Title: New predict command: tiled prediction not working for model v0.4 · Issue #415 · bioimage-io/core-bioimage-io-python · GitHub
Open Graph Title: New predict command: tiled prediction not working for model v0.4 · Issue #415 · bioimage-io/core-bioimage-io-python
X Title: New predict command: tiled prediction not working for model v0.4 · Issue #415 · bioimage-io/core-bioimage-io-python
Description: Tiled prediction seems to not be implemented for v0.4 models: import bioimageio.core import imageio.v3 as imageio from xarray import DataArray from bioimageio.spec.model.v0_5 import AxisId image = imageio.imread("/home/pape/.cache/micro_...
Open Graph Description: Tiled prediction seems to not be implemented for v0.4 models: import bioimageio.core import imageio.v3 as imageio from xarray import DataArray from bioimageio.spec.model.v0_5 import AxisId image = ...
X Description: Tiled prediction seems to not be implemented for v0.4 models: import bioimageio.core import imageio.v3 as imageio from xarray import DataArray from bioimageio.spec.model.v0_5 import AxisId image = ...
Opengraph URL: https://github.com/bioimage-io/core-bioimage-io-python/issues/415
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"New predict command: tiled prediction not working for model v0.4","articleBody":"Tiled prediction seems to not be implemented for v0.4 models:\r\n```python\r\nimport bioimageio.core\r\nimport imageio.v3 as imageio\r\nfrom xarray import DataArray\r\n\r\nfrom bioimageio.spec.model.v0_5 import AxisId\r\n\r\nimage = imageio.imread(\"/home/pape/.cache/micro_sam/sample_data/livecell-2d-image.png\")\r\nmodel = bioimageio.core.load_description(\"hiding-tiger\")\r\nmodel.inputs[0].data_type = \"float32\"\r\n\r\ninput_descr = model.inputs[0]\r\n# this still does not work for me! (It would be great to fix it)\r\n# inputs = {input_descr.name: DataArray(image[None, None], dims=tuple(input_descr.axes))}\r\ninputs = {input_descr.name: DataArray(image[None, None], dims=(\"batch\", \"channel\", \"y\", \"x\"))}\r\n\r\n# tile_shape = {\"y\": 512, \"x\": 512}\r\ntile_shape = {input_descr.name: {AxisId(\"x\"): 512, AxisId(\"y\"): 512}}\r\npred = bioimageio.core.predict(model=model, inputs=inputs, input_block_shape=tile_shape)\r\n```\r\nfails with\r\n```\r\nTraceback (most recent call last):\r\n File \"/home/pape/Work/playground/bioimageio/new-pred/check_new_pred.py\", line 18, in \u003cmodule\u003e\r\n pred = bioimageio.core.predict(model=model, inputs=inputs, input_block_shape=tile_shape)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/pape/Work/bioimageio/core-bioimage-io-python/bioimageio/core/prediction.py\", line 100, in predict\r\n output = pp.predict_sample_with_fixed_blocking(\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/pape/Work/bioimageio/core-bioimage-io-python/bioimageio/core/_prediction_pipeline.py\", line 208, in predict_sample_with_fixed_blocking\r\n self.predict_sample_block(\r\n File \"/home/pape/Work/bioimageio/core-bioimage-io-python/bioimageio/core/_prediction_pipeline.py\", line 114, in predict_sample_block\r\n raise NotImplementedError(\r\nNotImplementedError: predict_sample_block not implemented for model 0.4.10\r\n```","author":{"url":"https://github.com/constantinpape","@type":"Person","name":"constantinpape"},"datePublished":"2024-08-23T08:35:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/415/core-bioimage-io-python/issues/415"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:81a70998-b917-3506-4387-2dfee730723b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E5F8:19E2D7:5DEADFF:81B688D:6A4BB340 |
| html-safe-nonce | 08bd94cb90fdce9dcd87da68c051770991e8a52cf32f18dce33afbad74cec88d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUY4OjE5RTJENzo1REVBREZGOjgxQjY4OEQ6NkE0QkIzNDAiLCJ2aXNpdG9yX2lkIjoiODQyMTI5OTE2MTQwNjk2Mzg0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ef9c9139c5fc65c1b3b2ef444f916d969ec60ef538f9083f4bb29ab705f3f36a |
| hovercard-subject-tag | issue:2482624779 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/bioimage-io/core-bioimage-io-python/415/issue_layout |
| twitter:image | https://opengraph.githubassets.com/57dd7b803dd4b260b025d3f0cce6dd73fe0229110f4cef3fb6176e21527f5680/bioimage-io/core-bioimage-io-python/issues/415 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/57dd7b803dd4b260b025d3f0cce6dd73fe0229110f4cef3fb6176e21527f5680/bioimage-io/core-bioimage-io-python/issues/415 |
| og:image:alt | Tiled prediction seems to not be implemented for v0.4 models: import bioimageio.core import imageio.v3 as imageio from xarray import DataArray from bioimageio.spec.model.v0_5 import AxisId image = ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | constantinpape |
| hostname | github.com |
| expected-hostname | github.com |
| None | ae1c14875555a1dd92bdef45baa6dd9aa796df891e4e471989f7117fe3139fc1 |
| turbo-cache-control | no-preview |
| go-import | github.com/bioimage-io/core-bioimage-io-python git https://github.com/bioimage-io/core-bioimage-io-python.git |
| octolytics-dimension-user_id | 54582174 |
| octolytics-dimension-user_login | bioimage-io |
| octolytics-dimension-repository_id | 218790457 |
| octolytics-dimension-repository_nwo | bioimage-io/core-bioimage-io-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 218790457 |
| octolytics-dimension-repository_network_root_nwo | bioimage-io/core-bioimage-io-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 68fba4ebcf15cde644b66de9a06e0a8582279435 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width