Skip to content

gpsurya/FACE-MASK-DETECTION-USING-YOLO-V3

 
 

Repository files navigation

FACE-MASK DETECTION

A minimal PyTorch implementation of YOLOv3, with support for training, interface & evalution.
To train on custom dataset please visit my another [GitRepo].

ABSTARCT

APPROCH

Standard YOLO V3 Approch is modified, and the table shows what change has been made.

Standard YOLO Approch Self-Modified YOLO Approch
1. Object Detection Process 1. Object Detection Process
... 1.1. Localization ... 1.1. Localization
... 1.2. Class Prediction ... 1.2. Class Prediction
2. Thresholding 2. Thresholding
3. Non max suppression with respect to Class 3. Non max suppression irrespective of class label
4. Bounding Box Labelling

REPORT

INSTALLATION

Clone and install requirements
> git clone https://github.com/NisargPethani/Face-Mask-Detection-using-YOLO-v3.git
> cd Face-Mask-Detection-using-YOLO-v3/
> pip install -r requirements.txt
Checkpoints

Download checkpoint From [GoogleDrive]
Copy yolov3_ckpt_35.pth into checkpoints/

EVALUATION

Evaluates the model.

> python validate.py --weights_path checkpoints/yolov3_ckpt_35.pth

Average Precisions:

Class AP
Class '0' (MASK) 73.0
Class '1' (NO_MASK) 83.3

mAP: 78.19

DETECTION

Real Time Detection

> python cam_detect.py --weights_path checkpoints/yolov3_ckpt_35.pth

Some Screen-shots of Real-Time Detection is shown below

Detection in Image

Move inmages to testing/input/images

> python image_detect.py --image_folder testing/input/images --weights_path checkpoints/yolov3_ckpt_35.pth

Detection in Video

Make new directory with name: 'videos' in testing/input
Move videos to testing/input/videos

> python video_detect.py --image_folder testing/input/videos --weights_path checkpoints/yolov3_ckpt_35.pth

YOUTUBE

Following YouTube video shows the output.

CREDIT

[Paper] [Project Webpage] [Authors' Implementation]

@article{yolov3,
  title={YOLOv3: An Incremental Improvement},
  author={Redmon, Joseph and Farhadi, Ali},
  journal = {arXiv},
  year={2018}
}

Also Help is taken from [GitRepo]

About

Using PyTorch Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%