How does one create custom convolution, maxpool and softmax layers in Opencv dnn module?
I am trying to implement a custom object detection network without Tensorflow dependency. My weights are stored in nchw order in binary file and can easily be loaded into cv::Mat. However, I can't seem to find an example of how to build custom layers in dnn module. Official documentation is slightly confusing for me.
Here is link: convolution, maxpool and softmax. And this too:maxpool
here's an example of a custom (cv2.dnn) layer: https://github.com/opencv/opencv/blob...
and some boilerplate c++ code: https://github.com/opencv/opencv/blob...
Maybe I expressed myself wrongly, I didn't mean how ti implement it, but how to create for example a cv::dnn::Convolution layer and add it to cv::dnn::Net with function int cv::dnn::Net::addLayerToPrev ( const String & name, const String & type, LayerParams & params ). Basically what should parameters name, type and params be if I want to add new convolution layer with kernel size 3x3, input channels 3, output channels 10 and stride 1.