Giter VIP home page Giter VIP logo

object-tracking-using-yolov3's Introduction

Object Tracking using YOLOv3

Refer my blog for detail explanation ๐Ÿ‘‰ YOLO : Real Time Object Detection

Detecting Objects on Image with OpenCV deep learning library

Algorithm:

Reading RGB image --> Getting Blob --> Loading YOLO v3 Network --> --> Implementing Forward Pass --> Getting Bounding Boxes --> --> Non-maximum Suppression --> Drawing Bounding Boxes with Labels

Result: Window with Detected Objects, Bounding Boxes and Labels.

Some comments

With OpenCV function 'cv2.dnn.blobFromImage' we get 4-dimensional so called 'blob' from input image after mean subtraction, normalizing, and RB channels swapping. Resulted shape has:

  • number of images
  • number of channels
  • width
  • height E.G.: blob = cv2.dnn.blobFromImage(image, scalefactor=1.0, size, mean, swapRB=True)

Detecting Objects on Video with OpenCV deep learning library

Algorithm:

Reading input video --> Loading YOLO v3 Network --> --> Reading frames in the loop --> Getting blob from the frame --> --> Implementing Forward Pass --> Getting Bounding Boxes --> --> Non-maximum Suppression --> Drawing Bounding Boxes with Labels --> --> Writing processed frames

Result: New video file with Detected Objects, Bounding Boxes and Labels.

Some comments

What is a FOURCC? FOURCC is short for "four character code" - an identifier for a video codec, compression format, colour or pixel format used in media files. http://www.fourcc.org

Parameters for cv2.VideoWriter(): filename - Name of the output video file. fourcc - 4-character code of codec used to compress the frames. fps - Frame rate of the created video. frameSize - Size of the video frames. isColor - If it True, the encoder will expect and encode colour frames.

Detecting Objects in Real Time with OpenCV deep learning library

Algorithm:

Reading stream video from camera --> Loading YOLO v3 Network --> --> Reading frames in the loop --> Getting blob from the frame --> --> Implementing Forward Pass --> Getting Bounding Boxes --> --> Non-maximum Suppression --> Drawing Bounding Boxes with Labels --> --> Showing processed frames in OpenCV Window

Result: Window with Detected Objects, Bounding Boxes and Labels in Real Time.

Some comments

cv2.VideoCapture(0)

To capture video, it is needed to create VideoCapture object. Its argument can be camera's index or name of video file. Camera index is usually 0 for built-in one. Try to select other cameras by passing 1, 2, 3, etc

$ Download the pre-trained YOLO v3 weights file from this link and place it in yolo-coco-data folder.

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

object-tracking-using-yolov3's People

Contributors

sarangdeshmukh7 avatar

Stargazers

 avatar  avatar  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.