nrtk.impls.score_detections.coco_scorer
This module provides the COCOScorer class, an implementation of the ScoreDetections interface that calculates object detection scores conforming to the COCO (Common Objects in Context) dataset format and evaluation metrics. This class is specifically tailored to use COCO evaluation metrics by formatting ground truth and predicted data accordingly.
- Classes:
COCOScorer: Scores object detection results based on COCO evaluation metrics, allowing users to specify ground truth data and a particular statistic index to retrieve a sequence of metric scores.
- Dependencies:
pycocotools for COCO data handling and evaluation.
smqtk_image_io for bounding box handling.
nrtk.interfaces for the ScoreDetections interface.
contextlib for suppressing unwanted output during COCO initialization.
- Usage:
Instantiate COCOScorer with the path to the COCO-formatted ground truth data and specify the statistic index to be used for scoring. Call score with actual and predicted bounding boxes to obtain a sequence of float scores.
- Example:
scorer = COCOScorer(gt_path=”path/to/ground_truth.json”, stat_index=0) scores = scorer.score(actual_detections, predicted_detections)
Classes
An implementation of the |