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.3.tar.gz
(8.2 kB
view hashes)
Built Distribution
Close
Hashes for torch_waymo-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af0245e40743689a2133e71fdb6d92f78ef2192aa31fd7f48a788a496d5e4e4d |
|
MD5 | ca3f4fe85963c91af01f6608e35f62a9 |
|
BLAKE2b-256 | 1d710e78e9c5dfe7f13cd6ee85ed9f3e5ac1de0fa2b44611b44a29d369876686 |