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: Does not really support tracks with nan points (will just not split when a nan is met)
- run(video, tracks: Collection[Track]) List[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 (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[Track], min_length: int, max_dist: float) List[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: Does not really support tracks with nan points (will just not split when a nan is met)