Mask-Wearing Classification using CNN and Transfer Learning

notion image

Mask-Wearing Classification using CNN and Transfer Learning

In our project, we took on the exciting challenge of classifying images based on mask-wearing scenarios. We built and trained a convolutional neural network (CNN) that showed impressive classification performance.

Dataset

📚 With around 5000 images divided into three classes - people with masks, people without masks, and a mix of masked and unmasked individuals - we dove into the classification task. Opting for a CNN architecture, we harnessed the power of convolutional layers to enhance model performance.

Models and Training

🧠 We trained two models: one utilizing transfer learning and another without. Given the limited dataset size, we implemented data augmentation techniques to expand our training data. For the non-transfer learning model, we explored both sequential and parallel convolutional approaches inspired by GoogLeNet. These models achieved scores between 0.6 and 0.7.
⚙️ We investigated various training strategies, including freezing different network layers and training the entire network from scratch. Surprisingly, training the entire network from scratch yielded the best outcome, with a test accuracy exceeding 93% on Kaggle. We employed adaptive learning rate and early stopping techniques to further refine the model.
 
/co

Results and Conclusion

Throughout our exploration, we conducted additional tests, such as freezing different layer subsets and exploring weight decay and optimization strategies. However, the model trained from scratch consistently outperformed other variations, showcasing the effectiveness of our approach. 💪🎉
In conclusion, our project demonstrated the successful classification of mask-wearing in images using CNN and transfer learning. This work contributes to the development of intelligent systems that can assist in mask detection and monitoring, enhancing safety and public health in various environments.
 
Read the code in my GitHub Read the full article with all the techinicalities
 
Built with Potion.so