liveBook · Manning

Image segmentation

As explained in Fight Fraud with Machine Learning

Image segmentation is the task of assigning labels to pixels or regions of an image.

Image segmentation divides an image into multiple segments—sets of pixels representing objects, regions, or boundaries. For document fraud, it assigns each receipt pixel to one of two classes: forged or genuine. section 6.2

Segmentation is preferred over whole-image classification because it:

  • Pushes the model toward forgery regions instead of allowing shortcuts such as language differences between forged and genuine receipts. section 6.2
  • Produces pixel-wise detections that make the model’s decision easier to interpret. section 6.2
  • Uses a CNN-based model such as DeepLabV3; atrous convolutions help capture more image context. section 6.2

Receipt forgery heatmaps

Resize a receipt to 256×256 pixels, run model inference, and obtain a forgery probability between 0 and 1 for every pixel. Resize the output to the original image dimensions and overlay it as a heatmap alongside ground-truth bounding boxes. Training heatmaps may align closely with known forgeries, while test heatmaps can reveal overfitting through misplaced or consistently high-probability regions. section 6.3.5

Figure 6.7 Example of image segmentation, where the original image is shown on the left, and its segmentation output is shown on the right. Different segments in the segmentation output refer to different entities in the original image, namely the beach background, the person’s hair, arms, dress, face, and so on.

Compare an original beach photograph with its segmentation into background, hair, dress, face, and arms. section 6.2

How Fight Fraud with Machine Learning covers it

How deep it goes
Defines segmentation, contrasts classification, names DeepLabV3, and demonstrates inference without fully detailing model training internals.
Examples
Uses a segmented beach photograph and receipt forgery probability heatmaps compared with bounding-box labels.
What it assumes
Assumes basic computer-vision awareness while defining segmentation and contrasting it with image classification.
What you can do after
Apply it via a CNN to generate interpretable pixel-level forgery predictions and inspect their generalization on unseen receipts.
How it connects
Connects computer vision, image classification, convolutional neural networks, DeepLabV3, and atrous convolutions.

Also explained in

Compare how 7 books explain image segmentation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fight Fraud with Machine Learning. The section links point to the parts of the book it draws on.