Compare two segmentations with Hoover metrics
This application compares a machine segmentation (MS) with a partial ground truth segmentation (GT). The Hoover metrics are used to estimate scores for correct detection, over-segmentation, under-segmentation and missed detection.
The application can output the overall Hoover scores along with coloredimages of the MS and GT segmentation showing the state of each region (correct detection, over-segmentation, under-segmentation, missed).
The Hoover metrics are described in: Hoover et al., “An experimental comparison of range image segmentation algorithms”, IEEE PAMI vol. 18, no. 7, July 1996.
This application has several output images and supports “multi-writing”. Instead of computing and writing each image independently, the streamed image blocks are written in a synchronous way for each output. The output images will be computed strip by strip, using the available RAM to compute the strip size, and a user defined streaming mode can be specified using the streaming extended filenames (type, mode and value). Note that multi-writing can be disabled using the multi-write extended filename option: &multiwrite=false, in this case the output images will be written one by one. Note that multi-writing is not supported for MPI writers.
Input ground truth
-ingt image Mandatory
A partial ground truth segmentation image.
Input machine segmentation
-inms image Mandatory
A machine segmentation image.
-bg int Default value: 0
Label value of the background in the input segmentations
-th float Default value: 0.75
Overlapping threshold used to find Hoover instances.
Colored ground truth output
-outgt image [dtype]
The colored ground truth output image.
Colored machine segmentation output
-outms image [dtype]
The colored machine segmentation output image.
Correct detection score
-rc float Mandatory
Overall score for correct detection (RC)
-rf float Mandatory
Overall score for over segmentation (RF)
-ra float Mandatory
Overall score for under segmentation (RA)
Missed detection score
-rm float Mandatory
Overall score for missed detection (RM)
From the command-line:
otbcli_HooverCompareSegmentation -ingt maur_GT.tif -inms maur_labelled.tif -outgt maur_colored_GT.tif uint8
import otbApplication app = otbApplication.Registry.CreateApplication("HooverCompareSegmentation") app.SetParameterString("ingt", "maur_GT.tif") app.SetParameterString("inms", "maur_labelled.tif") app.SetParameterString("outgt", "maur_colored_GT.tif") app.SetParameterOutputImagePixelType("outgt", 1) app.ExecuteAndWriteOutput()