Gender Classifier is python program which shows the functionality of a deep learning convolutional neural network that classifies between male and females.
- Programming Language: Python
- GUI Framework: Tkinter
- Deep Learning: CNNs
-
The model was trained on a data set which was a combination between alot of other datasets on the internet, The dataset included :
- 5000 Male Faces.
- 5000 Female Faces.
-
A link to the dataset will be uploaded soon.
The model consisted of 7 layers:
- Layer 1 - Convolution-Normalizing-MaxPooling - Dropout 0.25
- Layer 2 - Convolution-Convolution-Normalizing-MaxPooling - Dropout 0.25
- Layer 3 - Convolution-Convolution-Normalizing-MaxPooling - Dropout 0.25
- Layer 4 - Convolution-Convolution-Normalizing-MaxPooling - Dropout 0.25
- Layer 5 - Flattening
- Layer 6 - FCC Input Layer - Dropout 0.5
- Layer 7 - FCC Output Layer - Activation Softmax
The model was trained for 200 epochs with 32 batches and got the following results:
- 97% Training Accuracy
- 93% Testing Accuracy
To run the python application you need to install the requirements (It is preffered to start a new environment and install all the requirements) using the following command
pip install -r requirements.txt
Browse and select any image, The program will automatically detect the faces and each face will passed to the pre-trained model for classification.
The output will be automatically displayed and also saved as output.jpg in the program directory.
Instead of using an image, If you have a camera in your PC/Laptop, you can press "Use Live Camera" to get the classification done on the camera input.
Each frame will be passed to the model for classification and the output will be automatically shown.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.