Giter Club home page Giter Club logo

object-detection-and-tracking's Introduction

Automatic-Detection-And-Tracking

Objects detection in the first frame and Tracking special object by SiamRPN.

Overview

This repo illustrates a automatic detection and tracking of single object. In the process, It first detects all the objects in the first frame of input videos. Next, we should input a examplar image and it can determine the initial position of the target that is most similar to the examplar image. Finally the tracker could finish the single object tracking.

Key files in this repo

  • demo.py -- implements the detection, identify and tracking pipeline.
  • detection folder -- Faster RCNN detection
  • identify folder -- phash to identify tracking object
  • videos folder -- videos needed to handle
  • examplar.png -- a snapshot of object to track

Notes

Detection

It use Faster RCNN to finish object detection. This code was based on longcw's repo longcw/faster_rcnn_pytorch. It will be improved according to the latest papers.

Identify

It use phash to identify a special object.I will add Siamese Net and traditional Digital image processing to do it in the future.

Tracking

It use SiamRPN to finish object tracking. The codes was based on huanglianghua/siamrpn-pytorch. It will be improved according to the latest papers(DSiamRPN).

Prerequisites

  • Python 3.6
  • PyTorch 0.4.0 or higher
  • CUDA 8.0 or higher

For example

In Detection stage. It will detects all cars in the first frame as shown below. image

In Identify stage. We want to track the car as shown below. It could determine the initial position of the target based on Detection stage.
image

In Tracking stage. It will track the car.

Installation and demo

  1. Clone the code:
git clone https://github.com/mj000001/Object-Detection-And-Tracking.git
  1. Create a folder:
cd Object-Detection-And-Tracking && mkdir pretrained
  1. Pretrained Model:

In the root directory of Object-Detection-And-Tracking:Download the pretrained model.pth and VGGnet_fast_rcnn_iter_70000 from Baidu Yun with extraction code gm4f and put the files under pretrained/.

  1. Compilation:

Install python package

pip install -r requirements.txt

Build the Cython modules for nms and the roi_pooling layer

cd detection/faster_rcnn
./make.sh
  1. Run Demo:
python demo.py

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.