You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why use 'BGR' to input image in demo_crop, set cfg.INPUT.FORMAT = 'RGB', and then flip image to 'RGB' before the image is fed into the network? Doesn't this cause confusion, or is there something special going on
#30
Open
Clear-3d opened this issue
Oct 9, 2023
· 1 comment
First of all, many thanks to the authors for open sourcing such a great project. I was a little confused about the image format conversion.
Why use 'BGR' to input image in demo_crop, set cfg.INPUT.FORMAT = 'RGB', and then flip image to 'RGB' before the image is fed into the network? Doesn't this cause confusion, or is there something special going on.
In detectron2/projects/CropFormer/demo_cropformer/demo_from_dirs.py
img = read_image(path, format="BGR")
at this time cfg.INPUT.FORMAT = 'RGB'
and in detectron2/projects/CropFormer/demo_cropformer/predictor.py
if self.input_format == "RGB":
# whether the model expects BGR inputs or RGB
original_image = original_image[:, :, ::-1]
While the end result is correct, the process is confusing.
If there is any special purpose, I really look forward to your explanation for me. Thank you again for such a good work.
The text was updated successfully, but these errors were encountered:
First of all, many thanks to the authors for open sourcing such a great project. I was a little confused about the image format conversion.
Why use 'BGR' to input image in demo_crop, set cfg.INPUT.FORMAT = 'RGB', and then flip image to 'RGB' before the image is fed into the network? Doesn't this cause confusion, or is there something special going on.
img = read_image(path, format="BGR")
if self.input_format == "RGB":
# whether the model expects BGR inputs or RGB
original_image = original_image[:, :, ::-1]
While the end result is correct, the process is confusing.
If there is any special purpose, I really look forward to your explanation for me. Thank you again for such a good work.
The text was updated successfully, but these errors were encountered: