I've created a traffic sign classification model. I need to use it in OpenCV for Video traffic sign detection.
How can I do that using a .h5
file
Thanks in advance!
CodePudding user response:
In openCV you can read weights with
cv2.dnn.readNetFromCaffe
cv2.dnn.readNetFromTensorFlow
cv2.dnn.readNetFromTorch
cv2.dnn.readhTorchBlob
Because you can not read with opencv without manipulations and you need:
- You can read frames with OpenCV and put the frames to run in Keras
- Or you can convert keras model to tensorflow model and run with Opencv cv2.dnn.readNetFromTensorFlow