Ask Your Question

Maups's profile - activity

2018-11-26 11:25:52 -0600 received badge  Enthusiast
2017-11-20 13:32:08 -0600 commented question Wrong output for dnn using the master branch

@dkurt Yes, my mistake. I put the line right after the max pooling instead of right before the reshape. It is working no

2017-11-20 13:30:56 -0600 commented question Wrong output for dnn using the master branch

Yes, my mistake. I put the line right after the max pooling instead of right before the reshape. It is working now, this

2017-11-17 14:19:24 -0600 commented question Wrong output for dnn using the master branch

I did it and got the following error message: OpenCV Error: Assertion failed (ngroups > 0 && inpCn % ngroups

2017-11-17 10:53:51 -0600 asked a question Wrong output for dnn using the master branch

Wrong output for dnn using the master branch Hello everyone, thanks for all the help you gave me so far. If this problem

2017-11-17 10:25:04 -0600 received badge  Supporter (source)
2017-11-17 09:44:12 -0600 commented answer Problem with concat in cv::dnn?

Thank you so much! It worked for me, but only with the master branch :)

2017-11-17 09:37:32 -0600 marked best answer Problem with concat in cv::dnn?

I have the following code https://pastebin.com/DLfCRjd4 that uses the following model https://drive.google.com/open?id=17Zs... that was created with the following tensorflow code https://pastebin.com/j8q7GFfW

It is supposed to receive an 128x128 grayscale image as input, load the network from the file above, and then get the tensor of the last layer, which is a fully-connected layer. However, I'm getting the following error for both Opencv 3.3 and the master branch:

OpenCV 3.3

OpenCV Error: Assertion failed (srcMat.dims == 2 && srcMat.cols == weights.cols && dstMat.rows == srcMat.rows && dstMat.cols == weights.rows && srcMat.type() == weights.type() && weights.type() == dstMat.type() && srcMat.type() == CV_32F && (biasMat.empty() || (biasMat.type() == srcMat.type() && biasMat.isContinuous() && (int)biasMat.total() == dstMat.cols))) in run, file /home/mauricio/Libraries/OpenCV3.3/opencv-3.3.0/modules/dnn/src/layers/fully_connected_layer.cpp, line 132
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/mauricio/Libraries/OpenCV3.3/opencv-3.3.0/modules/dnn/src/layers/fully_connected_layer.cpp:132: error: (-215) srcMat.dims == 2 && srcMat.cols == weights.cols && dstMat.rows == srcMat.rows && dstMat.cols == weights.rows && srcMat.type() == weights.type() && weights.type() == dstMat.type() && srcMat.type() == CV_32F && (biasMat.empty() || (biasMat.type() == srcMat.type() && biasMat.isContinuous() && (int)biasMat.total() == dstMat.cols)) in function run

master branch

OpenCV Error: Assertion failed (srcMat.dims == 2 && srcMat.cols == weights.cols && dstMat.rows == srcMat.rows && dstMat.cols == weights.rows && srcMat.type() == weights.type() && weights.type() == dstMat.type() && srcMat.type() == 5 && (biasMat.empty() || (biasMat.type() == srcMat.type() && biasMat.isContinuous() && (int)biasMat.total() == dstMat.cols))) in run, file /home/mauricio/Libraries/OpenCVmaster/opencv/modules/dnn/src/layers/fully_connected_layer.cpp, line 152
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/mauricio/Libraries/OpenCVmaster/opencv/modules/dnn/src/layers/fully_connected_layer.cpp:152: error: (-215) srcMat.dims == 2 && srcMat.cols == weights.cols && dstMat.rows == srcMat.rows && dstMat.cols == weights.rows && srcMat.type() == weights.type() && weights.type() == dstMat.type() && srcMat.type() == 5 && (biasMat.empty() || (biasMat.type() == srcMat.type() && biasMat.isContinuous() && (int)biasMat.total() == dstMat.cols)) in function run

I found out that the problem is not in the fully connected layer itself, but actually before it. I have the following layers in my model:

Conv2D 1
add 2
Relu 3
Conv2D_1 4
add_1 5
Relu_1 6
MaxPool 7
Conv2D_2 8
add_2 9
Relu_2 10
MaxPool_1 11
Conv2D_3 12
add_3 13
Relu_3 14
MaxPool_2 15
Conv2D_4 16
add_4 17
Relu_4 18
MaxPool_3 19
Conv2D_5 20
add_5 21
Relu_5 22
Reshape 23
Reshape_1 24
concat 25
MatMul 26

The layers "Reshape" and "Reshape_1" have size 1x16384, so the layer "concat" should have size 1x32768, but it shows the same size of the layers it should be concatenating (1x16384). This is why the assertion for the size in the fully connected layer is ... (more)

2017-11-17 09:37:32 -0600 received badge  Scholar (source)
2017-11-16 16:52:31 -0600 asked a question Problem with concat in cv::dnn?

Problem with concat in cv::dnn? I have the following code https://pastebin.com/DLfCRjd4 that uses the following model ht

2017-10-11 22:30:10 -0600 received badge  Student (source)
2017-10-11 15:45:08 -0600 commented question Segmentation fault on readNetFromTensorflow

Yes, it works with the master branch. Sorry for the trouble guys, and thank you for the help!

2017-10-11 10:48:36 -0600 asked a question Segmentation fault on readNetFromTensorflow

Segmentation fault on readNetFromTensorflow I'm currently trying to create a .pb file for the InceptionV3 that runs on O

2017-10-05 14:56:02 -0600 commented question Assertion failed in function total (dnn::forward)

Looks like I need to replace tf.add for tf.nn.bias_add, as said in other threads. Just discovered that by dumping input

2017-10-05 10:02:52 -0600 asked a question Assertion failed in function total (dnn::forward)

Assertion failed in function total (dnn::forward) Hello, I'm facing a problem that I have no idea why it is happening.