Source code for

from typing import Optional
from os.path import join

from import (LabelStoreConfig,
from rastervision.pipeline.config import register_config, Field

[docs]@register_config('object_detection_geojson_store') class ObjectDetectionGeoJSONStoreConfig(LabelStoreConfig): """Configure an :class:`.ObjectDetectionGeoJSONStore`.""" uri: Optional[str] = Field( None, description= ('URI of GeoJSON file with predictions. If None, and this Config is part of ' 'a SceneConfig inside an RVPipelineConfig, it will be auto-generated.' ))
[docs] def build(self, class_config, crs_transformer, extent=None, tmp_dir=None): return ObjectDetectionGeoJSONStore(self.uri, class_config, crs_transformer)
[docs] def update(self, pipeline=None, scene=None): if pipeline is not None and scene is not None: if self.uri is None: self.uri = join(pipeline.predict_uri, '{}.json'.format(