Back

Face-mask detection demo using Computer-vision techniques

Authored by: Tech Team
29 September 2020

The UK Government is urging people to wear masks in public places to help combat Covid-19, which has proven to be an effective method in controlling the spread of coronavirus.

A major challenge is the enforcement and detection of non-compliance across the country. Traditionally this would have been performed by enforcement officers being in the right place at the right time. This is where an AI-based approach truly shines.

There are already many organisations that already provide AI-based solutions, these can be seen in various places across the UK, such as number plate recognition in a carpark, or more relevant today is temperature checking and face-mask detection in UK universities.

Here at Reinvent Systems, we decided to experiment using machine learning and computer vision techniques to build a Face-mask detection model. The aim was to identify the process and effort required to achieve a good standard of prediction accuracy.

Our Approach

We used a YOLO (You Only Look Once) model with CSPDarket-53 backbone. The model accepts image data as its input and the output would apply bounding boxes to classify (mask or no mask) with a confidence score.

The training dataset consisted of 4000 frames, some of the data was freely available on the internet but the remainder would have to be produced in-house.

We trained a second model which detects facial keypoints, the purpose would be to identify the position of the eyes, nose, mouth and other key features which would help us identify the shape of the face.

We then artificially placed a mask on the face using the facial keypoints, which provided the necessary frames of data.

This video from HM Government provided a suitable test for our proof of concept model.

Contact us

We would love to have a call, email or meet to discuss your requirements.

  • Call us: +44 0800 048 8671
  • Email us: info@reinventsystems.com

Thank you

Someone from our team will be in touch shortly.

By sending this message, I consent to having Reinvent Systems collect and process my personal details.