Ask Your Question

Revision history [back]

What I needed to do in order inception_resnet_v2 to work was:

  1. Follow the instruction here to freeze a model and optimize it for inference (as .pb file) and to transform a config .pbtxt file
  2. Modify this script by adding 'Relu', 'Pad', 'Rsqrt', 'Maximum', 'Sum', 'ConcatV1', 'Square', 'Concat', 'BatchToSpaceND', 'SpaceToBatchND', 'Reshape', 'MatMul' to the keepOps and using it to build the .pbtxt file for opencv
  3. Rename the Reshape op to Flatten in the .pbtxt file

Then cv.dnn.readNetFromTensorflow(model, config) works!