read_labels#
- read_labels(labels_df: GeoDataFrame, bbox: rastervision.core.box.Box | None = None) ChipClassificationLabels[source]#
Convert
GeoDataFrametoChipClassificationLabels.If the
GeoDataFramealready contains a grid of cells, thenChipClassificationLabelscan be constructed in a straightforward manner without having to infer the class of cells.If
bboxis given, only labels that intersect with it are returned.- Parameters:
geojson – dict in normalized GeoJSON format (see VectorSource)
bbox (rastervision.core.box.Box | None) – Box in pixel coords
labels_df (GeoDataFrame) –
- Return type: