error: (-215:Assertion failed) (int)_numAxes == inp0.dims in function 'cv::dnn::PermuteLayerImpl::finalize'
Hello, i am train keras model, after that i am convert keras model to pb model and try to use pb model via openCV dnn model by:
liveness_pb = r'.\pb\liveness_8_batch_1_epoch_test2.pb' modelCV = cv2.dnn.readNetFromTensorflow(liveness_pb)
prepare image and:
modelCV.setInput(face)
out = modelCV.forward()
but then get next error:
OpenCV(4.0.1) C:\projects\opencv-python\opencv\modules\dnn\src\layers\permute_layer.cpp:173: error: (-215:Assertion failed) (int)_numAxes == inp0.dims in function 'cv::dnn::PermuteLayerImpl::finalize'
can someone explain what i am doing wrong? and how to fix it?
Can you provide a reproducer? In example, upload a
.pb
file?Hi, .pb file is here: link text image for example: C:\fakepath\dalia_1_cropped_image.jpg)
code example:
and error is:
OpenCV(4.0.1) C:\projects\opencv-python\opencv\modules\dnn\src\layers\permute_layer.cpp:173: error: (-215:Assertion failed) (int)_numAxes == inp0.d