Skip to content

Commit d8cae3a

Browse files
authored
Add script to download waymo calibration dataset (#265)
1 parent d8bf122 commit d8cae3a

File tree

4 files changed

+83
-0
lines changed

4 files changed

+83
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright Notice
2+
3+
© 2025-2026 MLCommons. All Rights Reserved.
4+
5+
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:
6+
7+
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
8+
9+
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.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from mlc import utils
2+
import os
3+
4+
5+
def preprocess(i):
6+
7+
os_info = i['os_info']
8+
9+
env = i['env']
10+
11+
if os_info['platform'] == "windows":
12+
return {'return': 1, 'error': 'Script not supported in windows yet!'}
13+
14+
if env.get('MLC_DATASET_WAYMO_CALIBRATION_PATH', '') != '':
15+
if not os.path.exists(env['MLC_DATASET_WAYMO_CALIBRATION_PATH']):
16+
return {
17+
'return': 1, 'error': f"Path {env['MLC_DATASET_WAYMO_CALIBRATION_PATH']} does not exists!"}
18+
else:
19+
env['MLC_TMP_REQUIRE_DOWNLOAD'] = "yes"
20+
if env['MLC_DOWNLOAD_SRC'] == "mlcommons":
21+
i['run_script_input']['script_name'] = 'run-rclone'
22+
if env.get('MLC_OUTDIRNAME', '') != '':
23+
env['MLC_DATASET_WAYMO_CALIBRATION_PATH'] = env['MLC_OUTDIRNAME']
24+
else:
25+
env['MLC_DATASET_WAYMO_CALIBRATION_PATH'] = os.path.join(
26+
os.getcwd(), "kitti_format", "calibration")
27+
28+
return {'return': 0}
29+
30+
31+
def postprocess(i):
32+
33+
env = i['env']
34+
35+
return {'return': 0}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
alias: get-dataset-waymo-calibration
2+
automation_alias: script
3+
automation_uid: 5b4e0237da074764
4+
cache: true
5+
input_mapping:
6+
waymo_calibration_path: MLC_DATASET_WAYMO_CALIBRATION_PATH
7+
new_env_keys:
8+
- MLC_DATASET_WAYMO_CALIBRATION_PATH
9+
tags:
10+
- get
11+
- waymo
12+
- dataset
13+
- calibration
14+
uid: 59d3a8d48d5e4767
15+
variations:
16+
kitti_format:
17+
default: true
18+
env:
19+
MLC_DATASET_WAYMO_FORMAT: kitti
20+
group: dataset-format
21+
mlc:
22+
default: true
23+
env:
24+
MLC_DOWNLOAD_SRC: mlcommons
25+
group: download-src
26+
prehook_deps:
27+
- enable_if_env:
28+
MLC_TMP_REQUIRE_DOWNLOAD:
29+
- true
30+
tags: get,rclone
31+
- enable_if_env:
32+
MLC_TMP_REQUIRE_DOWNLOAD:
33+
- true
34+
force_cache: true
35+
tags: get,rclone-config,_waymo
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cmd="rclone sync mlc-waymo:waymo_preprocessed_dataset/kitti_format/testing ${MLC_DATASET_WAYMO_CALIBRATION_PATH} -P"
2+
echo $cmd
3+
eval $cmd
4+
test $? -eq 0 || exit $?

0 commit comments

Comments
 (0)