read_labels#
- read_labels(labels_df: GeoDataFrame, bbox: rastervision.core.box.Box | None = None) ChipClassificationLabels [source]#
Convert
GeoDataFrame
toChipClassificationLabels
.If the
GeoDataFrame
already contains a grid of cells, thenChipClassificationLabels
can be constructed in a straightforward manner without having to infer the class of cells.If
bbox
is 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: