Skip to content

Convert TF model in OpenCV model #2040

Answered by marbre2
marbre2 asked this question in Q&A
Discussion options

You must be logged in to vote

If anyone ever wonder, here is how I solved the issue - for jupyter notebook (code is not optimized).
The script sample (for Jupyter notebook) below performs
-> saving TF trained model into a ONNX model compatible with StarDist plugin for QuPath.

# SAVING AND EXPORT DL MODEL FOR STARDIST - QUPATH extension
## Install all packages and cuda libraries
!pip install tensorflow
!pip install -U tf2onnx
!pip install 'stardist[bioimageio]'
!pip install -q stardist # contains tools to operate STARDIST.
!pip install -q gputools # improves STARDIST performances
#!pip install edt # improves STARDIST performances
!pip install -q onnxruntime

## Loading libraries
import tf2onnx
from stardist.models impo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by marbre2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant