CelebMax is a web application that allows users to upload a photo of themselves and receive personalized hairstyle recommendations based on celebrity lookalikes. Our system uses a trained AI model to compare the user’s image against a dataset of 25,000 celebrity images, selecting the top 5 matches. Users can then choose one of these celebrities and apply the celebrity’s hairstyle onto their own photo.
- Jacob Hoppenstedt
- Daniel Dovale
- Rohith Vellore
- Veeraj Reddy Talasani
-
Celebrity/Model Matching:
- Users upload a photo.
- The backend calls an AI model that searches through a dataset of 25,000 celebrity images.
- The system picks the top 5 most similar faces based on facial similarity.
-
Hairstyle & Outfit Recommendations:
- Once a celebrity match is selected, users receive hairstyle recommendations.
- Integration with HairFastGAN-AI allows users to overlay the celebrity’s hair onto their own image.
-
User Authentication:
- Secure signup and login functionalities with basic authentication.
-
Modular Architecture:
- A Go backend that handles API requests and user authentication.
- A Python-based microservice that performs AI model inference.
-
Docker Compose Integration:
- Use Docker Compose to build and run the entire stack with a single command.
-
Docker & Docker Compose:
Ensure you have Docker installed on your machine. Get Docker -
Go 1.19+
-
Python 3.8+ (handled via Docker in our setup)
-
Clone the Repository:
git clone https://github.com/jacobhoppenstedt/celebmax.git cd celebmax -
Install Go Dependencies:
go mod tidy
-
Configure Environment Variables: Create a .env file in the root of the project with the following content:
PYTHON_SERVICE_URL=http://localhost:5001The project requires several large external files (e.g., pre-trained model weights and parts of the 25,000 celebrity dataset). These files are not included in the repository to keep the repository lightweight.
Download the required files from our Google Drive folder.
After downloading, place the files into the python-service directory. The expected structure is:
celebmax/
├── python-service/
│ ├── Haircut/
│ │ └── (files related to HairFastGAN-AI or hairstyle processing)
│ ├── .gitattributes
│ ├── aws_credentials.py
│ ├── clustered_embeddings.npy
│ ├── Dockerfile
│ ├── kmeans_model.pkl
│ ├── main.py
│ ├── requirements.txt
│ └── tests3.py
├── backend/
└── docker-compose.yml- Obtain Fal.ai API key, create
API_KEY.pyfile and place insidepython-service/Haircutfolder. - Obtain AWS key and update values inside the
aws_credentials.py
A docker-compose.yml file is provided in the root of the project to orchestrate the Go backend and the python-service.
From the project root, run:
docker-compose up --buildThis command will build the images (if necessary) and start the services:
-
Backend (Go Server): Runs on port 8080.
-
Python-service: Runs on port 5001.
We welcome contributions! To contribute:
-
Fork the repository.
-
Create a new branch for your feature or bug fix.
-
Follow the coding standards and include tests for any new functionality.
-
Submit a pull request with a clear description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.