Uploading data
See how you can upload and manage your datasets on Mindkosh using the SDK
Before you attempt to upload data, make sure you've followed the steps outlined here to setup the SDK.
Uploading data of a single type
from mindkosh import Client
## Upload all image files found in the specified directory
client.upload_data(
dataset_id=dataset_id,
resources=['/example_images/'],
tags=['penguin'] ## optional
)
## Or specify the files to be uploaded
client.upload_data(
dataset_id=dataset_id,
resources=[
'/home/user/Downloads/test1.pcd',
'/home/user/Downloads/test2.pcd'
],
tags=['forest'] ## optional
)If you would like to specify different tags for each file, you can use the ImageFile or PointCloudFile objects.
Uploading lidar + camera data
To upload lidar point clouds + reference camera images, create point cloud file objects and specify the camera images as ImageFile objects. If available, calibration parameters can be specified as Extrinsic parameters (For Lidar to camera projection) and Intrinsic (For camera to image projection) parameters. If these parameters have been specified, Mindkosh can automatically project cuboid annotations over reference camera images.
intrinsic- Specified in[fx, fy, cx, cy]form.extrinsic- Specified in a 4x4 transformation matrix that can transform a point in the point cloud reference frame to the camera reference frame.camera_model- Mindkosh supports two camera models -PINHOLEwhich is the most widely used, andFISHEYE. When specifying parameters for Fisheye, themirrorParameteralso needs to be set.Parameters are set separately for each camera and for each frame. Even if they stay the same across a scene.
device_id- A unique number that can be used to identify a camera. This can be any number as long as it is unique across the cameras, and stays the same across frames. For e.g. if you have a left and right camera, you can assign the device ID 1 and 2 to them, across all frames.
Mindkosh requires all files within a dataset to have unique names. This means that if your camera files have the same names (for e.g. the same timestamp.png for both left and right cameras), you will need to rename them by adding camera prefixes, so the names are unique.
Last updated