Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arsath-eng/face_classification
a deep learning project that uses ResNet and Inception architectures to classify real vs AI-generated face images. The project includes two models trained on a custom dataset, achieving validation accuracies of 52.45% (ResNet) and 52.94% (Inception). Built with TensorFlow and Flask, and a web interface for real time face classification
https://github.com/arsath-eng/face_classification
ai-detection computer-vision deep-learning face-detection flask image-classification machine-learning tensorflow
Last synced: 4 days ago
JSON representation
a deep learning project that uses ResNet and Inception architectures to classify real vs AI-generated face images. The project includes two models trained on a custom dataset, achieving validation accuracies of 52.45% (ResNet) and 52.94% (Inception). Built with TensorFlow and Flask, and a web interface for real time face classification
- Host: GitHub
- URL: https://github.com/arsath-eng/face_classification
- Owner: arsath-eng
- License: mit
- Created: 2024-07-13T22:17:51.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-29T11:11:11.000Z (18 days ago)
- Last Synced: 2024-10-29T13:12:11.170Z (18 days ago)
- Topics: ai-detection, computer-vision, deep-learning, face-detection, flask, image-classification, machine-learning, tensorflow
- Language: Jupyter Notebook
- Homepage: https://huggingface.co/spaces/arsath-sm/face_classification
- Size: 1.23 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Face Classification Project 🎭
[![Python](https://img.shields.io/badge/Python-3.9-blue.svg)](https://www.python.org)
[![Flask](https://img.shields.io/badge/Flask-2.1.0-green.svg)](https://flask.palletsprojects.com/)
[![TensorFlow](https://img.shields.io/badge/TensorFlow-latest-orange.svg)](https://tensorflow.org)
[![HuggingFace](https://img.shields.io/badge/🤗%20HuggingFace-Spaces-yellow.svg)](https://huggingface.co/spaces/arsath-sm/face_classification)A deep learning project for detecting and classifying real and artificially generated face images using ResNet and Inception architectures. 👤✨
## 📋 Table of Contents
- [Overview](#overview)
- [Model Architecture](#model-architecture)
- [Performance](#performance)
- [Installation](#installation)
- [Usage](#usage)
- [Model Links](#model-links)
- [Future Improvements](#future-improvements)## 🔍 Overview
This project implements two deep learning models to classify images as either real or AI-generated faces:
- **Model 1**: ResNet-based architecture with residual connections
- **Model 2**: Inception-style network with multi-scale feature processing## 🏗️ Model Architecture
### ResNet Model (Model 1)
- Deep CNN with residual connections
- Handles vanishing gradient problem
- Effective for complex feature learning
- Multiple residual blocks with increasing filter sizes
- Dropout layers for regularization### Inception Model (Model 2)
- Multi-scale feature processing
- Efficient computational design
- Parallel convolutional paths
- Adaptive to varying face sizes and orientations
- Better generalization capabilities## 📊 Performance
| Model | Validation Accuracy | Validation Loss |
|-------|-------------------|----------------|
| ResNet | 52.45% | 0.7246 |
| Inception | 52.94% | 0.6913 |
## 🚀 Installation### 1. Set up Conda Environment
```bash
# Create new environment
conda create -p face python=3.9# Activate environment
conda activate face# Install requirements
pip install -r requirements.txt
```### 2. Requirements
Create a `requirements.txt` file with:
```
Flask==2.1.0
tensorflow
numpy
opencv-python
pillow
```## 💻 Usage
### Running the Flask App
```bash
python app.py
```
Visit `http://localhost:5000` in your web browser to access the application.## 🔗 Model Links
- [Model 1 on HuggingFace](https://huggingface.co/arsath-sm/face_classification_model1/tree/main)
- [Model 2 on HuggingFace](https://huggingface.co/arsath-sm/face_classification_model2/tree/main)
- [Demo Application](https://huggingface.co/spaces/arsath-sm/face_classification)
- [Flask Application Source](https://github.com/arsath-eng/face_classification.git)## 🔄 Future Improvements
1. 📈 Data Quality
- Investigate dataset biases
- Enhance data diversity2. 🔧 Model Architecture
- Experiment with hybrid models
- Implement transfer learning
- Test ensemble methods3. ⚡ Performance
- Extended training periods
- Hyperparameter optimization
- Advanced data augmentation techniques## 🔗 Dataset
- [dataset about real-fake human face classification](https://drive.google.com/file/d/16y2xEwwuf1v_W0BUDv1thzpNu_dnaJZ1/view?usp=sharing)## 👥 Contributors
- Arsath S.M
- Faahiht K.R.M
- Arafath M.S.M## 📄 License
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
This project is licensed under the [MIT License](LICENSE) - see the [LICENSE](LICENSE) file for details.
---
Made with ❤️ at University of Jaffna Faculty of Engineering