"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;
Showing posts with label Object Tracking. Show all posts
Showing posts with label Object Tracking. Show all posts

January 10, 2021

Tracking @ 2021 - Paper Reads - Object Tracking

Paper - Object Detection and Tracking Algorithms for Vehicle Counting: A Comparative Analysis

Key Notes

  • Models used - CenterNet and Deep SORT, Detectron2 and Deep
  • SORT, and YOLOv4 and Deep SORT
  • YOLO and SORT algorithms
  • Counting Techniques
  • Counting by frame differencing
  • Counting by detection
  • Motion based counting
  • Deep learning based counting

OBJECT DETECTORS

CenterNet

  • CenterNet functions on the intuition that if a detected bounding box has a higher Intersection over Union (IoU) with the ground-truth box
  • CenterNet is a singlestage detector 

Detectron2

Detectron2 supports implementation to multiple object detection algorithms using different backbone network architectures such as ResNET {50, 101, 152}, FPN, VGG16

YOLOv4

You Only Look Once (YOLO) is the state-of-the-art object detection algorithm. New techniques adopted in YOLOv4 are: (i) WeightedResidual-Connections, (ii) Cross-Stage-Partial-Connections, (iii) Cross mini-batch, (iv) Normalization (CmBN), (v) Selfadversial-training, (vi) Mish-activation

EfficientDet

Follows single-stage detectors pattern

SORT

Simple Online and Realtime Tracking (SORT) is an implementation of tracking-by-detection framework where the main objective is to detect objects each frame and associate them for online and real-time tracking application

Deep SORT

A combination of Kalman Filter and Hungarian algorithm is used for tracking

Paper - Tracking Objects as Points

Key Notes

  • We track objects by tracking their centers. We learn a 2D offset between two adjacent frames and associate them based on center distance.
  • A simple displacement prediction, akin to sparse optical flow, allows objects in different frames to be linked
  • Joint detection and tracking
  • Early approaches [2, 47] used Kalman filters to model object velocities

Paper - SMOT: Single-Shot Multi Object Tracking

Key Notes

  • The first stage exercises a per-frame object detector to localize object bounding boxes in each frame
  • The second stage, tracklet generation, merges detection results to create a set of tracklets, i.e., short tracks, based on short-term cues

More Read

FairMOT: On the Fairness of Detection and Re-Identification in Multiple Object Tracking

Object Detection and Tracking in 2020


Paper - ByteTrack: Multi-Object Tracking

Key Notes

In this paper, we identify that the similarity with tracklets provides a strong cue to distinguish the objects and background in low score detection boxes

Data association is the core of multi-object tracking, which first computes the similarity between tracklets and detection boxes and then matches them according to the similarity.

Location and motion similarity are accurate in the short-range matching.

Code

Codes

Happy Learning!!!

October 08, 2019

Day #280 - Human detection and Tracking

Project #1 - Human Detection and Tracking 

Overview
  • Detecting a human and its face in a given video and storing Local Binary Pattern Histogram
  • Recognize them in any other videos
  • Local Binary Pattern Histogram - type of visual descriptor, clockwise direction check neighbour values
Execution Steps
Clone the project
Step 1 - python create_face_model.py -i data
Step 2 - python main.py -v video

Project #2 - Person-Detection-and-Tracking  (Pending Execution)

Overview
  • The person detection in Real-time is done with the help of Single Shot MultiBox Detector
  • Single Shot MultiBox Detector
  • Tracking - Kalman Filter is fed with the velocity, position and direction of the person which helps it to predict the future location 
Single Shot MultiBox Detector
  • The core of SSD is predicting category scores and box offsets for a fixed set of default bounding boxes using small convolutional filters applied to feature maps
  • The key difference between training SSD and training a typical detector that uses region proposals, is that ground truth information needs to be assigned to specific outputs in the fixed set of detector outputs
Execution Steps
Clone the project https://github.com/ambakick/Person-Detection-and-Tracking

Execute - camera.py in Spyder

Project #3 - Tracker Types Demo Project (Pending Execution)

Overview
  • Track Multiple faces
  • Download and Experiment
Run Below Demos
demo - track multiple faces.py
Multiple_Trackers.py
face_eye.py
distance_to_camera.py

Datasets - Link

Object Motion Detection and Tracking for Video Surveillance
Measuring size and distance with OpenCV
Calculate X, Y, Z Real World Coordinates from Image Coordinates using OpenCV

Happy Learning!!!

October 03, 2019

Day #279- Multi-Object Tracking

Project #1 - vehicle-speed-check

Clone Repository - Link

On Anaconda prompt,
cd vehicle-speed-check
pip install -r requirements.txt
python speed_check.py

Comments - Very good project to get started. The logic of speed computation with respect to frames per second, pixel movement can be reused in other use cases. Use of dlib correlation tracker. The tracking logic can be reused in other similar implementation

Project #2 - Simple Example code (ROI Based)



Project #3 - Another interesting project from Adrian blog 

Cloned the project and executed the demo. This code does not work in windows 10 though. Someone has fixed the code. The working code is in link 

python multi_object_tracking_fast.py --prototxt E:\Code_Repo\multiobject-tracking-dlib\mobilenet_ssd\MobileNetSSD_deploy.prototxt  --model E:\Code_Repo\multiobject-tracking-dlib\mobilenet_ssd\MobileNetSSD_deploy.caffemodel --video E:\Code_Repo\multiobject-tracking-dlib\race.mp4 --output E:\Code_Repo\multiobject-tracking-dlib\race_output_fast.avi

October 02, 2019

Day #278 - Object Tracking - TensorFlow Object Counting API

I came across this project. Fantastic work!! The Detection part needs to be finetuned for the Indian scenario, the tracking seems fine performing decently. You can spot a few false positives, Trucks on the other side of the lane are not detected, Indian Trucks are not well recognized. This can be handled by a custom detection model. Overall the tracking and counter approach can be reused in multiple scenarios.

Clone the project - object_counting_api

vehicle_counting.py - Executed this for some of my highway videos.

The objects passing through the line will be counted and incremented. Minor changes to roi

Output of the same



Happy Learning!!!

September 26, 2019

Day #277 - Tracking Objects - Deep SORT

What is Deep Sort ?
Simple Online and Realtime Tracking with a Deep Association Metric

How it works ?
It performs Kalman filtering in image space and frame-by-frame data association using the Hungarian method with an association metric that measures bounding box overlap

Paper - Link


Happy Learning!!!


April 09, 2019

Day #236 - Papers on Person Re-Identification

Paper #1 - Camera Style Adaptation for Person Re-identification

Key Lessons
  • Person Reidentification - Given Query Person, Retrieve person from multiple sources
  • Challenges - Resolution, Environment, Illumination
  • Camera Style Adaptation Approach - unsupervised, camera-invariant property
Techniques
  • Input image pairs are partitioned into three overlapping horizontal parts respectively, and through a siamese CNN model to learn the similarity of them using cosine distance
Paper #2 - SIMPLE ONLINE AND REALTIME TRACKING WITH A DEEP ASSOCIATION METRIC
Techniques
  • Kalman filtering in image space and frame by frame
  • Kalman filter with constant velocity motion
Paper #3 - In Defense of the Triplet Loss for Person Re-Identification
Techniques
  • A plain CNN with a triplet loss 
Triplet Loss
Key Lessons
  • Look at Anchor, Distance with Positive Example, Distance with Negative Example
  • 3 Images at a time Anchor, Positive, Negative Image
  • APNN
  • d(A,P) = 0.5 Set Margin to achieve it for positive / negative
  • L(A,P,N) = Max(||f(A)-f(P)||^2 - ||f(A)-f(N)||^2 + Alpha)
  • Chosing Triplets Randomly
  • Map Training Set into Triple
Example - Link1, Link2



Happy Mastering DL!!!