Skip to content

zet-rutherford/arcface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Face recognition with ArcFace

Installation

Use your Python virtual environment such as virtualenv to isolate project.

virtualenv -p python3.7 face-recognition
source face-recognition/bin/activate

Then install all dependencies.

pip install -r requirements.txt

Note: GPU is not required to run this code, but model inference will be faster if you have one.

Model

Download checkpoint for a model from GoogleDrive/Baidu and move it to checkpoint/backbone_ir50_ms1m_epoch120.pth

Data

All datasets with faces must support ImageFolder format. Look at the prepared examples in data directory. For all subsequent commands use tags argument to select specific datasets in data directory.

Data preprocessing

To prepare data with cropped and aligned faces from your original images, run:

python face_alignment.py --tags actors actresses musk woman --crop_size 112

Note: crop_size argument must be either 112 or 224.

Similarity visualization

To visualize similarity between faces in table format, run:

python similarity.py --tags actors actresses musk woman

The result for each dataset will be saved in images directory.

t-SNE visualization

To use t-SNE for dimensionality reduction and 2D visualization of face embeddings, run:

python tsne.py --tags actors actresses musk woman

Results will be plotted in a separate window. You can enlarge the image to look at details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages