Ask Your Question

SEbert's profile - activity

2020-03-11 12:56:39 -0600 received badge  Popular Question (source)
2019-03-12 02:55:45 -0600 commented answer OpenCV3.4 DNN forward custom and pre-trained caffe model

Hey, my solution was to not use the MemoryData-Layer. Replace your first DataLayer in the prototxt by input: "data" i

2018-06-22 15:48:46 -0600 received badge  Teacher (source)
2018-06-22 09:33:16 -0600 marked best answer How to use Net::setInput(InputArray blob, const String& name)

Dear OpenCV fellows, I have a tensorflow net (.pb) with twelve output layers. I can successfully forward my input blob to every single output layer with the help of the following code

    cv::Mat output1 = m_oDetectionNet.forward(std::string("conv10_2_mbox_conf_1/Conv2D"));
    cv::Mat output2 = m_oDetectionNet.forward(std::string("conv10_2_mbox_loc_1/Conv2D"));
    cv::Mat output3 = m_oDetectionNet.forward(std::string("conv9_2_mbox_conf_1/Conv2D"));
    cv::Mat output4 = m_oDetectionNet.forward(std::string("conv9_2_mbox_loc_1/Conv2D"));
    cv::Mat output5 = m_oDetectionNet.forward(std::string("conv8_2_mbox_conf_1/Conv2D"));
    cv::Mat output6 = m_oDetectionNet.forward(std::string("conv8_2_mbox_loc_1/Conv2D"));
    cv::Mat output7 = m_oDetectionNet.forward(std::string("fc7_mbox_conf_1/Conv2D"));
    cv::Mat output8 = m_oDetectionNet.forward(std::string("fc7_mbox_loc_1/Conv2D"));
    cv::Mat output9 = m_oDetectionNet.forward(std::string("conv13_3_norm_mbox_conf_1/Conv2D"));
    cv::Mat output10 = m_oDetectionNet.forward(std::string("conv13_3_norm_mbox_loc_1/Conv2D"));
    cv::Mat output11 = m_oDetectionNet.forward(std::string("conv11_3_norm_mbox_conf_1/Conv2D"));
    cv::Mat output12 = m_oDetectionNet.forward(std::string("conv11_3_norm_mbox_loc_1/Conv2D"));

unfortunatly, this is bad performance-wise. All output-layers use the same basenet, therefore the basenet will be computed for the same input 12 times. Is it possible to somehow re-use the last basenet-output as input blob with the function Net::setInput(InputArray blob, const String& name)? I tried, but I got the error

OpenCV(4.0.0-pre) Error: Requested object was not found (Requested blob "conv_pw_13_relu_1/clip_by_value" not found) in cv::dnn::experimental_dnn_v4::Net::setInput

when using

m_oDetectionNet.forward(std::string("conv_pw_13_relu_1/clip_by_value"))

all runs fine, thus I am sure, that the name of the layer is valid. Any ideas?

2018-06-22 09:33:13 -0600 received badge  Self-Learner (source)
2018-06-22 09:10:53 -0600 commented question How to use Net::setInput(InputArray blob, const String& name)

(sorry, I am not allowed to answer my own questions...) Thank you very much for this hint. The following code works gre

2018-06-22 07:59:27 -0600 asked a question How to use Net::setInput(InputArray blob, const String& name)

How to use Net::setInput(InputArray blob, const String& name) Dear OpenCV fellows, I have a tensorflow net (.pb) wit

2018-06-14 03:16:48 -0600 asked a question DNN LayerFactory

DNN LayerFactory Hi, I am using the dnn module of opencv 3.4.1 with Python 3.5 to deploy nets trained with keras/tensorf

2018-06-13 01:05:53 -0600 received badge  Enthusiast
2018-06-12 01:59:36 -0600 commented question How to import TensorFlow model with flatten layer?

Hi, this answer comes a bit late. But my similar problem was solved by this stackoverflow answer: Use Keras model with F

2018-06-12 01:53:07 -0600 answered a question OpenCV DNN with ssd_mobilenet_v1_0.25

I solved my problem by a custom build of the current openCV master branch, including the contrib-master. It works very f

2018-06-07 08:22:05 -0600 commented question OpenCV DNN with ssd_mobilenet_v1_0.25

Hi, I edited my post and uploaded a small zip-archive with my files: https://ufile.io/0ntdf the _opt.pb file is the gra

2018-06-07 07:59:07 -0600 edited question OpenCV DNN with ssd_mobilenet_v1_0.25

OpenCV DNN with ssd_mobilenet_v1_0.25 Hi, I try to run ssd_mobilenet_v1_0.25 with OpenCV DNN. The wet was trained by th

2018-06-07 07:57:10 -0600 edited question OpenCV DNN with ssd_mobilenet_v1_0.25

OpenCV DNN with ssd_mobilenet_v1_0.25 Hi, I try to run ssd_mobilenet_v1_0.25 with OpenCV DNN. The wet was trained by th

2018-06-07 07:20:56 -0600 asked a question OpenCV DNN with ssd_mobilenet_v1_0.25

OpenCV DNN with ssd_mobilenet_v1_0.25 Hi, I try to run ssd_mobilenet_v1_0.25 with OpenCV DNN. The wet was trained by th

2018-06-05 08:10:39 -0600 asked a question OpenCV3.4 DNN forward custom and pre-trained caffe model

OpenCV3.4 DNN forward custom and pre-trained caffe model Hi! I get the following error: C:\build\master_winpack-bui