Skip to content

Camerona, face detection and feature classification

Notifications You must be signed in to change notification settings

benjamin32561/Camerona

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Couldnt import the git lab repo so I copied all the files into here... link to the git lab repo https://gitlab.com/benjamin32561/camerona.git

Camerona

Camerona - A combination of the words 'camera' and 'corona', this tool may help with the enforcement of wearing masks during covid-19

Quick explanation

The idea of the project is to find people who doesnt wear mask in a photo, extract data about them and then ask them to wear a mask based on the data found about each person.

Models

Me and my partner built and trained our model by ourselves using tensorflow and data we found online. we built 4 models: First model is being used to determine if the person is wearing a mask (Binary classification). Second model is predicting the gender of a person (Binary classification). Third model is predicting if the person has a beard (Binary classification). Fourth model is predicting if the person has sunglass, regular glasses or non at all (multi-class classification).

We also tried to build and train our own SSD model for face detection but failed.

Models architectures

Mask, Gender and beard architecture Mask, Gender and beard architecture

Glass classifier architecture Glass classifier architecture last layer is 1x3 not 1x1!!!

As you can see the model are fairly simple, They have to be simple in order to avoid overfitting of the training data.

Training

The training took some time, I used Weights & Biases to track the training of each model.

You can see the training graphs in each of the models trainging folder:

Mask graph

Gender graph

Beard graph

Glass graph

Dataset

Because we built the dataset by ourselves we needed some tools, in the Dataset tools you can find the tools I wrote and used during the project, I will add links to the datasets we build in the future.

Model optimizations

After we trained the models we wanted the program to run faster, We decided to make them better by using tensorflow lite.

The optimization came out very good, you can see the performence improvement in this excel file

You can also see the difference by running the 2 different main.py codes, the tf lite is placed in tf-lite/main.py and the tensorflow is placed in keras/main.py.

Main files

keras/main.py is using tensorflow models to make prediction, the predictions are displayed on a video window. tf-lite/main.py is using tensorflow lite models to make prediction, the predictions are displayed on a video window. speakers/main.py is using the tensorflow lite models to predict and use the speakers to address some one.

Releases

No releases published

Packages

No packages published