Upload folder using huggingface_hub
Browse filesFiles changed (50)
- analyze.pyAdded+40
- build.shAdded+64
- clean.shAdded+11
- deit_t_onnx/config.jsonAdded+23
- deit_t_onnx/deit_t.onnxAdded+3
- depth_anything_v2_vits/config.jsonAdded+23
- depth_anything_v2_vits/depth_anything_v2_vits.onnxAdded+3
- find_no_output_dirs.shAdded+10
- inception_v1_onnx/config.jsonAdded+23
- inception_v1_onnx/inception_v1.onnxAdded+3
- inception_v3_onnx/config.jsonAdded+23
- inception_v3_onnx/inception_v3.onnxAdded+3
- mobilenet_v1_onnx/config.jsonAdded+23
- mobilenet_v1_onnx/mobilenet_v1.onnxAdded+3
- mobilenet_v2_onnx/config.jsonAdded+23
- mobilenet_v2_onnx/mobilenet_v2.onnxAdded+3
- resnet18_onnx/config.jsonAdded+23
- resnet18_onnx/resnet18.onnxAdded+3
- resnet50_onnx/config.jsonAdded+23
- resnet50_onnx/resnet50.onnxAdded+3
- squeezenet11_onnx/config.jsonAdded+23
- squeezenet11_onnx/squeezenet11.onnxAdded+3
- swin_t_onnx/config.jsonAdded+23
- swin_t_onnx/swin_t.onnxAdded+3
- yolov10s/config.jsonAdded+23
- yolov10s/yolov10s-cut.onnxAdded+3
- yolov11s/config.jsonAdded+23
- yolov11s/yolo11s-cut.onnxAdded+3
- yolov26s/config.jsonAdded+23
- yolov26s/yolo26s_640x640.onnxAdded+3
- yolov2_416_onnx/config.jsonAdded+23
- yolov2_416_onnx/yolov2_416_416.onnxAdded+3
- yolov3_ssp/config.jsonAdded+23
- yolov3_ssp/yolov3-spp.onnxAdded+3
- yolov5s_onnx/config.jsonAdded+23
- yolov5s_onnx/yolov5s.onnxAdded+3
- yolov6s_onnx/config.jsonAdded+23
- yolov6s_onnx/yolov6s.onnxAdded+3
- yolov7_tiny_onnx/config.jsonAdded+23
- yolov7_tiny_onnx/yolov7-tiny-cut.onnxAdded+3
- yolov8s_onnx/config.jsonAdded+23
- yolov8s_onnx/yolov8s.onnxAdded+3
- yolov9s/config.jsonAdded+23
- yolov9s/yolov9s-cut.onnxAdded+3
- yoloworldv2-txt/config.jsonAdded+30
- yoloworldv2-txt/yoloworld.vitb.txt.onnxAdded+3
- yoloworldv2/config.jsonAdded+23
- yoloworldv2/yolov8s-worldv2-80cls.onnxAdded+3
- yolox_s_onnx/config.jsonAdded+23
- yolox_s_onnx/yolox_s.onnxAdded+3
12345678910111213141516171819202122232425262728293031323334353637383940import onnximport argparse
def print_node_types_sorted(model_path): # 加载ONNX模型 model = onnx.load(model_path) # 获取模型中的所有节点 nodes = model.graph.node # 创建一个字典来存储每个类型的计数 type_counts = {} # 遍历所有节点并统计类型 for node in nodes: node_type = node.op_type if node_type in type_counts: type_counts[node_type] += 1 else: type_counts[node_type] = 1 # 将类型名称按照字母顺序排序 sorted_types = sorted(type_counts.items()) # 打印排序后的类型名称和它们的数量 for type_name, count in sorted_types: print(f"{type_name}: {count}")
if __name__ == "__main__": # 设置命令行参数解析 parser = argparse.ArgumentParser(description='Process an ONNX model.') parser.add_argument('model_path', type=str, help='Path to the ONNX model file') # 解析命令行参数 args = parser.parse_args() # 使用从命令行获取的模型路径调用函数 print_node_types_sorted(args.model_path)
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364#! /bin/bash
ws=$(realpath $(dirname "${BASH_SOURCE[0]}"))cd $ws
# 允许通过环境变量直接指定 target_hardware,非交互式环境默认使用 AX615if [ -n "$TARGET_HARDWARE" ]; then target_hardware=$TARGET_HARDWAREelif [ -t 0 ]; then options=(AX615 AX650 AX637 M57 "其他(手动输入)") PS3="请选择 target_hardware(输入数字): " select opt in "${options[@]}"; do case $opt in AX615|AX637|AX650|M57) target_hardware=$opt break ;; "其他(手动输入)") read -rp "请输入 target_hardware: " target_hardware if [ -n "$target_hardware" ]; then break fi echo "输入不能为空,请重新选择" ;; *) echo "无效选项,请重新选择" ;; esac doneelse target_hardware=AX650fi
echo "使用 target_hardware: $target_hardware"
find $ws -maxdepth 2 -name "*.onnx" | parallel -I {} -j 8 \ " d=\$(realpath \$(dirname {})) if [ -f \$d/output/compiled.axmodel ]; then echo '[{}] axmodel already exists, skip.'; exit 0; fi echo 'start building [{}]...'; time pulsar2 build \ --target_hardware $target_hardware \ --npu_mode NPU1 \ --input {} \ --config \$d/config.json \ --output_dir \$d/output 2>&1 | tee \$d/build.log || \ { echo 'build [{}] failed, skip.'; exit 0; }; echo 'build [{}] finish.'; "
echo ""echo "=== 模型转出情况 ==="while IFS= read -r onnx; do d=$(realpath $(dirname "$onnx")) name=$(basename "$d") if [ -f "$d/output/compiled.axmodel" ]; then echo "✅ Task '$name'" else echo "❌ Task '$name'" fidone < <(find $ws -maxdepth 2 -name "*.onnx" | sort)1234567891011#! /bin/bash
ws=$(realpath $(dirname "${BASH_SOURCE[0]}"))cd $ws
find $ws -maxdepth 2 \( -name "output" -o -name "build.log" \) | parallel -I {} -j 8 \ ' d=$(realpath $(dirname {})) rm -rf {}; echo "clean [{}] finish."; '1234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:0d515b672eb26eb1b8b5ba0d7425a86a00e69a9cc35b0ca4385491807ea60501size 247237901234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:443e95f17819f347f5f987384b8cb7d7d18ed6af6ac46dec9b0152748ba7dfd0size 9898597812345678910#!/bin/bash
# 遍历当前目录下的所有目录for dir in ./*/ ; do # 检查output子目录是否存在 if ! [ -d "$dir/output" ]; then # 打印不含output子目录的目录名 echo "${dir:2:-1}" fidone1234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:02d92847ec427ccbab0c555292ec4c5aa823f6e807dca2a3a43a4190951f42cesize 265006131234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:fbc74d359c9346f2341c32f28f1ae398ad0e8a3b5eb003a1216f249becb012cfsize 955713511234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:4ec45660c396274fe3de1bab667634b1ad617f0103d2739995cfe0bec9bab726size 168948691234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:b3921d38fe950d7ab58946662e06c4424c484298b7aeecd2f4a9c8eefb2123a5size 142048881234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:00dcef6fe7aa6fbcd00a591b689cb5247462edc5164da24124a4a84e3e0261a4size 468310561234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:61a806e4c5c03ec79eb36fcf4be5e441df51054d99b0a6e11ae41ee2cfabf4d4size 1021456711234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:caedccbac6871be81bf5cbc9461ace945a7a1d1b325437c93d662e9256149c98size 49548301234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:556f219e736b3de9f58e0acd31afee0e1eb93a2a4c1834429c9ae8a90e5d2a6csize 1186182761234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:7760257eb2cbb6a63c09c1ba411e7243a6e68a944927e5995a52e429ad7020fbsize 290785111234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:dd483e87031d8c7bd04aaf18e6a50cd71006c9b086d09df4eb3614cd6cab3bf0size 378565301234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:3a6d81c567dd86282c1d71fae83152b2d0b6c47fec495b335398e73b4e6d8171size 380657931234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:1d133fdd026f3c6f9670b5dd1f68820344eeb9d50133d90538a29f05d8685a2bsize 2039506261234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:e4e01e316dd212f6f2a14e114ce7d34286f802d686d93d7e2e910b0fdd366150size 200048821234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:6fcf95c10b910e3df46f24217f7d7cc0bc2f0a6a2bdb8bf09f25d8922574208fsize 289306481234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:f61f7826836ed8bf1901fad362f2ce156742b815e0621c3566d9ff042e902bfcsize 461708431234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:286ae1a0571c3b9f0b8a7fac857417e469ed1fbcd387e9f993555b3c5b9106bfsize 249031531234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:21ecbe9267d586273858d30bb6d152283c118ef2f07ae34e29c44f3e05a45b43size 446620841234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:7bd72c3a1d9507ea8bd3cda45d53fe121f036c4b2d171b81715511e8048a9921size 28979339123456789101112131415161718192021222324252627282930{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "text_token", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax", "layer_configs": [ { "start_tensor_names": ["DEFAULT"], # string of list "end_tensor_names": ["DEFAULT"], # string of list "data_type": "U16" } ], }, "input_processors": [ { "tensor_name": "text_token", "src_dtype": "FP32" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:c25fd76eac9349d7b5a9c5f5b3c7b1e7e4f7af78806202b22da8f4436a49faa1size 2543712171234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:7306339ba671872f8e803c2bc819e3d2e60dff26dc8b8342fe2a516aeb40c712size 510662331234567891011121314151617181920212223{ "model_type": "ONNX", "npu_mode": "NPU1", "quant": { "input_configs": [ { "tensor_name": "DEFAULT", "calibration_dataset": "s3://npu-ci/data/data.zip", } ], "calibration_method": "MinMax" }, "input_processors": [ { "tensor_name": "DEFAULT", "src_dtype": "U8" } ], "compiler": { "check": 0, "enable_slice_mode": true }}123version https://git-lfs.github.com/spec/v1oid sha256:c5c2d13e59ae883e6af3b45daea64af4833a4951c92d116ec270d9ddbe998063size 35858002analyze.pyAdded+40
build.shAdded+64
clean.shAdded+11
deit_t_onnx/config.jsonAdded+23
deit_t_onnx/deit_t.onnxAdded+3
depth_anything_v2_vits/config.jsonAdded+23
depth_anything_v2_vits/depth_anything_v2_vits.onnxAdded+3
find_no_output_dirs.shAdded+10
inception_v1_onnx/config.jsonAdded+23
inception_v1_onnx/inception_v1.onnxAdded+3
inception_v3_onnx/config.jsonAdded+23
inception_v3_onnx/inception_v3.onnxAdded+3
mobilenet_v1_onnx/config.jsonAdded+23
mobilenet_v1_onnx/mobilenet_v1.onnxAdded+3
mobilenet_v2_onnx/config.jsonAdded+23
mobilenet_v2_onnx/mobilenet_v2.onnxAdded+3
resnet18_onnx/config.jsonAdded+23
resnet18_onnx/resnet18.onnxAdded+3
resnet50_onnx/config.jsonAdded+23
resnet50_onnx/resnet50.onnxAdded+3
squeezenet11_onnx/config.jsonAdded+23
squeezenet11_onnx/squeezenet11.onnxAdded+3
swin_t_onnx/config.jsonAdded+23
swin_t_onnx/swin_t.onnxAdded+3
yolov10s/config.jsonAdded+23
yolov10s/yolov10s-cut.onnxAdded+3
yolov11s/config.jsonAdded+23
yolov11s/yolo11s-cut.onnxAdded+3
yolov26s/config.jsonAdded+23
yolov26s/yolo26s_640x640.onnxAdded+3
yolov2_416_onnx/config.jsonAdded+23
yolov2_416_onnx/yolov2_416_416.onnxAdded+3
yolov3_ssp/config.jsonAdded+23
yolov3_ssp/yolov3-spp.onnxAdded+3
yolov5s_onnx/config.jsonAdded+23
yolov5s_onnx/yolov5s.onnxAdded+3
yolov6s_onnx/config.jsonAdded+23
yolov6s_onnx/yolov6s.onnxAdded+3
yolov7_tiny_onnx/config.jsonAdded+23
yolov7_tiny_onnx/yolov7-tiny-cut.onnxAdded+3
yolov8s_onnx/config.jsonAdded+23
yolov8s_onnx/yolov8s.onnxAdded+3
yolov9s/config.jsonAdded+23
yolov9s/yolov9s-cut.onnxAdded+3
yoloworldv2-txt/config.jsonAdded+30
yoloworldv2-txt/yoloworld.vitb.txt.onnxAdded+3
yoloworldv2/config.jsonAdded+23
yoloworldv2/yolov8s-worldv2-80cls.onnxAdded+3
yolox_s_onnx/config.jsonAdded+23
yolox_s_onnx/yolox_s.onnxAdded+3