The keras model is created by training SmallerVGGNet from scratch on around 2200 face images (~1100 for each class). Face region is cropped by applying face detection using cvlib on the images gathered from Google Images. It acheived around 96% training accuracy and ~90% validation accuracy. (20% of the dataset is used for validation)
- Tensorflow
- Keras
- Flask
- OpenCV
- Run the file Gender Detection.exe
-
cd Gender-Paint
-
pip3 install -r requirements.txt
(only for the first time) thenpython3 app.py
-
Add or Edit the routes and functions in the file app.py
- Locally, eg: http://localhost:3434/status
- With LIVE Heroku Server, eg: https://genderpaintapi.herokuapp.com/status
- Test the API with POSTMAN.
Example input for POST:
- Set the URL TO
https://genderpaintapi.herokuapp.com//upload
INPUT:
{
"base64":"Add Your Base64 string here"
}