I tried to use a pb file from the regular darkflow library. Converted it to onnx. Unfortunately, this code doesnt seem to be able to read it:
xavier@xenocrates:~/neural-nets/tiny_yolov2_onnx_cam$ python3 tiny_yolov2_onnx_cam.py --width 640 --height 480 --objth 0.2 Loading ONNX file from path tiny_yolov2/Model.onnx... Beginning ONNX file parsing Completed parsing of ONNX file Building an engine from file tiny_yolov2/Model.onnx; this may take a while... [TensorRT] ERROR: Network must have at least one output Completed creating Engine Traceback (most recent call last): File "tiny_yolov2_onnx_cam.py", line 261, in <module> main() File "tiny_yolov2_onnx_cam.py", line 196, in main with get_engine(onnx_file_path, engine_file_path) as engine, \ File "/home/xavier/neural-nets/tiny_yolov2_onnx_cam/get_engine.py", line 90, in get_engine return build_engine() File "/home/xavier/neural-nets/tiny_yolov2_onnx_cam/get_engine.py", line 81, in build_engine f.write(engine.serialize()) AttributeError: 'NoneType' object has no attribute 'serialize'
@skywo1f Thank you for your contact. My code is just using NVIDIA TensorRT to load ONNX models. So I suppose that there is some unsupported layer for TensorRT in your ONNX file.
I tried to use a pb file from the regular darkflow library. Converted it to onnx. Unfortunately, this code doesnt seem to be able to read it:
xavier@xenocrates:~/neural-nets/tiny_yolov2_onnx_cam$ python3 tiny_yolov2_onnx_cam.py --width 640 --height 480 --objth 0.2 Loading ONNX file from path tiny_yolov2/Model.onnx... Beginning ONNX file parsing Completed parsing of ONNX file Building an engine from file tiny_yolov2/Model.onnx; this may take a while... [TensorRT] ERROR: Network must have at least one output Completed creating Engine Traceback (most recent call last): File "tiny_yolov2_onnx_cam.py", line 261, in <module> main() File "tiny_yolov2_onnx_cam.py", line 196, in main with get_engine(onnx_file_path, engine_file_path) as engine, \ File "/home/xavier/neural-nets/tiny_yolov2_onnx_cam/get_engine.py", line 90, in get_engine return build_engine() File "/home/xavier/neural-nets/tiny_yolov2_onnx_cam/get_engine.py", line 81, in build_engine f.write(engine.serialize()) AttributeError: 'NoneType' object has no attribute 'serialize'