@berak figured out the first stage feature_stirde and now new error
T raceback (most recent call last):
> File “E:\mask_rcnn_inception_v2_coco_2018_01_28\opencv\sources\samples\dnn\tf_text_graph_common.py”, line 313, in writeTextGraph
cv.dnn.writeTextGraph(modelPath, outputPath)
cv2.error: OpenCV(4.5.2) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-vi271kac\opencv\modules\dnn\src\tensorflow\tf_io.cpp:42: error: (-2:Unspecified error) FAILED: ReadProtoFromBinaryFile(param_file, param). Failed to parse GraphDef file: E:\mask_rcnn_inception_v2_coco_2018_01_28\motabiju\saved_model.pb in function 'cv::dnn::ReadTFNetParamsFromBinaryFileOrDie'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\mask_rcnn_inception_v2_coco_2018_01_28\opencv\sources\samples\dnn\tf_text_graph_mask_rcnn.py", line 53, in <module>
writeTextGraph(args.input, args.output, ['num_detections', 'detection_scores', 'detection_boxes', 'detection_classes', 'detection_masks'])
File "E:\mask_rcnn_inception_v2_coco_2018_01_28\opencv\sources\samples\dnn\tf_text_graph_common.py", line 316, in writeTextGraph
from tensorflow.tools.graph_transforms import TransformGraph
ModuleNotFoundError: No module named 'tensorflow.tools.graph_transforms'
sorry, but i have no real idea about mask-rnn or tf, but if the model on your ggl drive is only 2mb, it’s probably broken (should be >500mb, iirc(which is why i never downloaded it))
@berak can you tell which models that support for opencv dnn? here is the full trace on my error
Number of classes: 90
Scales: [0.25, 0.5, 1.0, 2.0]
Aspect ratios: [0.5, 1.0, 2.0]
Width stride: 16.000000
Height stride: 16.000000
Features stride: 8.000000
[libprotobuf ERROR C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-vi271kac\opencv\3rdparty\protobuf\src\google\protobuf\wire_format_lite.cc:629] String field 'opencv_tensorflow.FunctionDef.Node.ret' contains invalid UTF-8 data when parsing a protocol buffer. Use the 'bytes' type if you intend to send raw bytes.
2021-05-15 13:18:22.371302: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2021-05-15 13:18:22.371450: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
File "E:\mask_rcnn_inception_v2_coco_2018_01_28\opencv\sources\samples\dnn\tf_text_graph_common.py", line 313, in writeTextGraph
cv.dnn.writeTextGraph(modelPath, outputPath)
cv2.error: OpenCV(4.5.2) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-vi271kac\opencv\modules\dnn\src\tensorflow\tf_io.cpp:42: error: (-2:Unspecified error) FAILED: ReadProtoFromBinaryFile(param_file, param). Failed to parse GraphDef file: E:\mask_rcnn_inception_v2_coco_2018_01_28\motabiju\saved_model.pb in function 'cv::dnn::ReadTFNetParamsFromBinaryFileOrDie'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\mask_rcnn_inception_v2_coco_2018_01_28\opencv\sources\samples\dnn\tf_text_graph_mask_rcnn.py", line 53, in <module>
writeTextGraph(args.input, args.output, ['num_detections', 'detection_scores', 'detection_boxes', 'detection_classes', 'detection_masks'])
File "E:\mask_rcnn_inception_v2_coco_2018_01_28\opencv\sources\samples\dnn\tf_text_graph_common.py", line 316, in writeTextGraph
from tensorflow.tools.graph_transforms import TransformGraph
ModuleNotFoundError: No module named 'tensorflow.tools.graph_transforms'