ObjectDetectionLabelSource#

class ObjectDetectionLabelSource[source]#

Bases: LabelSource

A read-only label source for object detection.

Attributes

__init__(vector_source: VectorSource, extent: Box, ioa_thresh: Optional[float] = None, clip: bool = False)[source]#

Constructor.

Parameters
  • vector_source (VectorSource) – A VectorSource.

  • extent (Box) – Box used to filter the labels by extent.

  • ioa_thresh (Optional[float], optional) – IOA threshold to apply when retieving labels for a window. Defaults to None.

  • clip (bool, optional) – Clip bounding boxes to window limits when retrieving labels for a window. Defaults to False.

Methods

__init__(vector_source, extent[, ...])

Constructor.

get_labels([window, ioa_thresh, clip])

Get labels (in global coords) for a window.

validate_geojson(geojson)

__init__(vector_source: VectorSource, extent: Box, ioa_thresh: Optional[float] = None, clip: bool = False)[source]#

Constructor.

Parameters
  • vector_source (VectorSource) – A VectorSource.

  • extent (Box) – Box used to filter the labels by extent.

  • ioa_thresh (Optional[float], optional) – IOA threshold to apply when retieving labels for a window. Defaults to None.

  • clip (bool, optional) – Clip bounding boxes to window limits when retrieving labels for a window. Defaults to False.

get_labels(window: Optional[Box] = None, ioa_thresh: float = 1e-06, clip: bool = False) ObjectDetectionLabels[source]#

Get labels (in global coords) for a window.

Parameters
  • window (Box) – Window coords.

  • ioa_thresh (float) –

  • clip (bool) –

Returns

Labels with sufficient overlap with the

window. The returned labels are in global coods (i.e. coords wihtin the full extent).

Return type

ObjectDetectionLabels

validate_geojson(geojson: dict) None[source]#
Parameters

geojson (dict) –

Return type

None

property extent: Box#