I've been using yolov3 with OpenCV and now I want to change to yolov5 and I saw it has .pt files instead of .weights files and it is in PyTorch.
Is there any way to use yolov5 model in OpenCV?
When I try to use the .pt file in OpenCV with this command:
net = cv2.dnn.readNetFromTorch('./model_6/best.pt')
It gives me this error:
cv2.error: OpenCV(4.4.0) D:\Build\OpenCV\opencv-4.4.0\modules\dnn\src\torch\torch_importer.cpp:1017: error: (-213:The function/feature is not implemented) Unsupported Lua type in function 'cv::dnn::dnn4_v20200609::TorchImporter::readObject'