The demo detects people in front of the webcam and changes them into Santa Claus (the biggest face) and reindeer (all other faces). The name of the reindeer depends on the face expression (emotion).
Here are the steps involved in this demo:
Step 1: Install Python and prerequisites
Step 2: Set up the environment
Step 3: Run the Application
Now, let's dive into the steps starting with installing Python.
Star the repository (optional, but recommended :))
This project requires Python 3.10-3.12 and a few libraries. If you don't have Python installed on your machine, go to https://www.python.org/downloads/ and download the latest version for your operating system. Follow the prompts to install Python, making sure to check the option to add Python to your PATH environment variable.
Install libraries and tools:
sudo apt install git python3-venv python3-dev
NOTE: If you are using Windows, you may need to install Microsoft Visual C++ Redistributable also.
- Clone the Repository
To clone the repository, run the following command:
git clone https://github.com/openvinotoolkit/openvino_build_deploy.git
The above will clone the repository into a directory named "openvino_build_deploy" in the current directory. Then, navigate into the directory using the following command:
cd openvino_build_deploy/demos/santa_claus_demo
- Create a virtual environment
To create a virtual environment, open your terminal or command prompt and navigate to the directory where you want to create the environment. Then, run the following command:
python3 -m venv venv
This will create a new virtual environment named "venv" in the current directory.
- Activate the environment
Activate the virtual environment using the following command:
source venv/bin/activate # For Unix-based operating system such as Linux or macOS
NOTE: If you are using Windows, use venv\Scripts\activate
command instead.
This will activate the virtual environment and change your shell's prompt to indicate that you are now working within that environment.
- Install the Packages
To install the required packages, run the following commands:
python -m pip install --upgrade pip
pip install -r requirements.txt
To run the application, use the following command:
python main.py --stream 0
To change the models, precision or device use:
python main.py --stream 0 --device AUTO --detection_model_name face-detection-adas-0001 --landmarks_model_name landmarks-regression-retail-0009 --emotions_model_name emotions-recognition-retail-0003 --model_precision FP16-INT8
Run the following to see all available options.
python main.py --help