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

RGB channel correct? #90

Open
liunian-harold-li opened this issue Mar 12, 2020 · 1 comment
Open

RGB channel correct? #90

liunian-harold-li opened this issue Mar 12, 2020 · 1 comment

Comments

@liunian-harold-li
Copy link

liunian-harold-li commented Mar 12, 2020

Hi Jianwei, thank you for the excellent code! When I was trying to visualize the image and predictions, I find the RGB channels of the image swapped.

I looked into the original code for generating the imdb_1024.h5 and I find the dataset is already in the BGR format (https://github.com/danfeiX/scene-graph-TF-release/blob/master/data_tools/vg_to_imdb.py#L81). But in this repo, the model flips it back to RGB (https://github.com/jwyang/graph-rcnn.pytorch/blob/master/lib/data/transforms/transforms.py#L117). I wonder if that is the intended behavior as I presume that the input to the model should be in BGR. Am I using the correct imdb_1024.h5?

I would greatly appreciate your input. Thanks!

@entalent
Copy link

I encountered the same question ... I used the mini_vg from http://svl.stanford.edu/projects/scene-graph/dataset/mini-vg.zip, abd the R and B channels of the visualized images are swapped. I noticed that in all the yaml files provided in the config folder, the value of TO_BGR255 is not specified, and the value of cfg.INPUT.TO_BGR255 is True all the time. Thus, I guess the img read from the h5 file ( https://github.com/jwyang/graph-rcnn.pytorch/blob/master/lib/data/vg_hdf5.py#L108 ) should be in RGB format.

I would be grateful if the author could confirm the order of the image channels.

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