NVIDIA-AI-IOT / CUDA-PointPillars

A project demonstrating how to use CUDA-PointPillars to deal with cloud points data from lidar.
Apache License 2.0
502 stars 148 forks source link

Model .onnx Export Failure with Latest onnx & onnx-simplifier #121

Open kivanctezoren opened 1 week ago

kivanctezoren commented 1 week ago

Executing the following python3 tool/export_onnx.py --ckpt ckpts/pointpillar_7728.pth --out_dir model with the latest onnx and onnx-simplifier versions installed as in the Dockerfile produces the following error:

Traceback (most recent call last):
  File "tool/export_onnx.py", line 151, in <module>
    main()
  File "tool/export_onnx.py", line 142, in main
    onnx_simp, check = simplify(onnx_trim_post)
  File "/usr/local/lib/python3.8/dist-packages/onnxsim/onnx_simplifier.py", line 199, in simplify
    model_opt_bytes = C.simplify(
onnx.onnx_cpp2py_export.checker.ValidationError: Nodes in a graph must be topologically sorted, however input '195' o
f node: 
name: ScatterND_55 OpType: ScatterND
 is not output of any previous nodes.

I have not looked into the exact reason for this, but downgrading the packages to their previous versions seems to provide a temporary fix:

pip install --upgrade onnx-simplifier==0.4.35 onnx==1.15.0 

after which the exact same pointpillar.onnx file with the one provided in the repository can be produced.