openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

readNetFromONNX possibly broken? (ofxCv/ofxOpenCV)

Open sourya-sen opened this issue 2 months ago • 1 comments

Cannot confirm, but multiple ONNX files I tried to load (from different years in case of architectural changes) are leading to SIGABRT.

libc++abi: terminating due to uncaught exception of type cv::Exception: OpenCV(4.11.0) /Users/runner/work/apothecary/apothecary/build/opencv/modules/dnn/src/onnx/onnx_importer.cpp:278: error: (-5:Bad argument) Can't read ONNX file: (pah/to/file) in function 'ONNXImporter'

File exists in the bin/data folder.

sourya-sen avatar Sep 04 '26 11:09 sourya-sen

I will take this issue. Please assign it to me.

The error suggests a problem in onnx_importer.cpp at line 278. It seems the ONNX files are not being read correctly, possibly due to a file path or format issue. I will first check if the file paths are correctly resolved and if the ONNX files are compatible with the current OpenCV version. I will also inspect the ONNXImporter function to ensure it handles exceptions properly. A small fix might involve improving error handling or updating the ONNX parser logic.

modelpath-dev avatar Sep 09 '26 07:09 modelpath-dev