Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why don't we need to convert BGR to RGB and resize the input image? #1

Open
kid-pc-chen opened this issue Jan 31, 2018 · 2 comments
Open

Comments

@kid-pc-chen
Copy link

Thanks for sharing this tutorial.
However, I still got some questions; I would appreciate it if you could elaborate a little bit more.

  1. 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.
  2. Could you please tell me how you figured out the input and output tensor names of the COCO graphs?
  3. 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.
@moorage
Copy link
Owner

moorage commented Jan 31, 2018

  1. 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.

  2. 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.

  3. I'm not sure the reasons behind it, but you don't need to resize it for the program to work.

@kid-pc-chen
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants