lgov opened a new issue #13217: Handle OpenCV exceptions instead of aborting URL: https://github.com/apache/incubator-mxnet/issues/13217 (This is intended as an umbrella issue to follow up my ongoing proposal on the dev mailing list & work on handling OpenCV exceptions) ## Description I am working on migrating a classification product currently using Caffe to MXNet. Along the way I'm encountering some issues loading and augmenting the images dataset. Basically it seems my dataset contains some technically invalid images. When loading them using mx.io.ImageRecordIter (from a Python script), they get passed eventually to the OpenCV library which will throw a C++ exception. MXNet currently doesn't capture those, resulting in my script aborting with a not very clear error message. ## Error Message: " terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(3.4.3) /home/lgo/dev/opencv-3.4.3/modules/imgproc/src/resize.cpp:4044: error: (-215:Assertion failed) !ssize.empty() in function 'resize' Aborted (core dumped) " ## Environment info (Required) Linux (Ubuntu 18.04), OpenCV 3.4.3, mxmet master branch, Python 3.6.6 ## Build info (Required if built from source) Compiler (gcc/clang/mingw/visual studio): gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0 ## Steps to reproduce It's not clear exactly which image causes this particular exception. As the process aborts due to the unhandled exception, there is no easy way to capture good information about the process status - in this case the image name.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
