Skip to content

It aims to detect objects from an image or sequence of frames from a video by using the You Only Look Once (YOLO) Deep Neural Network. Furthermore, this project follows Object Oriented Programming (OOP) and the latest C++ features (e. g. STL threads, locks, smart pointers).

License

Notifications You must be signed in to change notification settings

mishrasushruti99/Object_detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOLO Object Detection

This project is the Capstone project.

It aims to detect objects from an image or sequence of frames from a video by using the You Only Look Once (YOLO) Deep Neural Network.

Furthermore, this project follows Object Oriented Programming (OOP) and the latest C++ features (e. g. STL threads, locks, smart pointers).

Overpass detection

Installation

The core of the project is OpenCV and the Intel Inference Engine from OpenVINO. You can find more documentation about these two projects in here and here respectively.

Supported Operating Systems

OpenCV is supported in almost every operating system. On the other hand, OpenVINO only supports Linux and macOS up to version 10.13. Nevertheless, this project works for 10.15 as well.

  • Ubuntu 16.04 LTS or later.
  • macOS 10.15.

Dependencies

  • cmake >= 3.11
  • make >= 4.2 (Linux, Mac)
  • gcc/g++ >= 9.2
  • OpenCV >= 4.1.2
  • OpenVINO >= 2019_R3.1
  • yaml-cpp >= 0.6.3

Requisites

Models

Model weights can be downloaded with this script.

A good place to store these models is resources/ under a models/ directory that you have to create.

OpenCV and OpenVINO.

In order to install both libraries you can follow these installation links below.

Note: macOS is only supported until version 10.13. However, this project works with 10.15 even if the installer says it's not supported.

Build instructions

  1. Clone this repo.

This project relies on googletest as a thirdparty library.

  1. Compile the project.
make build

Look into the Makefile to see how the app is built.

  1. Run it.

Go to usage.

Tests

The tests are implemented using googletest framework. These can be found under test/ directory.

Coding style

Coding style is addressed by using clang-format tool and the configuration can be found in .clang-format. This inherits Google's style rules plus a minor change. The documentation regarding Google's convention can be found in this site.

Usage

Once built the binary can parse inputs such as a configuration file and the input for the system.

Parameters

  • input: Absolute path to a resource (image or video).
  • configuration: Name of a YAML file.

How to run it

./build/yolo_object_detection \
 --configuration=conf.yml \
 --input=$(realpath resources/videos/overpass.mp4)

License

MIT

Class structure

You can find it in here.

Rubric points met

Loops, Functions, I/O

Point File Lines
The project demonstrates an understanding of C++ functions and control structures. all -
The project reads data from a file and process the data, or the program writes data to a file. main.cpp 11-15
The project accepts user input and processes the input. main.cpp 8,10,17

Object Oriented Programming

Point File Lines
The project uses Object Oriented Programming techniques. all -
Classes use appropriate access specifiers for class members. all -
Class constructors utilize member initialization lists. detection_output.cpp 3
The project follows the Rule of 5. all -
Classes abstract implementation details from their interfaces. region.cpp 5
Classes encapsulate behavior. model.h, model.cpp -
Classes follow an appropriate inheritance hierarchy. all -
Overloaded functions allow the same function to operate on different parameters. - -
Derived class functions override virtual base class functions. detection_output.h 13
Templates generalize functions in the project. queue_fps.h -

Memory Management

Point File Lines
The project makes use of references in function declarations. all -
The project uses destructors appropriately. all -
The project uses scope / Resource Acquisition Is Initialization (RAII) where appropriate. model.cpp 32-34
The project follows the Rule of 5. all -
The project uses move semantics to move data, instead of copying it, where possible. model.cpp 6-8
The project uses smart pointers instead of raw pointers. yolo.cpp 38-42

Concurrency

Point File Lines
The project uses multithreading. yolo.cpp 27, 28, 47, 49
A promise and future is used in the project. - -
A mutex or lock is used in the project. queue_fps.h 25, 36, 48, 64
A condition variable is used in the project. - -

About

It aims to detect objects from an image or sequence of frames from a video by using the You Only Look Once (YOLO) Deep Neural Network. Furthermore, this project follows Object Oriented Programming (OOP) and the latest C++ features (e. g. STL threads, locks, smart pointers).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published