Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cyanosite/facial-attribute-recognition

Facial Attribute Recognition using the Transformer architecture, 91% on CelebA
https://github.com/cyanosite/facial-attribute-recognition

celeba celeba-dataset computer-vision facial-recognition machine-learning neural-network transformer transformer-architecture

Last synced: 9 days ago
JSON representation

Facial Attribute Recognition using the Transformer architecture, 91% on CelebA

Awesome Lists containing this project

README

        

# Facial-Attribute-Recognition

[PDF](paper.pdf)

## Project Overview

This project aims to recognize various facial attributes in images. This is achieved by using the Transformer architecture, a model architecture that uses self-attention mechanisms and has been successful in various tasks in the field of natural language processing.

My model is built upon the EfficientFormerV2 transformer backbone, a creation of Snap Inc., Northeastern University, and UC Berkeley. More details can be found [here](https://github.com/snap-research/EfficientFormer).

## Results

The current iteration of the model achieves 91% accuracy on the CelebA dataset.
It uses 15.6M parameters and with an inference latency of 1.18ms on an iPhone 14 Pro Max it is well suited of real-time facial attribute classification.

Below are comparisons of our model with other state-of-the-art models. The baseline is established by predicting attributes on the test dataset based on the attribute distribution in the training dataset. If an attribute probability is below 0.5, it is subtracted from 1.
![Comparison of results with other models in a Radar Plot](images/radarplot.png)
![Comparison of results with other models in a Bar Chart](images/barchart.png)

## Installation and Setup

1. Clone the repository: `git clone https://github.com/Cyanosite/Intel-Image-Classification.git`
2. Navigate into the project directory: `cd Facial-Attribute-Recognition`
3. (Optional) Create a virtual environtment and select it: `python -m venv .venv`
4. Install the required dependencies: `pip install -r requirements.txt`
5. Execute the `solution.ipynb` notebook to train the model, evaluate its performance, and reproduce the results.
6. If you get the error `FileURLRetrievalError: Too many users have viewed or downloaded this file recently.` then download the dataset manually and put it under `./model/data/celeba`.

## Contact

Zsombor Szenyán - [email protected]