All Projects → roboflow-ai → zero-shot-object-tracking

roboflow-ai / zero-shot-object-tracking

Licence: GPL-3.0 license
Object tracking implemented with the Roboflow Inference API, DeepSort, and OpenAI CLIP.

Projects that are alternatives of or similar to zero-shot-object-tracking

rpi-urban-mobility-tracker
The easiest way to count pedestrians, cyclists, and vehicles on edge computing devices or live video feeds.
Stars: ✭ 75 (-69.01%)
Mutual labels:  object-tracking, deep-sort
Homography-Based-MOTDT
MOTDT with Homography Matrix for Multi-Object Tracking
Stars: ✭ 21 (-91.32%)
Mutual labels:  object-tracking
Keras-LSTM-Trajectory-Prediction
A Keras multi-input multi-output LSTM-based RNN for object trajectory forecasting
Stars: ✭ 88 (-63.64%)
Mutual labels:  object-tracking
ailia-models
The collection of pre-trained, state-of-the-art AI models for ailia SDK
Stars: ✭ 1,102 (+355.37%)
Mutual labels:  object-tracking
OpenCV
Computer Vision programs like Motion Detection, Color Tracking, Motion Rcording, Optical Flow and Object Tracking using Python with OpenCV library
Stars: ✭ 21 (-91.32%)
Mutual labels:  object-tracking
USOT
[ICCV2021] Learning to Track Objects from Unlabeled Videos
Stars: ✭ 52 (-78.51%)
Mutual labels:  object-tracking
chainer-sort
Simple, Online, Realtime Tracking of Multiple Objects (SORT) implementation for Chainer and ChainerCV.
Stars: ✭ 20 (-91.74%)
Mutual labels:  object-tracking
capture reid
可基于摄像头实时监控或录制的视频或静态图片进行行人检测(lffd)/跟踪(deep sort)和行人重识别(reid)。
Stars: ✭ 87 (-64.05%)
Mutual labels:  deep-sort
SiamFusion
No description or website provided.
Stars: ✭ 26 (-89.26%)
Mutual labels:  object-tracking
objtrack
实现常用的目标跟踪算法
Stars: ✭ 22 (-90.91%)
Mutual labels:  object-tracking
video labeler
A GUI tool for conveniently label the objects in video, using the powerful object tracking.
Stars: ✭ 87 (-64.05%)
Mutual labels:  object-tracking
Prediction-using-Bayesian-Neural-Network
Prediction of continuous signals data and Web tracking data using dynamic Bayesian neural network. Compared with other network architectures aswell.
Stars: ✭ 28 (-88.43%)
Mutual labels:  object-tracking
CLIP-Guided-Diffusion
Just playing with getting CLIP Guided Diffusion running locally, rather than having to use colab.
Stars: ✭ 328 (+35.54%)
Mutual labels:  openai-clip
VBT-Barbell-Tracker
A proof of concept app to optically track a barbell through its range of motion using OpenCV to give the lifter realtime feedback on concentric avg velocity, cutoff velocity, and displacement for a Velocity Based Training program.
Stars: ✭ 53 (-78.1%)
Mutual labels:  object-tracking
pytorch-detect-to-track
A pytorch implementation of Detect and Track (https://arxiv.org/abs/1710.03958)
Stars: ✭ 114 (-52.89%)
Mutual labels:  object-tracking
OpenCV-Object-Tracking
Object Tracking Using OpenCV and Python Plus Comparing different Trackers
Stars: ✭ 32 (-86.78%)
Mutual labels:  object-tracking
d3d
Devkit for 3D -- Some utils for 3D object detection based on Numpy and Pytorch
Stars: ✭ 27 (-88.84%)
Mutual labels:  object-tracking
mosse-object-tracking
This is the implementation of MOSSE tracking algorithm (correlation filter based).
Stars: ✭ 89 (-63.22%)
Mutual labels:  object-tracking
survey-computer-vision-2021
2021年计算机视觉技术综述分类汇总
Stars: ✭ 54 (-77.69%)
Mutual labels:  object-tracking
UniTrack
[NeurIPS'21] Unified tracking framework with a single appearance model. It supports Single Object Tracking (SOT), Video Object Segmentation (VOS), Multi-Object Tracking (MOT), Multi-Object Tracking and Segmentation (MOTS), Pose Tracking, Video Instance Segmentation (VIS), and class-agnostic MOT (e.g. TAO dataset).
Stars: ✭ 293 (+21.07%)
Mutual labels:  object-tracking

Roboflow Object Tracking Example

Object tracking using Roboflow Inference API and Zero-Shot (CLIP) Deep SORT. Read more in our Zero-Shot Object Tracking announcement post.

Example fish tracking

Example object tracking courtesy of the Roboflow Universe public Aquarium model and dataset. You can adapt this to your own dataset on Roboflow or any pre-trained model from Roboflow Universe.

Overview

Object tracking involves following individual objects of interest across frames. It combines the output of an object detection model with a secondary algorithm to determine which detections are identifying "the same" object over time.

Previously, this required training a special classification model to differentiate the instances of each different class. In this repository, we have used OpenAI's CLIP zero-shot image classifier to create a universal object tracking repository. All you need is a trained object detection model and CLIP handles the instance identification for the object tracking algorithm.

Getting Started

Colab Tutorial Here:

Open In Colab

Training your model

To use the Roboflow Inference API as your detection engine:

Upload, annotate, and train your model on Roboflow with Roboflow Train. Your model will be hosted on an inference URL.

To use YOLOv5 as your detection engine:

Follow Roboflow's Train YOLOv5 on Custom Data Tutorial

The YOLOv5 implementation uses this colab notebook

The YOLOv5 implementation is currently compatible with this commit hash of YOLOv5 886f1c03d839575afecb059accf74296fad395b6

Performing Object Tracking

Clone repositories

git clone https://github.com/roboflow-ai/zero-shot-object-tracking
cd zero-shot-object-tracking
git clone https://github.com/openai/CLIP.git CLIP-repo
cp -r ./CLIP-repo/clip ./clip             // Unix based
robocopy CLIP-repo/clip clip\             // Windows

Install requirements (python 3.7+)

pip install --upgrade pip
pip install -r requirements.txt

Install requirements (anaconda python 3.8)

conda install pytorch torchvision torchaudio -c pytorch
conda install ftfy regex tqdm requests pandas seaborn
pip install opencv pycocotools tensorflow

Run with Roboflow

python clip_object_tracker.py --source data/video/fish.mp4 --url https://detect.roboflow.com/playing-cards-ow27d/1 --api_key ROBOFLOW_API_KEY --info

**NOTE you must provide a valid API key from Roboflow

Run with YOLOv5

python clip_object_tracker.py --weights models/yolov5s.pt --source data/video/fish.mp4 --detection-engine yolov5 --info

Run with YOLOv4

To use YOLOv4 for object detection you will need pretrained weights (.weights file), a model config for your weights (.cfg), and a class names file (.names). Test weights can be found here https://github.com/AlexeyAB/darknet. yolov4.weights yolov4.cfg

python clip_object_tracker.py --weights yolov4.weights --cfg yolov4.cfg --names coco.names --source data/video/cars.mp4 --detection-engine yolov4 --info

(by default, output will be in runs/detect/exp[num])

Help

python clip_object_tracker.py -h
--weights WEIGHTS [WEIGHTS ...]  model.pt path(s)
--source SOURCE                  source (video/image)
--img-size IMG_SIZE              inference size (pixels)
--confidence CONFIDENCE          object confidence threshold                      
--overlap OVERLAP                IOU threshold for NMS
--thickness THICKNESS            Thickness of the bounding box strokes
--device DEVICE                  cuda device, i.e. 0 or 0,1,2,3 or cpu
--view-img                       display results
--save-txt                       save results to *.txt
--save-conf                      save confidences in --save-txt labels
--classes CLASSES [CLASSES ...]  filter by class: --class 0, or --class 0 2 3
--agnostic-nms                   class-agnostic NMS
--augment                        augmented inference
--update                         update all models
--project PROJECT                save results to project/name
--name NAME                      save results to project/name
--exist-ok                       existing project/name ok, do not increment
--nms_max_overlap                Non-maxima suppression threshold: Maximum detection overlap.
--max_cosine_distance            Gating threshold for cosine distance metric (object appearance).
--nn_budget NN_BUDGET            Maximum size of the appearance descriptors allery. If None, no budget is enforced.
--api_key API_KEY                Roboflow API Key.
--url URL                        Roboflow Model URL.
--info                           Print debugging info.
--detection-engine               Which engine you want to use for object detection (yolov5, yolov4, roboflow).

Acknowledgements

Huge thanks to:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].