PANDORE Version 6 |
GREYC-IMAGE |
passesssegmentationalgorithm
Evaluation of segmentation algorithm performances based on discrepancy measures between segmentation results and reference segmentations.
Synopsis
passesssegmentationalgorithm [-v] matching_algorithm_id matching_threshold segmentation_result_path reference_segmentation_path [col_out1|-] [col_out2|-]
Description
The operator passesssegmentationalgorithm calculates discrepancy measures between
segmentation results yielded by an algorithm and reference segmentations made on the
same images. Five discrepancy indicators are evaluated and for each
indicator two measures are calculated with value between 0 and 1:
- Indicator 1: Detection accuracy. The two measured errors are:
- Recall error accounts for proportion of false negative regions.
- Precision error accounts for proportion of false positive regions.
- Indicator 2: Fragmentation consistency. The two measured errors are:
- Under-segmentation error accounts
for proportion of regions grouped into a single segment.
- Over-segmentation error accounts
for proportion of segments grouped into a single region.
- Indicator 3: boundary precision. The two measured errors are:
- Pixel deficit error accounts for
proportion of missed pixels in correctly detected regions.
- Pixel excess error accounts for
proportion of false pixels added to correctly detected regions.
- Indicator 4: Shape fidelity. The two measured errors are:
- Omission shape error accounts for distance of deleted shape to true shape.
- Commission error accounts for distance of added shape to true shape.
- Indicator 5: Topology preservation. The two measured errors are:
- Hole addition error accounts for the proportion of false holes.
- Hole detection error accounts for the proportion of missed holes.
Discrepancy measures are computed using a matching graph between segments in the segmentation
results and regions in the reference segmentations.
Two types of graph matching algorithm can used depending on the parameter matching_algorithm_id:
the first one allows for over and under-segmentation, and the second
one restricted to unique matching.
In this graph, a segment S detects a region R
if the overlapping area | R * S | is such that:
| R * S | | R * S |
--------- >= matching_threshold and --------- >= matching_threshold
| R | | S |
Reference segmentation and segmentation results are region maps.
Several reference segmentations may exist for each test image.
The folder reference_segmentations_path should be organized in
subforders each one related to one expertise, for instance
expert001, expert002, etc.
The folder segmentation_result_path and each subfolder of
reference_segmentation_path should be organized in the same way, with
the same subfolders and the same image names.
The output collection col_out1 contains the detail of the 10 segmentation errors
for each segmentation result (described with numerator / denominator).
When several reference segmentations exist, the error is the minimum value.
The output collection col_out2
contains the average values considering all segmentation results.
Parameters
- -v : verbose mode
- matching_algorithm_id: the index of the matching algorithm to be used:
- 0: for 1-n and n-1 matching.
A segment in the segmentation result can merge several regions in the reference segmentation (under-segmentation), and
a region in the reference segmentation can be split into several segments in the segmentation result (over-segmentation).
However, a segment or a region cannot be both part of over-segmentation and under-segmentation.
- 1: for 1-1 matching. A segment can only detect one region at the most, and a region can only be
detected by one segment at the most.
- matching_threshold: minimum proportion of overlapping area between a region and a segment to accept a detection.
The value is in the interval [0,1] where value x corresponds to (x*100)% of overlapping.
- segmentation_result_path: path to segmentation results folder. This folder can be organized
into subfolders.
- reference_segmentation_path: path to reference segmentation folder.
The folder is divided in as much as subfolders as they are expertises.
Each subfolder is organized in the same way as each subfolder of segmentation_result_path.
Outputs
- col_out1: a collection with the 10 computed error values for each segmentation result (stored as numerator / denominator).
- col_out2: a collection with the 10 average error values prathat summarize the algorith performances.
Result
Returns SUCCESS or FAILURE.
Examples
Assesses performances of algorithm 'algo001' from its result images stored in folder 'images/resultimages/algo001':
passesssegmentationalgorithm -v 0 0.5 images/resultimages/algo001 images/groundtruths detail_errors.pan total_errors.pan
pdisplayperformancevalues detail_errors.pan total_errors.pan
See also
Evaluation,
passessdetectionaccuracy,
passessfragmentationconsistency,
passessboundaryprecision,
passessshapefidelity,
passesstopologypreservation,
pranksegmentationalgorithms,
pranksegmentationalgorithmsfromfolders
Prototype C++
Errc PAssessSegmentationAlgorithm( int matching_algorithm_id, float matching_threshold,
std::string segmentation_result_path,
std::string reference_segmentation_path,
Collection & col_out1,
Collection & col_out2 );
Author: Régis Clouard