Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/cyanosite/facial-attribute-recognition
- Owner: Cyanosite
- License: mit
- Created: 2024-02-28T21:41:15.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-15T17:49:20.000Z (6 months ago)
- Last Synced: 2024-10-11T18:56:56.408Z (about 1 month ago)
- Topics: celeba, celeba-dataset, computer-vision, facial-recognition, machine-learning, neural-network, transformer, transformer-architecture
- Language: Jupyter Notebook
- Homepage:
- Size: 27.4 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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]