kili-technology/kili-python-sdk

Suggest improvement to geojson-to-kili-labels docs

robmarkcole opened this issue · 0 comments

Docs at https://python-sdk-docs.kili-technology.com/latest/sdk/tutorials/geojson/#geojson-to-kili-labels are missing the from kili.utils.labels.geojson import geojson_polygon_feature_to_kili_bbox_annotation import and example, i.e.

json_response = {}

for feature in geojson_label["features"]:
    geometry_type = feature["geometry"]["type"]
    ....

    elif geometry_type == "Polygon":
        job_name = "OBJECT_DETECTION_JOB"
        category = "B_BOX_A"
        converter = geojson_polygon_feature_to_kili_bbox_annotation

    else:
        raise ValueError(f"Geometry type {geometry_type} not supported")