Open qin-yu opened 3 weeks ago
This sounds great thanks! It would be great if it was easy for the community to host their Cellpose 2 fine-tuned models there! I'm not sure if I fully understand the packaging issue -- do you mean for users to add metadata? Our models are 26MB of pytorch weights -- that's all the user needs to run the model. I see for example I can download the stardist tensorflow weights from bioimage zoo, even though they also have non-tensorflow post-processing steps. Or maybe I misunderstand what you mean by post-processing.
This sounds great thanks! It would be great if it was easy for the community to host their Cellpose 2 fine-tuned models there!
Great! Your understanding is correct. The main goal here is to simplify the process for users to package and share their models with the necessary metadata included, making existing models easily discoverable and accessible to the community.
I'll start working on this and may reach out to you for some design decisions!
I'm not sure if I fully understand the packaging issue -- do you mean for users to add metadata? Our models are 26MB of pytorch weights -- that's all the user needs to run the model. I see for example I can download the stardist tensorflow weights from bioimage zoo, even though they also have non-tensorflow post-processing steps. Or maybe I misunderstand what you mean by post-processing.
This is a different matter, but your understanding is absolutely correct again. What I was saying is that while BioImage.IO allows users to run networks directly, spatial gradients from CPnet are not "post-processed" there (though it could happen, I'm not pushing for this). The immediate benefit lies in hosting community Cellpose models for downloading and running within Cellpose itself (which sounds great already!).
Is your feature request related to a problem? Please describe.
Hi @carsen-stringer!
I propose adding an
export_bioimageio()
function/method in Cellpose to facilitate packaging Cellpose models for the BioImage.IO model zoo. This feature could greatly benefit the community by simplifying the integration of Cellpose models into BioImage.IO.On the BioImage.IO side, Cellpose post-processing has not been finalized yet, but I've developed scripts for saving and packaging Cellpose models into the BioImage.IO format (
spec-bioimage-io
). I wanted to submit this issue before moving on to other tasks to see if you think it would be useful.Describe the solution you'd like
Plan A: Implement a function/method for one-click packaging of Cellpose models into the BioImage.IO format.
cellpose/utils.py
or create a new module.bioimageio_deps = ["bioimageio.spec"]
tosetup.py
to handle dependencies.Describe alternatives you've considered
Plan B: Describe the packaging steps in the documentation only, without implementing a dedicated function/method.