Skip to content

This project, for Udacity's C++ Nanodegree, uses YOLOv3 Deep Neural Network and OpenCV to detect objects in a user supplied video or webcam.

Notifications You must be signed in to change notification settings

justinbellucci/yolo3-object-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOLOv3 Object Detection using OpenCV

This is the Capstone Project for the Udacity C++ Nanodegree Program. This program can detect up to 80 classes of objects from a sequence of video frames using the You Only Look Once (YOLOv3) Deep Neural Network, originally authored by Joseph Redmon and Ali Farhadi. YOLOv3 forwards the the whole image, or frame, at once saving valuable inference time. It divides the image into a 13x13 grid of cells. Each cell is responsible for predicting a number of bounding boxes in the image. For each bounding box, the network predicts the confidence that the bounding box encloses an object and outputs the probability that the object represents a particular class. Using non-maximum suppression the bounding boxes with low confidence scores (0.5) are eliminated. This technique yields surprisingly fast results.

Dependencies for Running Locally

The following dependencies are required to run the program locally.

Build Instructions

  1. Clone the repository and navigate to the downloaded folder.
git clone https://github.com/justinbellucci/yolo3-object-detection.git
cd yolo3-object-detection
  1. Download the models in the main project directory.
sudo chmod a+x getModels.sh
./getModels.sh
  1. Make a build directory in the top level directory:
mkdir build && cd build
  1. Compile
cmake .. 
make

Running the Program

The input to this program can be either a mp4 video file or a webcam. Both methods require the yolov3.weights, yolov3.cfg and coco.names files to be placed in the main project directory. Once run, a window will open and the video will play automatically. Once finished, the program will terminate the window.

// run from build directory
cd build 
  1. Video file:

    ./yolo3_detector --video=/my_video.mp4 
    
  2. Webcam

    ./yolo3_detector 
    

About

This project, for Udacity's C++ Nanodegree, uses YOLOv3 Deep Neural Network and OpenCV to detect objects in a user supplied video or webcam.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published