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.1.tar.gz (77.3 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.1-py3-none-any.whl (100.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stardust_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 77.3 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.1.tar.gz
Algorithm Hash digest
SHA256 c9c75a00c1fd58d57d9f3f566dd68fc66b8ed8ed21bdb59dd161c87350ab2666
MD5 0a08a936c96b9482bfa66e426c8b1868
BLAKE2b-256 896e014d536b8f0bc93539c92a4b5bb4f7fb45ae0aa5eed1bfc8ccbddab7a1cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stardust_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 100.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f906f7326c10eab3f7664325b0fb8bcdb964d437190cb268caca0e238f81f56
MD5 6b0c5bb1f6316ebd51b4a4e22575cadb
BLAKE2b-256 d0feddcb30a381169532301ea86cda0619f7516f7a2345d4370499de18afce6f

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