make_cc_scene#
- make_cc_scene(image_uri: Union[str, List[str]], label_vector_uri: Optional[str] = None, class_config: Optional[ClassConfig] = None, aoi_uri: Union[str, List[str]] = [], label_vector_default_class_id: Optional[int] = None, image_raster_source_kw: dict = {}, label_vector_source_kw: dict = {}, label_source_kw: dict = {}, scene_id: Optional[str] = None) Scene [source]#
Create a chip classification scene from image and label URIs.
This is a convenience method. For more fine-grained control, it is recommended to use the default constructor.
- Parameters
image_uri (Union[str, List[str]]) – URI or list of URIs of GeoTIFFs to use as the source of image data.
label_vector_uri (Optional[str], optional) – URI of GeoJSON file to use as the source of segmentation label data. Defaults to None.
class_config (Optional[ClassConfig]) – The ClassConfig. Must be non-None if creating a scene without a LabelSource. Defaults to None.
aoi_uri (Union[str, List[str]], optional) – URI or list of URIs of GeoJSONs that specify the area-of-interest. If provided, the dataset will only access data from this area. Defaults to [].
label_vector_default_class_id (Optional[int], optional) – If using label_vector_uri and all polygons in that file belong to the same class and they do not contain a class_id property, then use this argument to map all of the polgons to the appropriate class ID. See docs for ClassInferenceTransformer for more details. Defaults to None.
image_raster_source_kw (dict, optional) – Additional arguments to pass to the RasterioSource used for image data. See docs for RasterioSource for more details. Defaults to {}.
label_vector_source_kw (dict, optional) – Additional arguments to pass to the GeoJSONVectorSourceConfig used for label data, if label_vector_uri is set. See docs for GeoJSONVectorSourceConfig for more details. Defaults to {}.
label_source_kw (dict, optional) – Additional arguments to pass to the ChipClassificationLabelSourceConfig used for label data, if label_vector_uri is set. See docs for ChipClassificationLabelSourceConfig for more details. Defaults to {}.
scene_id (Optional[str]) – Optional scene ID. If None, will be randomly generated. Defaults to None.
- Returns
A chip classification scene.
- Return type