Describe the bug
When running get_bacteria_list on segmented fluorescence images, a large fraction of the
detected objects return no width and no length (bacteria.width / bacteria.length come
back as None/NaN).
To Reproduce
step1: mask, _ = run_omnipose(image_raw, 'bact_fluor_omni', gpu_option=False,
filter_options={'min_area': 10})
step2: bacteria_list = get_bacteria_list(
image_raw, mask,
options={'pxsize': 117, 'fit_type': 'fluorescence', 'psfFWHM': 370,
'n_widths': 5, 'boundary_smoothing_factor': 15,
'error_threshold': 0.05, 'max_iter': 50,
'min_distance_to_boundary': 1, 'step_size': 1.0,
'spline_spacing': 0.25, 'spline_order': 3})
step3: for b in bacteria_list:
print(b.label, b.area, b.axis_major_length, b.width, b.length)
Expected behavior
Every successfully segmented object generates a width and length. If the fit genuinely
cannot converge for an object, a warning/reason can be shown.
Screenshots

Describe the bug
When running get_bacteria_list on segmented fluorescence images, a large fraction of the
detected objects return no width and no length (bacteria.width / bacteria.length come
back as None/NaN).
To Reproduce
step1: mask, _ = run_omnipose(image_raw, 'bact_fluor_omni', gpu_option=False,
filter_options={'min_area': 10})
step2: bacteria_list = get_bacteria_list(
image_raw, mask,
options={'pxsize': 117, 'fit_type': 'fluorescence', 'psfFWHM': 370,
'n_widths': 5, 'boundary_smoothing_factor': 15,
'error_threshold': 0.05, 'max_iter': 50,
'min_distance_to_boundary': 1, 'step_size': 1.0,
'spline_spacing': 0.25, 'spline_order': 3})
step3: for b in bacteria_list:
print(b.label, b.area, b.axis_major_length, b.width, b.length)
Expected behavior
Every successfully segmented object generates a width and length. If the fit genuinely
cannot converge for an object, a warning/reason can be shown.
Screenshots