SSA ACT workshop - Image Segmentation
RSFAS, ANU
reticulate and torch basicsImage segmentation is the process of dividing an image into coherent regions so that pixels belonging to the same object or area are grouped together.
Where do we need segmentation?

Semantic segmentation: Label each pixel with a class (no instance separation).
Instance segmentation: Distinguish individual objects of the same class.
Panoptic segmentation: Combines semantic + instance into one unified output.
(H, W) or (H, W, 1) a single channel per pixel0 (background), 1 (foreground)1, 2, … (class id)Masks are commonly saved as greyscale PNG or TIFF on disk.
<image_id>.txt:
annotation.json:
images: list of images
id: unique image IDfile_name: image filenameheight, width: image sizeannotations: list of objects
image_id: links annotation to imagecategory_id: class of objectbbox: [x, y, width, height] (for object detection)segmentation: polygon coordinates [[x1,y1, x2,y2, ...]] or run-length encoding for dense masks (object mask)categories: list of classes
id: class IDname: class nameThe default COCO dataset includes segmentation annotations. If your custom dataset in COCO format also contains segmentation information, you can convert it to YOLO format for segmentation tasks.
Similarly, mask data can be converted into YOLO format.

LabelMe: Web-based tool for creating polygonal and freehand annotations. Supports exporting to multiple formats like JSON for machine learning pipelines.

CVAT (Computer Vision Annotation Tool): Powerful open-source platform for image and video annotation. Supports polygons, masks, and tracking for object detection and segmentation.

VIA (VGG Image Annotator): Lightweight, browser-based tool. Ideal for quick annotations with minimal setup. Exports annotations in JSON or CSV.
Fully convolutional networks (FCNs) — Long, Shelhamer and Darrell (2015) — were the first deep learning architecture designed for semantic segmentation. They replace a classifier’s dense layers with convolutions, turning the final feature map into a spatial prediction of the image.
The U-Net family consists of encoder–decoder architectures with skip connections that preserve spatial detail, making them highly effective for dense prediction tasks in medical imaging, remote sensing, and agriculture.
Conv2DTranspose layer
image 1/1 /Users/patrickli/Desktop/rproj/ssa-cv-workshop/instructor/slides/slide_figures/original.png: 640x448 1 cat, 45.8ms
Speed: 3.7ms preprocess, 45.8ms inference, 7.4ms postprocess per image at shape (1, 3, 640, 448)
'slide_figures/cat_segmentation.png'
Training a segmentation model in YOLO is very straightforward, and the data format is largely the same as for object detection.
The workshop covered classification, detection and segmentation. Four directions extend these foundations without requiring entirely new fundamentals:
ultralytics, which is already loaded.Random* augmentation layers, but with learned image generation.
Slides URL: https://ssa-act-cv-workshop.patrickli.org/ | Canberra time