stardist / stardist-imagej

StarDist plugin for ImageJ
BSD 3-Clause "New" or "Revised" License
27 stars 14 forks source link

Models Incompatible with Stardist package - need .h5 files #20

Closed kaitsmith22 closed 8 months ago

kaitsmith22 commented 9 months ago

Hello,

I would like to use the models found here https://github.com/stardist/stardist-imagej/tree/master/src/main/resources/models/2D with the main stardist package. However, when I register the models using

 from csbdeep.models import register_model, register_aliases, clear_models_and_aliases
register_model(StarDist2D,   'stardist-imagej', 'https://github.com/stardist/stardist-imagej/blob/master/src/main/resources/models/2D/dsb2018_heavy_augment.zip', None)

I get the warning: base_model.py (163): Couldn't find any network weights (*.h5, *.hdf5) to load.. Could the zip files be updated with the .h5 files so the models can be easily used with the stardist api?

kaitsmith22 commented 8 months ago

The models given here https://github.com/stardist/stardist-imagej/tree/master/src/main/resources/models/2D give very similar results to the models in the stardist package, such as 2d_versatile_fluo. If anyone is having trouble using the results of the model out of the box, I recommend making sure the images are normalized between 0 and 1. Thresholding to remove any noise will also help improve model results.

uschmidt83 commented 8 months ago

I would like to use the models found here https://github.com/stardist/stardist-imagej/tree/master/src/main/resources/models/2D with the main stardist package

Sorry, the Java models are in a different format and not usable from Python.

The models given here https://github.com/stardist/stardist-imagej/tree/master/src/main/resources/models/2D give very similar results to the models in the stardist package, such as 2d_versatile_fluo.

Yes, they are very similar but not identical. It's a bit confusing, sorry.