Note: If you're interested in using it, feel free to ⭐️ the repo so we know!
The data have been split into a test and training set. The training set contains ~1300 images and the test set contains 509 images. There are two types of images in this dataset, people or images with face masks and people or images without.
Your task is to provide the probability that an image contains at least one mask. For each unique image ID you should estimate the likelihood that the image contains at least one mask, with an estimated probability value between 0 and 1.
The dataset comprises of the following files:
Details about the dataset and challenge can be seen on Challenge page
Images in the dataset did not have fixed size therfore it was mandatory to resize them for training. Therefore after careful consideration and looking at memory constraints we decided to resize all the images to 256x256. Along with this Images were normalized before performing data augmentation.
The size of dataset is small so we needed to add more data for training and we used data augmentations. For Data Augmentation we performed:
- Rotation
- Zoom
- Shear
- Width Shift
- Heights Shift
For this Challenge we have used EfficientNet-B0 as it was lightweights as compared to its counterparts.
The architecture of EfficientNet-B0 is as follows:
Comparision of EfficientNet-B0 with other models with respect to Top1 Accuracy and Parameters
We had also tried other models but didn't perform better than EfficientNet-B0. Some of these models were:
- Inception-ResNet V2
- Xception
- VGG16
- Inception V3
The Pre-Trained models can be downloaded from google drive.
To get this repo work please install all the dependencies using the command below:
pip install -r requirments.txt
To start training run the Train.py script from the command below. For training configurations refer to the config.json file and to modify loss function and other similar parameters refer to Training File. You can update the file according to your training settings. Model avaible for training is EfficientNet-B0.
python Train.py
To test the trained models on Test Images you first have to download the weights. After downliading the weights you unzip them and then run the Inference by using the command below. For testing configurations please refer to the config.json file.
python Test.py
Results Reported on Private Leaderboard of Challenge
Model | Loss | Accuracy |
---|---|---|
EfficientNet-B0 | 0.0256 | 0.9920 |
EfficientNet-B0 is trained for this task and the model is evaluated on accurary and loss function used is Binary Cross Entropy.
Maintainer
Syed Nauyan Rashid (nauyan@hotmail.com)