Detect and recognize face in realtime.
Expect Python >= 3.10
- Install dependencies
pip install -r requirements.txt
- Prepare data
There are two options
- Manually creating
facebank
data as:
/facebank
├── /name1
│ ├── *.jpg
└── /name2
├── *.jpg
- Get faces from webcam by running:
python make_data.py
- Create
face embedding
& train a classifier
Create face embedding for each image in the dataset. Expect 1 face each images. Embedding from ArcFace
is a vector (1,512)
.
python make_identifier.py
- Inference
Run the following command for details information:
python main.py --help
-
-t
tag for task,img
for inference on image,vid
for inference on video. -
-p
path to the image file. -
-s
save the image/video after processing.
bash run_api.sh
- Build the container
bash build.sh
- Run the container
bash run.sh
- Run API
bash run_api.sh