Metadata-Version: 2.1
Name: motrack
Version: 0.1.0
Summary: Tracking-by-detection (MOT) package
Home-page: https://github.com/Robotmurlock/Motrack
Author: Momir Adzemovic
Author-email: momir.adzemovic@gmail.com
Keywords: tracking-by-detection,multi-object-tracking
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.8, <4
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: hydra-core
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: omegaconf
Requires-Dist: opencv-python
Requires-Dist: pandas
Requires-Dist: PyYAML
Requires-Dist: scipy
Requires-Dist: tqdm
Provides-Extra: yolov8
Requires-Dist: ultralytics ; extra == 'yolov8'

# Motrack: Multi-Object Tracking Library

## Introduction

Motrack is a versatile multi-object tracking library designed to 
leverage the tracking-by-detection paradigm. 
It supports a range of tracker algorithms and object detections, 
making it ideal for applications in various domains.

## Usage

Pseudocode for tracker utilization:

```python
from motrack.object_detection import YOLOv8Inference
from motrack.tracker import ByteTracker, TrackletState

tracker = ByteTracker()  # Default parameters
tracklets = []
yolo = YOLOv8Inference(...)

video_frames = read_video(video_path)

for i, image in enumerate(video_frames):
  detections = yolo.predict_bboxes(image)
  tracklets = tracker.track(tracklets, detections, i)
  active_tracklets = [t for t in tracklets if t.state == TrackletState.ACTIVE]

  foo_bar(active_tracklets)
```

This library offers flexibility to use any custom object detector.

Implementation of custom tracker:

```python
from typing import List, Tuple

from motrack.library.cv.bbox import PredBBox
from motrack.tracker import Tracker, Tracklet


class MyTracker(Tracker):
  def track(
    self,
    tracklets: List[Tracklet],
    detections: List[PredBBox],
    frame_index: int,
    inplace: bool = True
  ) -> List[Tracklet]:
    ... Tracker logic ...

    return tracklets
```

Similarly, custom object detection inference, filter, association method
or dataset can also be implemented and seamlessly combined
with other components.

## Features
- **Tracker Algorithms Support**: 
  - SORT
  - ByteTrack
  - SparseTrack
- **Object Detection Inference**:
  - YOLOX
  - YOLOv8
- **Kalman Filter**:
  - Bot-Sort Kalman filter implementation
- **Association Methods**:
  - IoU (SORT)
  - Move
  - CBIoU
  - DCM
  - And more...
- **Dataset Format Support**:
  - MOT: MOT17, MOT20, DanceTrack 
- **Tools**:
  - Inference: Perform any tracker inference that can directly evaluated with TrackEval framework.
  - Postprocess: Perform offline postprocessing (linear interpolation, etc...) for more accuracy tracklets.
  - Visualize: Visualize tracker inference.

## Installation

Run these commands to install package within your virtual environment or docker container.

```bash
git clone https://github.com/Robotmurlock/Motrack
cd Motrack
pip install -e .
```
