Upload Multiple Annotations

Hi,

I have about 50 bbox-annotations per image and I’d like to upload them.
In the example notebook, we can see the examples code as follows;

bbox_with_radio_subclass_annotation = lb_types.ObjectAnnotation(
    name="bbox_with_radio_subclass",
    value=lb_types.Rectangle(
        start=lb_types.Point(x=541, y=933),  #  x = left, y = top 
        end=lb_types.Point(x=871, y=1124),  # x= left + width , y = top + height
    ),
    classifications=[
        lb_types.ClassificationAnnotation(
            name="sub_radio_question",
            value=lb_types.Radio(answer=lb_types.ClassificationAnswer(
                name="first_sub_radio_answer")))
    ])

This code contains only one bbox. When I intend to import multiple bbox annotations to an image, I 'd like to know if I have to define another variable like bbox_with_radio_subclass_annotation_2 and store the annotations in it, or is it possible to store the bbox coordinates within bbox_with_radio_subclass_annotation?

Hi @Miko, thanks for your question. You must create a unique annotation for each bounding box you wish to import. Each object of the ObjectAnnotation class can only contain one top-level annotation.