Skip to main content

Stardust SDK for AI/ML data processing and annotation workflows

Project description

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

Option 1: Install from PyPI (Recommended)

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

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

stardust_sdk-0.1.0.tar.gz (77.0 kB view details)

Uploaded Source

Built Distribution

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

stardust_sdk-0.1.0-py3-none-any.whl (99.9 kB view details)

Uploaded Python 3

File details

Details for the file stardust_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: stardust_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 77.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.14

File hashes

Hashes for stardust_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7230bf0d2ab9c4689f9312cdd41018e05872fd55bbca775a7105d5fe05365c07
MD5 eddf8f5b00136fcc4d47e186f6b4d41b
BLAKE2b-256 7d751c402f214b275cb5311dd2685647126f9abf74daffc6955f27d17e183173

See more details on using hashes here.

File details

Details for the file stardust_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: stardust_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 99.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.14

File hashes

Hashes for stardust_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14a1ae204601951295b72fbc828611a6b3c46a6da58ed843d36cdf341329216c
MD5 e42724a38e6275e8e0b60c1b80712c96
BLAKE2b-256 7b952157cdd685a233d0e71a5e366cd37944bfa2f693b2bec5449ef84d0b4558

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