Skip to content

miladsoltany/Face-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Face-Detection

Face detection using yolov5

In this repository, I have trained yolov5s on the WIDER face dataset. The WIDER dataset comprises of more than 30k images with more than 390k faces, each with bouding box and other various label formats.

image

Facial expression classification is not in the scope of this project and it is only about detection. Therefore, all the faces have the same label which is, obviosuly, "face".

The included code, which is in form of a IPython notebook, downloads the dataset and performs preproccessing. The faces with area of less than 2 percent of the whole image are considered too small and ignored. Moreover, for each image in the dataset, the yolo required format (cls,x,y,w,h) is constrcuted and saved.

Finally, the yolov5s is trained on the dataset. The final accuracy on the validaion dataset is 93.6%

Here are the results on some randomly downloaded data with the given model.

download istockphoto-1146473249-612x612

Colab Notebook

The code needed to preprocess the data and train the model is available in the following notebook. Set the runtime to GPU and run everything.

Open In Colab

Yolo weights

The weights are also available to run using the official yolov5 code found here

Download the weights: Link

Releases

No releases published

Packages

No packages published