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

Add stardist fluorescence model #3

Merged
merged 6 commits into from
Jun 24, 2024
Merged

Add stardist fluorescence model #3

merged 6 commits into from
Jun 24, 2024

Conversation

gnodar01
Copy link
Member

We have had stardist H&E for a while, which is pretrained for tissue images, this adds the variant of stardist pretrained on flourescence data from here: https://bioimage.io/#/?tags=stardist&id=10.5281%2Fzenodo.6348084

gnodar01 added 4 commits June 12, 2024 16:08
- we have had stardist H&E for a while, which is pretrained for tissue
  images, this adds the variant of stardist pretrained on flourescence
  data from here: https://bioimage.io/#/?tags=stardist&id=10.5281%2Fzenodo.6348084
- TODO: DRY the code, by unifying preprocessing, prediction and loading
  from the two stardist implementations (majority is identical between
  the two)
- create abstract stardist class for the two concrete stardist variant
  classes, because most of the functionality is identical
@gnodar01 gnodar01 requested a review from Andrea-Papaleo June 12, 2024 21:13
@Andrea-Papaleo
Copy link
Contributor

Running into error while predicting.
Error in running predictions Error: The shape of dict['input'] provided in model.execute(dict) must be [-1,-1,-1,1], but was [1,128,128,3]

Stardist Example Fluo

@gnodar01
Copy link
Member Author

gnodar01 commented Jun 17, 2024

The fluorescence model takes one channel inputs. You can find the example image at the zenodo repo, but don't download the jpg (since that's a scaled down, 3 channel, preview image). You should download sample_input_0.tif, which is one channel and 32-bit. Since 32-bit images are not yet supported you have to scale it down to 16-bit in fiji via Image -> type -> 16-bit (I can't upload it here since GitHub doesn't support tiff).

UPDATE: I added the example image in data/images.

I did make the mistake of setting 3 for requiredChannels in the model constructor, which I've now fixed, but there is no difference in behavior if passing in the 3 channel image. The same error is issued; at least on predict piximi doesn't stop you from trying to press predict on a 3 channel image. Filed an issue here.

@Andrea-Papaleo Andrea-Papaleo merged commit 2eb6af5 into master Jun 24, 2024
1 check passed
Andrea-Papaleo pushed a commit that referenced this pull request Jun 24, 2024
Add stardist fluorescence model 2eb6af5
@bethac07 bethac07 deleted the stardist-fluo branch July 17, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants