Copied
Docs

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

EMPLOYEE LOGIN
  • Home
  • Getting Started
  • Annotate
  • Tasks
  • API
  • Recipes
  • Tutorials
  • Integrations

Objects Delivery Experience

Updated at September 23rd, 2024

This document provides comprehensive details on the Objects JSON format, covering everything you need to know about structuring, managing, and utilizing JSON for objects. It includes explanations of the required fields, and format guidelines.

JSON format for objects

"objects":[
   {
      "id":0,
      "parent_id":4,
      "sort_index":1,
      "tags":{
         
      },
      "class_name":"PassengerCar",
      "key_locations":[
         {
            "frame_number":0,
            "tags":{
               "isBehindPhysicalBarrier":"false",
               "isIgnoreArea":"false",
               "occlusion":"0.0",
               "isAttachedTo":"-1",
               "vehicleExtension":[
                  "None"
               ],
               "duty":"Military",
               "vehicleLightsOn":[
                  "Off"
               ],
               "isCargo":"false",
               "isDummy":"false",
               "vehicleType":"NotSet"
            }
         }
      ],
      "locations":[
         {
            "tags":{
               "isBehindPhysicalBarrier":"false",
               "isIgnoreArea":"false",
               "occlusion":"0.0",
               "isAttachedTo":"-1",
               "vehicleExtension":[
                  "None"
               ],
               "duty":"Military",
               "vehicleLightsOn":[
                  "Off"
               ],
               "isCargo":"false",
               "isDummy":"false",
               "vehicleType":"NotSet"
            }
         }
      ]
   }           

Objects will be incorporated as new entries in the JSON structure, with each shape being linked to its respective object through a unique ID relationship. 

 

Within the .json file, we have a section titled "objects" which contains:

  • id: that serves as a unique identifier for an object
  • parent_id: to identify the object parent's id [optional]
  • sort_index: to define the initial order of objects in the UI [optional]
  • tags: to define the static attributes of the object
  • class_name: to identify the class the object belongs to
  • key_locations: to define the dynamic attributes of the object that change at this key frame
  • locations: to define the dynamic attributes of the object at that location, empty before the first key frame

JSON format for shapes

"answers":{
   "camera1_annotations":[
      {
         "group_type":null,
         "frame_count":1,
         "shapes":[
            {
               "index":1,
               "type":"rectangle",
               "tags":{
                  
               },
               "object_id":0,
               "key_locations":[
                  {
                     "frame_number":0,
                     "points":[
                        [
                           3476,
                           2087
                        ],
                        [
                           3863,
                           2087
                        ],
                        [
                           3476,
                           2420
                        ],
                        [
                           3863,
                           2420
                        ]
                     ],
                     "visibility":1
                  }
               ],
               "locations":[
                  {
                     "visibility":1,
                     "points":[
                        [
                           3476,
                           2087
                        ],
                        [
                           3863,
                           2087
                        ],
                        [
                           3476,
                           2420
                        ],
                        [
                           3863,
                           2420
                        ]
                     ],
                     "tags":{
                        
                     }
                  }
               ]
            },
            "...."

 

There will be no single shapes section. There will be an answers section containing all the shapes per output (point, cloud, video). 

  "answers": { 
"output 1": [ ... ], 
"output 2": [ ... ], 
... 
}
 
  • index: to identify the shape's index
  • type: to define the type of shape
  • tags: to define the static attributes of the shape
  • object_id: to identify the object the shape belongs to
  • key_locations: to define the dynamic attributes of the shape that change at this key frame. It also contains the coordinates (points) of that shape and visibility at each key frame
  • locations: to define the dynamic attributes of the shape at that location, empty before the first key frame. It also contains interpolated coordinates and visibility for the shape at every frame

Example Delivery JSON

{
   "id":"66be3c0174d94713579eb62b",
   "priority":0,
   "client_batch_id":"33",
   "project_id":41119,
   "created_at":"2024-08-15T17:34:03.030Z",
   "delivered_at":null,
   "state":"approved",
   "data":{
      "lidar_annotations Original url":"https://sama-pointCloud/...",
      "lidar_annotations Translations":"[[0.0,0.0,0.0,1.0,0.0,0.0,0.0]]",
      "lidar_annotations Total frames":"1",
      "camera1_annotations Camera initial rotation":"[0,0,0]",
      "camera1_annotations Original url":"https://sama-img8bitColor...",
      "camera1_annotations Original file name":"img8bitColor",
      "camera1_annotations Frames per second":"",
      "camera1_annotations Total frames":"1",
      "camera1_annotations Height":"3074",
      "camera1_annotations Width":"6090",
      "camera1_annotations Duration":"",
      "str_camera_type":"FC1",
      "url_camera1":"https://assets/..."
   },
   "answers":{
      "camera1_annotations":[
         {
            "group_type":null,
            "frame_count":1,
            "shapes":[
               {
                  "index":1,
                  "type":"rectangle",
                  "tags":{
                     
                  },
                  "object_id":0,
                  "key_locations":[
                     {
                        "frame_number":0,
                        "points":[
                           [
                              3476,
                              2087
                           ],
                           [
                              3863,
                              2087
                           ],
                           [
                              3476,
                              2420
                           ],
                           [
                              3863,
                              2420
                           ]
                        ],
                        "visibility":1
                     }
                  ],
                  "locations":[
                     {
                        "visibility":1,
                        "points":[
                           [
                              3476,
                              2087
                           ],
                           [
                              3863,
                              2087
                           ],
                           [
                              3476,
                              2420
                           ],
                           [
                              3863,
                              2420
                           ]
                        ],
                        "tags":{
                           
                        }
                     }
                  ]
               },
               ".....""objects":[
                  {
                     "id":0,
                     "sort_index":1,
                     "tags":{
                        
                     },
                     "class_name":"PassengerCar",
                     "key_locations":[
                        {
                           "frame_number":0,
                           "tags":{
                              "isBehindPhysicalBarrier":"false",
                              "isIgnoreArea":"false",
                              "occlusion":"0.0",
                              "isAttachedTo":"-1",
                              "vehicleExtension":[
                                 "None"
                              ],
                              "duty":"Military",
                              "vehicleLightsOn":[
                                 "Off"
                              ],
                              "isCargo":"false",
                              "isDummy":"false",
                              "vehicleType":"NotSet"
                           }
                        }
                     ],
                     "locations":[
                        {
                           "tags":{
                              "isBehindPhysicalBarrier":"false",
                              "isIgnoreArea":"false",
                              "occlusion":"0.0",
                              "isAttachedTo":"-1",
                              "vehicleExtension":[
                                 "None"
                              ],
                              "duty":"Military",
                              "vehicleLightsOn":[
                                 "Off"
                              ],
                              "isCargo":"false",
                              "isDummy":"false",
                              "vehicleType":"NotSet"
                           }
                        }
                     ]
                  },
                  {
                     "id":1,
                     "sort_index":0,
                     "tags":{
                        
                     },
                     "class_name":"Truck",
                     "key_locations":[
                        {
                           "frame_number":0,
                           "tags":{
                              "isBehindPhysicalBarrier":"false",
                              "isIgnoreArea":"false",
                              "occlusion":"0.0",
                              "isAttachedTo":"-1",
                              "vehicleExtension":[
                                 "None"
                              ],
                              "duty":"Military",
                              "vehicleLightsOn":[
                                 "MainLights"
                              ],
                              "isCargo":"false",
                              "isDummy":"false"
                           }
                        }
                     ],
                     "locations":[
                        {
                           "tags":{
                              "isBehindPhysicalBarrier":"false",
                              "isIgnoreArea":"false",
                              "occlusion":"0.0",
                              "isAttachedTo":"-1",
                              "vehicleExtension":[
                                 "None"
                              ],
                              "duty":"Military",
                              "vehicleLightsOn":[
                                 "MainLights"
                              ],
                              "isCargo":"false",
                              "isDummy":"false"
                           }
                        }
                     ]
                  }
               },
               "submitter_ids_by_step":{
                  "Step A":11817,
                  "Step C":7416,
                  "Step B":7416
               },
               "_extras":{
                  
               }
            }
         ]

⚠️ Please note that this .json file is not fully complete as it only serves as an example. 

📘 Note

The existing JSON format will not be compatible with this update, as it lacks the necessary 'object' field to accommodate these new entries.

 

 

goods transport items delivery

Was this article helpful?

Yes
No
Give feedback about this article
JSON format for objects JSON format for shapes Example Delivery JSON

The first B Corp-certified AI company

  • Security
  • Terms
  • Privacy
  • Quality & Information

Copyright © 2023 Samasource Impact Sourcing, Inc. All rights reserved.


Knowledge Base Software powered by Helpjuice

Expand