Detection Start Guide - Gachon-Graduation-work/Muzzle_Detection_Project GitHub Wiki

Object Detection - OpenCV and YOLO

Author: Matteo Medioli

YOLO: https://pjreddie.com/darknet/yolo/

1. How to use YOLO with Opencv

Let’s start by importing the libraries Opencv and numpy and then we load the algorythm.

We import the classes:

import cv2
import numpy as np

We load the algorythm. The run the algorythm we need three files:

  • Weight file: it’s the trained model, the core of the algorythm to detect the objects.

  • Cfg file: it’s the configuration file, where there are all the settings of the algorythm.

  • Name files: contains the name of the objects that the algorythm can detect.

reference : https://pysource.com/2019/06/27/yolo-object-detection-using-opencv-with-python/

2. How to detect Dog and Muzzle

1. Run python server
2. When a client takes a picture, the picture is sent to the server
3. Detect dogs and muzzles
3. Then, the photo with the bounding box will be returned to the client