https://github.com/fyt3rp4til/gendervision-classifier
https://github.com/fyt3rp4til/gendervision-classifier
eigenfaces flask jinja2 pca-analysis svm
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/fyt3rp4til/gendervision-classifier
- Owner: FYT3RP4TIL
- Created: 2024-07-05T17:22:04.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-08T09:46:53.000Z (almost 2 years ago)
- Last Synced: 2025-03-04T02:42:00.126Z (over 1 year ago)
- Topics: eigenfaces, flask, jinja2, pca-analysis, svm
- Language: HTML
- Homepage:
- Size: 24.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Face Recognition Web App with Machine Learning & Flask

## :bulb: Objective :
Face recognition is a powerful technology used in various applications. This project will guide you through developing and deploying a face recognition web app using machine learning and Flask. The project will cover everything from image processing to creating a web server gateway interface.
## Project Outline :
1. **Image Processing with OpenCV**
2. **Image Data Preprocessing**
3. **Image Data Analysis (EDA)**
4. **Eigenfaces with PCA**
5. **Face Recognition Classification Model with Support Vector Machines**
6. **Pipeline Model**
7. **Flask (Jinja Template, HTML, CSS, HTTP Methods)**
Finally, we will integrate all these components to build a fully functional face recognition web app.
## πΒ Getting Started
### 1. Clone the Repository
```bash
git clone https://github.com/yourusername/face-recognition-web-app.git
cd FaceRecognition-GenderApp-Flask
```
### 2. Create a Virtual Environment
```bash
python -m venv venv
```
### 3. Activate the Virtual Environment
- On Windows:
```bash
venv\Scripts\activate
```
- On macOS and Linux:
```bash
source venv/bin/activate
```
### 4. Install Dependencies
```bash
pip install -r requirements.txt
```
### 5. Run the App
```bash
python main.py
```
Open your web browser and go to http://127.0.0.1:5000/ to see the app in action.
## Project Structure :
```yml
flaskApp/
βββ templates/
β βββ index.html
βββ static/
β βββ images/
β βββ predict/
β βββ upload/
βββ model/
β βββ model.xml
β βββ model.pickle
βββ app/
β βββ views.py
β βββ face_recognition.py
βββ main.py
βββ requirements.txt
βββ Procfile
βββ Aptfile
```
## Step-by-Step Guide
### 1. Image Processing with OpenCV
- **Load images using OpenCV.**
- **Convert images to grayscale.**
- **Resize images for uniformity.**
### 2. Image Data Preprocessing
- **Normalize image data.**
- **Flatten images for PCA.**
### 3. Image Data Analysis (EDA)
- **Visualize image data.**
- **Plot sample images.**
### 4. Eigenfaces with PCA
- **Compute Eigenfaces using PCA.**
- **Reduce dimensionality of the image data.**
### 5. Face Recognition Classification Model with SVM
- **Train SVM model using Eigenfaces.**
- **Evaluate model performance.**
### 6. Pipeline Model
- **Create a pipeline for preprocessing and classification.**
- **Save the model for deployment.**
### 7. Flask Web App
- **Create a Flask app.**
- **Render HTML templates with Jinja.**
- **Handle HTTP methods for image upload and processing.**
For Image Processing, EDA, PCA, Model Code go through [here](https://github.com/FYT3RP4TIL/ImageProcessing_EDA_SVM-Model)
## :key: Results
https://github.com/FYT3RP4TIL/FaceRecognition-GenderApp-Flask/assets/113416452/efe1b395-6298-474f-aee2-9e7c7a200bf6


