Module verify

Module verify 

Source
Expand description

COCO dataset verification utilities.

Provides functions for comparing COCO datasets and validating annotation accuracy using Hungarian matching for optimal annotation pairing.

Structs§

BboxValidationResult
Bounding box validation results.
CategoryValidationResult
Category validation results.
MaskValidationResult
Segmentation mask validation results.
SegmentationPairComparison
Result of comparing a single segmentation pair.
VerificationResult
Result of verifying a COCO import against Studio data.

Functions§

bbox_iou
Calculate Intersection over Union (IoU) for two COCO bboxes. COCO bbox format: [x, y, width, height] (top-left corner)
build_annotation_map_by_name
Build a map of annotations by sample name for efficient lookup.
compare_segmentation_pair
Compare two segmentations and return comparison metrics.
compute_segmentation_area
Calculate total area of a segmentation.
count_polygon_parts
Count number of polygon parts in a segmentation.
count_polygon_vertices
Count total polygon vertices in a segmentation.
hungarian_match
Use Hungarian algorithm to find optimal matching between two sets of annotations based on bounding box IoU. Returns pairs of (original_idx, restored_idx) for matched annotations.
polygon_area
Calculate polygon area using the Shoelace formula. Takes coordinates as flat array [x1, y1, x2, y2, …]
polygon_bounds
Calculate bounding box of a polygon (min_x, min_y, max_x, max_y)
segmentation_bbox_iou
Calculate IoU between two segmentation bounding boxes.
segmentation_bounds
Get bounding box for any segmentation type.
validate_bboxes
Validate bounding boxes between two datasets using Hungarian matching.
validate_categories
Validate categories between two datasets.
validate_masks
Validate segmentation masks between two datasets using Hungarian matching.