read_labels#

read_labels(labels_df: GeoDataFrame, bbox: rastervision.core.box.Box | None = None) ChipClassificationLabels[source]#

Convert GeoDataFrame to ChipClassificationLabels.

If the GeoDataFrame already contains a grid of cells, then ChipClassificationLabels 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:
Return type:

ChipClassificationLabels