StarDist
- class byotrack.implementation.detector.stardist.StarDistDetector(model_dir: str | PathLike, **kwargs)
Bases:
BatchDetectorRuns stardist as a detector.
Wraps the official implementation at https://github.com/stardist/stardist, following the paper: Uwe Schmidt, Martin Weigert, Coleman Broaddus, and Gene Myers. Cell Detection with Star-convex Polygons. International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI), Granada, Spain, September 2018.
We do not provide any code to train the stardist model. We expect you to already have trained the model.
Note
This module requires stardist lib to be installed (with tensorflow). Please follow the instruction of the official implementation to install it.
- detect(batch: ndarray) List[Detections]
Apply the detection on a batch of frames
By default, the frame ids are set from 0 to n-1 with n the size of the batch. The aggregattion of batches and frame ids correction is automatically handled when called the run method.
- Parameters:
batch (np.ndarray) – Batch of video frames Shape: (B, H, W, C)
- Returns:
Detections for each given frame
- Return type:
Collection[byotrack.Detections]