https://github.com/ksachdeva/face-embeddings-generator
A simple tool to generate face embeddings using dlib and/or facenet networks
https://github.com/ksachdeva/face-embeddings-generator
computer-vision descriptors dlib embeddings face-detection face-recognition neural-network
Last synced: 7 months ago
JSON representation
A simple tool to generate face embeddings using dlib and/or facenet networks
- Host: GitHub
- URL: https://github.com/ksachdeva/face-embeddings-generator
- Owner: ksachdeva
- License: apache-2.0
- Created: 2018-07-08T21:11:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-25T14:13:16.000Z (over 7 years ago)
- Last Synced: 2025-05-08T23:02:40.053Z (10 months ago)
- Topics: computer-vision, descriptors, dlib, embeddings, face-detection, face-recognition, neural-network
- Language: Python
- Size: 25.7 MB
- Stars: 3
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Face embeddings generator
This is a set of scripts to generate a json file containing the embeddings (descriptors) using various neural networks.
## Setup / Install instructions
```bash
# create a python virtual environment
virtualenv -p python3 .env3
# activate the environment
source .env3/bin/activate
```
```bash
# install the required libraries
pip install -r requirements.txt
```
## Download LFW
You can download Labeled Faces in the Wild (LFW) database from here -
[http://vis-www.cs.umass.edu/lfw/](http://vis-www.cs.umass.edu/lfw/)
To use the FaceNet model for embedding generation, download the model here -
[https://drive.google.com/open?id=1EXPBSXwTaqrSC0OhUdXNmKSh9qJUQ55-](https://drive.google.com/open?id=1EXPBSXwTaqrSC0OhUdXNmKSh9qJUQ55-)
## Run it
You can see various options by issuing the following command
```bash
python main.py --help
```
You will see that there are options to specify various paths (lfw-dir, models-dir and out-dir) as well as
options related to number of classes to process etc
Here is an example command -
```bash
# This command will generate the embeddings for 20 classes where every class in LFW
# has *atleast* 10 images
python main.py dlib --lfw-dir /lfw --models-dir ./models --max-num-classes 20 --min-images-per-class 10 --out-dir
```