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

Usage with custom 2D/3D model #25

Open
jo-mueller opened this issue Apr 9, 2024 · 5 comments
Open

Usage with custom 2D/3D model #25

jo-mueller opened this issue Apr 9, 2024 · 5 comments

Comments

@jo-mueller
Copy link

Describe the bug
I just tried to use the stardist-napari plugin using a custom model from the bioimage model zoo (i.e., this one). I would expect that I'd just have to select Custom 2D/3D in the stardist-napari plugin and navigate to the model weights (they're downloaded as .h5) and select them. However, the dialogue only allows to select folders and remains red when I chose the folder containing the weights file.

To reproduce
Simply install stardist-napari and download the weights from the link above.

Expected behavior
Weights should be detectable on my filesystem through the openfiledialogue in the plugin. I suspect that there is an openfolderdialogue instead of an openfiledialogue.

Data and screenshots

Capture

Environment:

os: Windows-10-10.0.19044-SP0
stardist_napari: 2022.12.6
stardist: 0.8.5
csbdeep: 0.7.4
napari: 0.4.19
magicgui: 0.8.2
tensorflow: 2.16.1
@jo-mueller jo-mueller added the bug Something isn't working label Apr 9, 2024
@jo-mueller
Copy link
Author

Possibly solved by this image.sc thread

@uschmidt83
Copy link
Member

Hi, the plugin expects a folder that contains a (StarDist-specific) config.json file that describes model architecture and at least one .h5 weights file. It looks like the author @qin-yu of the model you mentioned above has chosen to remove the config.json file.

@uschmidt83
Copy link
Member

Sorry, I was remembering this wrong. You actually need to first convert from the bioimage.io format to the "normal" stardist folder format. Then use that folder for the napari plugin. You can see how to do this here.

@uschmidt83 uschmidt83 removed the bug Something isn't working label Apr 26, 2024
@qin-yu
Copy link

qin-yu commented Apr 26, 2024

Hey @uschmidt83, should I do something? If I need to fix anything I'll be available over the weekend. If everything is okay then maybe I should put a guide somewhere in the description to show users how to convert. I'll talk to Fynn is there are more generic issues.

@uschmidt83
Copy link
Member

Hi @qin-yu, there's nothing for you to do. The bioimage.io model must be "imported" to create a regular StarDist model folder, as shown in this notebook. It can then be used with the napari plugin. I've also updated the plugin README to document this.

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

No branches or pull requests

3 participants