Skip to content
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

Dataset and model scripts for automotive reference implementation #161

Merged
merged 3 commits into from
Jan 27, 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/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.
28 changes: 28 additions & 0 deletions script/get-dataset-waymo/customize.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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_PATH', '') == '':
return {'return': 1, 'error': 'Please provide path to kitti dataset using tag \\`--waymo_path\\`as automatic download of this dataset is not supported yet.'}

if not os.path.exists(env['MLC_DATASET_WAYMO_PATH']):
return {
'return': 1, 'error': f"Path {env['MLC_DATASET_WAYMO_PATH']} does not exists!"}

return {'return': 0}


def postprocess(i):

env = i['env']

return {'return': 0}
19 changes: 19 additions & 0 deletions script/get-dataset-waymo/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
alias: get-dataset-waymo
automation_alias: script
automation_uid: 5b4e0237da074764
cache: true
tags:
- get
- dataset
- waymo
uid: 21b269c753b64437
new_env_keys:
- MLC_DATASET_WAYMO_PATH
input_mapping:
waymo_path: MLC_DATASET_WAYMO_PATH
variations:
kitti_format:
default: true
group: dataset-format
env:
MLC_DATASET_WAYMO_FORMAT: kitti
8 changes: 8 additions & 0 deletions script/get-dataset-waymo/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

#CM Script location: ${MLC_TMP_CURRENT_SCRIPT_PATH}

#To export any variable
#echo "VARIABLE_NAME=VARIABLE_VALUE" >>tmp-run-env.out

#${MLC_PYTHON_BIN_WITH_PATH} contains the path to python binary if "get,python" is added as a dependency
9 changes: 9 additions & 0 deletions script/get-ml-model-pointpillars/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.
32 changes: 32 additions & 0 deletions script/get-ml-model-pointpillars/customize.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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_ML_MODEL_POINT_PILLARS_PATH', '') == '':
return {'return': 1, 'error': 'Please provide path to pointpillars model using tag \\`--pp_path\\`as automatic download of this model is not supported yet.'}

if os.path.isdir(env['MLC_ML_MODEL_POINT_PILLARS_PATH']):
if env['MLC_ML_MODEL_PP_FORMAT'] == "onnx":
env['MLC_ML_MODEL_POINT_PILLARS_PATH'] = os.path.join(
env['MLC_ML_MODEL_POINT_PILLARS_PATH'], "pp.onnx")
else:
env['MLC_ML_MODEL_POINT_PILLARS_PATH'] = os.path.join(
env['MLC_ML_MODEL_POINT_PILLARS_PATH'], "pp_ep36.pth")

return {'return': 0}


def postprocess(i):

env = i['env']

return {'return': 0}
26 changes: 26 additions & 0 deletions script/get-ml-model-pointpillars/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
alias: get-ml-model-pointpillars
automation_alias: script
automation_uid: 5b4e0237da074764
cache: true
tags:
- get
- ml-model
- ml
- model
- pointpillars
uid: 3562621a8994411d
new_env_keys:
- MLC_ML_MODEL_POINT_PILLARS_PATH
input_mapping:
pp_path: MLC_ML_MODEL_POINT_PILLARS_PATH
variations:
gpu:
default: true
group: device
env:
MLC_ML_MODEL_PP_FORMAT: pth
cpu:
group: device
env:
MLC_ML_MODEL_PP_FORMAT: onnx

8 changes: 8 additions & 0 deletions script/get-ml-model-pointpillars/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

#CM Script location: ${MLC_TMP_CURRENT_SCRIPT_PATH}

#To export any variable
#echo "VARIABLE_NAME=VARIABLE_VALUE" >>tmp-run-env.out

#${MLC_PYTHON_BIN_WITH_PATH} contains the path to python binary if "get,python" is added as a dependency
9 changes: 9 additions & 0 deletions script/get-ml-model-resnet50-deeplab/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.
33 changes: 33 additions & 0 deletions script/get-ml-model-resnet50-deeplab/customize.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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_ML_MODEL_DPLAB_RESNET50_PATH', '') == '':
return {'return': 1, 'error': 'Please provide path to deeplab resnet 50 model using tag \\`--dp_resnet50_path\\`as automatic download of this dataset is not supported yet.'}

if os.path.isdir(env['MLC_ML_MODEL_DPLAB_RESNET50_PATH']):
if env['MLC_ML_MODEL_DPLAB_RESNET50_FORMAT'] == "onnx":
env['MLC_ML_MODEL_DPLAB_RESNET50_PATH'] = os.path.join(
env['MLC_ML_MODEL_DPLAB_RESNET50_PATH'], "deeplabv3+.onnx")
else:
env['MLC_ML_MODEL_DPLAB_RESNET50_PATH'] = os.path.join(
env['MLC_ML_MODEL_DPLAB_RESNET50_PATH'],
"best_deeplabv3plus_resnet50_waymo_os16.pth")

return {'return': 0}


def postprocess(i):

env = i['env']

return {'return': 0}
27 changes: 27 additions & 0 deletions script/get-ml-model-resnet50-deeplab/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
alias: get-dataset-deeplab-resnet50
automation_alias: script
automation_uid: 5b4e0237da074764
cache: true
tags:
- get
- ml-model
- ml
- model
- resnet50-deeplab
- resnet50
- deeplab
uid: 93097b691a6a4fce
new_env_keys:
- MLC_ML_MODEL_DPLAB_RESNET50_PATH
input_mapping:
dp_resnet50_path: MLC_ML_MODEL_DPLAB_RESNET50_PATH
variations:
gpu:
default: true
group: device
env:
MLC_ML_MODEL_DPLAB_RESNET50_FORMAT: pth
cpu:
group: device
env:
MLC_ML_MODEL_DPLAB_RESNET50_FORMAT: onnx
8 changes: 8 additions & 0 deletions script/get-ml-model-resnet50-deeplab/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

#CM Script location: ${MLC_TMP_CURRENT_SCRIPT_PATH}

#To export any variable
#echo "VARIABLE_NAME=VARIABLE_VALUE" >>tmp-run-env.out

#${MLC_PYTHON_BIN_WITH_PATH} contains the path to python binary if "get,python" is added as a dependency
Loading