nrtk.impls.score_detections.random_scorer

This module defines the RandomScorer class, which implements the ScoreDetections interface to generate random scores for object detection tasks. The RandomScorer class serves as a test tool to verify reproducibility by returning random float scores based on a given seed value. This can be useful in testing scenarios where deterministic random values are needed.

Classes:

RandomScorer: An implementation of ScoreDetections that generates random scores for input detection data.

Dependencies:
  • numpy for generating random float values.

  • smqtk_image_io for bounding box handling.

  • nrtk.interfaces for the ScoreDetections interface.

Usage:

Instantiate RandomScorer with an optional seed for reproducibility:

scorer = RandomScorer(seed=42) scores = scorer.score(actual_detections, predicted_detections)

Example:

random_scorer = RandomScorer(seed=123) random_scores = random_scorer.score(actual_detections, predicted_detections)

Classes

RandomScorer

An implementation of the ScoreDetection interface that serves as a simple test for reproduciblity.