https://github.com/willguimont/torch_waymo
PyTorch dataloader for Waymo Open Dataset
https://github.com/willguimont/torch_waymo
dataloader dataset point-cloud pytorch torch waymo
Last synced: 2 months ago
JSON representation
PyTorch dataloader for Waymo Open Dataset
- Host: GitHub
- URL: https://github.com/willguimont/torch_waymo
- Owner: willGuimont
- License: mit
- Created: 2023-01-30T21:12:04.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-20T00:11:51.000Z (over 1 year ago)
- Last Synced: 2025-02-09T07:48:28.594Z (3 months ago)
- Topics: dataloader, dataset, point-cloud, pytorch, torch, waymo
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 12
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# torch_waymo
Load Waymo Open Dataset in PyTorch
Cite this repository:
```
@software{Guimont-Martin_A_PyTorch_dataloader_2023,
author = {Guimont-Martin, William},
month = {1},
title = {{A PyTorch dataloader for Waymo Open Dataset}},
version = {0.1.1},
year = {2023}
}
```## Usage
Requires:
- Python < 3.10### Download the dataset
```shell
# Login to gcloud
gcloud auth login# Download the full dataset
cd
gsutil -m cp -r \
"gs://waymo_open_dataset_v_1_4_1/individual_files/training" \
"gs://waymo_open_dataset_v_1_4_1/individual_files/validation" \
.
```### Convert it
```shell
# Make a tf venv
python -m venv venv_tf
source venv_tf/bin/activate
pip install torch_waymo[waymo]# Convert all the dataset
torch-waymo-convert --dataset
# Or only convert the training split
torch-waymo-convert --dataset --split training
# Or convert multiple splits
torch-waymo-convert --dataset --split training validation
```### Load it in your project
Now that the dataset is converted, you don't have to depend on `waymo-open-dataset-tf-2-6-0` in your project.
You can simply install `torch_waymo` in your project.```shell
pip install torch_waymo
```Example usage:
```python
from torch_waymo import WaymoDatasettrain_dataset = WaymoDataset('~/Datasets/Waymo/converted', 'training')
for i in range(10):
# frame is of type SimplifiedFrame
frame = train_dataset[i]
print(frame.timestamp_micros)
```