-
Notifications
You must be signed in to change notification settings - Fork 31
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
BioImage.IO Core: Improve interface for PlantSeg models #248
Conversation
Looks very nice! :) It's much cleaner. Since we are discussing this widget, I have two more ideas/suggestions:
|
`AliasChoices` can only be used in `validation_alias`; `alias` takes only `str`
I originally planned to implement automatic halo sizing when I noticed that the halo size was set to a constant value. However, I shifted focus to correct the halo implementation in PlantSeg and pytorch-3dunet, and the initial plan was set aside. I’ll proceed based on this paper: https://nvlpubs.nist.gov/nistpubs/jres/126/jres.126.009.pdf. My belief is that group norm and wrong halo implementation (and perhaps constant halo size) worked in previous settings because the images were always similar. Now I trained new official models with batch norm that reduce hallucination, fixed halo padding that reduce tiling artefact (it's not too wrong to claim we "removed tiling artefact"). The next step is to automatically set a minimal halo size based on the architecture so that the prediction is as exact as theoretically possible and completely removes tiling artefact. In the end, yes we remove the user-input halo, but do not use a constant. What do you think?
Thanks for the advice, I'll fix it tomorrow! |
Cool paper, a great work retraining the moodels! :) I like the idea of havig the perfect halo size calculated from the architecture. My point is just that exposing the |
Current models on BioImage.IO Model Zoo were uploaded before implementation of BioImage.IO Spec format version 0.5, but Spec v0.5 is in use already.
Hey Lorenzo, I don't actually understand the significance of having "Single Patch". If the model runs on host then PlantSeg finds batch size 1, otherwise finds the best batch size. I guess we can remove it and always find the best batch size for users? But I made the changes you requested. UpdateThere is one use case though: when someone has only one graphics card and plan to run PlantSeg for many images while using the same card. Yes, let's keep it. |
48f7f5a
to
f01c284
Compare
- Improve readability - Make multi-patch mode the default
f01c284
to
90c27aa
Compare
Yeah, that's exactly the use case. In general, if you have a single graphic card, it's nicer to keep a bit of Slack for other apps. |
PREDICTION_MODES = (PREDICTION_MODE_P, PREDICTION_MODE_B) # PREDICTION_MODES will not be binary, thus not boolean | ||
|
||
BIOIMAGEIO_FILTER = [("PlantSeg Only", True), ("All", False)] | ||
SINGLE_PATCH_MODE = [("Find Batch Size", False), ("Single Patch", True)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since "batch size" is also the label, should we use simply:
SINGLE_PATCH_MODE = [("Auto", False), ("One", True)]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we have space to put "(Lower VRAM usage)"/"(Lower memory usage)", we add this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SINGLE_PATCH_MODE = [("Auto", False), ("One (Lower VRAM Usage)", True)]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Changes
This PR improves #247
Improve UI: Change "Single Patch" to "Batch Size" and make auto-batch-size-discover the default
Choose to show PlantSeg or all models in dropdown list from BioImage.IO Model Zoo
Remove PlantSeg model zoo filters for BioImage.IO models
Before this PR