Module 13

So you want to try pretrained models

This page integrates the short but useful content from `5_cellpose_deep_learning.ipynb` and `6_accessible_tools_for_DL.ipynb` into one applied overview of pretrained models and accessible workflows, minus the part where it all feels like a black box from the start.

Estimated time: 45 to 75 min Main topics: Cellpose, BMZ, ZeroCostDL4Mic

Cellpose content from the source notebooks

  1. Use the Cellpose GUI with a dedicated environment.
  2. Test built-in pretrained models on example images.
  3. Explore model fine-tuning from the GUI.
  4. Run Cellpose programmatically by importing `io`, `models`, and `core`.
  5. Load an image, call `.eval`, and visualize predicted masks.

Model-zoo and no-code content from the source notebooks

  1. Introduce the BioImage Model Zoo as a place to discover pretrained resources.
  2. Point learners to `bioimageio.spec` and `bioimageio.core` example notebooks.
  3. Introduce ZeroCostDL4Mic as a coding-light path for researchers.
  4. Introduce DL4MicEverywhere as a more reproducible notebook-driven route.

How this should feel in the website

This page should be presented as an orientation and decision-making module, not as a demand that every learner fully adopt deep learning immediately. The goal is to show what kinds of tools now exist, when they help, and how a researcher can start carefully.

Part 1: Cellpose as a first pretrained-model experience

Start with the GUI because it reduces friction and keeps the focus on interpretation of results. Then show the programmatic route for learners who want reproducible pipelines.

Part 2: model ecosystems

Introduce BioImage Model Zoo as a discovery layer and explain that model consumption and model evaluation are now part of practical bioimage analysis.

Part 3: accessible deep learning

ZeroCostDL4Mic and DL4MicEverywhere are important because they meet researchers where they are. These should be framed as real options, not as “less serious” than custom coding.

Representative code examples

Cellpose in Python

from cellpose import io, models
import matplotlib.pyplot as plt

model = models.Cellpose(model_type="cyto3")
image = io.imread("path/to/image.tif")
masks_pred, flows, styles, diams = model.eval(image)

plt.imshow(masks_pred)
plt.title("Predicted masks")
plt.show()

Model-zoo direction of travel

# Example only: the exact model-zoo code depends on the chosen package
# but the workflow idea is:
# 1. load a published model resource
# 2. test it on your image
# 3. inspect outputs carefully before trusting them

Best integration point with the current site

This module naturally extends the existing napari and mAIcrobe page. It turns that introductory viewer experience into a broader picture of modern pretrained-model and deep-learning workflows.

Exercises to keep

  1. Open example images in Cellpose GUI and compare built-in models.
  2. Run one image programmatically and display predicted masks.
  3. Browse BioImage Model Zoo and identify one model relevant to your domain.
  4. Decide whether your own workflow is better served by GUI use, notebooks, or no-code tools.