Age and Gender prediction is a simple flask application which can be used to recognize the Gender of the human being present in an image as well as his/her age.
-
You can see the code for training the model in this notebook.
-
Before running the code for training the model, you need to have the dataset downloaded and placed inside the training folder.
You can download the dataset from Kaggle present here. -
This repository also consists of already trained weights for this model which you can find here.
- Get the source code on your pc via git.
git clone https://github.com/muskanmi/Age-and-Gender-Prediction.git
- Create a virtual environment to install the required dependencies of the application.
virtualenv venv
- Activate the virtual environment (You have to activate it every time you are working on project).
For mac users:
source venv/bin/activate
For windows users:
.\venv\Scripts\activate
For Linux users:
source venv/bin/activate
- Now, install python dependencies.
pip install -r requirements.txt
-
Now, navigate to the src directory (containing the app.py file).
-
Run following command:
python app.py
- Application is ready for use. You can run it at http://localhost:80/.