Link to Google Drive : https://drive.google.com/drive/folders/1UbfelXXSTd9ikeNDut49V7nfPONpTUc5?usp=drive_link
I could not upload files due to upload limit. Link to google drive for code and model : https://drive.google.com/drive/folders/1ZUqndWb1evjDuYN4jZgAoptWG1vdojQp?usp=drive_link
FIRST
I found a data set on kaggle with $ \approx $
For example :

The mask roughly covers half of the image and I t was the case for all other images too. So I thought of cropping the image in half and training the whole dataset.
Now for the validation part I needed masked faces, so I needed to make datasets which was hectic. So, I dropped this dataset.
But I think this will work if we provided masked faces provided mask covers half of the image from bottom.
SECOND
I downloaded a dataset from kaggle having $ \approx $
APPROACH TO THE PROBLEM
- I had unlabelled data-set so I needed to separate them into two folders. For that I took help from ChatGPT because I could not figure out myself. I got a code using which I got prompt for each image and separated them manually. The two folders are in folder named "dataset".
- Used image_height = image_width = 200
- Used VGG16 as base model(freezed) and added MaxPool then a 128 sized Dense layer with softmax activation. Then unfreezed the base model and fine-tuned the model
ROAD-BLOCKS FACED
- Un-labelled dataset : Labelled them manually using help from the Net.
- Got very less number of models : Used Data augmentation.
- Images were not of same size : Data processing ro resize them to
$200$ x$200$ pixels.
HOW TO RUN THE CODE
- Download the files in repository.
- There is a jupyter notebook named $ Use_trained_model.ipynb $.
- The model is already trained, you may train a new model or use pre-trained one.
- To use pre-trained model just replace $ base_path $ with the path of the folder where testing images are stored.
- Testing images along with predictions will be displayed.