Ask Your Question
0

Unable to read TensorFlow trained model into OpenCV 3.4.1

asked 2018-03-01 23:55:13 -0500

BAHRAMUDIN ADIL gravatar image

I am trying to read the TensorFlow trained model in OpenCV, I have downloaded ssd_inception_v2_coco and ssd_mobilenet_v1_coco from here model while reading the Net like this:

String basePath = "/home/adil/Desktop/models/ssd_mobilenet_v1_coco_2017_11_17/";
String model = basePath + "frozen_inference_graph.pb";
Net net = Dnn.readNetFromTensorflow(model);

But it throws this error:

tf_importer.cpp:1582: error: (-2) Unknown layer type Cast in op ToFloat in function populateNet

Why it should throw the error, is there anything else to configure? If yes, then how can be done to successfully read and use the TF trained model into OpenCV application.

Thanks!!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-03-02 01:26:16 -0500

dkurt gravatar image

@BAHRAMUDIN ADIL, There is a wiki page about how to import SSD-based models from TensorFlow Object Detection API into OpenCV: https://github.com/opencv/opencv/wiki...

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-03-01 23:55:13 -0500

Seen: 326 times

Last updated: Mar 02 '18