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

How to run 'powerful-fish' on my image? #405

Open
tibuch opened this issue Jul 22, 2024 · 2 comments
Open

How to run 'powerful-fish' on my image? #405

tibuch opened this issue Jul 22, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@tibuch
Copy link

tibuch commented Jul 22, 2024

Hi everyone,

I wanted to try one of the available models to enhance membranes in one of my images. The image is 3D with shape = (91, 1024, 1024). I tried to use the CLI with bioimageio predict-image but I get an ERROR: Could not consume arg: predict-image.

Then I thought to try it via Python, but I encounter this:

prediction_pipeline.predict_sample_with_blocking(sample)
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
Cell In[85], line 1
----> 1 prediction_pipeline.predict_sample_with_blocking(sample)

File ~/Gitrepos/gliberal_crypt-morphogenisis/.pixi/envs/modelzoo/lib/python3.12/site-packages/bioimageio/core/_prediction_pipeline.py:200, in PredictionPipeline.predict_sample_with_blocking(self, sample, skip_preprocessing, skip_postprocessing, ns, batch_size)
    197     self.apply_preprocessing(sample)
    199 if isinstance(self.model_description, v0_4.ModelDescr):
--> 200     raise NotImplementedError(
    201         "predict with blocking not implemented for v0_4.ModelDescr {self.model_description.name}"
    202     )
    204 ns = ns or self._default_ns
    205 if isinstance(ns, int):

NotImplementedError: predict with blocking not implemented for v0_4.ModelDescr {self.model_description.name}

What is the recommended way to run tiled prediction with a v0.4 model?

@esgomezm
Copy link
Contributor

Hi Tim!

The issue is basically that we cannot perform tiling with the new version of bioimageio.core library on "old models" (with a format version < 0.5).

For simply testing the inference, I would recommend using the test run online in the website. It will do the tiling and it's straightforward to drag&drop the image and click on run model. I would reduce slightly the Z-dimension from 91 to 64 and if possible the (X,Y) dimensions. If not, it will just take more time.

Screenshot 2024-07-22 at 13 41 37

Otherwise, to use the Python code, here are some alternatives:

I hope this helps. Please, let us know how it goes

@esgomezm esgomezm added the enhancement New feature or request label Jul 22, 2024
@FynnBe
Copy link
Member

FynnBe commented Jul 23, 2024

Hi @tibuch I'm currently working on restoring some of the convenience functionality from before the update of bioimageio.spec (and its incorporation into bioimageio.core): #406
So this should become more accessible in the next release.

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

No branches or pull requests

3 participants