RGB-D Data Upload
File requirements for uploading RGB images with depth maps into an RGB-D project.
Supported File Types
Datature Nexus accepts RGB-D assets as ZIP files. Each ZIP file holds one RGB image and its matching depth map, and becomes a single asset in your RGB-D project.
RGB-D ZIP File Requirements
To upload an RGB-D asset, create one ZIP file per capture that meets the following criteria:
- File size must not exceed 512 MiB
- The ZIP must contain exactly one RGB image and one depth map
- By default, the RGB image must be named
rgband the depth map must be nameddepth, for examplergb.jpganddepth.png(case-insensitive) - To use other file names, add a
meta.jsonfile (see below)
- By default, the RGB image must be named
- All files must sit at the root of the ZIP, with no folders inside
- The RGB image and depth map must have the same width and height
- Neither image can be larger than 60,000 pixels on any side
scene_001.zip
├── rgb.jpg
├── depth.png
└── meta.json (optional)
Note:On macOS, zipping files with Compress adds a hidden
__MACOSXfolder, which will cause the upload to fail. Zip from the terminal instead, for example:zip -j scene_001.zip rgb.jpg depth.png
RGB Image Requirements
The RGB image can be any of the following formats:
.jpg,.jpeg,.jfif.png.bmp.tif,.tiff.webp.gif.avif.heic,.heif.jp2,.j2k
The file contents must match the file extension.
Depth Map Requirements
The depth map must be one of the following:
- PNG (
.png)- Single-channel grayscale only
- Bit depth of 1, 2, 4, 8 or 16. We recommend 16-bit PNG to preserve the full depth range
- NumPy array (
.npy)- Shape must be
(H, W)or(H, W, 1) - Datatype can be any integer type, or
float16,float32orfloat64 - Float values are rounded to the nearest whole number
- Values must be between
0and65535after rounding - Pickled arrays and
.npzfiles are not supported
- Shape must be
Depth values are stored as 16-bit integers. If your depth is in metres as floating point, convert it to an integer unit such as millimetres before saving it, and record the conversion with scale in meta.json.
Note:
NaNand infinite values in.npydepth maps are replaced with the first value ininvalidValues(0by default).
Custom File Names and Depth Settings (meta.json)
Add a meta.json file to the root of your ZIP to use different file names, or to describe how your depth values should be read. Every field is optional:
{
"version": "1",
"rgb": {
"file": "color_0001.jpg"
},
"depth": {
"file": "depth_0001.png",
"scale": 0.001,
"invalidValues": [0]
}
}| Field | Input | Description |
|---|---|---|
version | "1" | Version of the meta.json format. |
rgb.file | File name | Name of the RGB image in the ZIP. Defaults to the file named rgb. |
depth.file | File name | Name of the depth map in the ZIP. Defaults to the file named depth. |
depth.scale | Positive number | Number of metres represented by one stored depth unit. Default: 0.001, which means your depth map is in millimetres. For example, use 0.0001 if your depth map is in tenths of a millimetre. |
depth.invalidValues | List of unique integers, 0 to 65535 | Depth values that mean "no reading", for example 0 from pixels the sensor couldn't measure. Default: [0]. |
Any other keys in meta.json will cause the upload to fail.
How do I upload my RGB-D files?
Through the web app, open your RGB-D project, select Assets in the sidebar, and drop your ZIP files into the upload box, just as you would with images. See Uploading Data.
Through the Python SDK (version 1.12.2 and above), use a regular upload session. When the project is an RGB-D project, add_path picks up every .zip file in the folder:
from datature.nexus import Client
project = Client("YOUR_SECRET_KEY").get_project("proj_YOUR_PROJECT_ID")
with project.assets.create_upload_session() as upload_session:
upload_session.add_path("path/to/rgbd_zips/")Through the CLI, run datature assets upload and point it at the folder containing your ZIP files.
Through cloud storage, connect an Amazon S3, Azure Blob, Google Cloud Storage or MinIO bucket to your RGB-D project. ZIP files in the bucket are synced as RGB-D assets.
Common Questions
Why did my RGB-D upload fail?
The most common causes are:
- The ZIP contains a folder (including
__MACOSX) instead of having all files at the root. - There isn't exactly one file named
rgband one nameddepth, and there's nometa.jsonpointing to the right files. - The depth PNG has more than one channel (for example, an RGB or colourised depth image).
- The depth
.npyhas values below0or above65535. meta.jsonhas an unrecognised key or points to a file that isn't in the ZIP.
Can I upload regular images into an RGB-D project?
No. RGB-D projects only accept RGB-D ZIP files. To annotate regular images, create an Object Detection or Segmentation project instead.
What happens to the original ZIP?
Datature keeps your original ZIP file, alongside a processed version used for display in the Annotator.
Can I export my RGB-D dataset?
Not yet. Exporting RGB-D assets and their annotations is coming soon.
👋 Need help? Contact us via website or email
🚀 Join our Slack Community
💻 For more resources: Blog | GitHub | Tutorial Page
🛠️ Need Technical Assistance? Connect with Datature Experts or chat with us via the chat button below 👇
Updated 16 minutes ago