You'll need a unix terminal to execute the necessary commands. MacOS and Linux have this by default, typically called "terminal". If you're using Windows, install git bash.
This project utilizes make to simplify the setup and execution of our project. MacOS and Linux distros typically come with this preinstalled, but Windows does not. The following section details how to install make on each OS, in the event that it isn't installed.
To check whether you already have make installed, run the following command in a terminal:
make --versionIf this runs without error, skip past this section. If you receive an error, install make using the steps below:
-
Click the following link, which downloads make from GnuWin32
-
Run the downloaded .exe, following the installation prompts. Make sure to leave the default install paths.
-
Go to Windows search and access "Edit the system environment variables".
-
Select "Environment Variables"
-
Edit Path
-
Add the following path
-
Install homebrew by running the following command in terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Install make by running the following command in terminal:
brew install make
-
Run the following command in terminal
sudo apt update && sudo apt install -y make
-
Run the following command in terminal
sudo pacman -Su make
Assuming you already have Python installed, this covers all requirements for the project.
cmake is not standard on Unix systems, so we'll need to install it for MacOS, Linux, and Windows.
-
Open git bash and run the following command (This assumes you're on Windows 10 or later):
winget install cmake
-
If you haven't already, install homebrew by running the following command in terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Install cmake by running the following command in terminal:
brew install cmake
-
Run the following command in terminal
sudo apt update && sudo apt install cmake
-
Run the following command in terminal
sudo pacman -Su cmake
-
(OPTIONAL) Create and activate a virtual environment in "./duck_typing" to contain the necessary Python libraries.
- MacOS or Linux
python3 -m venv .venv source .venv/bin/activate- Windows:
python -m venv .venv source .venv/Scripts/activate -
Open a terminal directed at "./duck_typing"
-
Run the following command:
make init
This installs the necessary Python libraries and remote files for project functionality.
Running the project requires a single command:
make runRead the following section for information on how to use the running application.
After executing make run for the first time, your webcam will turn on, and a calibration window will appear. In the calibration window:
-
Turn your head to look at the green dot on-screen. Hold this position for two seconds.
-
Press the spacebar (the green dot will reappear in a new location)
-
Repeat steps 1 through 2 until the calibration window closes
Now, the primary window will open. After a brief animation, two turtles appear on-screen.
-
Turn your head to look at a specific turtle (the fill color should turn white)
- This indicates which turtle you currently control
-
Use the arrow keys on your keyboard to control the turtle, moving your head with the turtle
- Up
$\rightarrow$ Forward - Down
$\rightarrow$ Backward - Left
$\rightarrow$ Turn Left - Right
$\rightarrow$ Turn Right
- Up
-
At some point, switch your gaze to the opposite turtle, and use the same controls to move it as desired
Once you've finished having the time of your life controlling these turtles, close the program by pressing the ESCAPE key.
Thank you for viewing our project. The following table lists member contributions:
| Member | Section |
|---|---|
| Robert Horvath | Gaze Detection |
| John Lyle | Agent Selection |
| Linus Kim | Control of Agents |
| Quinn Farquharson | Visualization and Interfaces |
Libraries used (per file):
File Structure:
./
├── _assets/
│ ├── calibration_files/ # Cached calibration files
│ ├── dlib_typing.py # Custom typing for dlib library
│ └── shape_predictor.dat # Pre-trained Predictor
├── engine/
│ ├── agent_controller.py # Logic for controlling agents
│ ├── agent_selection.py # Logic for selecting agents
│ ├── agent_state.py # State variable for agents
│ └── gaze_detection.py # Logic for deriving gaze from webcam
├── _ico/
│ ├── cb.png # Unchecked checkbox image
│ └── c.png # Checked checkbox image
├── .gitignore
├── main.py
├── makefile
├── README.md
└── requirements.txt # Python library requirements

