delta.data.predictCompilefromseg_track¶
- delta.data.predictCompilefromseg_track(img_path: str, seg_path: str, files_list: Union[List[str], Tuple[str, ...]], target_size: Tuple[int, int] = (256, 32), crop: bool = False) Tuple[ndarray[Any, dtype[float32]], List[str], List[Tuple[CroppingBox, CroppingBox]]]¶
Compile an inputs array for tracking prediction with the tracking U-Net, directly from U-Net segmentation masks saved to disk.
- Parameters
- img_pathstring
Path to original single-chamber images folder. The filenames are expected in the printf format Position%02d_Chamber%02d_Frame%03d.png
- seg_pathstring
Path to segmentation output masks folder. The filenames must be the same as in the img_path folder.
- files_listtuple/list of strings, optional
List of filenames to compile in the img_path and seg_path folders.
- target_sizetuple of 2 ints, optional
Input and output image size. The default is (256,32).
- Returns
- inputs_arr4D numpy array of floats
Input images and masks for the tracking U-Net training routine. Dimensions of the tensor are (cells_to_track, target_size[0], target_size[1], 4), with cells_to_track the number of segmented cells in all segmentation masks of the files_list.
- seg_name_listlist of strings
Filenames to save the tracking outputs as. The printf format is Position%02d_Chamber%02d_Frame%03d_Cell%02d.png, with the ‘_Cell%02d’ string appended to signal which cell is being seeded/tracked (from top to bottom)
- boxeslist of (dict, dict)
Cropping box and fill box to re-place output prediction masks in the original image coordinates.