The aim of this project is to construct a Convolutional Neural Network (CNN) model that is capable of accurately distinguishing between male and female categories, given an image of a human.
├───App
│ ├───static
│ │ └───faces
│ ├───templates
├───Code
├───Model
└───Pic
To prepare the images for classification, OpenCV (CV2) is utilized to crop faces from the images. The classification process is based on a simple CNN algorithm
- Training :47009
- Validation: 11649
Note : This set is splited to : 2,336 for testing and 9,313 for validation
- Samples:
- RandomFlip("horizontal")
- RandomRotation(0.1)
- RandomZoom(0.1)
- RandomBrightness(factor=0.2)
- RandomContrast(factor=0.2)
- LearningRateScheduler
- EarlyStopping (monitor='val_loss', patience=3)
- Adam : initial_lr = 0.0001, Drop = 0.1, Every 10 epochs
- loss : Categorical Cross Entropy
- metric : 'Accuracy'
- epochs : 19
- Tranining loss : 0.0904
- Training Acc : 0.9680
- Validation loss : 0.0802
- Validation lAcc : 0.9695
- Accuracy: 1.0
- Precision: 1.0
- Recall: 1.0
- F1-score: 1.0
- Confusion matrix: