Skip to content

ni3choudhary/Bollywood-Celebrity-Look-Alike-App-Deployment

Repository files navigation

Bollywood-Celebrity-Look-Alike-App-Deployment

Kaggle Python 3.6

The demo will take an image and detects all faces in it. If a face is found then it will identify which celebrity looks the face most closely. The demo will display the resulting celebrity with his image and name along with the uploaded image.

Dataset

You can find the dataset here.

• This repository consists of files required for end to end implementation of Bollywood Celebrity Look Alike Machine Learning Web App created with Streamlit on Heroku platform.

setup

$ python3 -m venv env

Activate Virtual Environment

$ .env/bin/activate 
          OR
$ .\env\Scripts\activate

Install Libraries using below command

$ pip install -r requirements.txt

I have tried to add some more actors images into the original data. For this we need to run some python file to get those data into the format we want.

The Files explained

Use the files as following to create the demo from scratch or create your own demo in an adapted way.

1. First create a data folder and combine all the three dataset folder downloded from kaggle.

2. scraper.py to scrape for some more bollywood celebrity images which will give you a celebrity list pickle file.

3. data_downloader.py to download the images which are not present in kaggle dataset.

4. rename_files.py to rename the files in one format.

5. face_crop_mtcnn.py to only get the faces from the freshly downloaded images from data_downloader.py file.

6. actors_filenames_extractor.py to extract filenames from all the sub-directory present in data directory.

7. feature_extractor.py to create embeddings for all faces present in data directory.

  • Now run app.py on terminal to start local server.
$ streamlit run app.py

• Please do ⭐ the repository, if it helped you in anyway.