SimpleGenericGenerator
- class nrtk.impls.gen_object_detector_blackbox_response.simple_generic_generator.SimpleGenericGenerator(images: Sequence[ndarray[Any, Any]], ground_truth: Sequence[Sequence[tuple[AxisAlignedBoundingBox, dict[Hashable, float]]]])
Example implementation of the
GenerateObjectDetectorBlackboxResponseinterface.Methods
from_configInstantiate a new instance of this class given the configuration JSON-compliant dictionary encapsulating initialization arguments.
generateGenerate item-response curves for given parameters.
Generates a serializable configuration for the instance.
get_default_configGenerate and return a default configuration dictionary for this class.
get_implsDiscover and return a set of classes that implement the calling class.
is_usableCheck whether this class is available for use.
- __getitem__(idx: int) tuple[ndarray[Any, Any], Sequence[tuple[AxisAlignedBoundingBox, dict[Hashable, float]]], dict[str, Any]]
Get the image and ground_truth pair for a specific index.
- Parameters:
idx – Index of desired data pair.
- Raises:
IndexError – The given index does not exist.
Data pair corresponding to the given index.
- __init__(images: Sequence[ndarray[Any, Any]], ground_truth: Sequence[Sequence[tuple[AxisAlignedBoundingBox, dict[Hashable, float]]]]) None
Generate response curve for given images and ground_truth.
- Parameters:
images – Sequence of images to generate responses for.
ground_truth – Sequence of sequences of detections corresponsing to each image.
- Raises:
ValueError – Images and ground_truth data have a size mismatch.
- __len__() int
Number of image/ground_truth pairs this generator holds.
- get_config() dict[str, Any]
Generates a serializable configuration for the instance.
- Returns:
dict[str, Any]: Configuration dictionary containing instance parameters.