Fix transposed dimensions#1609
Conversation
There was a problem hiding this comment.
Thanks!
Can you maybe please use something like <output name="output_predicted_image" file="result.tiff" ftype="tiff" compare="image_diff" /> for the tests?
galaxytools/tools/bioimaging/bioimage_inference.xml
Lines 67 to 82 in 973836f
This will be more reliable.
kostrykin
left a comment
There was a problem hiding this comment.
You also need to increment the @VERSION_SUFFIX@:
|
And another question, this is beyond the scope of this PR, but maybe we can discuss this :) I tried to wrap my head around the galaxytools/tools/bioimaging/bioimage_inference.xml Lines 40 to 44 in 973836f The only place that I could find where it is used is in galaxytools/tools/bioimaging/main.py Line 123 in 973836f so it looks like you only need the number of axes? If this is the case, I have two follow-up questions:
<option value="bcyx">Four axes (e.g., bcyx, byxc)</option>
<option value="bczyx">Five axes (e.g., bczyx)</option>
|
Yes, it is required to get the exact number of dimensions that the model needs to process the image.
Yes, it should work. I will make this change
We are not currently taking input numpy arrays for processing as inputs, only TIFF and PNG. However, the numpy arrays might contain the correct number of dimensions that the models need but the TIFF files do not have this information. For example, the RDF file for this model "Mitochondria EM Segmentation Boundary Model" (https://bioimage.io/#/?id=10.5281%2Fzenodo.5874841) says that the input size is |
I agree but with |
Awesome!
At least for this particular test, the file is just about 500 kB: result.tiff.zip |
|
Also, opened a PR for updating the associated GTN tutorial to replace the unsupported TensorFlow model to a Pytorch one: galaxyproject/training-material#5957 |
| <assert_contents> | ||
| <has_size size="524846" delta="110" /> | ||
| </assert_contents> |
There was a problem hiding this comment.
With the image_diff check in place, I think we can remove this?
The has_size test is very heuristical, it might even raise a false-negative check failure.
|
Thanks! |
Alright, we're on the same page here :) |
This PR fixes #1608
Tested with all the models in https://training.galaxyproject.org/training-material/topics/imaging/tutorials/process-image-bioimageio/tutorial.html
In the above tutorial, "NeuronSegmentationInEM" does not have any Pytorch model available at the mentioned link. I propose to change it to https://bioimage.io/#/?id=10.5281%2Fzenodo.5874741
ping @kostrykin