Get job results

JOB RESULT

GET https://api.playment.io/v1/projects/:project_id/jobs/:job_id

This endpoint allows you to get the annotations created on a job.

Path Parameters

Headers

{
    "data": {
        "project_id": "905ea3ee-6f62-4bb7-8c31-471e486d9202",
        "reference_id": "001",
        "job_id": "3f3e8675-ca69-46d7-aa34-96f90fcbb732",
        "batch_id": "468b6ae3-e98d-4d08-9427-b6e7a016054c",
        "status": "completed",
        "work_flow_id": "51bb440c-f0ed-4286-8984-ea399cbc1f9w",
        "priority_weight": 5,
        "tag": "2aae1234-acac-1234-eeff-12a22a237bbc", //tag is the workflow_id for the job  
        "result": "https://playment-data-uploads.s3.ap-south-1.amazonaws.com/sample-result.json"
    },
    "success": true
}

ATTACHMENT

GET https://api.playment.io/v1/attachments?url=:result_url

The result_url (data.result) returned by the GET Job result API is a private URL (Well, it's public till 15th July 2021, after which we'll enforce it to be private). You need to use this Attachment access API to securely fetch the results. Please refer to the Attachment Access API document for more detail.

Path Parameters

Headers

The API will redirect to a signed URL of the attachment

Result Object

{
  "data": {
    "annotations": {
      "rectangles": [],
      "polygons": [],
      "lines": [],
      "cuboids": [],
      "landmarks": []
    },
    "image_url":"https://s3.aws.com/600x400/000/fff.jpg&text=Dummy+Image+1"
  }
}

The rectangles list contains objects, where each object is an annotation. You can check the data structures for various annotation types below:

"rectangles": [
  {
    "_id": "0e6d895e-2484-439a-b62b-d8a0afb3d190",
    "label": "Chair".
    "attributes": {
      "Truncation": {
        "value": "0% Truncated"
      },
      "Occlusion": {
        "value": "0% Occluded"
      }
    }
    "coordinates": [
      {"x": 0.00398, "y": 0.00558},
      {"x": 0.05404, "y": 0.00558},
      {"x": 0.05404, "y": 0.09096},
      {"x": 0.00398, "y": 0.09096}
    ]
  }
]

In our annotation output, the x and y coordinates are normalised to ensure consistency across different image sizes. Normalisation is crucial for accurately representing object positions relative to the image dimensions.

X and Y Coordinates:

  • X Coordinate:

    • Normalised x coordinates (XnormXnorm​) are calculated using the formula: Xnorm=Xraw/ImageWidthXnorm = Xraw / Image Width

    • The result ranges from 0.0 to 1.0, where 0.0(Origin) corresponds to the leftmost edge of the image, and 1.0 corresponds to the rightmost edge.

  • Y Coordinate:

    • Normalised y coordinates (YnormYnorm​) are calculated using the formula: Ynorm=Yraw/ImageHeightYnorm = Yraw / Image Height

    • The result ranges from 0.0 to 1.0, where 0.0(Origin) corresponds to the topmost edge of the image, and 1.0 corresponds to the bottommost edge.

Last updated