Releases: BIOP/qupath-extension-cellpose
Improved label image reading and code linting
From several forum posts, it was clear that for large tiles and large fields of view, the extension was having issues.
This caused tiles to be empty and the detections being incomplete.
It seems like it was caused by the way we used to read objects in using JTS.
This new update changes the way label images are converted to QuPath objects by using the same strategy as LaRoMe's Labels2Rois
https://github.com/BIOP/ijp-LaRoMe/blob/master/src/main/java/ch/epfl/biop/ij2command/Labels2Rois.java
Fundamentally, this should not change the way cells are detected now vs before, though no testing has been done. One thing to note is that if Cellpose ever allows for objects with holes to be detected, then the current strategy will need to be changed again.
What's Changed
Full Changelog: v0.9.5...v0.9.6
Bugfix
As per https://forum.image.sc/t/a-bug-in-cellpose-for-qupath-extension-0-9-4/100641/5
This reverts the touching object handling that was broken in the previous version.
this is the information from the previous version
This new update adresses some issues linked to cellpose failing on large tiles, most likely linked to there being overly small tiles being created in some cases.
This was adressed for now by either ignoring images that are too small (which should be included in the overlap between tiles anyway) and by adding a check in case reading a label image has an error, which initially caused the extension to simply crash.
A new builder parameter setOutputModelName(String outputName) allows you to rename the resulting cellpose model after training.
Since Cellpose 3.0, cellpose models can have arbitrary names, so the extension renames the model to a *.cpm (Cellpose Model) with the timestamp of creation.
Feedback welcome
Small updates and error catching
This new update adresses some issues linked to cellpose failing on large tiles, most likely linked to there being overly small tiles being created in some cases.
This was adressed for now by either ignoring images that are too small (which should be included in the overlap between tiles anyway) and by adding a check in case reading a label image has an error, which initially caused the extension to simply crash.
A new builder parameter setOutputModelName(String outputName)
allows you to rename the resulting cellpose model after training.
Parallel object reader, normalization bugfix gpu disable option and more
Welcome to a new release with the following important changes
- Adds
useGPU( boolean )
to the builder to disable GPU (Enabled by default) - Fixes a bug found and corrected by @tfehlmann where
op
s were being re-created per image, which caused an error during image saving - Adds better error handling when no candidate files are present
- Adds
readResultsAsynchronously()
to the builder, which allows the extension to read the resulting labeled images for each tile as cellpose processes them, potentially making the extension faster - Changes the logic for the
VirtualEnvironmentRunner
when using CONDA (Not available as such within the extension) as per a suggestion by @loicsauteur - Allows
pixelSize()
to accept values smaller than the original pixel size in case you want to upsample your data before sending it to cellpose - Uses a new log parser in order to parlse omnipose and cellpose v3 logs when training
What's Changed
- Ensure that operations are the same when processing multiple images by @tfehlmann in #44
- Bugfixes and update to Cellpose 3 logging by @lacan in #46
New Contributors
- @tfehlmann made their first contribution in #44
Full Changelog: v0.9.2...v0.9.3
Release for first publication in Zenodo
This is not a release per se, but will trigger Zenodo to generate a DOI for the software.
Experimental faster label image read
Adds an option readResultsAsynchronously()
in the cellpose builder that, when activated, tries to
- Create a file Watcher on the folder where cellpose is supposed to write the predicted labels
- On new files being created, calls the image to label conversion while the prediction continues for the rest of the tiles
This is experimental, feel free to test it, with no promises
QuPath 0.5.0 compatibility
The new cellpose extension with QuPath 0.5.0 support.
Also includes a new version of que Quality Control Python script, so please update that one too
Small bugfixes, custom folders export, script templates
This new release adds the following
- You can define output folders for all things now when invoking the builder:
groundTruthDirectory(java.io.File groundTruthDirectory)
Specify the training directory where thes test and train images will be addedtempDirectory(java.io.File groundTruthDirectory)
Specify the temporary directory when using cellpose inferencemodelDirectory(java.io.File groundTruthDirectory)
Specify the where the model will be saved- the Quality Control results remain inside the model directory
- an Omnipose internal variable name had a typo and was fixed. You will have to re-enter the path in in your
Edit > Preferences
if you are using Omnipose - Script templates: Training and detection script templates are now in
Extensions > Cellpose
, Just like the StarDist extension (Thank you @petebankhead) - Names for Cellpose preferences were changed to empahsise how we need the full path to
python.exe
Happy Cellposing
Bugfixes and the return of Omnipose
With the current versions of Cellpose and Omnipose, we have gotten them to play nice enough with each other and drafter this new release with a (small) breaking change.
Python Path is now the only available way of calling your cellpose or omnipose installation. You will need to update your Preferences under Cellpose/Omnipose
This follows with what was done for TrackMate, and simplifies our life so we can be conda/mamba/venv agnostic. This has been tested on Windows and Mac with no problems. We of course welcome feedback!
The documentation has been updated to reflect this change.
A small bug where preprocessing steps were not taken into account on training images was also fixed
Tile creation rollback
This update simply adds a rollback on how tiles were computed for cellpose.
When QuPath 0.4.1 came out, the logic of the tiles was rewritted based on the StarDist Extension, which would force tiles to be a particular size, with optional padding. In our case, this tended to create tiles that were coering way more image space than necessary, creating large overhead.
So with this update, we have reverted back to the older way of doing it.
This should have no change, or perhaps very minor changes in the global normalization numbers and in cellpose normalization, because of the change in tile size and thus contents.