This project builds a face recognition feature that takes as input the picture of someone and outputs the celebrity that looks the most like them.
It is based on the YouTube Faces with Keypoints Dataset from Kaggle.
The best way to run the app is to use the following Google Colab notebook: Celebrity Lookalike Colab Notebook
We suggest to choose a High-RAM runtime (otherwise the notebook will crash when building the vector embeddings) and a GPU to speed up the embedding computations.
You can also run the app using your local runtime by following the steps below:
- Clone the repository
- Install the requirements in requirements.txt
- Get your Kaggle API credentials: To use the Kaggle API, sign up for a Kaggle account at https://www.kaggle.com. Then go to the 'Account' tab of your user profile and select 'Create API Token'. This will trigger the download of
kaggle.json
, a file containing your API credentials - Place the
kaggle.json
file in the root of the repository - Download the Youtube Faces with Keypoints dataset by running the command
make dataset
- Build the ANN Index for the embeddings of all the faces in the dataset by running
python main.py
- Launch the app by running
streamlit run app.py