Code Monkey home page Code Monkey logo

face-mask-detection's Introduction

Face-Mask-Detection

Face Mask Detection From Images Using Mobilenet

This project is aimed to develop an application that can detect whether a person is wearing a face mask or not.

Introduction

The objective of this project is to develop a face mask detection system using convolutional neural networks (CNNs). Face masks are worn by people to protect themselves and others from the transmission of respiratory infections. However, the use of face masks has been shown to vary widely in different settings. In some cases, face masks are not used at all, while in others, they are used inconsistently. This can lead to a lack of protection against respiratory infections.

Dataset

The dataset used to train the face mask detection system is the "FaceMask Dataset Covid-19(10k Images 2 Folders)" dataset from Kaggle (https://www.kaggle.com/datasets/muhammadahsan026/facemask-dataset-covid1910k-images-2-folders). The dataset consists of 10K images of faces, with and without masks.

Methodology

The face mask detection system was developed using convolutional neural networks (CNNs). CNNs are a type of artificial neural network that are well-suited for image classification tasks. The system was trained on a dataset of images of people wearing face masks in different settings. The system was then tested on a separate dataset of images to evaluate its performance. In this project, I have implemented a Mobilenet convolutional neural network that takes an image of a person's face and predicts whether the person is wearing a mask or not.

The input image is a color image with dimensions of 100x100x3. The output of the neural network is a prediction probability.

In this i used a Mobilenet Neural Netowork without pretraining weights. The first 11 layers are depthwise separable convolutional layers with 3x3 kernels. The final layer is a 1x1 convolutional layer with a sigmoid activation.

Dataset Preprocessing

The first step in any machine learning project is to preprocess the data. This dataset is already in a good format for training a CNN. However, there are a few steps that will be taken to improve the results.

  • Rescale Image
  • Resizing images into 100*100
  • Prepare Train and Validation set

Training Convolutional neural network

There are many ways to train a convolution neural network. One common method is to use a training set and a validation set. The training set is used to train the network, and the validation set is used to evaluate the performance of the network.

The project is developed using the following tools and libraries:

  • TensorFlow 2.0
  • Keras
  • NumPy
  • Opendatasets
  • Pillow
  • Gradio
  • matplotlib

Gradio Deployed Model Screenshot

face-mask-detection's People

Contributors

omjiverma avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.