Cleaner
- class byotrack.implementation.refiner.cleaner.Cleaner(min_length: int, max_dist: float)
Bases:
RefinerCleaner refiner.
Split tracklet when the distance between two consecutive points is greater than max_dist. And delete tracks that are shorter than min_length.
Warning
It will not split when the position of the track is NaN.
Warning
merge_id is only set on the last split track, which may be deleted (if too short).
- run(video, tracks: Collection[byotrack.Track]) list[byotrack.Track]
Run the refiner on a whole video.
- Parameters:
video (Sequence[np.ndarray] | np.ndarray) – Sequence of T frames (array). Each array is expected to have a shape ([D, ]H, W, C)
tracks (Collection[byotrack.Track]) – Tracks of particles
- Returns:
Refined tracks of particles
- Return type:
Collection[byotrack.Track]
- static clean_tracks(tracks: Collection[byotrack.Track], min_length: int, max_dist: float) list[byotrack.Track]
Clean tracks.
Split tracklet when the distance between two consecutive points is greater than max_dist. And delete tracks that are shorter than min_length.
Warning
It will not split when the position of the track is NaN.
Warning
parent_id is only set on the first split track, which may be deleted (if too short). merge_id is only set on the last split track, which may be deleted (if too short).
XXX: Stop duplicating identifiers.