Skip to main content

Video Object Tracking Toolkit

Project description

VidTracker

CI Python License

VidTracker is a Python package for object tracking


Tracker

Tracker Paper Description
DFSTracker Distribution Fields for Tracking (CVPR 2012) Smooth histogram fields with spatial/feature domain convolution
MILTracker Visual Tracking with Online Multiple Instance Learning (CVPR 2009) Online boosting with Haar features
LKTracker Based on Lucas-Kanade optical flow Tracks feature points and estimates affine transforms

Dataset

You can download the original MILTrack dataset (e.g., cliffbar) from:
--> https://bbabenko.github.io/miltrack.html

Extract the dataset into data/input/ to match the folder structure shown below.

Project Structure

.
├── config.json
├── data
   ├── input
      ├── cliffbar
         ├── cliffbar_frames.txt
         ├── cliffbar_gt.txt
         ├── cliffbar_MIL_TR*.txt
         ├── imgs/
             └── imgXXXXX.png
      ├── cliffbar.zip
   └── output/
      ├── cliffbar
         └── imgXXXXX.png
├── tests/
└── vidtracker/
    ├── cli.py
    ├── dfs.py
    ├── lk.py
    ├── mil.py
    ├── util.py
    └── video.py

Installation

From PyPI:

pip install vidtracker

From GitHub:

pip install git+https://github.com/keyneoei/vidtracker.git

Or locally:

git clone https://github.com/keyneoei/vidtracker.git
cd vidtracker
pip install .

CLI Usage

vidtracker --input=data/input/cliffbar/imgs --output=data/output/cliffbar --tracker=DFS --show_frames

or

python -m vidtracker.cli --input=data/input/cliffbar/imgs --output=data/output/cliffbar --tracker=DFS --show_frames

Usage Example (Python)

from vidtracker import DFSTracker, MILTracker, LKTracker

tracker_type = "DFS"    # or "MIL", "LK"
frame = ...             # read video frame
init_bbox = ...         # init bbox
cfg = ...               # configuration (box)

if tracker_type == "DFS":
    tracker = DFSTracker(frame, init_bbox, cfg)
elif tracker_type == "MIL":
    tracker = MILTracker(frame, init_bbox, cfg)
elif tracker_type == "LK":
    tracker = LKTracker(frame, init_bbox, cfg)

# Process subsequent frames
x, y, w, h, angle = tracker.process_frame(next_frame)

References

  • DFS: Sevilla-Lara, L., Learned-Miller, E. (2012). Distribution Fields for Tracking. CVPR.
  • MIL: Babenko, B., Yang, M.-H., & Belongie, S. (2009). Visual Tracking with Online Multiple Instance Learning. CVPR.
  • LK: Lucas, B., & Kanade, T. (1981). An Iterative Image Registration Technique. DARPA.

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vidtracker-0.1.4.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vidtracker-0.1.4-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file vidtracker-0.1.4.tar.gz.

File metadata

  • Download URL: vidtracker-0.1.4.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for vidtracker-0.1.4.tar.gz
Algorithm Hash digest
SHA256 41a8a6d5cf24ca5ad067bcb156080feff4aa8066eeb65ee15b92df8831173bcb
MD5 f845ac5b1a64d6d462674efda40848b5
BLAKE2b-256 5508191ccaa9c227a4c812e559b3cd0870ec59194351ea7997e44edd0abef4ed

See more details on using hashes here.

File details

Details for the file vidtracker-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: vidtracker-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for vidtracker-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fc1a835cbaaabe3bc880974f5b70294a6d5d38e89a1fb6f22d2c6a69ec102973
MD5 0bfd33b199fd521fce5811a40f1c7022
BLAKE2b-256 20a2d9f7070633c1d2191786d3c0a8d2f3249fb9c13d16a3170666e3177266c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page