An extension that wraps a Cellpose environment such that WSI can be analyzed using Cellpose through QuPath.

Overview

QuPath Cellpose extension

This repo adds some support to use 2D Cellpose within QuPath through a Python virtual environment.

Installing

Step 1: Install Cellpose

Follow the instructions to install Cellpose from the main Cellpose repository. This extension will need to know the path to your Cellpose environment.

Cellpose Environment on Mac

Currently, due to lack of testing and obscurity in the documentation, you cannot run the conda version of Cellpose from Mac or Linux, and a Python virtual environment is suggested (venv). Anyone able to run conda activate from a Java ProcessBuilder, please let me know :)

The 'Simplest' way with just a venv so far is the following

  1. Create a conda environment with the right Python version, and use that conda environment to create a venv
conda create python38 python=3.8
conda activate python38
python -m venv /where/you/want/your/cellpose
conda deactivate
source /where/you/want/your/cellpose/bin/activate
  1. Now we are on the venv and we can install Cellpose
pip install cellpose 

Step 1.1: Anaconda, Miniconda: Allow conda command from command line

  1. Into the environment variable , edit PATH , add path to your ..\Anaconda3\condabin default would be C:\ProgramData\Anaconda3\condabin
  2. Open a new PowerShell (and/or PowerShell (x86) ) or Command Prompt and run the following command once to initialize conda:
conda init

From now on you don't need to run a conda prompt you can simply activate a conda env from cmd.exe .

To check if it works:

  1. Press the windows key, type cmd.exe (to get a command promt)
  2. Type conda env list and you should get the list of your conda envs

Step 1.2: Run Cellpose at least once from the command line

If you never ran Cellpose before, it needs to download its pretrained models the first time you run it. This may take some time and we've experienced the process hanging if done through QuPath. Just run cellpose from your command line and it should download all the models. Do this before using it in QuPath.

Step 2: Install the QuPath Cellpose extension

Download the latest qupath-extension-cellpose-[version].jar file from releases and drag it onto the main QuPath window.

If you haven't installed any extensions before, you'll be prompted to select a QuPath user directory. The extension will then be copied to a location inside that directory.

You might then need to restart QuPath (but not your computer).

QuPath: First time setup

Go to Edit > Preferences > Cellpose Complete the fields with the requested information The example below is from a full GPU enabled cellpose installation that was made by following the instructions here. image

In the example provided above for installing cellpose on Mac/Linux, you would enter /where/you/want/your/cellpose/ and Python VENV as options

Using the Cellpose QuPath Extension

Training

Requirements: A QuPath project with rectangles of class "Training" and "Validation" inside which the ground truth objects have been painted.

We typically create a standalone QuPath project for training only. This project will contain the training images along with the ground truth annotations drawn in QuPath. Here are some reasons we do it this way:

  1. Separating training and prediction/analysis makes for clean project structures and easier sharing of the different steps of your workflow.
  2. In case we need to get more ground truth, we can simply fire up the relevant QuPath project and import the newly trained model into any other project that might need it.

Protocol

  1. In your QuPath project create rectangle annotations, of "Training" and "Validation" classes.
  2. Lock the rectangles (right click > Annotations > Lock).
  3. Draw your ground truth. You can also run cellpose with createAnnotations() in the builder to have a starting ground truth you can manually correct.
  4. The drawn ground truth annotations must have no classes.

After you have saved the project, you can run the Cellpose training in the following way:

import qupath.ext.biop.cellpose.Cellpose2D

def cellpose = Cellpose2D.builder("cyto") // Can choose "None" if you want to train from scratch
                .channels("DAPI", "CY3")  // or use work with .cellposeChannels( channel1, channel2 ) and follow the cellpose way
                .preprocess(ImageOps.Filters.gaussianBlur(1)) // Optional preprocessing QuPath Ops 
                .epochs(500)              // Optional: will default to 500
                .learningRate(0.2)        // Optional: Will default to 0.2
                .batchSize(8)             // Optional: Will default to 8
                .useGPU()                 // Optional: Use the GPU if configured, defaults to CPU only
                .modelDirectory(new File("My/location")) // Optional place to store resulting model. Will default to QuPath project root, and make a 'models' folder 
                .build()

// Once ready for training you can call the train() method
// train() will:
// 1. Go through the current project and save all "Training" and "Validation" regions into a temp folder (inside the current project)
// 2. Run the cellpose training via command line
// 3. Recover the model file after training, and copy it to where you defined in the builder, returning the reference to it

def resultModel = cellpose.train()

// Pick up results to see how the training was performed
println "Model Saved under "
println resultModel.getAbsolutePath().toString()

// You can get a ResultsTable of the training. 
def results = cellpose.getTrainingResults()
results.show("Training Results")

// Finally you have access to a very simple graph 
cellpose.showTrainingGraph()

Extra training options: All options in Cellpose have not been transferred. In case that this might be of use to you, please open an issue.

Prediction

Running Cellpose is done via a script and is very similar to the excellent QuPath StarDist Extension

All builder options are to be found in the Javadoc

import qupath.ext.biop.cellpose.Cellpose2D

// Specify the model name (cyto, nuc, cyto2, omni_bact or a path to your custom model)
def pathModel = 'cyto'

def cellpose = Cellpose2D.builder( pathModel )
        .pixelSize( 0.5 )              // Resolution for detection
        .channels( 'DAPI' )            // Select detection channel(s)
//        .preprocess( ImageOps.Filters.median(1) )                // List of preprocessing ImageOps to run on the images before exporting them
//        .tileSize(2048)                // If your GPU can take it, make larger tiles to process fewer of them. Useful for Omnipose
//        .cellposeChannels(1,2)         // Overwrites the logic of this plugin with these two values. These will be sent directly to --chan and --chan2
//        .maskThreshold(-0.2)           // Threshold for the mask detection, defaults to 0.0
//        .flowThreshold(0.5)            // Threshold for the flows, defaults to 0.4 
//        .diameter(0)                   // Median object diameter. Set to 0.0 for the `bact_omni` model or for automatic computation
//        .invert()                      // Have cellpose invert the image
//        .useOmnipose()                 // Add the --omni flag to use the omnipose segmentation model
//        .excludeEdges()                // Clears objects toutching the edge of the image (Not of the QuPath ROI)
//        .clusterDBSCAN()               // Use DBSCAN clustering to avoir over-segmenting long object
        .cellExpansion(5.0)            // Approximate cells based upon nucleus expansion
//        .cellConstrainScale(1.5)       // Constrain cell expansion using nucleus size
//        .classify("My Detections")     // PathClass to give newly created objects
        .measureShape()                // Add shape measurements
        .measureIntensity()            // Add cell measurements (in all compartments)  
//        .createAnnotations()           // Make annotations instead of detections. This ignores cellExpansion
        .useGPU()                      // Optional: Use the GPU if configured, defaults to CPU only

        .build()

// Run detection for the selected objects
def imageData = getCurrentImageData()
def pathObjects = getSelectedObjects()
if (pathObjects.isEmpty()) {
    Dialogs.showErrorMessage("Cellpose", "Please select a parent object!")
    return
}
cellpose.detectObjects(imageData, pathObjects)
println 'Done!'

Citing

If you use this extension, you should cite the original Cellpose publication

You should also cite the QuPath publication, as described here.

Building

You can build the QuPath Cellpose extension from source with

gradlew clean build

The output will be under build/libs.

  • clean removes anything old
  • build builds the QuPath extension as a .jar file and adds it to libs

Extra notes

Like the StarDist extension, we provide a normalization option normalizePercentiles. However. because Cellpose does its own normalization, and QuPath keeps the normalized image in 32-bit with no clipping, there is no effect from using the normalization.

In case you need your own normalization, you need to ask Cellpose to implement it or allow to deactivate normalization.

Ubuntu Error 13: Permission Denied

As per this post here, there is a permissions issue when using Ubuntu, which does not allow Java's ProcessBuilder to run. The current workaround is to build QuPath from source in Ubuntu, which then allows the use of the ProcessBuilder, which is the magic piece of code that actually calls Cellpose.

Comments
  • min_train_masks option

    min_train_masks option

    Hi,

    Would it be possible to add the min_train_masks option. I try to train the detection of mitosis. But get an error like: "train images with number of masks less than min_train_masks (5)". Would be nice to set this to a lower value.

    image

    Best, Ron

    opened by RAHoebe 7
  • Cannot run init the conda env and run the python command

    Cannot run init the conda env and run the python command

    Dear,

    I installed cellpose and the qupath plugin but ran into this error on Windows 10 with conda version conda 4.11.0 :

    INFO: Executing command: [cmd.exe /C conda activate C:\GBW_MyPrograms\Anaconda3\envs\cellpose & python -W ignore -m cellpose --dir C:\Users\myuser\Downloads\test_cellpose_qupath\cellpose-temp --pretrained_model cyto --chan 0 --chan2 0 --diameter 0.0 --flow_threshold 0.4 --mask_threshold 0.0 --save_tif --no_npy --use_gpu --verbose]
    INFO: Cellpose2D: 
    INFO: Cellpose2D: CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
    INFO: Cellpose2D: If using 'conda activate' from a batch script, change your
    INFO: Cellpose2D: invocation to 'CALL conda.bat activate'.
    INFO: Cellpose2D: 
    INFO: Cellpose2D: To initialize your shell, run
    INFO: Cellpose2D: 
    INFO: Cellpose2D:     $ conda init <SHELL_NAME>
    INFO: Cellpose2D: 
    INFO: Cellpose2D: Currently supported shells are:
    INFO: Cellpose2D:   - bash
    INFO: Cellpose2D:   - cmd.exe
    INFO: Cellpose2D:   - fish
    INFO: Cellpose2D:   - tcsh
    INFO: Cellpose2D:   - xonsh
    INFO: Cellpose2D:   - zsh
    INFO: Cellpose2D:   - powershell
    INFO: Cellpose2D: 
    INFO: Cellpose2D: See 'conda init --help' for more information and options.
    INFO: Cellpose2D: 
    INFO: Cellpose2D: IMPORTANT: You may need to close and restart your shell after running 'conda init'.
    

    It looks like it will be better to use CALL conda.bat activate, something like this:

    cmd.exe /C CALL conda.bat activate <cellpose_env> & python -W ignore -m <cellpose_env> --dir ... instead of cmd.exe /C conda activate <path_to_cellpose_env> & python -W ignore -m <cellpose_env> --dir ...

    Would it be possible to add a field in the cellpose option plugin to set the command ?

    Best, Benjamin

    bug good first issue 
    opened by bpavie 4
  • Tiled Segmentation

    Tiled Segmentation

    Hi,

    image

    I tested training a network. Works OK I think. It is really fast, so I hope it used my complete training patches etc. However using the trained network gives a problem if the images are big and the script runs prediction on tiles. See picture. I also tried training Stardist, and predicting with Stardist does not give these effects at the borders.

    Best, Ron

    bug 
    opened by RAHoebe 3
  • conda.bat path

    conda.bat path

    Hi,

    It is amazing to setup cellpost under BIOP. However, I am working within intranet and cannot modify PATH. I would like to request conda.bat setup unde Cellpose.
    create new text input for conda.batl or modify conda.bat path by adapting from cellpose env, like CellposeEnvDir -> "D:\Anaconda3\envs\cellpose", then conda.bat -> "D:\Anaconda3\condabin\conda.bat".

    Thanks a lot!

    opened by ZhaoJK 2
  • Changed the way project base dir is inferred

    Changed the way project base dir is inferred

    As per Pete's explanations, I changed the way the project base directory is inferred in the extension (for the creation of a temp directory required by Cellpose).

    I've only tested this in Windows, but the change generated a valid path, both from a GUI thread and from a "normal" script.

    opened by zindy 1
  • No annotations for detected object

    No annotations for detected object

    Hi: I am trying to use cellpose extension in qupath. It seems like the extension works well and I trained my own model. When I tried to use the model for cell detection, however, no cells are detected (or detected but not annotated) on my images.

    Below is the log: INFO: Provided model C:\ABBA\QuPath-0.3.2\My\location\cellpose_residual_on_style_on_concatenation_off_train_2022_08_07_23_40_19.334298 is a file. Assuming custom model INFO: If tiling is necessary, 0 pixels overlap will be taken between tiles INFO: Folder creation of C:\HistologyData\1085426\cellposetraining\cellpose-temp was interrupted. Either the folder exists or there was a problem. INFO: Saving images for 6 tiles INFO: Saving to C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_17744_10696.tif INFO: Saving to C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_16954_9672.tif INFO: Saving to C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_17744_8964.tif INFO: Saving to C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_16954_8964.tif INFO: Saving to C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_16954_10696.tif INFO: Saving to C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_17744_9672.tif INFO: Executing command: [cmd.exe /C C:\Users\xxx\anaconda3\envs\cellpose\python.exe -W ignore -m cellpose --dir C:\HistologyData\1085426\cellposetraining\cellpose-temp --pretrained_model C:/ABBA/QuPath-0.3.2/My/location/cellpose_residual_on_style_on_concatenation_off_train_2022_08_07_23_40_19.334298 --chan 0 --chan2 0 --diameter 0.0 --flow_threshold 0.4 --cellprob_threshold 0.0 --save_tif --no_npy --use_gpu --verbose] INFO: Cellpose2D: creating new log file INFO: Cellpose2D: 2022-08-08 10:04:14,114 [INFO] WRITING LOG OUTPUT TO C:\Users\xxx.cellpose\run.log INFO: Cellpose2D: 2022-08-08 10:04:14,285 [INFO] ** TORCH CUDA version installed and working. ** INFO: Cellpose2D: 2022-08-08 10:04:14,286 [INFO] >>>> using GPU INFO: Cellpose2D: 2022-08-08 10:04:14,288 [INFO] >>>> running cellpose on 6 images using chan_to_seg GRAY and chan (opt) NONE INFO: Cellpose2D: 2022-08-08 10:04:14,289 [INFO] >>>> loading model C:/ABBA/QuPath-0.3.2/My/location/cellpose_residual_on_style_on_concatenation_off_train_2022_08_07_23_40_19.334298 INFO: Cellpose2D: 2022-08-08 10:04:16,124 [INFO] >>>> model diam_mean = 30.000 (ROIs rescaled to this size during training) INFO: Cellpose2D: 2022-08-08 10:04:16,124 [INFO] >>>> model diam_labels = 24.321 (mean diameter of training ROIs) INFO: Cellpose2D: 2022-08-08 10:04:16,125 [INFO] >>>> not using cyto, cyto2, or nuclei model, cannot auto-estimate diameter INFO: Cellpose2D: 2022-08-08 10:04:16,125 [INFO] >>>> using diameter 24.321 for all images INFO: Cellpose2D: 2022-08-08 10:04:16,128 [INFO] 0%| | 0/6 [00:00<?, ?it/s] INFO: Cellpose2D: 2022-08-08 10:04:20,661 [INFO] 17%|#6 | 1/6 [00:04<00:22, 4.53s/it] INFO: Cellpose2D: 2022-08-08 10:04:21,946 [INFO] 33%|###3 | 2/6 [00:05<00:10, 2.62s/it] INFO: Cellpose2D: 2022-08-08 10:04:22,881 [INFO] 50%|##### | 3/6 [00:06<00:05, 1.85s/it] INFO: Cellpose2D: 2022-08-08 10:04:23,438 [INFO] No cell pixels found. INFO: Cellpose2D: 2022-08-08 10:04:23,521 [INFO] 67%|######6 | 4/6 [00:07<00:02, 1.37s/it] INFO: Cellpose2D: 2022-08-08 10:04:24,739 [INFO] 83%|########3 | 5/6 [00:08<00:01, 1.32s/it] INFO: Cellpose2D: 2022-08-08 10:04:25,625 [INFO] 100%|##########| 6/6 [00:09<00:00, 1.17s/it] INFO: Cellpose2D: 2022-08-08 10:04:25,625 [INFO] 100%|##########| 6/6 [00:09<00:00, 1.58s/it] INFO: Cellpose2D: 2022-08-08 10:04:25,625 [INFO] >>>> completed in 11.340 sec INFO: Virtual Environment Runner Finished INFO: Cellpose command finished running INFO: Getting objects for C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_16954_9672_cp_masks.tif INFO: Getting objects for C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_16954_8964_cp_masks.tif INFO: Getting objects for C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_17744_8964_cp_masks.tif INFO: Getting objects for C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_16954_10696_cp_masks.tif INFO: Getting objects for C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_17744_10696_cp_masks.tif INFO: Getting objects for C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_17744_9672_cp_masks.tif INFO: Getting objects for C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_17744_10696_cp_masks.tif Done INFO: Getting objects for C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_17744_8964_cp_masks.tif Done INFO: Getting objects for C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_16954_8964_cp_masks.tif Done INFO: Getting objects for C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_16954_10696_cp_masks.tif Done INFO: Getting objects for C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_17744_9672_cp_masks.tif Done INFO: Getting objects for C:\HistologyData\1085426\cellposetraining\cellpose-temp\Temp_16954_9672_cp_masks.tif Done INFO: Making measurements for Annotation (Rectangle) (22 objects) INFO: Done!

    Based on the log, I felt that 22 objects are detected but are not annoated on my images somehow? (I could be wrong). I also checked those tiles and I do see masks on them.
    image Do you have any explanation? Below is my script def imageData = getCurrentImageData() def stored_annotations = getAnnotationObjects() if (stored_annotations.isEmpty()) { Dialogs.showErrorMessage("Cellpose", "Please select a parent object!") return } import qupath.ext.biop.cellpose.Cellpose2D

    def pathModel = "C:/ABBA/QuPath-0.3.2/My/location/cellpose_residual_on_style_on_concatenation_off_train_2022_08_07_23_40_19.334298"

    def cellpose = Cellpose2D.builder( pathModel) .pixelSize( 0.5 ) // Resolution for detection .channels( 'tdTom') // Select detection channel(s)C //.cellExpansion(5.0) // Approximate cells based upon nucleus expansion .measureShape() // Add shape measurements .measureIntensity() // Add cell measurements (in all compartments)
    .useGPU() // Optional: Use the GPU if configured, defaults to CPU only .createAnnotations() .build()

    cellpose.detectObjects(imageData, stored_annotations) println 'Done!'

    opened by xcccc402 1
  • Qp v0.4.0 update

    Qp v0.4.0 update

    Rewritten QuPath Extension Cellpose to work with the QuPath 0.4.0 release and the changes implemented by the updated QuPath Extension StarDist.

    Most important changes:

    • Global Normalization is now available thanks to Pete's work
    • Any Cellpose CLI parameter can now be passed when running the extension

    Breaking changes

    • We no longer track the cellpose version and leave it to the user to work with a compatible version
    • Some builder parameters no longer exist, in favor of the more flexible approach with addParameter()

    See the readme for more information

    opened by lacan 0
  • Cellpose v2

    Cellpose v2

    Adds support for cellpose V2

    returns the possibility to simplify shapes though it is not recommended

    starts work on global normalization, though nothing currently runs. It is just some ground work

    opened by lacan 0
  • Using other Cellpose 2.0 built-in models ?

    Using other Cellpose 2.0 built-in models ?

    Hi,

    Thanks for the great Cellpose extension ! I have data for which other built-in Cellpose models work better than cyto2 (tissuenet, TN1, TN2, TN3) I wonder if you can add an option to use all the models built-in cellpose 2.0.

    Thanks Ofra

    opened by ofrag 0
  • run for project freezes intermittently

    run for project freezes intermittently

    Hi

    I have noticed that when I run qupath-cellpose script for project, sometimes imy batch run just gets stuck on one image and cannot proceed.

    At this point, my only options is to kill qupath and start again. Not sure how to troubleshoot the source of the issue, or if others run into the same issue?

    Here is my script (which uses imageops to run cellpose on hematoxylin deconv channel)...

    import qupath.ext.biop.cellpose.Cellpose2D
    
    // Specify the model name (cyto, nuc, cyto2 or a path to your custom model)
    def model = "my_model.598691"
    def modeldir = 'K:\\path\\to\\model\\directory'
    def pathModel = [modeldir, model].join('\\')
    
    // Get info for stain deconvolution
    def imageData = getCurrentImageData()
    def stains = imageData.getColorDeconvolutionStains()
    
    def cellpose = Cellpose2D.builder(pathModel) // Can choose "None" if you want to train from scratch
                    .preprocess(
                        ImageOps.Channels.deconvolve(stains),
                        ImageOps.Channels.extract(0, 1) // 0 for HTX and 1 for DAB
                    )
                    . cellposeChannels(2, 1) // can specify 2 channels with .cellposeChannels(2, 1), or one with .cellposeChannels(1), First channels used for cyto, second for nuclei
    //                .channels("Blue")  // or use work with .cellposeChannels( channel1, channel2 ) and follow the cellpose way
    //                .preprocess(ImageOps.Filters.gaussianBlur(1)) // Optional preprocessing QuPath Ops 
    //                .epochs(500)             // Optional: will default to 500
    //                .learningRate(0.2)       // Optional: Will default to 0.2
    //                .batchSize(8)            // Optional: Will default to 8
    //                .minTrainMasks(5)        // Optional: Will default to 5
    //                .pixelSize(0.1725)              // Resolution for detection, defaults to full resolution
                    .diameter(0.0)                   // Median object diameter. Set to 0.0 for the `bact_omni` model or for automatic computation
                    .cellExpansion(1.0)            // Approximate cells based upon nucleus expansion                
                    .measureShape()                // Add shape measurements
                    .measureIntensity()            // Add cell measurements (in all compartments) 
    //                .maskThreshold(0.1)        // Probability threshold to accept between 0 and 1
    //                .classify("MyDetections")     // PathClass to give newly created objects    
                    .setOverlap(60)                // Overlap between tiles (in pixels) that the QuPath Cellpose Extension will extract. Defaults to 2x the diameter or 60 px if the diameter is set to 0 
                    .tileSize(2048)                // If your GPU can take it, make larger tiles to process fewer of them. Useful for Omnipose    
                    .useGPU()                 // Optional: Use the GPU if configured, defaults to CPU only
    //                .modelDirectory( new File("Cellpose_models")) // Optional place to store resulting model. Will default to QuPath project root, and make a 'models' folder
    //                .saveBuilder("My Builder") // Optional: Will save a builder json file that can be reloaded with Cellpose2D.builder(File builderFile)
                    .build() 
                                   
    // Run detection for the selected objects
    selectObjectsByClassification("Tissue")
    def pathObjects = getSelectedObjects()
    
    if (pathObjects.isEmpty()) {
        Dialogs.showErrorMessage("Cellpose", "Please select a parent object!")
        return
    }
    cellpose.detectObjects(imageData, pathObjects)
    
    opened by mezwick 10
Releases(v0.6.0)
  • v0.6.0(Dec 15, 2022)

    This release implements the awesome new changes that came with the release of QuPath 0.4.0 and the updated StarDist extension for it.

    And this has also led to a couple of small modifications

    1. Some Cellpose builder methods were removed in favor or a more flexible way of passing parameters
    2. The new version of the extension only supports Cellpose versions above 2.0
    3. You can now add any cellpose parameter using addParameter() in the builder
    4. There is now a possibility for global normalization!

    Check out the updated readme for further information and do not hesitate to go to https://forum.image.sc to discuss usage issues.

    Source code(tar.gz)
    Source code(zip)
    qupath-extension-cellpose-0.6.0.zip(58.23 KB)
  • v0.5.1(Nov 8, 2022)

    This update fixes an issue in the way objects were being detected and re-added to QuPath.

    It now follows much more closely what is done in the StarDist Extension and should result in fewer issues.

    Now the Z and T positions are also appended to the names of the exported images. Useful for 3D and T stacks

    Adds the min_training_masks option to help avoid cellpose from excluding images with less than 5 annotations during training

    Finally, it adds a bit more verbosity. The full command used to run or train is output in such a way that it can be run from the command line by copy-paste

    You should unzip the contents of the file below into your extensions directory

    Source code(tar.gz)
    Source code(zip)
    qupath-extension-cellpose-0.5.1.zip(44.39 KB)
  • v0.4.1(Sep 5, 2022)

    This release builds on v0.4.0 #https://github.com/BIOP/qupath-extension-cellpose/commit/7365020597b0f509f83636678ff36f25ee9c1ab1 following comments by @romainGuiet to integrate the whole QC directly rather than run it separately (Which no-one will ever do until it's too late 😅).

    Improvements

    Quality control is perfomed after training provided that:

    1. You added the scikit-image dependency to your cellpose installation
    2. You copy run-cellpose-qc.py into your QuPath extensions folder

    Read the updated ReadMe to see how to do these installation steps. Here is an example gif in real time (only 100 epochs though)

    cellposeValidation

    Possibility to save the training graph as a PNG in your QuPath project's QC folder

    On top of showing you the training graph if you request it after training using showTrainingGraph(), you can also choose to save it but not show it using showTrainingGraph(boolean show, boolean save)

    Updated JavaDoc and ReadMe to account for the new features

    As ususal, JavaDoc is here: https://biop.github.io/qupath-extension-cellpose/qupath/ext/biop/cellpose

    Always happy to receive comments and suggestions!

    Source code(tar.gz)
    Source code(zip)
    qupath-extension-cellpose-0.4.1.jar(39.43 KB)
    run-cellpose-qc.py(15.14 KB)
  • v0.4.0(Sep 1, 2022)

  • v0.3.11(Aug 31, 2022)

    Following the discussions on the Image.sc forum https://forum.image.sc/t/create-a-shortcut-button-to-run-a-script/71195

    And the PR #14 by @zindy, a better way to figure out where the project directory has been implemented.

    This release corrects an incorrect overlap being set to 0 instead of the default due to my messing up boxed and unboxed doubles and ints.

    Source code(tar.gz)
    Source code(zip)
    qupath-extension-cellpose-0.3.11.jar(37.23 KB)
  • v0.3.10(Aug 4, 2022)

    This release tackles the following aspects

    • Erroneous message informing that an unimplemented 'global normalization' was being performed on downsampled data
    • Update to documentation with Cellpose installation instructions and practical information
    • Adds an updated JavaDoc
    • Adds the option to normalize in QuPath by clipping values below 0.0 and above 1.0 after calling normalizePercentiles(double min, double max) in the builder.

    Note This implies that the order of normalizePercentiles(double min, double max) and preprocess() is important. Always finish with the normalization if using `preprocess()

    Please read the updated documentation for some more small details

    Source code(tar.gz)
    Source code(zip)
    qupath-extension-cellpose-0.3.10.jar(37.20 KB)
  • v0.3.7(Jun 23, 2022)

  • v0.3.5(Apr 13, 2022)

  • v0.3.3(Feb 10, 2022)

  • v0.3.2(Jan 31, 2022)

  • v0.3.1(Jan 21, 2022)

    This small update fixes a slowdown in saving images caused by the new way the Bioformats reader is setup.

    Furthermore this update includes an easier way to see and display the training of your cellpose model. After building your cellpose object and after running the training with train(), you can now do the following

    1. cellpose.getOutputLog() which will return a String array with all the logged steps from cellpose. You could save these as a file if you want.
    2. Call cellpose.getTrainingResults() which parses the raw output log and returns a ResultsTable with the losses per epoch
    3. Call cellpose.showTrainingGraph(), which displays a simple JavaFX plot of the Training and Validation Losses per Epoch.

    The cellpose.getOutputLog() also would work when doing prediction instead of training. The others would simply be empty.

    Happy training

    Source code(tar.gz)
    Source code(zip)
    qupath-extension-cellpose-0.3.1.jar(35.58 KB)
  • v0.3.0(Dec 14, 2021)

  • v0.2.0(Dec 3, 2021)

    This new version uses cellpose/omnipose instead, which has an updated CLI.

    This means that your previous cellpose environment will no longer work

    If you have not done it before, please update cellpose from their instructions or create a new virtual environment for omnipose as per https://github.com/MouseLand/cellpose

    Source code(tar.gz)
    Source code(zip)
    qupath-extension-cellpose-0.2.0.jar(35.85 KB)
Owner
BioImaging And Optics Platform (BIOP)
All the code that is publicly available/published by the BioImaging And Optics Platform (BIOP)
BioImaging And Optics Platform (BIOP)
This project uses the artificial potential field method to realize the path planning of the robot, and completes the trajectory optimization through other settings. It can also be combined with laser SLAM, target recognition and other technologies for path planning.

FRCAutoDriver 项目说明 Project Instruction 本项目利用人工势场法,实现机器人的路径规划,并通过其他设置完成轨迹优化,还可以结合激光SLAM、目标识别等技术进行路径规划 This project uses the artificial potential field

ZhangzrJerry 2 Sep 9, 2022
Implementation of Greedy Particle Swarm Optimization, HSGA and Hybrid(GA+PSO) for the purpose of Task Scheduling in cloud computing environment using CloudSim

Implementation of Greedy Particle Swarm Optimization, HSGA and Hybrid(GA+PSO) for the purpose of Task Scheduling in cloud computing environment using CloudSim

Yash Jain 5 Dec 18, 2022
Presti 5 Nov 19, 2022
A manager tool to categorize game assets such as images and sounds/music. The tool enables you to tag these files, so that finding them by tags allows fast searches.

BtAssetManager This application allows you to easily categorize large amounts of image and sound files. You can apply tags to each individual file to

null 21 Sep 15, 2022
Google App Engine Standard Environment Source Code for Java 8 and Java11

Google App Engine Standard Environment Source Code for Java 8 and Java11. This is a repository that contains the Java Source Code for Google App Engin

Google Cloud Platform 167 Jan 2, 2023
A Jenkins plugin for inserting the commits changelog into the jenkins build environment.

commits-changelog-env-plugin A Jenkins plugin for inserting the commits changelog into the jenkins build environment. Jenkins插件, 在构建时通过将提交的更新列表插入 Jenk

Chen Pan 1 Feb 16, 2022
The project is a simple vulnerability Demo environment written by SpringBoot

The project is a simple vulnerability Demo environment written by SpringBoot. Here, I deliberately wrote a vulnerability environment where there are arbitrary file uploads, and then use the `scan` attribute in the loghack configuration file to cooperate with the logback vulnerability to implement RCE.

Panda 76 Dec 14, 2022
A React Native Template for installing a working ClojureScript, Krell, and Storybook environment

A React Native Template for ClojureScript, Krell, and Storybook Getting Started npx react-native init YourProjectName --template react-native-template

Joshua Miller 30 Dec 23, 2022
Discourse-java is a platform where users can freely discuss on topics they want to, and like-minded people can join in and contribute

Discourse is the 100% open source discussion platform built for the next decade of the Internet. Use it as a: mailing list discussion forum long-form

Infosys Ltd 16 Oct 19, 2022
By this package we can get sim info, call logs and sms logs.Also we can find for specific sim info and call logs as well.

sim_sms_call_info A new flutter plugin project. Getting Started This project is a starting point for a Flutter plug-in package, a specialized package

 Hasib Akon 3 Sep 17, 2022
Log4j CVE-2021-44228 examples: Remote Code Execution (through LDAP, RMI, ...), Forced DNS queries, ...

Log4j CVE-2021-44228 and CVE-2021-45046 Requisites Use a vulnerable JDK, for instance JDK 1.8.0_181 Usage Malicious server The malicious server deploy

Manuel Álvarez Álvarez 5 Feb 7, 2022
Xerath - 🔪 AOP development framework implemented through *Annotation + ASM + Gradle Transform API* for Android🤖

简体中文 | English | Xerath Xerath 是一个通过 [自定义注解]+ASM + Gradle Transform API 实现的一套功能强大,方便开发,并且能够有效减少重复代码的Android Aop 框架。 旨在编译器进行全局性的修改,来完成一些诸如方法耗时统计,异常收集,拦

Pumpkin 325 Nov 22, 2022
DM Movie is an app with several movies catalogued through a database, you enter your email and your rating of the movie

DM Movie is an app with several movies catalogued through a database, you enter your email and your rating of the movie

Davi M. G. de Almeida 5 Jan 28, 2022
ijrd - internal java runtime debugger (loads through java agents LOL)

ijrd ijrd - internal java runtime debugger (loads through java agents LOL) this actually requires brain to build and then setup little guide to setup

null 6 Jan 28, 2022
Project developed in Block 1 through the Generation bootcamp

PROJETO JAVA - CCHIV COMBATE CONTRA O HIV COMO SURGIU ? É um software criado para facilitar a forma de atender o público de pessoas portadoras do HIV

Paulo Brisola 4 Jul 5, 2022
The application consists of a web page with a list of some movies. The page allows user interaction through ratings of movies listed in the web app.

DSMovie About the project https://matheus-maia-alvarez-dsmovie.netlify.app/ DSMovie is a full stack web and mobile application built during the Spring

Matheus Maia Alvarez 6 Jul 21, 2022
A custom minimap that displays resources all around you while you adventure through Aeternum!

New-World-MiniMap A custom minimap that displays resources all around you while you adventure through Aeternum! Download Download Page Minimap.rar Oth

Mal Ball 7 Dec 9, 2021
Service that will swap rbtc for btc and then initiated a loopin through lnd-loop

Code https://github.com/grmkris/marduk-admin-frontend https://github.com/grmkris/marduk-admin-backend RSK balances https://wiki.sovryn.app/en/technica

Kris 2 Dec 31, 2021
Winfoom is an HTTP(s) proxy server facade that allows applications to authenticate through the proxy without having to deal with the actual handshake.

winfoom Basic Proxy Facade for NTLM, Kerberos, SOCKS and Proxy Auto Config file proxies To help this project please give it a star ⭐ Overview Winfoom

Eugen Covaci 56 Dec 8, 2022