Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ome-tiff inference script #7

Closed
JLrumberger opened this issue Apr 4, 2024 · 0 comments · Fixed by #8
Closed

Add ome-tiff inference script #7

JLrumberger opened this issue Apr 4, 2024 · 0 comments · Fixed by #8
Labels
enhancement New feature or request

Comments

@JLrumberger
Copy link
Collaborator

JLrumberger commented Apr 4, 2024

Description of feature

Add ome-tiff inference features to Nimbus.

We can adjust the Nimbus class by adding functions prepare_normalization_dict_ome and predict_ome_fovs to utils.py. The nimbus class then needs to check if fovs contain ome.tifs and use the according functions from utils.py.

The functions in utils.py should look roughly like this

def calculate_normalization_ome(ome_path, quantile, include_channels):
    # open ome_file
    # check if include_channels are included in ome file
    # iterate through include_channels and calculate quantile of foreground
    return channel: quantile dict

def prepare_normalization_dict_ome( fov_paths, output_dir, quantile,
    include_channels, n_subsets, n_jobs, output_name):
    # parallelize over fov_paths if n_jobs > 1
    # average quantiles of dicts

def predict_ome_fovs(nimbus, fov_paths, normalization_dict,
    segmentation_naming_convention, output_dir, suffix, include_channels=[],
    save_predictions=True, half_resolution=False, batch_size=4,
    test_time_augmentation=True):
# iterate through fovs and make prediction with nimbus object
# save predictions as tiffs or ome.tiffs 

In addition we need to change the ViewerWidget reader to work with ome.tifs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant