All Projects → amh28 → IBM-Data-Science-Capstone-Alejandra-Marquez

amh28 / IBM-Data-Science-Capstone-Alejandra-Marquez

Licence: other
Homemade face mask detector fine-tuning a Yolo-v3 network

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to IBM-Data-Science-Capstone-Alejandra-Marquez

Traffic Signal Violation Detection System
A Computer Vision based Traffic Signal Violation Detection System from video footage using YOLOv3 & Tkinter. (GUI Included)
Stars: ✭ 200 (+614.29%)
Mutual labels:  yolov3
Bmw Yolov4 Inference Api Gpu
This is a repository for an nocode object detection inference API using the Yolov3 and Yolov4 Darknet framework.
Stars: ✭ 237 (+746.43%)
Mutual labels:  yolov3
edge-tpu-tiny-yolo
Run Tiny YOLO-v3 on Google's Edge TPU USB Accelerator.
Stars: ✭ 94 (+235.71%)
Mutual labels:  yolov3
Yolov4 Custom Functions
A Wide Range of Custom Functions for YOLOv4, YOLOv4-tiny, YOLOv3, and YOLOv3-tiny Implemented in TensorFlow, TFLite, and TensorRT.
Stars: ✭ 199 (+610.71%)
Mutual labels:  yolov3
Yolo person detect
person detect based on yolov3 with several Python scripts
Stars: ✭ 212 (+657.14%)
Mutual labels:  yolov3
Deepstream Project
This is a highly separated deployment project based on Deepstream , including the full range of Yolo and continuously expanding deployment projects such as Ocr.
Stars: ✭ 120 (+328.57%)
Mutual labels:  yolov3
Darknet face with landmark
加入关键点的darknet训练框架,轻量级的人脸检测,支持ncnn推理
Stars: ✭ 192 (+585.71%)
Mutual labels:  yolov3
DIoU YOLO V3
📈📈📈【口罩佩戴检测数据训练 | 开源口罩检测数据集和预训练模型】Train D/CIoU_YOLO_V3 by darknet for object detection
Stars: ✭ 53 (+89.29%)
Mutual labels:  yolov3
Paddledetection
Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Stars: ✭ 5,799 (+20610.71%)
Mutual labels:  yolov3
deepstream tao apps
Sample apps to demonstrate how to deploy models trained with TAO on DeepStream
Stars: ✭ 274 (+878.57%)
Mutual labels:  yolov3
Yolov3 deepsort
Object tracking implemented with YOLOv3, Deep Sort and Tensorflow.
Stars: ✭ 205 (+632.14%)
Mutual labels:  yolov3
Yolodet Pytorch
reproduce the YOLO series of papers in pytorch, including YOLOv4, PP-YOLO, YOLOv5,YOLOv3, etc.
Stars: ✭ 206 (+635.71%)
Mutual labels:  yolov3
pytorch YOLO OpenVINO demo
No description or website provided.
Stars: ✭ 73 (+160.71%)
Mutual labels:  yolov3
Pine
🌲 Aimbot powered by real-time object detection with neural networks, GPU accelerated with Nvidia. Optimized for use with CS:GO.
Stars: ✭ 202 (+621.43%)
Mutual labels:  yolov3
Open-Source-Models
Address book for computer vision models.
Stars: ✭ 30 (+7.14%)
Mutual labels:  yolov3
Yolov3 Object Detection With Opencv
This project implements a real-time image and video object detection classifier using pretrained yolov3 models.
Stars: ✭ 191 (+582.14%)
Mutual labels:  yolov3
pose-estimation-3d-with-stereo-camera
This demo uses a deep neural network and two generic cameras to perform 3D pose estimation.
Stars: ✭ 40 (+42.86%)
Mutual labels:  yolov3
darknet
php ffi darknet
Stars: ✭ 21 (-25%)
Mutual labels:  yolov3
yolo deepsort
Fast MOT base on yolo+deepsort, support yolo3 and yolo4
Stars: ✭ 47 (+67.86%)
Mutual labels:  yolov3
YoloV3-Custom-Object-Detection
Custom Object Detection With YoloV3
Stars: ✭ 18 (-35.71%)
Mutual labels:  yolov3

IBM-Capstone-Project

IBM Capstone Project

This is my project for the IBM Data Science Capstone project. I decided work on an object detection problem in order to tell whether people are wearing masks or not. Object detection algorithms aim at answering two questions basically: Which objects are present on an image and what are the bounding box coordinates that contain those objects. I am using deep learning and I train an object detection network. I need to provide it with the images and annotation files containing the bounding box coordinates, along with the class names of the objects contained within those images.

All the steps towards the completion of this problem are documented on the following noteboooks:

  1. Data Exploration Notebook.ipynb
  2. Feature Preparation -Choosing train, val and test set.ipynb
  3. Modeldefinition_and_training.ipynb
  4. Model Evaluation Notebook_.ipynb

  • I am using a deep learning network architecture called YOLO (short for You Only Look Once), using pretrained weights on the ImageNet dataset and then performing fine-tuning on my dataset. I introduce some modifications to the Tensorflow YOLO v3 implementation found on the following repo: https://github.com/zzh8829/yolov3-tf2, for solving object detection on my custom problem. In order to test mask - no mask detection you should clone that repo, follow installation instructions, such as creating the virtual environments and installing dependencies. After that you can replace the files contained on this repo.

After installing everything, in order to know how to use this repo, skip to the How to use it section.

Datasets

Despite the fact that there exists Face mask datasets depicting only the faces of one person in an image, I couldn't find many annotated dataset sources of face mask images with subjects placed on different parts of an image. That is why I performed manual annotations of those images using the LabelImg tool (https://github.com/tzutalin/labelImg).

  • All annotations are found on the Annotations/ directory. You are free to use them and add more images for the benefit of others working on the same problem. All images are on the JPEGImages directory.

  • There are currently 2749 images that were used for training. In order to develop a highly reliable face mask detector we would need far more training images for both classes.

Loss function and network size

  • I tweaked the model playing with loss function formulation and also compared detections obtained by the whole YOLO architecture and the Tiny version.

  • It is also important to change bounding box number, otherwise we will obtain nan values when training.

  • I also explain this on the Modeldefinition_and_training.ipynb notebook.

How to use it:

  • After installing the original YOLO repo, you should add an replace all files found on this repo.

  • The weights I obtained after training, which I also used for inference and for creating the demo video from above, is on the checkpoints/ directory called: yolov3_train_125.tf

  • After adding and replacing those files, you can visualize the dataset:

python tools/visualize_dataset.py --classes=./data/voc2012.names --output visualize_dataset.jpg

  • You can perform inference on an image. Here are some examples:

python detect.py
--classes ./data/voc2012.names
--num_classes 3
--weights ./checkpoints/yolov3_train_125.tf
--image ./data/20200726_020740.jpg
--yolo_max_boxes 300
--yolo_iou_threshold 0.3
--yolo_score_threshold 0.3
--output ./without_mask.jpg

python detect.py
--classes ./data/voc2012.names
--num_classes 3
--weights ./checkpoints/yolov3_train_125.tf
--image ./data/20200726_020835.jpg
--yolo_max_boxes 300
--yolo_iou_threshold 0.3
--yolo_score_threshold 0.3
--output ./with_mask.jpg

  • You could also try it live from a webcam:

python detect_video.py
--video 0
--classes ./data/voc2012.names
--weights ./checkpoints/yolov3_train_125.tf
--yolo_max_boxes 300
--yolo_iou_threshold 0.3
--yolo_score_threshold 0.3
--num_classes 3

How to retrain it adding more images

  • If you would like to retrain the network you would need to add new images and annotations to the JPEGImages and Annotations folders. Then create new train val test txt files with the new filenames and perform cross validation to create the best partition. You need to generate new training and validation TF.RECORDS for training a new network. Commands for generating them are found at the end of the Feature Preparation -Choosing train, val and test set.ipynb notebook. Then you can train again as shown on the Modeldefinition_and_training.ipynb notebook.

  • You can also change loss function to its original formulation in case it doesn't work for your problem.

Ps. If you liked my work, give it a Star! 😄 🇵🇪

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].