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

[BHEU2024] Fix bioimage_inference tool with 3D images #1544

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tools/bioimaging/bioimage_inference.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@
<output name="output_predicted_image" file="output_nucleisegboundarymodel.tif" compare="sim_size" delta="100" />
<output name="output_predicted_image_matrix" file="output_nucleisegboundarymodel_matrix.npy" compare="sim_size" delta="100" />
</test>
<test>
<param name="input_imaging_model" value="input_imaging_model.zip" location="https://zenodo.org/api/records/7768142/files/torchscript_tracing.pt/content"/>
<param name="input_image_file" value="input_bheu2024a.tif"/>
<param name="input_image_input_size" value="128,128,100,1"/>
<output name="output_predicted_image" file="output_bheu2024.tif" compare="sim_size" delta="100" />
<output name="output_predicted_image_matrix" file="output_bheu2024.npy" compare="sim_size" delta="100" />
</test>
</tests>
<help>
<![CDATA[
Expand Down
7 changes: 1 addition & 6 deletions tools/bioimaging/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@

def find_dim_order(user_in_shape, input_image):
"""
Find the correct order of input image's
shape. For a few models, the order of input size
mentioned in the RDF.yaml file is reversed compared
to the input image's original size. If it is reversed,
transpose the image to find correct order of image's
dimensions.
Find the correct order of input image's shape. For a few models, the order of input size mentioned in the RDF.yaml file is reversed compared to the input image's original size. If it is reversed, transpose the image to find correct order of image's dimensions.
"""
image_shape = list(input_image.shape)
# reverse the input shape provided from RDF.yaml file
Expand Down
Binary file added tools/bioimaging/test-data/input_bheu2024a.tif
Binary file not shown.
Loading