Skip to content

πŸ”— Code Repository β€” COMSYS Hackathon-5 (2025), Team: The Attention Seekers

Notifications You must be signed in to change notification settings

SannidhyaDas/COMSYS-5

Β 
Β 

Repository files navigation

Team Name: The Attention Seekers (Soham Chaudhuri & Sannidhya Das)

πŸ§ͺ Face Analysis Evaluation Scripts

This repository provides scoring scripts for:

  • βœ… Task A: Gender Classification
  • βœ… Task B: Face Recognition (Binary Verification)

πŸ”§ Setup

Install required libraries:

pip install -r requirements.txt

Required config files:

Download Face Embeddings from Google Drive

Download Gender model weights from Google Drive

Download ArcFace model weights from Google Drive

🧠 Task A – Gender Classification

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.

Model Architecture

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.

πŸ“ Test Folder Structure


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.pt

Results

Task A Training Result Task A Validation Result

🧠 Task B – Face Recognition

We used a retriever model based on ArcFace Face Embeddings and vectorDB ChromaDB to make the Face Recognition model.

Model Architecture

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.

πŸ“ Test Folder Structure

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.json

Results

Task B Training Result Task B Validation Result

Here, 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

About

πŸ”— Code Repository β€” COMSYS Hackathon-5 (2025), Team: The Attention Seekers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.6%
  • Python 0.4%