This repository provides scoring scripts for:
- β Task A: Gender Classification
- β Task B: Face Recognition (Binary Verification)
Install required libraries:
pip install -r requirements.txtRequired config files:
Download Face Embeddings from Google Drive
Download Gender model weights from Google Drive
Download ArcFace model weights from Google Drive
We used the CLIP (Contrastive Language-Image Pretraining) ViT-B/32 model to extract image features then apply an MLP head to classify the gender of the person in the images.
We have provided our training jupyter notebook clip-genderclassification.ipynb which has the validation result and the training result is provided in the taska-scoregenerator.ipynb.
We have also made a separate score_task_a.py which can be used a tool to classify images. To classify images using the scorer file a sample Test folder structure is given below and also in the repo.
val_task_a/
βββ male/
β βββ img1.jpg
β βββ img2.jpg
β βββ ...
βββ female/
β βββ img1.jpg
β βββ img2.jpg
β βββ ...
After having the above folder structure download the model_weights.pt from gdrive and use the below command line prompt to run the scorer.
python score_task_a.py --val_path ./val_task_a --weights_path ./saved_model/model_weights.ptWe used a retriever model based on ArcFace Face Embeddings and vectorDB ChromaDB to make the Face Recognition model.
We have also provided with model development jupyter notebook task_B_dev.ipynb. We have used the ArcFace model through the DeepFace package's interface and stored all the face embeddings in ChromaDB with labels as metadata.
We have provided the faces_collection.json in gdrive which has the embeddings collection. score_task_b.py can be used to do face recognition based on FaceCOM dataset.
val_task_b/
βββ Person_A/
β βββ img.jpg
β βββ distortion/
β βββ distorted_1.jpg
βββ Person_B/
β βββ ...
python score_task_b.py --val_path ./val_task_b --collection faces_collection.jsonHere, the recognized stands for the images that are from the FaceCOM dataset and not_recognized for the images not present in FaceCOM. Results where generated for 1000 images on the training and validation set respectively.
For a detailed System Description see : System Description





