Functionality Guide

Every button, slider, checkbox and click-interaction in Mycol - what it is called in the app, and what it does. Organised by app page, in the order you meet them.

Workflow FAQ Functionality Guide Preprint GitHub

Shared controls

Elements that turn up on more than one page. Described here once, then referred to rather than repeated.

Always on screen
Top navigation bar
Nav
Switches between the five app pages: Upload Models and Data, Annotate Images, Train Models, Compare Phenotypes and Downloads. Your session - images, masks, labels, models - is kept as you move between them.
Mycol logo
Link
Top-left. Opens this documentation site.
The image selection table

The same table appears on three pages. Each page sets its own default and does something different with your ticks; the table itself always works the same way.

Row ticks
Table select
One row per uploaded image, showing No., Image name, Mask Present (✅ / ❌), Number of Masks and Labelled Masks (labelled ÷ total). Tick rows in the checkbox column; use the header checkbox for all or none. Ticks survive moving between pages, and each page remembers its own.
Every plot
Chart toolbar
Hover tools
Appears on hover. The camera icon saves the plot as an SVG - a vector file that stays sharp at any size, suitable for figures. Drag on a plot to zoom into it, double-click to reset, and hover a point for its exact value.
Some pages need data first. Annotate Images, Train Models, Compare Phenotypes and Downloads ask you to upload images before they will open. Train Models and Compare Phenotypes also need at least one image carrying masks.
1

Upload Models and Data

Bring images, masks, models and saved sessions in. One uploader takes the lot - files are sorted by extension, and models by their contents.

Upload Images, Masks and Models
File uploader
Drag & drop
Takes images and masks (.tif, .tiff, .npy, .png, .jpg, .jpeg), model weights (.pt, .pth), a Cellpose hyperparameters table (.csv) and a saved session (.zip) - all at once if you like. Masks pair to images by filename; Cellpose and DenseNet weights are told apart automatically. Unpaired or unrecognised masks are ignored. 512 MB per upload, so split larger sets into batches.
Mask suffix
Text box
The text a mask filename adds to its image filename, so the two can be paired. Default _masks, meaning sample1.tif pairs with sample1_masks.tif. Change it to match your own naming.
Resize (512x512)
Checkbox
On by default. Shrinks images and masks to 512×512 on the way in, which keeps large images responsive at some cost in detail. Cell measurements are still reported for the original, pre-resize image.
Use demo data
Button
Loads an example image set, so you can try the whole workflow without your own data.
Cellpose / DenseNet cards
Status
Green MODEL LOADED with the filename once a model is in the session, orange NOT UPLOADED otherwise. Both models are optional.
Uploaded images
Image table
Table select
Nothing is ticked by default here - tick only what you want to get rid of.
Remove selected images
Button
Drops every ticked image, with its masks and labels, from the session. Greyed out until something is ticked, and not reversible afterwards.
2

Annotate Images

The main workspace, in three columns: controls on the left, the image in the middle, zoom and pan on the right.

Image navigation & display

Left column, above the tabs.

Image n/N banner
Status
Position and filename of the image you are looking at.
◀ / ▶ buttons
Button
Unlabelled buttons either side of the slider. Step to the previous or next image. Hidden when only one image is loaded.
Image index slider
Slider
Jumps straight to any image in the set. Also hidden for a single image.
Masks
Toggle Space
Shows or hides the coloured mask overlay. Filled blue while on.
Normalize
Toggle N
Stretches pixel intensities across the full brightness range, making faint cells easier to see. Display only - the stored image and every measurement are unchanged.
Image
Toggle I
Shows or hides the photograph underneath. Turn it off to inspect masks alone on black.
Current Mode banner
Status
At the top of both tabs. Names the mode the image is in, so you always know what a click will do. In labelling mode it also names the class, e.g. Assign class (spore).
Segmentation Controls Tab

Three pop-out panels. Both tabs stay loaded behind the scenes, so every keyboard shortcut works from either one.

Predict masks with Cellpose Popover

Automatic segmentation of a whole image at a time.

Select model
Dropdown
Which weights to segment with: Cyto3, Cyto2, Cyto, Nuclei, or Fine-tuned Model - your own, uploaded or trained this session. Defaults to the fine-tuned model whenever one is available.
Generate
Button
Segments the image currently on screen.
Batch generate
Button
Segments every uploaded image with the same model and settings.
Cellpose hyperparameters
Expander
Reveals the five accuracy settings below.
Mean cell diameter
Number
Typical cell size in pixels. Leave at 0 to let Cellpose estimate it, or set it yourself when the estimate looks off.
Cell probability threshold
Number
−2 to 2. How sure Cellpose must be that a pixel belongs to a cell. Higher gives fewer, tighter cells; lower gives more, larger ones.
Flow threshold
Number
−2 to 2. How irregular a predicted shape may be before it is thrown out. Lower is more permissive.
Minimum cell size
Number
Discards masks smaller than this area - a quick way to drop debris.
Niter
Number
0 to 2000 refinement iterations. Higher values favour long, stringy cells such as filaments.
Predict masks with boxes Popover

SAM2, for segmenting chosen cells one at a time.

Draw box
Mode B
Click and drag a red box around each cell you want segmented.
Generate masks from boxes
Button G
Runs SAM2 on every box drawn, turning each into a mask. The boxes clear once their masks are in.
Manually edit masks Popover

Draw masks by hand, and repair ones that came out wrong.

Freehand
Mode F
Click and hold to trace an outline; releasing closes it into a filled mask.
Ellipse
Mode E
Drag a box around a colony and it fills with an ellipse inscribed in that box - a circle if you drag a square. Committed the moment you release.
Split masks
Mode S
Drag a line right through a mask to cut it in two. The line has to cross all the way through - partly crossed masks are left alone. Both halves keep the original class.
Join masks
Mode J
Lasso a group of masks; those lying entirely inside the lasso and touching each other merge into one.
Classification Controls Tab
Manage Labels Popover

Classes are shared across every image in the session.

Add a new class:
Text box
Type a name and press Enter. The class is created, given a colour, and made the current one.
Delete a class:
Dropdown
Removes a class everywhere. Cells that carried it become unlabelled - the masks themselves stay. No label is reserved and cannot be deleted.
Rename:
Dropdown
Picks which class to rename.
To:
Text box
The new name; press Enter to apply it across every image at once. Typing the name of a class that already exists merges the two.
Map model predictions to cell classes
Expander
Only present once a DenseNet model is loaded. One Map model class n to dropdown per model output, tying the model's numbered outputs to your class names. Until at least one is mapped, the classify buttons stay disabled.
Classify cells with Densenet Popover
Classify
Button
Labels every mask in the current image with the loaded model. Disabled - with a tooltip saying why - when no model is loaded or nothing has been mapped yet.
Batch classify
Button
The same across every uploaded image, with a progress bar. Batch runs are not recorded for undo.
Class rows List

One row per class - a colour chip matching the overlay colour, the name, then two buttons. No label sits first, and is how you strip a label back off.

All
Button
Assigns every mask in the current image to that class in one go.
Click
Mode
Makes that class active and switches the image into Assign class mode, so clicking a cell labels it.
Editing tools

Below the tabs, and available from both.

Remove
Mode D
Click a mask to delete it, or click a drawn box to delete the box. Boxes take priority where the two overlap.
Clear All
Button
Wipes every mask, label and box from the current image. Other images are untouched, and Undo will bring it back if you press it straight away.
Undo
Button Ctrl+Z
Reverts the last mask or box action. Single-level - only the most recent action can be recovered.
The image itself Canvas
Click and drag behaviour
Exactly one mode is active at a time, named in the Current Mode banner and set by the mode buttons above. Remove and Assign class respond to a single click; the rest are drag actions.
Chart toolbar
Read-only
In drag modes a small toolbar appears above the image with the one tool that mode uses - box select, or lasso. Nothing to choose; it reflects the mode you are in.
Scroll wheel
Disabled
Deliberately off, so the view does not jump while you work. Use the Zoom slider, or your browser's own pinch-zoom.
Zoom & pan

Right column, beside the image.

Zoom
Slider
1× to 10× in steps of 0.5, magnifying around the current view centre. The image stays the same size on screen - you simply see less of it. At 1× the whole image is shown.
Minimap
Click target
Thumbnail of the whole image with a red rectangle marking the part you are viewing. Click anywhere on it to recentre the view there.
▲ ◀ ◎ ▶ ▼ pad
Buttons
Nudges the view by most of a screenful, keeping a sliver of the old view to orient by. recentres on the middle of the image. All disabled at 1×, where everything is visible anyway.
3

Train Models

Fine-tune a model on what you have annotated. Numbered steps; the parameters in step 3 depend on which model you picked in step 1.

Step 1 - Choose which model to fine-tune
Model type
Pills
Pick one: Train a Cellpose model to identify cells for better segmentation, or Train a DenseNet model to classify cells for better labelling. Everything below re-renders to match.
Step 2 - Select images to train on
Image table
Table select
All images ticked by default; untick any to exclude. Cellpose uses the masks on the ticked images, DenseNet uses their labelled cells.
Step 3 - Cellpose segmenter parameters
Base model
Dropdown
Weights to start from - cyto, cyto2, cyto3, nuclei - or scratch to train from random initialisation.
Max epochs
Number
1 to 1000 passes over the training set. More can improve results, at the cost of time.
Learning rate
Number
Step size the optimizer takes. Lower trains more slowly but more stably.
Weight decay
Number
Regularisation over the final epochs, discouraging the model from over-fitting to your training images.
Min cells per image
Number
Images with fewer annotated cells than this are dropped from training - Cellpose's own default is 5. The step 4 summary reports how many this excludes.
Batch size
Dropdown
8, 16, 32 or 64 images per training step. Larger is faster but needs more memory.
Images per epoch
Dropdown
How many training images to sample each epoch - All, or 8 / 32 / 64 / 128 / 256.
Optimise hyperparameters
Checkbox
After training, searches for the inference settings - diameter, thresholds and so on - that suit the new model best. Note the winning values down: you will want to re-enter them on the Annotate Images page when you use the model.
Optimisation iterations
Slider
10 to 60 combinations to try, in steps of 5. Only shown when the box above is ticked. More trials, better settings, longer wait.
Train / test split
Slider
10% to 90% in steps of 5, labelled with the share of images used for training. The rest are held out as a test set and never trained on, so the step 5 plots measure performance on images the model has not seen.
Step 3 - DenseNet classifier parameters
Input size
Dropdown
64, 96 or 128 pixels - the size each cell crop is scaled to before the model sees it. Larger keeps more detail and trains more slowly.
Batch size
Dropdown
As above, but counted in cell crops rather than whole images.
Max epochs
Number
1 to 500 passes over the labelled cells.
Train / validation split
Slider
Works like the Cellpose split, but divides labelled cells. The held-out share becomes the validation set behind the accuracy and confusion matrix plots.
Step 4 - Train the model

Only one model trains at a time; starting one greys out the other.

Training set summary
Status
Sits just above the button. Cellpose reports total masks, images passing the minimum-cells filter, and the train/test breakdown. DenseNet reports total labelled cells, the train/validation breakdown, and a per-class count table.
Fine-tune Cellpose
Button
Starts training in the background.
Fine tune Densenet121
Button
The same, and additionally disabled until at least two classes have two or more labelled cells each.
View Training Log
Expander
Appears while a job runs - live worker output, so you can follow progress epoch by epoch. Cellpose shows a matching View Validation Log during its evaluation pass afterwards.
Cancel Training
Button
Stops the running job; nothing is kept from a cancelled run. Reads Cancel Validation during the evaluation pass.
Show Error Details
Expander
Appears if a job fails, holding the full error from the worker.
Step 5 - Review model training

Appears once a model has finished.

How do I interpret these graphs?
Popover
Plain-language notes on each plot, one expander apiece - training vs test loss, IoU comparison and predicted vs real counts for Cellpose; loss, accuracy / precision / recall / F1, and the confusion matrix for DenseNet.
Tested hyperparameters
Table
Shown when Optimise hyperparameters was ticked: every combination tried and how it scored, so you can copy the best into the Annotate Images page.
A newly trained model goes straight to work. As soon as training finishes it becomes the Fine-tuned Model option on the Annotate Images page, and the Cellpose model / DenseNet model tick on the Downloads page.
4

Compare Phenotypes

Plot the shape and colour descriptors of your segmented cells, grouped by class. Nothing is calculated until you press the button in step 5.

Step 1 - Select images to compare
Image table
Table select
All ticked by default. Untick to plot a subset - one condition against another, say.
Steps 2 & 3 - Choose what to plot
Choose classes to compare
Multiselect
The classes present in the ticked images, plus Unlabelled for cells with no class. Each becomes one group in the plots; remove one with the × on its tag.
Choose cell descriptors to compare
Segmented control
Pick as many as you like - area, perimeter, circularity, solidity, eccentricity and the rest, colour measures included. One plot comes out per descriptor. area is selected to begin with.
Attribute Information
Popover
An expander per descriptor explaining what it measures and how to read it, with a diagram.
Step 4 - Select plot parameters
Plot type
Pills
Violin shows the full distribution per class; Bar shows the summary.
Overlay datapoints
Option pill
Draws every individual cell over the plot, so the sample size and any outliers behind the summary are visible.
Convert to distance
Option pill
Turns pixel measurements into real units, and reveals the two controls below.
Pixel size
Number
The physical size of one pixel, in whatever unit you name alongside.
Unit
Text box
Labels the axes - µm gives “Area (µm²)”. Defaults to µm.
Step 5 - Generate plots
Generate Plots
Button
Builds the measurement table and draws one plot per selected descriptor. Press it again after changing anything above to refresh them.
5

Downloads

Tick what you want across four columns, build the zip, then save it. Changing any tick clears a zip you already built, so you always get what is currently ticked.

Images and Masks
Images and masks
Checkbox
On by default. The image files and their mask files. Unticking it greys out the four options below, which all build on it.
Colored mask overlays
Checkbox
On by default. Copies of each image with the cells drawn over them in their class colours - the view you see in the app.
Per-image class counts
Checkbox
Prints how many cells of each class there are into the corner of each saved image.
Normalize images
Checkbox
Rescales pixel intensities to the full 0-255 range before saving.
Cell patch images
Checkbox
A small cropped image of every individual cell - useful as training data or for figure panels.
Tables
Per-image cell counts
Checkbox
On by default. A CSV of how many cells of each class appear in each image.
Cell metrics
Checkbox
On by default. A CSV with every morphological and colour descriptor for every single cell - the raw data behind the page 4 plots.
Trained Models
Cellpose model
Checkbox
Fine-tuned weights, the training dataset and the loss curves. Greyed out until a model has been trained or uploaded.
DenseNet model
Checkbox
The same, with evaluation metrics in place of the loss curves.
Session Restore
Save Session
Checkbox
Adds mycol_saved_session.zip to the download. Drop that zip back into the uploader on page 1 to restore your images, masks, labels, models and settings exactly as you left them.
Building the download
Prepare Download
Button
Packs everything ticked into a single zip. Large sets take a while - a spinner shows while it works.
Download Files
Button
Saves the prepared zip to your computer. Greyed out until Prepare Download has been pressed.

Keyboard shortcuts

All on the Annotate Images page, and all working from either control tab.

Previous / next image
Space Toggle mask overlay
N Toggle normalization
I Toggle underlying image
B Draw box mode
G Generate masks from boxes
F Freehand mode
E Ellipse mode
S Split masks mode
J Join masks mode
D Remove mode
Ctrl+Z Undo last action
Shortcuts know when you are typing. Letter and Space shortcuts stand down while the cursor is in a text box, so naming a class never triggers a mode change and a space stays a space. The zoom slider hands the arrow keys back as soon as you move away from it, so and keep changing image.