Create a job
A JOB
POST
https://api.playment.io/v1/projects/:project_id/jobs
This endpoint allows you to create a job
Path Parameters
project_id
string
ID of the project in which you want to create the job
Headers
x-api-key
string
API key for authentication
Request Body
batch_id
string
A batch is a way to organize multiple jobs under one batch_id
. You can create new batches from the dashboard or by using the batch creation API.
If batch_id
is left empty or the key is not present, the job is created in the Default batch
in your project.
work_flow_id
string
The ID of the workflow inside which you want to create the job
data
object
The data
object contains all the information and attachments required to label a job. The data
object is defined below
reference_id
string
The unique identifier of the job
Payload
Code Example
Creating jobs with pre-labeled data
If you have data which has been labeled previously by an ML model or by human labelers, you can create jobs with such labels already created. To do this, you need to send the annotation data in the data.maker_response
key in the payload. The annotation data needs to be in our annotation format.
Here's an example
The data.maker_response.video_2d.data.annotations
list contains objects, where each object is a tracker. A tracker tracks an object across frames. The frames
key in the tracker object maps each annotation object in the tracker to the frame_id
it belongs to.
You can check the structure for various annotation_object
below:
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 () are calculated using the formula:
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 () are calculated using the formula:
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