i wanna put this model (https://www.pyimagesearch.com/2020/05/04/covid-19-face-mask-detector-with-opencv-keras-tensorflow-and-deep-learning/) to works in a C++ code,the model is written using keras and H5,so i search and i discovered than i need first to convert my h5 model to a pb model because the opencv dont have h5 support.
following this guide (https://www.youtube.com/watch?v=2UgqCwVfdJY) i could do it and now i have a prototxt file and a pb file
so all that i need is to go in my code and write:
'''cv::dnn::Net mask_net = cv::dnn::readNetFromTensorflow("output_graph.pb","proto_file.prototxt");
right? but is not working... i tried another models like sddmobilinet2 and works well, but with this custom model, it doesn't works
i have this log:
terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(4.4.0-pre) /home/luiz/Libraries/CPP/opencv/modules/dnn/src/tensorflow/tf_graph_simplifier.cpp:1016: error: (-215:Assertion failed) permIds.size() == net.node_size() in function 'sortByExecutionOrder'
Aborted (core dumped)
can anyone help-me?