Ask Your Question

Revision history [back]

click to hide/show revision 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

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

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

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