Points on the image
- Create the image job as mentioned in Creating image annotation-task(Job) check the sidebar for a sample input
POST
https://api.playment.io/v0/projects/<project_id>/jobs
Parameters
project_id
: To be passed in the URL
x-api-key
: Secret key to be passed as a header
{
"reference_id": "001",
"data": {
"image_url":"https://dummyimage.com/600x400/000/fff.jpg&text=Dummy+Image+1"
},
"tag": "Sample-task",
"batch_id": "72c888f6-b365-4f27-ad57-d7841da2de0c",
"priority_weight": 5
}
{
"data": {
"job_id": "3f3e8675-ca69-46d7-aa34-96f90fcbb732",
"reference_id": "001",
"tag": "Sample-task"
},
"success": true
}
-
Fetching result as mentioned in Fetching Job Result
GET
https://api.playment.in/v0/projects/<project_id>/jobs/<job_id>
Parameters
project_id
: To be passed in the URL
x-api-key
: Secret key to be passed as a header
{
"data": {
"project_id": "",
"reference_id": "001",
"job_id": "fde54589-ebty-48lp-677a-03a0428ca836",
"batch_id": "b99d241a-bb80-ghyi-po90-c37d4fead593",
"status": "completed",
"tag": "sample_project",
"priority_weight": 5,
"result": "https://playment-data-uploads.s3.ap-south-1.amazonaws.com/sample-result.json"
},
"success": true
}
{
"data": {
"annotations": {
"cuboids": [],
"landmarks": [{
"_id": "e7e3353f-2ffe-432a-a14f-9cb9a6f4b735",
"attributes": {
"Label": {
"state": "editable",
"value": "inside image and occluded by other object"
}
},
"points": {
"p1": { "x": 0.17, "y": 0.58, "label": 1 },
"p2": { "x": 0.26, "y": 0.63, "label": 2 },
"p3": { "x": 0.27, "y": 0.63, "label": 3 },
"p4": { "x": 0.29, "y": 0.59, "label": 4 },
"p5": { "x": 0.25, "y": 0.46, "label": 5 },
"p6": { "x": 0.22, "y": 0.42, "label": 6 }
},
"label": "nose"
}, {
"_id": "cf980562-599f-453c-b717-40a07c20e156",
"attributes": {
"Label": {
"state": "editable",
"value": "inside image and occluded by other object"
}
},
"points": {
"p1": { "x": 0.17, "y": 0.58, "label": 7 },
"p2": { "x": 0.26, "y": 0.63, "label": 8 },
"p3": { "x": 0.27, "y": 0.63, "label": 9 },
"p4": { "x": 0.29, "y": 0.59, "label": 10 },
"p5": { "x": 0.25, "y": 0.46, "label": 11 },
"p6": { "x": 0.22, "y": 0.42, "label": 12 }
},
"label": "left-ear"
}],
"lines": [],
"polygons": [],
"rectangles": []
},
"image_url": "https://playment-data-uploads.s3.ap-south-1.amazonaws.com/clients/d3ad5a3e-b701-4f6b-a1d4-4ec2ae668ddb/projects/13c7d7dc-c79b-45e7-bbfa-1d84bfb41681/batch_upload_data/e595c2f0-141b-4f0b-8642-a9caf5e7698d/Pre-selection/relevant%20frames/20190923-123036_City__00025_F_STEREO_L_2_masked.jpg"
}
}
Result JSON Structure
Response Key | Description |
---|---|
data | object having annotations object and image_url |
data.annotations | Object having all the types of annotations namely cuboids, landmarks, lines, polygons and rectangles |
data.annotations.landmarks | List of all the landmarks annotated in this job |
data.annotations.landmarks.[i] | one of the Object from landmarks list, having _id, label, points and other attributes |
data.annotations.landmarks.[i]._id | String id of the particular annotated landmark |
data.annotations.landmarks.[i].label | String class label of the particular annotated landmark |
data.annotations.landmarks.[i].points | Object having all the points of the corresponding landmark named as p1, p2, p3..... |
data.annotations.landmarks.[i].points.p[j] | Object having label and x and y coordinate of a particular point |
data.annotations.landmarks.[i].attributes | Object having all the additional attributes associated with the particular annotated landmark |
data.image_url | String URL of the image over which landmarking was done |