Skip to content

Conversation

@Fl4m3Ph03n1x
Copy link
Contributor

What

This PR adds support for SuperAnnotate tags. It should be the last step needed to complete the SuperAnnotate import project (aside from rotated bounding boxes which are on ice for the time being).

It also adds some additional checks to the superannotate_schema that were missing from the last PR.

How to test

test.json

{
    "instances": [
        {
            "type": "bbox",
            "classId": 2,
            "probability": 100,
            "points": {
                "x1": 275.4,
                "x2": 570.3,
                "y1": 590.8,
                "y2": 1440
            },
            "groupId": 0,
            "pointLabels": {},
            "locked": false,
            "visible": true,
            "attributes": [
                {
                    "id": 2,
                    "groupId": 1
                },
                {
                    "id": 3,
                    "groupId": 2
                }
            ]
        }
    ],
    "tags": [
        "orange",
        "red"
    ],
    "metadata": {
        "version": "1.0.0",
        "name": "sonnie-hiles-PUBt7UPbJFY-unsplash.jpg",
        "status": "Completed"
    }
}

classes.json

[
    {
        "attribute_groups": [
            {
                "id": 1,
                "name": "Sex",
                "is_multiselect": false,
                "attributes": [
                    {
                        "id": 1,
                        "name": "Male"
                    },
                    {
                        "id": 2,
                        "name": "Female"
                    }
                ],
                "opened": true,
                "hasChanges": false
            },
            {
                "id": 2,
                "name": "Emotion",
                "is_multiselect": false,
                "attributes": [
                    {
                        "id": 3,
                        "name": "Smiling"
                    },
                    {
                        "id": 4,
                        "name": "Sadness"
                    },
                    {
                        "id": 5,
                        "name": "Crying"
                    }
                ],
                "opened": true,
                "hasChanges": false
            }
        ],
        "color": "#fd7007",
        "id": 2,
        "name": "Pedestrian",
        "opened": true
    }
]

command
darwin dataset import cars superannotate YOUR_FOLDER_PATH

@Fl4m3Ph03n1x Fl4m3Ph03n1x self-assigned this Dec 30, 2021
@Fl4m3Ph03n1x Fl4m3Ph03n1x added documentation Improvements or additions to documentation enhancement New feature or request wind-team labels Dec 30, 2021
@Fl4m3Ph03n1x Fl4m3Ph03n1x merged commit 9d60a2f into master Dec 30, 2021
Copy link
Member

@andreaazzini andreaazzini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few questions

Comment on lines +169 to +170
def _convert_tag(tag: str) -> Annotation:
return make_tag(tag)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function seems to basically act as proxy of make_tag, I'd say, let's use make_tag right away 🙂

Comment on lines +1 to +3
##################################
# import_file.json #
##################################
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we use this comment convention elsewhere?

@Fl4m3Ph03n1x Fl4m3Ph03n1x deleted the v7-2632-support-tags branch December 30, 2021 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request wind-team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants