Ask Your Question

Revision history [back]

Error while importing network from Caffe

Hello, I am trying to import a pre-trained network from Caffe. I receive following error

def FasterRCNN_VGG16(image):
  model_file = 'vgg16_faster_rcnn_iter_80000.caffemodel'
  proto_file = 'test.prototxt'
  net = cv2.dnn.readNetFromCaffe(proto_file,model_file)
  blob = cv2.dnn.blobFromImage(cv2.resize(image,(224, 224)), 1.0, (224, 224), (104,177, 123))
  net.setInput(blob)
return net.forward()

File "/Users/nimaaghli/PycharmProjects/embraer/detectors/detector_dnn.py", line 23, in FasterRCNN_VGG16 return net.forward() cv2.error: OpenCV(4.1.0)

/Users/travis/build/skvark/opencv-python/opencv/modules/dnn/src/dnn.cpp:2297: error: (-215:Assertion failed) inp.total() in function 'allocateLayers'

link to the .prototxt https://github.com/playerkk/face-py-faster-rcnn/blob/master/models/face/VGG16/faster_rcnn_end2end/test.prototxt

I believe there is problem in my prototxt file but I can not figure out what.

Error while importing network from Caffe

Hello, I am trying to import a pre-trained network from Caffe. I receive following error

def FasterRCNN_VGG16(image):
  model_file = 'vgg16_faster_rcnn_iter_80000.caffemodel'
  proto_file = 'test.prototxt'
  net = cv2.dnn.readNetFromCaffe(proto_file,model_file)
  blob = cv2.dnn.blobFromImage(cv2.resize(image,(224, 224)), 1.0, (224, 224), (104,177, 123))
  net.setInput(blob)
return net.forward()

File "/Users/nimaaghli/PycharmProjects/embraer/detectors/detector_dnn.py", line 23, in FasterRCNN_VGG16 return net.forward() cv2.error: OpenCV(4.1.0)

/Users/travis/build/skvark/opencv-python/opencv/modules/dnn/src/dnn.cpp:2297: error: (-215:Assertion failed) inp.total() in function 'allocateLayers'

link to the .prototxt https://github.com/playerkk/face-py-faster-rcnn/blob/master/models/face/VGG16/faster_rcnn_end2end/test.prototxt

I believe there is problem in my prototxt file but I can not figure out what.

Error while importing network from Caffe

Hello, I am trying to import a pre-trained network from Caffe. I receive following error

def FasterRCNN_VGG16(image):
model_file = 'vgg16_faster_rcnn_iter_80000.caffemodel'
proto_file = 'test.prototxt'
net = cv2.dnn.readNetFromCaffe(proto_file,model_file)
blob = cv2.dnn.blobFromImage(cv2.resize(image,(224, 224)), 1.0, (224, 224), (104,177, 123))
net.setInput(blob)
return net.forward()

File "/Users/nimaaghli/PycharmProjects/embraer/detectors/detector_dnn.py", line 23, in FasterRCNN_VGG16 return net.forward() cv2.error: OpenCV(4.1.0)

/Users/travis/build/skvark/opencv-python/opencv/modules/dnn/src/dnn.cpp:2297: error: (-215:Assertion failed) inp.total() in function 'allocateLayers'

link to the .prototxt https://github.com/playerkk/face-py-faster-rcnn/blob/master/models/face/VGG16/faster_rcnn_end2end/test.prototxt

I believe there is problem in my prototxt file but I can not figure out what.

Error while importing network from Caffe

Hello, I am trying to import a pre-trained network from Caffe. I receive following error

def FasterRCNN_VGG16(image):
model_file = 'vgg16_faster_rcnn_iter_80000.caffemodel'
proto_file = 'test.prototxt'
'vgg16_faster_rcnn_iter_80000.prototxt'
net = cv2.dnn.readNetFromCaffe(proto_file,model_file)
blob = cv2.dnn.blobFromImage(cv2.resize(image,(224, 224)), 1.0, (224, 224), (104,177, 123))
net.setInput(blob)
return net.forward()

File "/Users/nimaaghli/PycharmProjects/embraer/detectors/detector_dnn.py", line 23, in FasterRCNN_VGG16 return net.forward() cv2.error: OpenCV(4.1.0)

/Users/travis/build/skvark/opencv-python/opencv/modules/dnn/src/dnn.cpp:2297: error: (-215:Assertion failed) inp.total() in function 'allocateLayers'

link to the .prototxt https://github.com/playerkk/face-py-faster-rcnn/blob/master/models/face/VGG16/faster_rcnn_end2end/test.prototxt

I believe there is problem in my prototxt file but I can not figure out what.

click to hide/show revision 5
retagged

updated 2019-05-11 14:48:50 -0600

berak gravatar image

Error while importing network from Caffe

Hello, I am trying to import a pre-trained network from Caffe. I receive following error

def FasterRCNN_VGG16(image):
model_file = 'vgg16_faster_rcnn_iter_80000.caffemodel'
proto_file = 'vgg16_faster_rcnn_iter_80000.prototxt'
net = cv2.dnn.readNetFromCaffe(proto_file,model_file)
blob = cv2.dnn.blobFromImage(cv2.resize(image,(224, 224)), 1.0, (224, 224), (104,177, 123))
net.setInput(blob)
return net.forward()

File "/Users/nimaaghli/PycharmProjects/embraer/detectors/detector_dnn.py", line 23, in FasterRCNN_VGG16 return net.forward() cv2.error: OpenCV(4.1.0)

/Users/travis/build/skvark/opencv-python/opencv/modules/dnn/src/dnn.cpp:2297: error: (-215:Assertion failed) inp.total() in function 'allocateLayers'

link to the .prototxt https://github.com/playerkk/face-py-faster-rcnn/blob/master/models/face/VGG16/faster_rcnn_end2end/test.prototxt

I believe there is problem in my prototxt file but I can not figure out what.