ICY EMHT

Wrapper around Spot Tracking protocol of ICY.

EMHT Protocol
class byotrack.implementation.linker.icy_emht.icy_emht.IcyEMHTLinker(icy_path: str | PathLike | None = None)

Bases: Linker

Run EMHT [4] from Icy [1]

This code is only a wrapper arounds Icy implementation as EMHT is painful to implement.

About EMHT: It is a probabilistic tracking that uses statistical motion model on particles. It uses multiple kalman filters for each particle allowing a particle to have several mode of motions. It also keeps multiple hypothesis of tracking at each frame so that a final detections linking decision is made after seeing several frames in the past and future of these detections.

Here we rely on the handmade protocol “emht_protocol” that expects detections as a valid rois file for icy and some hyperparameters.

The workflow is:

  1. Detections to rois in Icy format

  2. Run the Icy protocol

  3. [In ICY] Read rois, estimate emht parameters, run emht, export tracks to xml

  4. Read Icy tracks and return

Note

This implementation requires Icy to be installed (https://icy.bioimageanalysis.org/download/)

runner

Icy runner

Type:

byotrack.icy.IcyRunner

motion

Prior on the underlying motion model (Brownian vs Directed vs Switching) Given to the Icy block that estimates EMHT parameters. Default: Motion.BROWNIAN

Type:

Motion

## XXX: Should we add update_cov (bool): Whether to update covariances in Kalman filters

class Motion(value)

Bases: Enum

Different motion models:

Brownian: Random gaussian displacement at each time Directed: Random gaussian noise around a directed trajectory Multi: Switch randomly between Brownian and Directed

run(video: Iterable[ndarray], detections_sequence: Collection[Detections]) Collection[Track]

Run the linker on a whole video

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

  • detections_sequence (Collection[byotrack.Detections]) – Detections for each frame

Returns:

Tracks of particles

Return type:

Collection[byotrack.Track]