ZEISS Knowledge Base
Help
ZEISS Knowledge Base

Converting Cellpose models for use in arivis

How to use the Cellpose to ONNX script

First, download the script file here: Cellpose_to_onnx.py

Copy and paste the py file in the main folder of your cellpose python solution.

The script requires that the ONNX python libraries are installed. If these libraries are not yet installed, or you just want to make sure you have the latest:

  1. Open a cmd in the same folder as python.exe which your environment uses as its interpreter (this ensures that you are installing ONNX module for the correct env)
  2. Run pip install onnx to install ONNX module from official python packages

The script has two options:

  • Convert all models: look for built-in and custom models where Cellpose saves them. Any custom change in Cellpose behaviour (where the models are saved, for example) is not guaranteed to work with this option.
  • Convert individual model: convert single model at the time, the user must provide the model full path and a mean_diameter
Impressum
Carl-Zeiss-Strasse 22
73447 Oberkochen
Germany
Legal