LEVIATHANDocumentation

DOC 04PERCEPTION

Synthetic data and export

LEVIATHAN writes ground truth in its own native format, which is lossless and content-addressed. Adapters derive views for common tools: COCO, KITTI, depth maps and optical-flow formats. Each adapter records what it loses.

Formats at a glance

Table 4.1 Export formats available in the current release.
FormatContainsLosslessFrom
Native frame / datasetEvery PerceptionFrame channel, frame records, object tables, calibration, provenance; optionally sonar, DVL, IMU, pressure, magnetometer and USBL measurementsYesViewport Export → Frame / Dataset; service
COCOInstance boxes and segmentation masks with canonical class idsNoViewport Export → COCO; service
KITTI3D object boxes for the camera, as KITTI camera 2NoViewport Export → KITTI; service
DepthZ-depth or range maps in float64Yes, for that channelViewport Export → Z-depth / Range; service
Native motion datasetSurface correspondence, forward and backward optical flow, scene displacement, motion fieldsYesService
Sintel / Middlebury .floOptical flow (u, v)No (float32)Service
KITTI 2015 flow PNGOptical flow with a validity channelNo (1/64 px steps)Service
PFMFlow, scene displacement, motion field or point velocity, with a JSON sidecarNo (float32)Service
Native track datasetTracks, observations, events and boxes for one cameraYesService
Native cross-modal datasetCamera–sonar contributor tables, observability and query indexesYesService
Native temporal camera–sonar datasetPairings of camera and sonar measurements taken at different times, with time-compensated ground truth per direction Under reviewYesService

Native datasets

The native dataset is the authoritative form. Writing and reading never regenerate provenance, change a hash or round an array.

Table 4.2 Layout of a native PerceptionFrame dataset.
EntryContent
manifest.jsonDataset schema, ordered frames, channel registry with units and frames, conventions, dataset hash
frames.jsonlOne canonical-JSON record per frame: camera calibration, pose, objects, completeness, provenance, identity
channels/<channel>/<frame>.npyScientific arrays, NumPy format, little-endian, in each channel's own type (float64, uint16, bool)
representations/rgb_sensor/…png16-bit PNG of the sensor codes, exact
representations/rgb_display/…png8-bit sRGB PNG, for viewing only
measurements.jsonl, measurements/…Optional sonar, DVL, IMU, pressure, magnetometer and USBL measurement records with their arrays
  • Missing values. A missing float, such as a pixel with no hit, is written as NaN and read back as null. A NaN that is actually present in the data is refused at write time, so the mapping is exact.
  • Dataset hash. The SHA-256 of the ordered list of frame content hashes. It does not depend on file names, timestamps, compression or display images.
  • Capture-group datasets. These package all sensors captured at the same instants, cameras and measurements together, in one dataset.

COCO

  • Category ids are LEVIATHAN's canonical semantic ids; names are the canonical labels.
  • There is one annotation per instance visible in the frame. The box [x, y, w, h] comes from the visible mask, with pixel centres at integers and w = umax − umin + 1. The segmentation is uncompressed COCO RLE, column-major, starting with background.
  • Extra keys keep the persistent object identity and the frame's content hash.
  • Not representable: range and z-depth, normals, radiometry, 3D pose, water and seabed as "stuff", missing pixels, amodal extent.

KITTI

A PerceptionFrame has one camera, exported as KITTI camera 2. Each visible object gets a 3D box (height, width, length, location, rotation and observation angle) in the camera frame.

Representable boxes

KITTI boxes are produced for spheres, and for meshes whose rotation is the identity with one object axis parallel to the camera's y axis, seen by an undistorted pinhole camera. Other objects are refused, or skipped when you ask for that, rather than given an invented box. Calibration entries for other cameras, LiDAR and IMU are reported as unavailable.

Depth maps

A depth export is a set of float64 maps whose definition is always recorded: z_depth (distance along the optical axis, the usual computer-vision convention) or range (Euclidean distance along the ray). Missing pixels are NaN, and the export says so.

Motion and flow formats

The native motion dataset holds correspondence, motion ground truth and motion fields without loss. External formats are one-way projections with stated losses.

Table 4.3 Optical-flow export formats.
FormatEncodingOptions and losses
Sintel / Middlebury .flo"PIEH" header, width, height, then float32 (u, v) pairs, row-major from the top. Unknown pixels are written as 1010Mask valid (visible only, the default) or geometric (every finite flow, including occluded points). Float64 is reduced to float32, and the maximum rounding error is recorded. Status codes go to a sidecar PNG
KITTI 2015 flow PNG16-bit RGB PNG: u = (R − 215)/64, v likewise, B = validVariant noc (visible only) or occ (every finite geometric flow). Rounded to the nearest 1/64 px, and the maximum error is recorded. Values outside ±512 px are refused, never clamped
PFMFloat32, rows bottom to top, little-endian; three-channel for vectors, one-channel for masksQuantity: flow, scene displacement (metres, NED), motion field or point velocity. A JSON sidecar is mandatory because PFM does not record channel meaning. NaN preserved

A request may hold up to 16 frames and 65,536 pixels per frame.

Conventions in every export

Table 4.4 Conventions shared by LEVIATHAN exports.
ItemConvention
PixelsCentres at integer (u, v); principal point ((W−1)/2, (H−1)/2); row 0 at the top
FramesWorld NED, body FRD, camera OpenCV optical (see Coordinate frames)
UnitsMetres, radians, seconds or integer nanoseconds; radiometry relative to surface irradiance
DepthRange and z-depth are always separate; no channel is called "depth"
LabelsCanonical semantic ids; 65535 means unannotated geometry, to be ignored
DeterminismBitwise reproducible from the same spec, seed and frame index on the same build and platform

Legacy synthetic-data generator

The Dashboard's Synthetic data panel runs LEVIATHAN's earlier generator. It produces domain-randomised scenes of labelled primitives on a flat seabed, with segmentation or detection labels. It can grade the result and export COCO, KITTI, depth and normals. A related generator turns imaging-sonar and side-scan images into COCO or KITTI detection labels. Legacy These generators are deterministic for a seed, but they use simplified scenes and do not carry the canonical identity, completeness and provenance described above. Use PerceptionFrame datasets for new work.

Other data products

  • Learning datasets: offline reinforcement-learning datasets of transitions (see Learning and evaluation).
  • Replay: ROS 2 bags and pose or odometry logs can be ingested and played back in the Viewport.
  • Charts and surveys: gridded bathymetry and chart tiles from the hydrographic tools (see Mapping and navigation).