-
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
Add nice widgets callbacks #149
Conversation
lorenzocerrone
commented
Apr 13, 2023
•
edited
Loading
edited
- Add few magicguis callbacks to improve the user experience
- Setup good default for widgets
- Fix minor bug in headless
- Check version at start and notify if there is a newer version (to be improved) Notify if a new plantseg release is out #145
…s for the z cropping
…s for the z cropping
…o add_nices_widgets_callbacks # Conflicts: # plantseg/viewer/widget/dataprocessing.py
fixes #142 |
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.
just a few minor points. looks great overall 👍
plantseg/resources/models_zoo.yaml
Outdated
@@ -55,7 +55,7 @@ confocal_2D_unet_ovules_ds2x: | |||
description: "2D Unet trained on z-slices of confocal images of Arabidopsis Ovules (1/2-resolution in XY) with BCEDiceLoss." | |||
dimensionality: "2D" | |||
modality: "confocal" | |||
recommended_patch_size: [ 80, 170, 170 ] | |||
recommended_patch_size: [ 1, 170, 170 ] |
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.
here we should use [1, 256, 256]
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.
Done, plus [ 80, 170, 170 ] > [ 80, 160, 160 ], because 170 sounds like a weird choice to me :)
plantseg/resources/models_zoo.yaml
Outdated
@@ -101,7 +101,7 @@ lightsheet_2D_unet_root_ds1x: | |||
description: "2D Unet trained on z-slices of light-sheet images of Lateral Root Primordia on original resolution with BCEDiceLoss." | |||
dimensionality: "2D" | |||
modality: "light-sheet" | |||
recommended_patch_size: [ 80, 170, 170 ] | |||
recommended_patch_size: [ 1, 170, 170 ] |
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.
same here
plantseg/resources/models_zoo.yaml
Outdated
@@ -119,7 +119,7 @@ lightsheet_2D_unet_root_nuclei_ds1x: | |||
description: "2D Unet trained on z-slices of light-sheet images of Lateral Root Primordia nuclei on original resolution with BCEDiceLoss. The network predicts 2 channels: nuclei mask in the 1st channel, nuclei boundaries in the 2nd channel" | |||
dimensionality: "2D" | |||
modality: "light-sheet" | |||
recommended_patch_size: [ 80, 170, 170 ] | |||
recommended_patch_size: [ 1, 170, 170 ] |
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.
same here
plantseg/utils.py
Outdated
latest_version = response['tag_name'] | ||
latest_version_numeric = int(latest_version.replace('.', '')) | ||
plantseg_version_numeric = int(current_version.replace('.', '')) | ||
if latest_version_numeric > plantseg_version_numeric: |
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.
this might not always work though :)
v2.0 > v1.5.1
, but this code will convert it to 20 > 151
which is not correct. But assuming we always have major.minor.patch
from the bumpversion
this should be fine
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.
It's actually true, also 1.5.11 > 1.6.0. I change it to make it much more robust
@@ -15,6 +15,8 @@ def parser(): | |||
|
|||
|
|||
def main(): | |||
from plantseg.utils import check_version | |||
check_version() |
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.
would be good to surround this with try-except
clause in case there is a problem with github/network. We should not fail if external service is down
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.
Fixed it