ObjectDetectionGeoJSONStore#
- class ObjectDetectionGeoJSONStore[source]#
Bases:
LabelStore
Storage for object detection predictions.
Attributes
- __init__(uri: str, class_config: ClassConfig, crs_transformer: CRSTransformer, bbox: Optional[Box] = None)[source]#
Constructor.
- Parameters
uri (str) – uri of GeoJSON file containing labels
class_config (ClassConfig) – ClassConfig used to infer class_ids from class_name (or label) field
crs_transformer (CRSTransformer) – CRSTransformer to convert from map coords in label in GeoJSON file to pixel coords.
bbox (Optional[Box], optional) – User-specified crop of the extent. If provided, only labels falling inside it are returned by
ObjectDetectionGeoJSONStore.get_labels()
.
Methods
__init__
(uri, class_config, crs_transformer)Constructor.
Loads Labels from this label store.
save
(labels)Save labels to URI.
set_bbox
(bbox)Set self.extent to the given value.
- __init__(uri: str, class_config: ClassConfig, crs_transformer: CRSTransformer, bbox: Optional[Box] = None)[source]#
Constructor.
- Parameters
uri (str) – uri of GeoJSON file containing labels
class_config (ClassConfig) – ClassConfig used to infer class_ids from class_name (or label) field
crs_transformer (CRSTransformer) – CRSTransformer to convert from map coords in label in GeoJSON file to pixel coords.
bbox (Optional[Box], optional) – User-specified crop of the extent. If provided, only labels falling inside it are returned by
ObjectDetectionGeoJSONStore.get_labels()
.
- get_labels() ObjectDetectionLabels [source]#
Loads Labels from this label store.
- Return type
- save(labels: ObjectDetectionLabels) None [source]#
Save labels to URI.
- Parameters
labels (ObjectDetectionLabels) –
- Return type
None
- set_bbox(bbox: Box) None [source]#
Set self.extent to the given value.
Note
This method is idempotent.
- property crs_transformer: CRSTransformer#