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

Confused arguments: 'to_bgr' and 'to_rgb' #1616

Closed
yeliudev opened this issue May 3, 2022 · 2 comments
Closed

Confused arguments: 'to_bgr' and 'to_rgb' #1616

yeliudev opened this issue May 3, 2022 · 2 comments

Comments

@yeliudev
Copy link

yeliudev commented May 3, 2022

mmaction2 uses the argument to_bgr when normalizing the images (see here). Specifically, this argument is passed to mmcv.imnormalize_. However, this method only supports to_rgb but not to_bgr. Does it mean that all the models in mmaction2 are actually trained in BGR mode?

@yeliudev yeliudev changed the title Confused arguments: to_bgr and to_rgb Confused arguments: 'to_bgr' and 'to_rgb' May 3, 2022
@dreamerlin
Copy link
Collaborator

We use rgb

https://github.com/open-mmlab/mmaction2/blob/master/mmaction/datasets/pipelines/loading.py#L1303
https://github.com/open-mmlab/mmaction2/blob/master/mmaction/datasets/pipelines/loading.py#L1233-L1234

And actually, to_bgr and to_rgb are the same in mmcv.imnormalize_ since COLOR_BGR2RGB = 4 and cv2.COLOR_RGB2BGR = 4

@yeliudev
Copy link
Author

yeliudev commented May 6, 2022

I see. Thanks for your reply!

@yeliudev yeliudev closed this as completed May 6, 2022
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