ICY EMHT
Wrapper around Spot Tracking protocol of ICY.
- class byotrack.implementation.linker.icy_emht.icy_emht.IcyEMHTLinker(icy_path: str | PathLike | None = None)
Bases:
LinkerRun 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:
Detections to rois in Icy format
Run the Icy protocol
[In ICY] Read rois, estimate emht parameters, run emht, export tracks to xml
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:
## XXX: Should we add update_cov (bool): Whether to update covariances in Kalman filters
- class Motion(value)
Bases:
EnumDifferent 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]