Make sure to have Python 3.9 and Node.js 18.0.0 installed
$ python3.9 -m venv venv
$ . venv/bin/activate
$ pip install -r requirements.txt
$ cd cnn_code
$ pip install -r requirements.txt
$ wget https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/static/gender.caffemodel
$ cd ..
Then, in one terminal:
$ cd server
$ flask run
…and in another:
$ cd frontend
$ npm install
$ npm start
- In one terminal, run
flask run
in theserver/
folder - In another terminal, run
npm install
and thennpm start
in thefrontend/
folder
pip install -r requirements.txt Download the gender.caffemodel in the link below and place in cnn_code directory
- https://pysource.com/2019/05/28/face-swapping-explained-in-8-steps-opencv-with-python/
- https://pypi.org/project/dlib/
- https://pytorch.org/tutorials/beginner/finetuning_torchvision_models_tutorial.html
- https://www.kaggle.com/datasets/dadajonjurakuziev/movieposter
- https://www.kaggle.com/datasets/xuejunz/film-posters-information
- https://www.kaggle.com/datasets/spiyer/old-film-restoration-dataset
- https://www.kaggle.com/datasets/cashutosh/gender-classification-dataset/code (could be used for training a model for sex classification)
- https://www.kaggle.com/gpiosenka/gender-classification-from-an-image (smaller sex data set, in repo currently)
- https://drive.google.com/drive/folders/1-0YhtXe_oE2ei0R471X33a_NJyY5dVge
- look into pretrained facial feature models
- guessing sex
- might need to train a secondary model
- start by not worrying about this, mismatches are ok
- instead get it working good first
- later add a second level of detection
- also don’t worry about glasses too much
- focus on blending well with skin instead (/ “does it look like it’s the actual person’s face”)
- worth a try with skin tone
- TA will look into preexisting models
- facial expression / emotion may impact results
- consider finetuning pre-existing models
- take an existing model and then add a few layers onto the end of it, highly specialized to their dataset
- train the new layers using a small dataset
- start w/ pytorch tutorials (which go step by step through this process)
- https://pytorch.org/tutorials/beginner/finetuning_torchvision_models_tutorial.html
- consider finetuning pre-existing models
- do not worry if it doesn’t work, we’re supposed to explore / do something cool
- more important: did we put time/effort in?
- did we try different things?
- writeup is very important