Tracker

class byotrack.api.tracker.Tracker

Bases: ABC, ParametrizedObjectMixin

Base abstract tracker class

A tracker can be run on a whole video and produces tracks

abstract run(video: Sequence[ndarray] | ndarray) Collection[Track]

Run the tracker on a whole video

Parameters:

video (Sequence[np.ndarray] | np.ndarray) – Sequence of T frames (array). Each array is expected to have a shape (H, W, C)

Returns:

Tracks of particles

Return type:

Collection[byotrack.Track]

class byotrack.api.tracker.MultiStepTracker(detector: Detector, linker: Linker, refiners: Iterable[Refiner] = ())

Bases: Tracker

Multi step tracker: split the tracking task into Detect / Link / Refine

detector

Performs the detection on the video

Type:

byotrack.Detector

linker

Links detections through time

Type:

byotrack.Linker

refiners

Optional refinement steps Empty by default

Type:

Sequence[byotrack.Refiner]

run(video: Sequence[ndarray] | ndarray) Collection[Track]

Run the tracker on a whole video

Parameters:

video (Sequence[np.ndarray] | np.ndarray) – Sequence of T frames (array). Each array is expected to have a shape (H, W, C)

Returns:

Tracks of particles

Return type:

Collection[byotrack.Track]

class byotrack.api.tracker.BatchMultiStepTracker(detector: BatchDetector, linker: OnlineLinker, refiners: Iterable[Refiner] = ())

Bases: MultiStepTracker

Online Tracking with detect/link/refine framework

It only works with BatchDetector and OnlineLinker: it reduces RAM usage and computations by loading frames only by batch. Each batch is processed by the detector followed by the linker. Once a batch is processed, a new one is loaded. The detections are never fully stored, neither the video.

Tracks refining is done offline.

detector

Performs the detection on the video by batch It defines the batch size to use

Type:

byotrack.BatchDetector

linker

Links detections one frame at time

Type:

byotrack.OnlineLinker

refiners

Optional refinement steps Empty by default

Type:

Sequence[byotrack.Refiner]

run(video: Sequence[ndarray] | ndarray) Collection[Track]

Run the tracker on a whole video

Parameters:

video (Sequence[np.ndarray] | np.ndarray) – Sequence of T frames (array). Each array is expected to have a shape (H, W, C)

Returns:

Tracks of particles

Return type:

Collection[byotrack.Track]