scalableminds / webknossos

Visualize, share and annotate your large 3D images online
https://webknossos.org
GNU Affero General Public License v3.0
130 stars 24 forks source link

Enforce minimum AI inference bounding box #8198

Open hotzenklotz opened 1 week ago

hotzenklotz commented 1 week ago

Context

Sometimes user want to try out the AI inference features. The upload a tiny datasets and launch this feature or use a really small bounding box. In some cases this BB is too small to run an AI segmentation and the WK worker will crash. We should prevent users from triggering these jobs.

Expected Behavior

WK should enforce a minimum BB in the UI and prevent users from launching a worker run destined to fail. AFAIR, we already enforce a maximum limit for AI jobs.

Current Behavior

The worker crashes with with an Assertion Error:

AssertionError: Your dataset size in the prediction mag ([ 1 89 250]) is so small that no valid prediction output shape can be found (minimum is (2, 50, 128)).

E.g. https://webknossos.org/workflows/e4c9b63f53

Steps to Reproduce the bug

  1. Launch AI job with a really small BB
  2. Kaboom

Your Environment for bug