Load Waymo Open Dataset in PyTorch
Project description
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
# Login to gcloud
gcloud auth login
# Download the full dataset
cd <path/to/waymo>
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
# 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 <path/to/waymo>
# Or only convert the training split
torch-waymo-convert --dataset <path/to/waymo> --split training
# Or convert multiple splits
torch-waymo-convert --dataset <path/to/waymo> --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.
pip install torch_waymo
Example usage:
from torch_waymo import WaymoDataset
train_dataset = WaymoDataset('~/Datasets/Waymo/converted', 'training')
for i in range(10):
# frame is of type SimplifiedFrame
frame = train_dataset[i]
print(frame.timestamp_micros)
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
torch_waymo-0.1.4.tar.gz
(8.2 kB
view details)
Built Distribution
File details
Details for the file torch_waymo-0.1.4.tar.gz
.
File metadata
- Download URL: torch_waymo-0.1.4.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 338ca0f7f2a99d6833334d09d3297d23973bad89511ab95c648b8555feb632f5 |
|
MD5 | 82433a2a1047a920f7014000dac13a66 |
|
BLAKE2b-256 | bb4c218c98f3608103291ad1a45b0d869c1fc9ccd7c25b55ad060674bdc49420 |
File details
Details for the file torch_waymo-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: torch_waymo-0.1.4-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d51ef518a5d0fd8017ce2d47d795fb6f50aaa46d8e39769952143768aad6640 |
|
MD5 | 2d8c4b6a145c9de37763ecf11e87f614 |
|
BLAKE2b-256 | c1e2ddcb3e51f064f6691092eca73e6290fd21aa2715758efbf8454c8e617af3 |