Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cv2.dnn.readNetFromTorch(pretrained_model_path) throws error

When a model is trained and saved using official PyTorch(http://pytorch.org/) and the same model is loaded using OpenCV dnn module like this cv2.dnn.readNetFromTorch(pretrained_model_path) it throws below error

error:(-213: The function/feature is not implemented) Unsupported Lua type in function 'cv::dnn::*::TorchImporter::readObjectC:\fakepath\OpenCV_DNN_Error.png

click to hide/show revision 2
retagged

updated 2019-10-26 11:25:39 -0600

berak gravatar image

cv2.dnn.readNetFromTorch(pretrained_model_path) throws error

When a model is trained and saved using official PyTorch(http://pytorch.org/) and the same model is loaded using OpenCV dnn module like this cv2.dnn.readNetFromTorch(pretrained_model_path) it throws below error

error:(-213: The function/feature is not implemented) Unsupported Lua type in function 'cv::dnn::*::TorchImporter::readObjectC:\fakepath\OpenCV_DNN_Error.png