Python Workshop at the DBI-INFRA Image Analysis Core Facility in Copenhagen, Denmark – October 30-31, 2023

Python for BioImage Analysis DBI-INFRA workshop

Description

Number of seats: 25

Day 1 – Morning session (8.30h – 12h)

Welcome address – Sébastien Tosi from 8:30 to 8:45

Quick introduction to Python – Sébastien Tosi (1h15) from 8:45 to 9:30

  • Main Python variables and types (scalars, strings and lists)
  • Printing to the console
  • Iterations with For statements (by index and from a list)
  • If conditions
  • Functions (definition, call and input/output arguments)

Image processing with Python (Part 1) – Sébastien Tosi (1h) from 9:30 to 10:30 

  • Importing Python packages: numpy, skimage and matplotlib
  • Reading an image from file
  • Displaying the size of the image and accessing pixel intensities
  • Displaying an image and computing intensity histograms

Coffee break – (30min) from 10:30 to 11:00

Image processing with Python (Part 2) – Sébastien Tosi (1h) from 11:00 to 12:00 

  • Understanding the interface and calling image processing functions
  • Basic operations on numpy array applied to image thresholding
  • Analysing connected particles in a binary mask and measuring object properties
  • Plotting graphs and histograms

Lunch – (1h) from 12:00 to 13:00

Day 1 – Afternoon session (13h – 16h30)

Setting up a local environment for Napari (Part 1) – Richard de Mets (2h) from 13:00 to 15:00

  • Installing Anaconda
  • Setting up a Conda environment from a requirements.txt file
  • Introduction to Spyder: console and scripts

Coffee break – (30min) from 15:00 to 15:30

Setting up a local environment for Napari (Part 2) – Richard de Mets (1h) from 15:30 to 16:30

  • Running Napari from the console
  • Installing and using devbio-napari and napari-assistant plugins
  • Reading multidimensional images from a script
  • Invoking Napari from a script to display a multidimensional  image
  • Recording a simple workflow and making an automated script out of it

Day 2 – Morning session (9h – 13h)

Introduction to deep learning algorithms – Sébastien Tosi (1h) from 9:00 to 10:00

  • Convolutional Neural Network (CNN) for Image classification
  • U-NET, a very versatile pixel classification network for bioimage analysis
  • Object segmentation networks: Stardist and Cellpose

Deploying deep learning algorithms (Part 1) – Tricia Loo (1h) from 10:00 to 11:00

  • Building, training and running a CNN to classify MNIST images (Colab notebook 3)
  • Training a 2D U-NET adapted from ZeroCostDL4Mic (Colab notebook 4)
  • Performing inference with the trained 2D U-NET in DeepImageJ
  • Running a pre-trained Stardist network for nuclei segmentation

Coffee break – (30min) from 11:00 to 11:30

Deploying deep learning algorithms (Part 2) – Tricia Loo (1h30) from 11:30 to 13:00

  • Building, training and running a CNN to classify MNIST images
  • Training a 2D U-NET adapted from ZeroCostDL4Mic
  • Performing inference with the trained 2D U-NET in DeepImageJ
  • Running a pre-trained Stardist network for nuclei segmentation in QuPath

Lunch – (1h) from 13:00 to 14:00

Day 2 – Afternoon session (14h – 16h, open session)

Open Session: Apply what you have learnt on your own data. (2h) from 14:00 to 16:00