DeGirum Face Tracking Application Package
Project description
Face Tracking Demo
Demonstrates the following technologies:
- Face Detection in a video stream. Yolo models from DeGirum zoo are used.
- Creating face embeddings by DeepFace
- Saving face metadata, including embeddings, in a vector database (LanceDB)
- Recognition of detected faces, using saved faces metadata.
Used as a mock-up for development of hybrid deployment of a vector db.
1. Installation
Create a new conda environment:
conda env create -f environment.yml
Activate it:
conda activate dg_face_tracking
Create a database folder:
mkdir db
Change the cuurent directory to src:
cd src
Open env.ini file and fill the DEGIRUM_CLOUD_TOKEN field with a valid DeGirum cloud platform API access token.
2. Running
A laptop with an enabled camera must be used.
Start the labelling app:
python DataFaceApp.py
Start the face tracking app:
python DataFace.py face_tracker_camera
Faces will be detected and recognized in camera's stream, then displayed in app window. The identification results will be displayed above each face.
If a new person is detected, his/her face will appear with "unknown" label in the labelling app.
The operator must enter person's name and press OK button.
The system may also ask for operator's confirmation for such faces, that were recognized with a low confidence. In this case, the operator may perform one of the following:
- skip this face image by pressing Skip button;
- confirm recognition results by pressing OK button;
- override recognition results by entering the correct name.
Press OK button to finalize keying.
Ctrl+C stops the app.
3. Creating a dataset.
- Edit the
face_tracker_camera.cfg
config file by adding
[${data_source.id}, ${dataset_writer}]
line in data_connections
section.
- In
dataset
section ofLocalDBWriter.cfg
config file:
- Set the valid paths for catalogue (
catalogue_path
) and the datasets path (datasets_path
); - Set dataset name
dataset_name
- If you want to overwrite the existing dataset, set
write_mode
as "overwrite"
Run the application.
To stop data collection, press Ctrl+C
4. Running on a dataset
python DataFace.py face_tracker_dataset
dataset
section of FaceTrackerDataset.cfg
must contain the valid parameters of the dataset to be used:
- Set the valid paths for catalogue (
catalogue_path
) and the datasets path (datasets_path
); - Set the dataset name (
dataset_name
)
Run the application.
To stop running, press Ctrl+C
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file dg_face_tracking-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: dg_face_tracking-0.0.2-py3-none-any.whl
- Upload date:
- Size: 124.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85c3b9a55b8b1828f0692aaa7b632367acf9fd4632392d40947d961a1da21ae3 |
|
MD5 | ae6439c9c6087e1dbbd15388b9c274c9 |
|
BLAKE2b-256 | 3b22caa9a3337034d05f278ceac8797cf11b69fac40a17eda3c9f41a1eda7479 |