1 | initial version |
replace your input layer with the following lines:
input: "data"
input_dim: 10
input_dim: 3
input_dim: 224
input_dim: 224
(note, that the actual numbers are taken from blobFromImage() later)
then, in you code, call:
blob = cv2.dnn.blobFromImage(image,1, (224, 224), (104, 117, 123), True, False)
(no need to resize the image before !)
and again, you need the latest version for this, not 3.3.0
2 | No.2 Revision |
replace your input layer with the following lines:
input: "data"
input_dim: 10
1
input_dim: 3
input_dim: 224
input_dim: 224
(note, that the actual numbers are taken from blobFromImage() later)
then, in you code, call:
blob = cv2.dnn.blobFromImage(image,1, (224, 224), (104, 117, 123), True, False)
(no need to resize the image before !)
and again, you need the latest version for this, not 3.3.0
3 | No.3 Revision |
replace your input layer with the following lines:
input: "data"
input_dim: 1
input_dim: 3
input_dim: 224
input_dim: 224
(note, that the actual numbers are taken from blobFromImage() later)
then, in you code, call:
frame = cv2.imread('frame.jpg') ## color, NOT grayscale !
blob = cv2.dnn.blobFromImage(image,1, (224, 224), (104, 117, 123), True, False)
(no need to resize the image before !)
and again, you need the latest version for this, not 3.3.0
4 | No.4 Revision |
replace your input layer with the following lines:
input: "data"
input_dim: 1
input_dim: 3
input_dim: 224
input_dim: 224
(note, that the actual numbers are taken from blobFromImage() later)
then, in you code, call:
frame = cv2.imread('frame.jpg') ## color, NOT grayscale !
blob = cv2.dnn.blobFromImage(image,1, cv2.dnn.blobFromImage(frame, 1, (224, 224), (104, 117, 123), True, False)
(no need to resize the image before !)
and again, you need the latest version for this, not 3.3.0