justadudewhohacks / opencv4nodejs

Nodejs bindings to OpenCV 3 and OpenCV 4
MIT License
4.95k stars 826 forks source link

pbtxt file issue? #592

Open mgobishop opened 5 years ago

mgobishop commented 5 years ago

Hi - amazing work by the way. I've upgraded to 5.1.0 from an older version and see I now have to supply a config (.pbtxt ) as well as a .pb file to use the readNetFromTensorflow function. I've grabbed both files from https://github.com/opencv/opencv/wiki/TensorFlow-Object-Detection-API. I'm using MobileNet-SSD v1.

When running I get the following error:

ReadNetFromTensorflow - OpenCV Error: (nodesMapIt != nodesMap.end()) in sortByExecutionOrder, in file ../node_modules/opencv-build/opencv/opencv/modules/dnn/src/tensorflow/tf_graph_simplifier.cpp, line 860, status -215

Any help would be appreciated. Thanks.

justadudewhohacks commented 5 years ago

I've upgraded to 5.1.0 from an older version and see I now have to supply a config (.pbtxt ) as well as a .pb file to use the readNetFromTensorflow function.

Which OpenCV version are you using? The API shouldn't have changed. In the example they are providing a .pb and .pbtxt, so I am assuming you have to use both.

ReadNetFromTensorflow - OpenCV Error: (nodesMapIt != nodesMap.end()) in sortByExecutionOrder, in file ../node_modules/opencv-build/opencv/opencv/modules/dnn/src/tensorflow/tf_graph_simplifier.cpp, line 860, status -215

The error seems to indicate that your .pb and .pbtxt files do not match?

mgobishop commented 5 years ago

You are right - I was using the wrong .pbtxt file!

Thank you so much for your help.

On 12 Jul 2019, at 07:38, Vincent Mühler notifications@github.com wrote:

I've upgraded to 5.1.0 from an older version and see I now have to supply a config (.pbtxt ) as well as a .pb file to use the readNetFromTensorflow function.

Which OpenCV version are you using? The API shouldn't have changed. In the example they are providing a .pb and .pbtxt, so I am assuming you have to use both.

ReadNetFromTensorflow - OpenCV Error: (nodesMapIt != nodesMap.end()) in sortByExecutionOrder, in file ../node_modules/opencv-build/opencv/opencv/modules/dnn/src/tensorflow/tf_graph_simplifier.cpp, line 860, status -215

The error seems to indicate that your .pb and .pbtxt files do not match?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/justadudewhohacks/opencv4nodejs/issues/592?email_source=notifications&email_token=AC4VL2CERAAEIR6ZO2ZKEZLP7ARHJA5CNFSM4H65UIW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZY22VI#issuecomment-510766421, or mute the thread https://github.com/notifications/unsubscribe-auth/AC4VL2HMQPGG6YKJEWXVJP3P7ARHJANCNFSM4H65UIWQ.