OpenCVTensorflowExample
OpenCVTensorflowExample copied to clipboard
Why don't we need to convert BGR to RGB and resize the input image?
Thanks for sharing this tutorial. However, I still got some questions; I would appreciate it if you could elaborate a little bit more.
- You mentioned “ OpenCV uses BGR whereas Tensorflow uses RGB” in https://medium.com/greppy/object-detection-using-a-ssd-mobilenet-coco-model-with-opencv-3-3-tensorflow-1-4-in-c-and-xcode-28b3e1d955db …but I didn’t find the related code to convert the input image into RGB in your code.
- Could you please tell me how you figured out the input and output tensor names of the COCO graphs?
- Why don’t we need to resize the input image (e.g. 300x300 for SSD, 299x299 for Faster RCNN) for the input tensor? I didn’t find the related code to resize the input image in your code.
-
You're right, I didn't need to convert it here. I think I had to for my webcam version of this code, as opposed to JPG version.
-
I looked at https://github.com/ActiveState/gococo . I believe I could have figured it out by browsing the graph as well, but I haven't setup anything to do that.
-
I'm not sure the reasons behind it, but you don't need to resize it for the program to work.
@moorage Thanks for your reply. By the way, I found a post (https://stackoverflow.com/questions/35336648/list-of-tensor-names-in-graph-in-tensorflow) that shows a way to see the names of all operation names in the graph.