change gray image code from g to y - #25
Conversation
|
Thanks for the pull request. To gain a better understanding of the PR: where exactly in the code does the "overriding" create a problem (in the DepthCompletionNet definition, or in the self-supervised framework)? By design, |
|
In main.py line 63, because 'rgb' also has a 'g', when choosing 'rgb' as the input, use_g will be set to true when the input is either an rgb image or a gray image. However, in kitti_loader.py line 189, "if not args.use_g", this condition cannot differentiate rgb and gray and will be skipped when either rgb or g were selected. Thus, the function will not only return rgb even if the user has chosen rgb alone as the input. I checked DepthCompletionNet and it shouldn't be a problem there since 'rgb' in modality is checked before 'g' in modality, so the network and the framework should be OK (I have updated the pull request message). Only a redundant gray image might be created in dataloader when user chooses 'rgb' as the input. But I still think the code for gray image should be changed because by definition user_g will be set to true whenever 'rgb' is selected and it also brings confusion and vulnerability. |
Before: 'g' for gray, 'rgb' for rgb.
Problem: They both have a 'g' and args.use_g is checked before args.use_rgb in kittki_loader. A redundant gray image might be created when the user only chooses rgb.
After: 'y' for gray, 'rgb' for rgb.