Skip to main content

Stardust SDK

Stardust SDK helps data and machine learning teams orchestrate the lifecycle of high quality sensor datasets: exporting annotations, converting formats, validating metrics, and closing the loop on model performance.

Overview

Stardust-SDK is a Python toolkit created by Stardust.ai for preparing training data. It connects raw annotations from Rosetta and MorningStar to common computer vision formats, analytics, and visualization utilities so that models can be trained and debugged faster.

Features

  • Export labeled data from Rosetta or MorningStar in the Stardust data format and transform it into COCO, KITTI, or PandaSet with minimal code.
  • Visualize predictions for key perception tasks such as object detection, tracking, and lane detection.
  • Evaluate model quality with built-in metrics including precision, recall, and F1, or plug in custom callbacks.
  • Validate camera and lidar calibration matrices before they reach production pipelines.

Installation

pip install stardust-sdk

Option 2: Install from GitHub

pip install git+https://github.com/stardustai/Stardust-SDK.git

Option 3: Development Installation

  1. Create and activate a Python 3.9 (or newer) environment.

    conda create -n stardust_sdk python=3.9 -y
    conda activate stardust_sdk
    
  2. Clone this repository.

    git clone https://github.com/stardustai/Stardust-SDK.git
    cd Stardust-SDK
    
  3. Install dependencies and the package in editable mode.

    pip install -r requirements.txt
    pip install -e .
    

Quick Start

Export Stardust JSON

Use read_rosetta to load labeled frames from Rosetta and stream them to a JSON file.

import json
from stardust.utils.convert import read_rosetta

gen_data = read_rosetta(
    project_id=1694,
    input_path="/path/to/export",
    pool_lst=[48904],  # optional
    export_type="json"  # optional
)

with open("your_file.json", "w", encoding="utf-8") as sf:
    for json_data in gen_data:
        json.dump(json_data, sf, ensure_ascii=False)
        break

Convert to KITTI

Transform Stardust JSON into KITTI files with the high level conversion helper.

import os
from stardust.utils.convert import read_rosetta
from stardust.convertion.to_kitti.to_kitti import kitti_export


gen_json_data = read_rosetta(
    project_id=1507,
    input_path="/path/to/export"
)

kitti_export(
    gen_json_data,
    os.path.join("/path/to/export", "kitti")
)  # outputs into input_path/kitti

Compute Metrics

Compare model predictions against human labels and review the results.

from pprint import pprint
from stardust.utils.convert import read_rosetta
from stardust.metric.object_detection import compute_metric

project_id = 1507
json_datas = read_rosetta(project_id=project_id, input_path="/path/to/export")
metric = compute_metric(json_datas, 0.5, "IoU", "results")
pprint(metric)

Project 3D Points

Confirm calibration by projecting 3D point clouds onto camera images.

import numpy as np
import open3d as o3d
from stardust.geometry.ops3d import pointcloud2img
from stardust.utils.convert import read_rosetta


pcd_path = "/path/to/point_cloud.pcd"
frames_jsons = read_rosetta(
    project_id=1507,
    input_path="/path/to/export",
    export_type="json"
)

pcd = o3d.io.read_point_cloud(pcd_path)
pcd_pts = np.asarray(pcd.points)

for frame in frames_jsons:
    frame_info = frame["media"]
    img_pixel = pointcloud2img(frame_info, cam_idx=1, points_3d=pcd_pts)
    # img_pixel now contains the projection of the point cloud onto image 1

Data Model

Each exported frame contains synchronized metadata and annotations. The top level structure is:

{
  "media": "Media metadata for all sensor files",
  "task_info": "TaskInfo describing the labeling job context",
  "annotation": "Human annotation results",
  "prediction": "Model-generated pre-annotations"
}

Key components are documented in the API reference:

Refer to the documentation site for a complete schema and additional examples.

Documentation

Latest API and workflow guides: docs.

Contributing

We welcome pull requests and feature proposals. Please review the contributing guidelines before submitting code.

Roadmap

  • Streamlined data warehouse migration support.
  • Hard example discovery tooling for model debugging.
  • Active learning workflow integration.

Community

Have questions or feedback? Join the discussion on Discord: https://discord.gg/gaaENMpK

Release files for stardust-sdk 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stardust-sdk 0.1.1
File Size Uploaded
stardust_sdk-0.1.1.tar.gz 77.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stardust-sdk 0.1.1
File Interpreter ABI Platform
stardust_sdk-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 177.3 kB

Release files / stardust_sdk-0.1.1.tar.gz

Download URL stardust_sdk-0.1.1.tar.gz
Size 77.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c9c75a00c1fd58d57d9f3f566dd68fc66b8ed8ed21bdb59dd161c87350ab2666
BLAKE2b-256 checksum
How to use checksums
896e014d536b8f0bc93539c92a4b5bb4f7fb45ae0aa5eed1bfc8ccbddab7a1cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.14

Release files / stardust_sdk-0.1.1-py3-none-any.whl

Download URL stardust_sdk-0.1.1-py3-none-any.whl
Size 100.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f906f7326c10eab3f7664325b0fb8bcdb964d437190cb268caca0e238f81f56
BLAKE2b-256 checksum
How to use checksums
d0feddcb30a381169532301ea86cda0619f7516f7a2345d4370499de18afce6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.14

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page