bharatsubedi / ALPR-Yolov5

62 stars 20 forks source link

I have convert .pt model to ONNX for readNetFromONNX but its throwing error #16

Closed PankajAS closed 1 year ago

PankajAS commented 1 year ago

cap = cv2.VideoCapture('./video.mp4') net = cv2.dnn.readNetFromONNX("./detection_best.onnx")

img = cv2.resize(img, (640,640)) blob = cv2.dnn.blobFromImage(img,scalefactor= 1/255,size=(640,640),mean=[0,0,0],swapRB= True, crop= False)

Error error: (-2:Unspecified error) Can't create layer "/model.0/conv/act/HardSigmoid_output_0" of type "HardSigmoid" in function 'getLayerInstance'