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

Conversation

kostrykin
Copy link
Contributor

The tool yields an error when we try to use a 3D image. For example, using the 3DUNetArabidopsisApicalStemCells.pt model and an image with shape 256,256,2,1 yields the error:

Expected weight to be a vector of size equal to the number of channels in input, but got weight of shape [1] and input of shape [2, 256, 256]

Original PR for this tool: #1391
xref beatrizserrano/galaxy-image-community#26

@kostrykin
Copy link
Contributor Author

@anuprulez Any idea what might be going on here?

@anuprulez
Copy link
Contributor

@kostrykin I had a look into 3DUNetArabidopsisApicalStemCells.pt and its RDF file. In the RDF file, the test_input.npy is 4 dimensional

rdf

but when I load the NPY file, it is actually 5-dimensional. The 5-dimensional file works as correct test data with the associated Pytorch model. In the Galaxy tool, I use the information from the RDF file to find the right number and order of dimensions. But, for this 3DUNetArabidopsisApicalStemCells 3D mode, it seems to be different to me. Do we have separate information that can be used to provide the model to find the correct number of input file dimensions?

5d

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

Successfully merging this pull request may close these issues.

2 participants