Skip to content

Add script to download waymo calibration dataset #265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions script/get-dataset-waymo-calibration/COPYRIGHT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright Notice

© 2025-2026 MLCommons. All Rights Reserved.

This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License can be obtained at:

[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)

Unless required by applicable law or agreed to in writing, software distributed under the License is provided on an "AS IS" basis, without warranties or conditions of any kind, either express or implied. Please refer to the License for the specific language governing permissions and limitations under the License.
35 changes: 35 additions & 0 deletions script/get-dataset-waymo-calibration/customize.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from mlc import utils
import os


def preprocess(i):

os_info = i['os_info']

env = i['env']

if os_info['platform'] == "windows":
return {'return': 1, 'error': 'Script not supported in windows yet!'}

if env.get('MLC_DATASET_WAYMO_CALIBRATION_PATH', '') != '':
if not os.path.exists(env['MLC_DATASET_WAYMO_CALIBRATION_PATH']):
return {
'return': 1, 'error': f"Path {env['MLC_DATASET_WAYMO_CALIBRATION_PATH']} does not exists!"}
else:
env['MLC_TMP_REQUIRE_DOWNLOAD'] = "yes"
if env['MLC_DOWNLOAD_SRC'] == "mlcommons":
i['run_script_input']['script_name'] = 'run-rclone'
if env.get('MLC_OUTDIRNAME', '') != '':
env['MLC_DATASET_WAYMO_CALIBRATION_PATH'] = env['MLC_OUTDIRNAME']
else:
env['MLC_DATASET_WAYMO_CALIBRATION_PATH'] = os.path.join(
os.getcwd(), "kitti_format", "calibration")

return {'return': 0}


def postprocess(i):

env = i['env']

return {'return': 0}
35 changes: 35 additions & 0 deletions script/get-dataset-waymo-calibration/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
alias: get-dataset-waymo-calibration
automation_alias: script
automation_uid: 5b4e0237da074764
cache: true
input_mapping:
waymo_calibration_path: MLC_DATASET_WAYMO_CALIBRATION_PATH
new_env_keys:
- MLC_DATASET_WAYMO_CALIBRATION_PATH
tags:
- get
- waymo
- dataset
- calibration
uid: 59d3a8d48d5e4767
variations:
kitti_format:
default: true
env:
MLC_DATASET_WAYMO_FORMAT: kitti
group: dataset-format
mlc:
default: true
env:
MLC_DOWNLOAD_SRC: mlcommons
group: download-src
prehook_deps:
- enable_if_env:
MLC_TMP_REQUIRE_DOWNLOAD:
- true
tags: get,rclone
- enable_if_env:
MLC_TMP_REQUIRE_DOWNLOAD:
- true
force_cache: true
tags: get,rclone-config,_waymo
4 changes: 4 additions & 0 deletions script/get-dataset-waymo-calibration/run-rclone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cmd="rclone sync mlc-waymo:waymo_preprocessed_dataset/kitti_format/testing ${MLC_DATASET_WAYMO_CALIBRATION_PATH} -P"
echo $cmd
eval $cmd
test $? -eq 0 || exit $?
Loading