This repository provides implementations for multi-face tracking in TouchDesigner using two methods:
- YuNet: A deep learning-based face detection model.
- OpenCV Cascade Classifier: A traditional method using Haar cascades.
In the folder face_detection_yunet
, you will find the TouchDesigner implementation of YuNet.
- This example uses
op('VideoSource')
as the source for face detection. - To test with your own video, replace the file path in the operator.
- In
DAT script2_callbacks
, update the system path to theface_detection_yunet
folder on line 6. - Path format is
r"C:\....
for Windows.
- This implementation attempts to use CUDA if OpenCV DNN CUDA support is available.
- If CUDA is not found, it will automatically switch to CPU processing.
The folder OpenCV
contains an implementation using the Cascade Classifier from OpenCV in TouchDesigner.
- This example detects faces and applies a blur effect on them.
- TouchDesigner
- OpenCV with DNN module support (for YuNet)
- CUDA (optional, for hardware acceleration)
- Clone this repository:
git clone https://github.com/yourusername/TD-Multi-face-Tracking.git
- Install required Python packages:
pip install opencv-python opencv-python-headless
- Update system paths in the scripts as mentioned above.
- Open the corresponding TouchDesigner project file.
- Adjust video source paths as needed.
- Run the project and observe real-time face tracking.
This project is licensed under the MIT License.