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

Updated TextImage #1860

Merged
merged 1 commit into from
Jul 30, 2024
Merged

Updated TextImage #1860

merged 1 commit into from
Jul 30, 2024

Conversation

ternaus
Copy link
Collaborator

@ternaus ternaus commented Jul 30, 2024

Summary by Sourcery

Enhanced the 'preprocess_metadata', 'get_params_dependent_on_data', and 'apply_with_params' methods to include additional metadata fields 'bbox_index' and 'original_text'.

  • Enhancements:
    • Added 'bbox_index' and 'original_text' to the metadata dictionary in the 'preprocess_metadata' method.
    • Updated 'get_params_dependent_on_data' method to pass 'bbox_index' to 'preprocess_metadata'.
    • Modified 'apply_with_params' method to include 'original_text' and 'bbox_index' in the overlay data.

Copy link
Contributor

sourcery-ai bot commented Jul 30, 2024

Reviewer's Guide by Sourcery

This pull request updates the 'TextImage' augmentation by enhancing the metadata processing. The 'preprocess_metadata' method now accepts an additional 'bbox_index' parameter and includes 'bbox_index' and 'original_text' in its return dictionary. Corresponding updates were made to 'get_params_dependent_on_data' and 'apply_with_params' to handle these new fields.

File-Level Changes

Files Changes
albumentations/augmentations/text/transforms.py Enhanced metadata processing by adding 'bbox_index' and 'original_text' to the relevant methods and their return values.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ternaus - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@ternaus ternaus merged commit 512dc63 into main Jul 30, 2024
17 checks passed
@ternaus ternaus deleted the improve_textimage branch July 30, 2024 15:32
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.

1 participant