Skip to content

Many detected objects have no width/length #1

Description

@Jialu1104

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

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions