SciPy 2024

Image analysis and visualization in Python with scikit-image, napari, and friends
07-09, 13:30–17:30 (US/Pacific), Ballroom C

Between telescopes and satellite cameras and MRI machines and microscopes, scientists are producing more images than they can realistically look at. They need specialized viewers for multi-dimensional images, and automated tools to help process those images into knowledge. In this tutorial, we will cover the fundamentals of algorithmic image analysis, starting with how to think of images as NumPy arrays, moving on to basic image filtering, and finishing with a complete workflow: segmenting a 3D image into regions and making measurements on those regions. At every step, we will visualize and understand our work using matplotlib and napari.


Between telescopes and satellite cameras and MRI machines and microscopes, scientists are producing more images than they can realistically look at. They need specialized viewers for multi-dimensional images, and automated tools to help process those images into knowledge.

This tutorial is aimed at folks who have some experience in scientific computing with Python, but are new to image analysis. To get the most out of it, they should have done some work with NumPy arrays — no need to be an expert! — but they don't need to know an image from a pipe. We will cover the fundamentals of working with images in scientific Python. The tutorial will be split into four parts, of about 45 minutes each, plus breaks:

  • Images are just NumPy arrays. In this section we will cover the basics: how to think of images not as things we can see but numbers we can analyze.
  • Changing the structure of images with image filtering. In this section we will define filtering, a fundamental operation on signals (1D), images (2D), and higher-dimensional images (3D+). We will use filtering to find various structures in images, such as blobs and edges. Putting NumPy, SciPy, scikit-image, and scikit-learn together, we'll show how these fundamental filters are related to modern convolutional neural networks.
  • Finding regions in images and measuring their properties. In this section we will define image segmentation — splitting up images into regions. We will show how segmentation is commonly represented in the scientific Python ecosystem, some basic and advanced methods to do it, and use it to take measurements of segmented objects in our images. We will use scikit-image for some basics, and to make object measurements, but we'll also demonstrate how to use a modern, neural-network-based library to find our imaged objects quickly and get on with our science: measuring the things we've imaged.
  • Q&A/Quick tour of advanced features. This section will be more freestyle and will depend on the audience. We may do a guided tour of other advanced image analysis topics, answer lingering questions about the previous sections, or walk around the room and help people apply what they've learned to their own data of interest.

Attendees will leave understanding how to work with images in Python, knowing some of the main libraries that can help them do that, and knowing where to get more help if they need it.


Prerequisites

Attendees should have basic knowledge of:

  • Python (imports, if clauses, list indexing, for loops, function definition and return statements)
  • Python environments — they should be able to make a new Python environment for the tutorial
  • Jupyter notebooks: they should know how to launch a Jupyter notebook, enter code in cells, and execute the code
    -NumPy arrays and simple array arithmetic
Installation Instructions

https://github.com/scipy-2024-image-analysis/tutorial/blob/main/tutorial/install_dependencies.md

See also: Repository