-
Notifications
You must be signed in to change notification settings - Fork 390
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
Export CPnet to BioImage.IO Model Zoo #988
Conversation
Removed unnecessary packages. Now BioImage.IO can test Cellpose models with resnet_torch.py without Cellpose installed
`transform.convert_image()` no longer normalises the input.
`model_id` and `model_icon` should be `None` for new models
thank you! |
Hi @qin-yu, could you please write a short blurb in our readthedocs describing how to export a model to bioimage.io? I think it would make sense here: https://github.com/MouseLand/cellpose/blob/main/docs/models.rst#user-trained-models. I can also do this but I think you're the expert here, thanks so much for adding this to cellpose |
Sure! I'll let you know once it's done. |
Hi @qin-yu , can we move the overwriting of load_state_dict into your subclass ( cellpose/cellpose/resnet_torch.py Line 279 in 729b701
|
If we restore the old |
Hi @carsen-stringer!
I made a "export" module for Cellpose. Please have a look! This PR attempts to close #956 and provides an
export.py
module with a CLI interface to facilitate users to upload their custom Cellpose models (CPnet
s) to Bioimage.IO Model Zoo.Usage
To install the dependencies:
CLI interface:
This creates a bioimage.io package in a new directory
models/MODEL_NAME/cellpose_model.zip
which can be uploaded via https://bioimageio-uploader.netlify.app/#/uploader/addDetails
CPnet
class pass tests frombioimageio.core
, one small refactor of.load_model()
method was made, which only includes formal changes but keeps the semantics.CPnetBioImageIO
unpacks the nested output fromCPnet
and make it compatible tobioimageio.spec
test_input
for all Cellpose models