3 releases (breaking)

0.4.0 Jun 25, 2023
0.3.0 May 29, 2023
0.2.0 May 29, 2023
0.1.0 Dec 8, 2019

#1302 in Parser implementations

Download history 4/week @ 2024-07-14 4/week @ 2024-07-21 4/week @ 2024-07-28 6/week @ 2024-08-04 1/week @ 2024-08-11 4/week @ 2024-08-25 3/week @ 2024-09-01 17/week @ 2024-09-22 4/week @ 2024-09-29

71 downloads per month
Used in 4 crates

Custom license

72KB
1.5K SLoC

nuscenes-data: Loading nuScenes Dataset in Rust

[ crates.io | docs.rs ]

This project provides Rust implementation of nuScenes dataset loader, which format is defined on the nuScenes website.

Usage

Add the crate to your Rust project.

cargo add nuscenes-data

Import Dataset type and use it to load the data directory. The dataset version is "v1.0-trainval" in this example. You should able to find the "/path/to/dataset/v1.0-trainval" directory.

use nuscenes_data::Dataset;

let dataset = Dataset::load("v1.0-trainval", "/path/to/dataset")?;

The dataset contains many scenes. Use dataset.scene_iter() to iterate over scenes in the dataset. Scenes contain samples. Use scene.sample_iter() to iterate them.

for scene dataset.scene_iter() {
    for sample in scene.sample_iter() {
        for annotation in sample.annotatoin_iter() { /* omit */ }
        for data in sample.sample_data_iter() { /* omit */ }
    }
}

The complete tutorial can be found at the crate-level doc on docs.rs.

License

MIT license. See license file.

Dependencies

~3.5–4.5MB
~87K SLoC