Create a job

post
A JOB

https://api.playment.io/v1/projects/:project_id/jobs
This endpoint allows you to create a job
Request
Response
Request
Path Parameters
project_id
required
string
ID of the project in which you want to create the job
Headers
x-api-key
required
string
API key for authentication
Body Parameters
batch_id
optional
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
required
string
The ID of the workflow inside which you want to create the job
data
required
object
The data object contains all the information and attachments required to label a job. The data object is defined below
reference_id
required
string
The unique identifier of the job
Response
200: OK
{
"data": {
"job_id": "3f3e8675-ca69-46d7-aa34-96f90fcbb732",
"reference_id": "001",
"work_flow_id": "2aae1234-acac-1234-eeff-12a22a237bbc"
},
"success": true
}

Payload

{
"reference_id": "001",
"data": {
"sensor_data": {
"sensors": [
{
"sensor_id": "lidar",
"data_url": "https://xyz.s3.com/123.pcd",
"sensor_pose": {
"position": {
"x": 0,
"y": 0,
"z": 0
},
"heading": {
"w": 1,
"x": 0,
"y": 0,
"z": 0
}
}
},
{
"sensor_id": "18158562",
"data_url": "https://xyz.s3.com/123.jpg",
"sensor_pose": {
"position": {
"x": -0.81,
"y": 1.64,
"z": -1.52
},
"heading": {
"w": 0.68,
"x": 0.66,
"y": -0.21,
"z": 0.19
}
}
}
],
"ego_pose": {
"position": {
"x": 0,
"y": 0,
"z": 0
},
"heading": {
"w": 1,
"x": 0,
"y": 0,
"z": 0
}
},
"sensor_meta": [
{
"id": "lidar",
"name": "lidar",
"state": "editable",
"modality": "lidar",
"primary_view": true
},
{
"id": "18158562",
"name": "18158562",
"state": "editable",
"modality": "camera",
"camera_model": "brown_conrady",
"primary_view": false,
"intrinsics": {
"cx": 600,
"cy": 400,
"fx": 1200,
"fy": 800,
"k1": 0,
"k2": 0,
"k3": 0,
"k4": 0,
"p1": 0,
"p2": 0,
"skew": 0,
"scale_factor": 1
}
}
]
}
},
"work_flow_id": "2aae1234-acac-1234-eeff-12a22a237bbc"
}

Key

Description

Type

data.sensor_data

Contains a sensors list, ego_pose object and sensor metadata list

Object

data.sensor_data.sensor_meta

Contains a list of all the sensors with each having metadata information like id : id of sensor name : name of sensor modality : lidar / camera

If the sensor is a camera, you can add the camera intrinsic values as well as the camera_model. These values are used along with the sensor_pose to create projections between sensors.

camera_model: one of brown_conrady or fisheye

If this key doesn't exist or is null, the tool will assume brown_conrady.

The intrinsics object contains the following keys:

cx: principal point x value cy: principal point y value fx: focal length in x-axis fy: focal length in y-axis k1, k2, k3, k4, k5, k6: Radial distortion coefficients p1, p2: Tangential distortion coefficients skew: camera skew coefficient scale_factor: The factor by which the image has been downscaled (For example, scale_factor will be 2 if the original image is twice as large as the downscaled image)

If the camera_model is brown_conrady then the distortion coefficients should be one of the following combinations:

  • k1, k2, p1, p2

  • k1, k2, p1, p2, k3

  • k1, k2, p1, p2, k3, k4, k5, k6

If the camera_model is fisheye then the distortion coefficients should be the following combination:

  • k1, k2, k3, k4

The remaining coefficients can be ignored or be assigned a value of 0

OpenCV reference: Camera calibration and 3D reconstruction

List

data.sensor_data.ego_pose

Contains the pose of a fixed point on the ego vehicle in the world frame of reference in the form of position (in (x, y, z)) and orientation (as quaternion (w, x, y, z))

In case the pose of the ego vehicle is available in the world frame of reference, The tool can allow annotators to mark objects as stationary and toggle APC (Aggregated point cloud) mode.

Usually, if a vehicle is equipped with an IMU or Odometry sensor, then it is possible to get the pose of the ego-vehicle in the world frame of reference.

Object

data.sensor_data.sensors

List of all the sensors associated with this particular frame with each having:

sensor_id : id of the sensor. This is a foreign key to the sensor id mentioned in the sensor_meta of the sequence data

data_url : A URL to the file containing the data captured from the sensor for this frame. In order to annotate lidar data, please share point clouds in ascii encoded PCD format.

sensor_pose : This key specifies the pose of respective sensors in a common frame of reference. If the ego_pose is available in the world frame of reference, then you should specify the sensor_pose of individual sensors in the same world frame of reference. In such cases, the pose might change in every frame, as the vehicle moves. If the ego_pose is not available, then all sensor_pose can be specified with respect to a fixed point on the vehicle. In such cases, the pose will not change between frames.

List

Please share point clouds in ascii encoded PCD format

PCD format Specification: https://pcl.readthedocs.io/projects/tutorials/en/latest/pcd_file_format.html

# .PCD v0.7 - Point Cloud Data file format
VERSION 0.7
FIELDS x y z
SIZE 4 4 4
TYPE F F F
COUNT 1 1 1
WIDTH 47286
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 47286
DATA ascii
5075.773 3756.887 107.923
5076.011 3756.876 107.865
5076.116 3756.826 107.844
5076.860 3756.975 107.648
5077.045 3756.954 107.605
5077.237 3756.937 107.559
5077.441 3756.924 107.511
5077.599 3756.902 107.474
5077.780 3756.885 107.432
5077.955 3756.862 107.391
...