This page contains information on how to setup QuPath 0.3 and how to migrate 0.2 to 0.3 scripts and protocols
= Installing StarDist for QuPath 0.3.x =
[[ https://github.com/qupath/qupath-extension-stardist | StarDist now exists as a QuPath Extension ]], and on a fresh QuPath install, all you need to do is drag and drop the release JAR into QuPath. This will copy it into the `extensions` directory.
Otherwise it is included in `QuPath Common Data` which can be dlonloaded here: `\\svfas6\biop\public\0-QuPath`
= Migrating StarDist Models =
StarDist models now need to be in `*.pb` format as per [[ https://github.com/qupath/qupath-extension-stardist#converting-a-tensorflow-model-for-use-with-opencv | this note by Pete Bankhead on the StarDist Extension Repo ]]
== Install a Virtual Environment for the conversion ==
Pip Dependencies: {F21324420}
**If you use `venv` with `py` and want to install in `D:\env-tf2onnx`**
```
py -3.7 -m venv d:\env-tf2onnx
d:\env-tf2onnx\Scripts\activate\
pip install -r tf2onnx.txt
```
**If you use `conda`**
```
conda create -n env-tf2onnx
conda activate env-tf2onnx
pip install -r tf2onnx.txt
```
== Converting a Model from a StarDist Training ==
1. Copy the resulting **model folder **from StarDist training (not the ZIP file). The example here assumes it is called `demo-model`
2. Run the following command
```
python -m tf2onnx.convert --opset 10 --saved-model "L:\public\0-BIOP_Data\StarDist Models\demo-model" --output_frozen_graph "L:\public\0-BIOP_Data\StarDist Models\demo-model.pb"
```
3. This creates a single file `demo-model.pb`
4. Point to this file in the new StarDist Extension from within QuPath