Skip to main content

X-4D dataset format SDK — load, validate, evaluate, and convert autonomous driving datasets

Project description

x4d-devkit

X-4D dataset format SDK for autonomous driving — load, validate, evaluate, and convert datasets.

Installation

pip install x4d-devkit

With optional dependencies:

# NuScenes format converter
pip install x4d-devkit[converters]

# Platform API client
pip install x4d-devkit[client]

Quick Start

Load a clip

from x4d_devkit import ClipLoader

loader = ClipLoader("/path/to/clip")
print(loader.meta)

for sample in loader.samples:
    for sd in loader.sample_data_for_sample(sample.token):
        print(sd.channel, sd.file_path)

Coordinate frame transforms

Point clouds and annotations can be loaded in different coordinate frames:

loader = ClipLoader("/path/to/clip")
sd = loader.sample_data_for_channel("LIDAR_TOP")[0]

# Load point cloud in different frames
pts_sensor = loader.load_point_cloud(sd, frame="sensor")  # raw (default)
pts_ego = loader.load_point_cloud(sd, frame="ego")        # sensor → ego
pts_world = loader.load_point_cloud(sd, frame="world")    # sensor → world

# Get annotations in ego frame (for training)
anns_ego = loader.annotations_for_sample(sample.token, frame="ego")

# Get the transform matrix directly
T = loader.get_transform(sd, from_frame="sensor", to_frame="world")
pts_world = T.apply(pts_sensor[:, :3])  # or use T.as_matrix for 4x4

Validate a clip

x4d validate /path/to/clip
from x4d_devkit import validate_clip

report = validate_clip("/path/to/clip")
print(report)

Detection evaluation

from x4d_devkit import DetectionEval, DetectionConfig

config = DetectionConfig(
    class_names=["car", "pedestrian", "bicycle"],
    dist_thresholds=[0.5, 1.0, 2.0, 4.0],
)
evaluator = DetectionEval(config, gt_clips=[...], pred_clips=[...])
result = evaluator.evaluate()
print(f"mAP: {result.mAP:.3f}, NDS: {result.NDS:.3f}")

Convert from NuScenes

from x4d_devkit.converters import NuScenesConverter

converter = NuScenesConverter("/path/to/nuscenes")
converter.convert_scene("scene-0001", output_dir="/path/to/output")

Modules

Module Description
core Data models, token generation, coordinate transforms, clip loader
eval Detection evaluation (mAP, TP metrics, NDS)
converters Format converters (NuScenes → X4D)
validation Clip structure and data validation
client X-4D platform API client

License

Apache License 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

x4d_devkit-0.5.1.tar.gz (54.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

x4d_devkit-0.5.1-py3-none-any.whl (45.9 kB view details)

Uploaded Python 3

File details

Details for the file x4d_devkit-0.5.1.tar.gz.

File metadata

  • Download URL: x4d_devkit-0.5.1.tar.gz
  • Upload date:
  • Size: 54.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for x4d_devkit-0.5.1.tar.gz
Algorithm Hash digest
SHA256 f21273a01e33030699a979bdb4b9967c46dbcef9283c7bd7d7d9009a95bc592c
MD5 025270ba3238c256d7c329b80f1362d4
BLAKE2b-256 6a3b4c9617b2e1a6b1f0e1d4a6c7ddf7531d64f57d8ffded78b31fd48eeab7ee

See more details on using hashes here.

File details

Details for the file x4d_devkit-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: x4d_devkit-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 45.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for x4d_devkit-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0bad2f732f1861e312b819f0ca6bd3c8b97291ff06706f20e57747bc054f5626
MD5 1eb30020234183a97b709530afbd34d5
BLAKE2b-256 41c294c2eb3b81f8b4e4a502ac791d24cee4a6a9d3fea8e3ab8983174a1f7f53

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page