Machine & Deep Learning Course

Hi Students,

For this course we will use QuPath 0.3.2, Stardist and Cellpose

Some reading:

Please familiarize yourself with QuPath a bit. A good start is looking at the video tutorials #1: https://www.youtube.com/c/qupath

 

Install QuPath (with Stardist) and download Examples

https://qupath.github.io
On Windows run the downloaded MSI file, it will complain about not being verified, just allow it to install.
(Alternatively download the zip file, see: https://github.com/qupath/qupath/releases/tag/v0.3.2
)
On a MAC you have to hold down the left SHIFT key and click the install package and allow it to install.

You also have to install the Stardist extension. (https://github.com/qupath/qupath-extension-stardist)

  1. Start QuPath first (at first start you have to set the memory limit, by default is half of system memory, it is better to make this higher)
  2. To install the StarDist extension, download the latest qupath-extension-stardist-0.3.jar file from releases and drag it onto the main QuPath window.

When done download the course data here: QP-ML-Course.zip

Unzip this file and find the “project.qpproj” file in the “ML-DL-Data-Examples/QPP” folder. Drag it into the main QuPath window to open de project.
It will sometimes show a dialog while loading the project, because it cannot locate the data files (images). It suggest most of the time correctly where the data files are (in the ML-DL-Data folder).

If everything is correct, you see the data files (images) on the left. When selecting the “Installed extensions” menu item in the “Extensions” Menu, you should see “StarDist  extension (0.3.0) “.

 

Now you can also install Cellpose for QuPath  (for now version 0.3.3 for Cellpose 1.02)
https://github.com/BIOP/qupath-extension-cellpose
On Windows a Conda Cellpose Environment will work! (So do not create the virtual Python environment as shown on the BIOP GitHub site, but only a conda Cellpose environment as shown below)  https://github.com/MouseLand/cellpose).
The easiest way to set up a Cellpose environment up is with miniconda (only works with Windows, see github website of Cellpose for the python environment option)
  1. Download Miniconda, install and it it to the PATH (check both checkboxes when running set-up)
    https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html#installing-conda-on-a-system-that-has-other-python-installations-or-packages
  2. On the user command-line (run cmd.exe) run these commands in this order!:
    1. conda create --name cellpose
    2. conda activate cellpose
    3. conda install pytorch cudatoolkit=11.3 -c pytorch (optional but strongly recommended if you have a Nvidia GPU)
    4. pip install cellpose[gui]==1.0.2
    5. cellpose (this will run cellpose once , which is needed!)