This is an implementation of https://colab.research.google.com/drive/1H-AJX_URzN1fJn1Vhjh1_ehwc5Ih7eTe?usp=sharing (Google CoLab) on a local machine. If you have a machine with GPU, let's run the code on your machine.
$ conda env create -f environment.yaml
- dataset/imgs/*.png
- model/face-reader-soccer.h5 # trained model for this face reader
- model/model.tflite # pretrained model for ArcFace
- test_images/nn.jpg # images for testing face reader
Files can be downloaded from https://drive.google.com/drive/folders/1nVU7dO_3X_mwLoQ11hVR6jZ7zPmaoNIi?usp=share_link
dataset/imgs.zip
must be unzip before using it.model/model.tflite
: When an object of ArcFace class is instantiated, this model is supposed to be downloaded. Yet, I see time-out errors before the download ends. I manually downloaded this pretrained model file and the model path must be specified when ArcFace class is instantiated.
...
# python code example
face_rec = ArcFace.ArcFace(model_path='model/model.tflite')
...
- Activate
face-reader-soccer
conda environment.
$ conda activate face-reader-soccer
- Run
face-reader-soccer.py
(face-reader-soccer) $ python face-reader-soccer.py
- You will see who is the most likely best soccer player among guys in the
test_images
directory.