tsutof / tiny_yolov2_onnx_cam

Tiny YOLO v2 Inference Application with NVIDIA TensorRT
45 stars 15 forks source link

doesnt work for a regular tiny yolov2 voc model #4

Open skywo1f opened 4 years ago

skywo1f commented 4 years ago

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'

tsutof commented 4 years ago

@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.