Giter Club home page Giter Club logo

object-detection-opencv's Introduction

Object detection using deep learning with OpenCV and Python

OpenCV dnn module supports running inference on pre-trained deep learning models from popular frameworks like Caffe, Torch and TensorFlow.

When it comes to object detection, popular detection frameworks are

  • YOLO
  • SSD
  • Faster R-CNN

Support for running YOLO/DarkNet has been added to OpenCV dnn module recently.

Dependencies

  • opencv
  • numpy

pip install numpy opencv-python

Note: Compatability with Python 2.x is not officially tested.

YOLO (You Only Look Once)

Download the pre-trained YOLO v3 weights file from this link and place it in the current directory or you can directly download to the current directory in terminal using

$ wget https://pjreddie.com/media/files/yolov3.weights

Provided all the files are in the current directory, below command will apply object detection on the input image dog.jpg.

$ python yolo_opencv.py --image dog.jpg --config yolov3.cfg --weights yolov3.weights --classes yolov3.txt

Command format

$ python yolo_opencv.py --image /path/to/input/image --config /path/to/config/file --weights /path/to/weights/file --classes /path/to/classes/file

Checkout the blog post to learn more.

sample output :

Checkout the object detection implementation available in cvlib which enables detecting common objects in the context through a single function call detect_common_objects().

(SSD and Faster R-CNN examples will be added soon)

object-detection-opencv's People

Contributors

arun-1000lookz avatar arunponnusamy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.