| Crates.io | f-trak |
| lib.rs | f-trak |
| version | 0.2.0 |
| created_at | 2021-03-28 16:51:30.968417+00 |
| updated_at | 2023-09-23 23:23:15.581343+00 |
| description | A neural network based face detection program that tracks face movement in screen space. |
| homepage | https://github.com/Payne325/f-trak |
| repository | https://github.com/Payne325/f-trak |
| max_upload_size | |
| id | 374745 |
| size | 46,845 |
f-trak is a neural network based face detection program that tracks face movement in screen space. I originally built this as a cool means of controlling a player character in a POC game I made a while back called bongosero. So it's only intended purpose is to report a single bbox back representing the portion of a camera frame containing a face.
f-trak makes use of a pretrained face detection neural network and opencv's Deep Neural Network module to find a face in an image frame captured from a video device.
A prototype was written in python, based on an example by Dr. Adrian Rosebrock, which serves as the design for the current iteration. A sample of this code is provided in this repository.
f-trak is entirely dependent on the opencv-rust crate. Please follow the set up procedure in their documentation.
I found setting up for Linux a painless experience, but Windows is a tiny bit fiddly.
It's worth noting that when compiling for windows the following environment variables must be set.
OPENCV_DIR "$\opencvLocation\build\x64\vc15\lib"
OPENCV_INCLUDE_PATHS "$\opencvLocation\build\include"
OPENCV_LINK_PATHS "$\opencvLocation\build\x64\vc15\lib"
OPENCV_LINK_LIBS "opencv_world412"
Path "$\opencvLocation\build\x64\vc15\bin"
Other environment variables may be needed as the documentation describes.
You'll also need to install llvm, the opencv-rust crate readme documentation explains further.
f-trak is designed to be run on a separate thread and polled for the current location of a detected face. See the f-trak-test directory for an example application.