Skip to content

(Docs) Fix object_detection.md: Do not convert from RGB to BGR for augmentations#30180

Closed
rootAvish wants to merge 1 commit into
huggingface:mainfrom
rootAvish:fix_aug_object_detection_doc
Closed

(Docs) Fix object_detection.md: Do not convert from RGB to BGR for augmentations#30180
rootAvish wants to merge 1 commit into
huggingface:mainfrom
rootAvish:fix_aug_object_detection_doc

Conversation

@rootAvish

@rootAvish rootAvish commented Apr 11, 2024

Copy link
Copy Markdown

What does this PR do?

The docs of Albumenations here say that they use RGB instead of BGR: https://albumentations.ai/docs/examples/example/#read-the-image-from-the-disk-and-convert-it-from-the-bgr-color-space-to-the-rgb-color-space

The object detection notebook/docs however reverse the color channel dimension after opening the image as RGB and therefore pass BGR. My PR removes the reversal of channel dimension to correct this.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?

The docs of Albumenations here explicitly mention that they use RGB instead of BGR: https://albumentations.ai/docs/examples/example/#read-the-image-from-the-disk-and-convert-it-from-the-bgr-color-space-to-the-rgb-color-space

This line of code however reverses the color channel dimensions after opening the image as RGB.
@rootAvish

Copy link
Copy Markdown
Author

@NielsRogge tagging you for a review here as you're the most recent contributor to the doc and if I'm not wrong its original author.

@NielsRogge

NielsRogge commented Apr 11, 2024

Copy link
Copy Markdown
Collaborator

cc @qubvel could you take a look here?

@rootAvish

Copy link
Copy Markdown
Author

Saw this was fixed in a broader PR by @qubvel in #30683, closing.

@rootAvish rootAvish closed this May 11, 2024
@rootAvish rootAvish deleted the fix_aug_object_detection_doc branch May 11, 2024 05:18
@qubvel

qubvel commented May 11, 2024

Copy link
Copy Markdown
Contributor

@rootAvish Thanks!

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

Successfully merging this pull request may close these issues.

3 participants