This project is a web-based application that utilizes machine learning to detect and classify celebrity faces in images. Users can upload images, and the application will identify the celebrities present, displaying their names and confidence scores. The system is capable of handling multiple faces in a single image, showing separate results for each detected face.
- client/: Contains the frontend code, including HTML, CSS, and JavaScript files, responsible for the user interface.
- model/: Includes the machine learning model and associated scripts for face detection and classification.
- server/: Contains the backend code powered by Flask, which handles API requests and serves the classification model.
- requirements.txt: Lists all Python dependencies required to run the project.
- Procfile: Used for deploying the application on platforms like Heroku.
git clone <repository_url>cd Celebrity-face-detectionpip install -r requirements.txtpython server/server.pyThis will start the Flask backend server that serves the machine learning model.
If the client is a static site, you can serve it using a simple HTTP server:
cd client
python -m http.serverOnce both the server and client are running, you can access the application in your browser at http://localhost:5000 or the specified port.
The project utilizes a machine learning model that performs face detection and celebrity classification. The model has been trained on a dataset of celebrity images and can recognize multiple faces in a single image, returning the names of the detected celebrities along with confidence scores.
The project is designed to be easily deployed on platforms like Heroku. The Procfile contains the necessary commands to run the application on Heroku.
-
Create a Heroku app:
heroku create your-app-name
-
Push the code to Heroku:
git push heroku main
-
Scale the web process:
heroku ps:scale web=1
-
Open the application:
heroku open
-
Upload Interface:
Description: This is where users can drag and drop images for classification. -
Single Celebrity Detected:
Description: The application detects and classifies a single celebrity in the uploaded image. -
Multiple Celebrities Detected:
Description: When multiple celebrities are detected, the application displays results for each detected face.
This project is licensed under the MIT License. See the LICENSE file for more details.
- Thanks to Google
- Special thanks to the developers of the libraries and tools that made this project possible.
- Special thanks to Codebasics for helpful tutorials