Skip to calculator

Segmentation Mask Overlay Calculator

Upload images and masks, customize overlays, measure segmentation quality, inspect every class, edit regions, compare predictions, and export polished visual reports instantly with confidence.

Results summary

Results update after images are loaded or settings change.
Load an image and at least one mask to begin.

1. Image and mask inputs

JPG, PNG, or WebP.
Multiple masks are supported.
Larger values improve detail but use more memory.

2. Mask interpretation and classes

IDNameColorVisibleOpacityActions

3. Alignment and display controls

4. Mask processing

5. Interactive overlay and editor

100%
Coordinates: —RGB: —Class: —Confidence: —

6. Detailed class and object results

ClassPixelsCoverageGround truthIntersectionUnionIoUDicePrecisionRecallF1

Object-level analysis

ObjectClassAreaPerimeterCentroidBounding boxAspect ratioEquivalent diameter

7. Charts

8. Export overlay and mask files

Formula used

IoU = TP / (TP + FP + FN)
Dice = 2TP / (2TP + FP + FN)
Precision = TP / (TP + FP)
Recall = TP / (TP + FN)
Specificity = TN / (TN + FP)
Pixel Accuracy = (TP + TN) / Total Pixels
Equivalent Diameter = √(4 × Area / π)
Compactness = Perimeter² / (4π × Area)

How to use

  1. Upload an original image and predicted segmentation mask.
  2. Optionally add ground truth and confidence-map files.
  3. Choose mask interpretation, class colors, and ignored labels.
  4. Align, resize, rotate, or flip the mask when needed.
  5. Adjust opacity, contours, image filters, and display mode.
  6. Edit the mask with brush, eraser, rectangle, or fill tools.
  7. Review class metrics, objects, boundaries, and charts.
  8. Export overlay images, masks, CSV, JSON, or PDF reports.

Example data

Class IDClass namePredicted pixelsGround-truth pixelsIntersection
0Background58,40057,90056,700
1Object11,60012,10010,850

Segmentation mask guidance

Binary and multiclass masks

Binary masks separate foreground from background. Multiclass masks assign each pixel a class identifier. RGB masks encode classes using exact colors.

Semantic and instance segmentation

Semantic segmentation labels pixels by category. Instance segmentation separates individual objects within one category. Connected-component analysis provides a basic object approximation.

Nearest-neighbour resizing

Nearest-neighbour interpolation preserves label identifiers. Bilinear interpolation can create invalid intermediate class values. Use bilinear mainly for continuous confidence maps.

Boundary accuracy

Boundary metrics emphasize edge placement. They expose thin-object errors hidden by area scores. Increase tolerance only when annotations contain expected uncertainty.

Frequently asked questions

What is a segmentation mask overlay?

It combines class labels with an original image. Transparency keeps the source image visible. Boundaries make region edges easier to inspect.

Which mask format is most reliable?

Lossless PNG is usually best. JPEG compression can alter label colors. Indexed grayscale PNG files preserve exact IDs.

Why do image and mask dimensions need matching?

Every mask pixel should map to one image pixel. Misalignment changes region placement and metrics. The calculator can resize and offset masks.

What does IoU measure?

IoU compares intersection with combined predicted and actual area. Higher values indicate stronger overlap. It penalizes missed and extra regions.

How is Dice different from IoU?

Dice weights overlap twice in its numerator. It often appears numerically higher than IoU. Both summarize predicted and ground-truth agreement.

Can I compare multiple masks?

Yes, upload several predicted masks together. Select the active mask from the list. Each selection is analyzed independently.

Can the mask be edited?

Yes, use brush, eraser, rectangle, and fill tools. Changes update measurements and charts. Undo and redo support processing operations.

What does the confidence threshold do?

It converts continuous confidence values into a binary mask. Raising it keeps only stronger predictions. The threshold chart shows metric changes.

Are uploaded images sent to a server?

Normal analysis runs inside your browser. PHP only serves the page structure. Remote image URLs depend on cross-origin browser permissions.

Related Calculators

Class Frequency ChartImage Size Distribution PlotBounding-Box Size PlotIntersection-over-Union DistributionPrecision-Recall Curve by ClassMean Average Precision PlotPixel Intensity HistogramColour Channel HistogramConfusion Matrix for Image Classes

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.