Skip to content

Error while loading pytorch model in opencv #16662

@themechanicalcoder

Description

@themechanicalcoder

While reading the CRNN model from meijieru
in OpenCV, I got the following error

import cv2
net = cv2.dnn.readNetFromTorch("crnn.pth")
error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\dnn\src\torch\torch_importer.cpp:1022: error: (-213:The function/feature is not implemented) Unsupported Lua type in function 'cv::dnn::dnn4_v20191202::TorchImporter::readObject'

model link
How to fix this error?

System information (version)
  • OpenCV = 4.2.0
  • Operating System / Platform => Windows 64 Bit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions