daita-technologies / backend

Backend system for the DAITA platform.
http://app.daita.tech
GNU Affero General Public License v3.0
3 stars 1 forks source link

Define the DAITA-specific annotation format #157

Open pcaversaccio opened 2 years ago

pcaversaccio commented 2 years ago

As part of our DAITAnnotation platform, we will use our DAITA-specific annotation format. This issue tracks the progress we make in specifying the exact annotation format.

In the following I share a couple of existing examples.

Scale AI: scale.ai.json

[
  {
    "task_id": "a9b7c5d3e1f",
    "created_at": "2000-01-01T00:00:00.000Z",
    "completed_at": "2000-01-01T00:00:00.000Z",
    "callback_url": "example@example.com",
    "type": "annotation",
    "status": "completed",
    "instruction": "\n# Instructions\n\nLabel the helmets on the workers.",
    "params": {
      "attachment": "https://storage.googleapis.com/roboflow/0001.jpg",
      "attachment_type": "image",
      "objects_to_annotate": [
        "helmet",
        "head",
        "person"
      ],
      "with_labels": true,
      "min_width": 0,
      "min_height": 0,
      "examples": []
    },
    "is_test": false,
    "urgency": "standard",
    "metadata": {},
    "callback_succeeded": true,
    "processed_attachments": [],
    "project": "Hard Hat Workers",
    "response": {
      "annotations": [
        {
          "width": 189,
          "height": 144,
          "label": "helmet",
          "left": 1374,
          "top": 2128
        },
        {
          "width": 157,
          "height": 122,
          "label": "person",
          "left": 1427,
          "top": 2409
        }
      ]
    },
    "project_param_version": 0,
    "scale_internal_attachment": "https://d2qt2k6tuv6mdh.cloudfront.net/a9b7c5d3e1f/001.jpg",
    "workStarted": true
  }
]

Labelbox: labelbox.json

[{
    "ID": "a9b7c5d3e1f",
    "DataRow ID": "xy10z8a6b4c",
    "Labeled Data": "https://storage.labelbox.com/IMG_001.JPG",
    "Label": {
        "helmet": [{
            "geometry": [{
                "x": 690,
                "y": 1497
            }, {
                "x": 931,
                "y": 1497
            }, {
                "x": 931,
                "y": 1633
            }, {
                "x": 690,
                "y": 1633
            }]
        }, {
            "geometry": [{
                "x": 1079,
                "y": 1445
            }, {
                "x": 1324,
                "y": 1445
            }, {
                "x": 1324,
                "y": 1564
            }, {
                "x": 1079,
                "y": 1564
            }]
        }]
    },
    "Project Name": "Boggle",
    "External ID": "IMG_001.JPG"
}]

Sagemaker GroundTruth Manifest: rekognition.manifest

{"source-ref":"s3://roboflow/img001.jpg","roboflow":{"annotations":[{"class_id":1,"width":64,"top":82,"height":72,"left":350},{"class_id":1,"width":52,"top":139,"height":61,"left":242}],"image_size":[{"width":500,"depth":3,"height":333}]},"roboflow-metadata":{"job-name":"labeling-job/roboflow","class-map":{"0":"helmet","1":"helmet"},"human-annotated":"yes","objects":[{"confidence":0.09},{"confidence":0.09}],"creation-date":"2020-07-20T18:45:18.67800","type":"groundtruth/object-detection"}}
{"source-ref":"s3://roboflow/img002.jpg","roboflow":{"annotations":[{"class_id":1,"width":28,"top":32,"height":33,"left":95},{"class_id":1,"width":27,"top":93,"height":27,"left":149}],"image_size":[{"width":300,"depth":3,"height":220}]},"roboflow-metadata":{"job-name":"labeling-job/roboflow","class-map":{"0":"helmet","1":"helmet"},"human-annotated":"yes","objects":[{"confidence":0.09},{"confidence":0.09}],"creation-date":"2020-07-20T18:45:18.69200","type":"groundtruth/object-detection"}}
{"source-ref":"s3://roboflow/img003.jpg","roboflow":{"annotations":[{"class_id":1,"width":33,"top":85,"height":43,"left":252},{"class_id":1,"width":38,"top":85,"height":49,"left":208},{"class_id":1,"width":28,"top":97,"height":38,"left":444},{"class_id":1,"width":46,"top":74,"height":58,"left":100},{"class_id":1,"width":51,"top":77,"height":55,"left":329},{"class_id":1,"width":26,"top":122,"height":38,"left":391},{"class_id":1,"width":34,"top":84,"height":44,"left":324},{"class_id":1,"width":15,"top":118,"height":23,"left":3},{"class_id":1,"width":24,"top":113,"height":34,"left":19}],"image_size":[{"width":500,"depth":3,"height":324}]},"roboflow-metadata":{"job-name":"labeling-job/roboflow","class-map":{"0":"helmet","1":"helmet"},"human-annotated":"yes","objects":[{"confidence":0.09},{"confidence":0.09},{"confidence":0.09},{"confidence":0.09},{"confidence":0.09},{"confidence":0.09},{"confidence":0.09},{"confidence":0.09},{"confidence":0.09}],"creation-date":"2020-07-20T18:45:18.69400","type":"groundtruth/object-detection"}}
{"source-ref":"s3://roboflow/img004.jpg","roboflow":{"annotations":[{"class_id":1,"width":105,"top":168,"height":107,"left":128},{"class_id":1,"width":132,"top":475,"height":126,"left":158}],"image_size":[{"width":500,"depth":3,"height":750}]},"roboflow-metadata":{"job-name":"labeling-job/roboflow","class-map":{"0":"helmet","1":"helmet"},"human-annotated":"yes","objects":[{"confidence":0.09},{"confidence":0.09}],"creation-date":"2020-07-20T18:45:18.70100","type":"groundtruth/object-detection"}}
{"source-ref":"s3://roboflow/img005.jpg","roboflow":{"annotations":[{"class_id":1,"width":85,"top":2,"height":85,"left":45},{"class_id":1,"width":72,"top":29,"height":81,"left":324},{"class_id":1,"width":56,"top":56,"height":64,"left":269},{"class_id":1,"width":58,"top":12,"height":70,"left":120},{"class_id":1,"width":29,"top":36,"height":36,"left":31},{"class_id":1,"width":58,"top":15,"height":51,"left":315},{"class_id":1,"width":35,"top":1,"height":112,"left":454}],"image_size":[{"width":490,"depth":3,"height":275}]},"roboflow-metadata":{"job-name":"labeling-job/roboflow","class-map":{"0":"helmet","1":"helmet"},"human-annotated":"yes","objects":[{"confidence":0.09},{"confidence":0.09},{"confidence":0.09},{"confidence":0.09},{"confidence":0.09},{"confidence":0.09},{"confidence":0.09}],"creation-date":"2020-07-20T18:45:18.70600","type":"groundtruth/object-detection"}}
{"source-ref":"s3://roboflow/img006.jpg","roboflow":{"annotations":[{"class_id":1,"width":57,"top":46,"height":62,"left":43},{"class_id":1,"width":60,"top":51,"height":61,"left":244}],"image_size":[{"width":400,"depth":3,"height":225}]},"roboflow-metadata":{"job-name":"labeling-job/roboflow","class-map":{"0":"helmet","1":"helmet"},"human-annotated":"yes","objects":[{"confidence":0.09},{"confidence":0.09}],"creation-date":"2020-07-20T18:45:18.70800","type":"groundtruth/object-detection"}}
{"source-ref":"s3://roboflow/img007.jpg","roboflow":{"annotations":[{"class_id":0,"width":64,"top":41,"height":67,"left":228}],"image_size":[{"width":401,"depth":3,"height":600}]},"roboflow-metadata":{"job-name":"labeling-job/roboflow","class-map":{"0":"helmet"},"human-annotated":"yes","objects":[{"confidence":0.09}],"creation-date":"2020-07-20T18:45:18.71000","type":"groundtruth/object-detection"}}
{"source-ref":"s3://roboflow/img008.jpg","roboflow":{"annotations":[{"class_id":1,"width":116,"top":19,"height":121,"left":64},{"class_id":1,"width":82,"top":75,"height":102,"left":204},{"class_id":1,"width":128,"top":0,"height":138,"left":340}],"image_size":[{"width":500,"depth":3,"height":333}]},"roboflow-metadata":{"job-name":"labeling-job/roboflow","class-map":{"0":"helmet","1":"helmet"},"human-annotated":"yes","objects":[{"confidence":0.09},{"confidence":0.09},{"confidence":0.09}],"creation-date":"2020-07-20T18:45:18.71200","type":"groundtruth/object-detection"}}
{"source-ref":"s3://roboflow/img009.jpg","roboflow":{"annotations":[{"class_id":1,"width":72,"top":0,"height":63,"left":95},{"class_id":1,"width":64,"top":45,"height":78,"left":167}],"image_size":[{"width":444,"depth":3,"height":215}]},"roboflow-metadata":{"job-name":"labeling-job/roboflow","class-map":{"0":"helmet","1":"helmet"},"human-annotated":"yes","objects":[{"confidence":0.09},{"confidence":0.09}],"creation-date":"2020-07-20T18:45:18.71600","type":"groundtruth/object-detection"}}
{"source-ref":"s3://roboflow/img010.jpg","roboflow":{"annotations":[{"class_id":1,"width":64,"top":4,"height":84,"left":179},{"class_id":1,"width":36,"top":85,"height":37,"left":40},{"class_id":1,"width":46,"top":64,"height":44,"left":69},{"class_id":1,"width":27,"top":110,"height":34,"left":2}],"image_size":[{"width":480,"depth":3,"height":318}]},"roboflow-metadata":{"job-name":"labeling-job/roboflow","class-

LabelMe: labelme.json

{
  "version": "4.5.6",
  "flags": {},
  "shapes": [
    {
      "label": "black-bishop",
      "points": [
        [
          250.5,
          44.0
        ],
        [
          285.0,
          112.5
        ]
      ],
      "group_id": null,
      "shape_type": "rectangle",
      "flags": {}
    },
    {
      "label": "white-knight",
      "points": [
        [
          128.5,
          44.0
        ],
        [
          168.5,
          110.5
        ]
      ],
      "group_id": null,
      "shape_type": "rectangle",
      "flags": {}
    },
    {
      "label": "white-king",
      "points": [
        [
          110.5,
          153.5
        ],
        [
          160.0,
          253.5
        ]
      ],
      "group_id": null,
      "shape_type": "rectangle",
      "flags": {}
    },
    {
      "label": "white-bishop",
      "points": [
        [
          91.0,
          295.0
        ],
        [
          136.5,
          366.0
        ]
      ],
      "group_id": null,
      "shape_type": "rectangle",
      "flags": {}
    },
    {
      "label": "white-pawn",
      "points": [
        [
          242.0,
          253.5
        ],
        [
          277.5,
          306.5
        ]
      ],
      "group_id": null,
      "shape_type": "rectangle",
      "flags": {}
    },
    {
      "label": "white-queen",
      "points": [
        [
          317.0,
          33.0
        ],
        [
          357.0,
          117.0
        ]
      ],
      "group_id": null,
      "shape_type": "rectangle",
      "flags": {}
    },
    {
      "label": "white-bishop",
      "points": [
        [
          367.5,
          1.5
        ],
        [
          401.0,
          69.5
        ]
      ],
      "group_id": null,
      "shape_type": "rectangle",
      "flags": {}
    },
    {
      "label": "black-rook",
      "points": [
        [
          484.5,
          56.5
        ],
        [
          522.5,
          113.0
        ]
      ],
      "group_id": null,
      "shape_type": "rectangle",
      "flags": {}
    },
    {
      "label": "black-king",
      "points": [
        [
          557.0,
          108.0
        ],
        [
          614.5,
          206.0
        ]
      ],
      "group_id": null,
      "shape_type": "rectangle",
      "flags": {}
    },
    {
      "label": "black-pawn",
      "points": [
        [
          384.0,
          153.0
        ],
        [
          412.5,
          204.5
        ]
      ],
      "group_id": null,
      "shape_type": "rectangle",
      "flags": {}
    },
    {
      "label": "black-bishop",
      "points": [
        [
          388.5,
          242.0
        ],
        [
          428.0,
          310.5
        ]
      ],
      "group_id": null,
      "shape_type": "rectangle",
      "flags": {}
    },
    {
      "label": "black-pawn",
      "points": [
        [
          517.5,
          249.5
        ],
        [
          553.0,
          303.5
        ]
      ],
      "group_id": null,
      "shape_type": "rectangle",
      "flags": {}
    },
    {
      "label": "black-knight",
      "points": [
        [
          466.5,
          356.5
        ],
        [
          516.0,
          430.5
        ]
      ],
      "group_id": null,
      "shape_type": "rectangle",
      "flags": {}
    }
  ],
  "imagePath": "0af.jpg",
  "imageData": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBg...",
  "imageHeight": 512,
  "imageWidth": 765
}