Crates.io | nuscenes-data |
lib.rs | nuscenes-data |
version | 0.4.0 |
source | src |
created_at | 2019-12-08 16:44:51.750084 |
updated_at | 2023-06-25 19:48:06.843875 |
description | NuScenes dataset loader in Rust |
homepage | https://github.com/jerry73204/nuscenes-data-rs |
repository | https://github.com/jerry73204/nuscenes-data-rs |
max_upload_size | |
id | 187331 |
size | 93,136 |
This project provides Rust implementation of nuScenes dataset loader, which format is defined on the nuScenes website.
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.
MIT license. See license file.