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

Pr 1789 #1790

Merged
merged 16 commits into from
Jun 17, 2024
Merged

Pr 1789 #1790

merged 16 commits into from
Jun 17, 2024

Conversation

ternaus
Copy link
Collaborator

@ternaus ternaus commented Jun 14, 2024

Small fixes on top of #1789

@zakajd

As you wanted faster just refactored on top:

  1. We use Pydantic for checking input parameters in tranaforms => added InitSchema class
  2. Pre-commit fixes

P.S. All credit for the work goes to you.

Summary by Sourcery

This pull request introduces the PlanckianJitter transform for realistic color augmentation, adds Pydantic-based input validation for the new transform, and includes pre-commit fixes.

  • New Features:
    • Introduced the PlanckianJitter transform for realistic color augmentation by simulating illumination changes in images.
  • Enhancements:
    • Added Pydantic-based input parameter validation for the PlanckianJitter transform using the InitSchema class.
  • Chores:
    • Applied pre-commit fixes to the codebase.

Copy link
Contributor

sourcery-ai bot commented Jun 14, 2024

Reviewer's Guide by Sourcery

This pull request introduces a new image transformation called PlanckianJitter, which simulates illumination changes based on temperature. The transformation uses Pydantic for input validation, ensuring that parameters are within specified ranges. Additionally, pre-commit fixes were applied to maintain code formatting standards.

File-Level Changes

Files Changes
albumentations/augmentations/transforms.py
albumentations/augmentations/functional.py
Introduced PlanckianJitter transformation with Pydantic validation and implemented the corresponding functional logic.
tests/test_core.py Applied pre-commit fixes to ensure code formatting consistency.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • 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 found some issues that need to be addressed.

Blocking issues:

  • Potential typo in constant key. (link)
  • Potential division by zero. (link)
Here's what I looked at during the review
  • 🔴 General issues: 2 blocking issues, 5 other issues
  • 🟢 Security: all looks good
  • 🟡 Testing: 1 issue found
  • 🟢 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.

albumentations/augmentations/transforms.py Show resolved Hide resolved
albumentations/augmentations/transforms.py Show resolved Hide resolved
albumentations/augmentations/transforms.py Outdated Show resolved Hide resolved
albumentations/augmentations/transforms.py Show resolved Hide resolved
albumentations/augmentations/functional.py Outdated Show resolved Hide resolved
albumentations/augmentations/functional.py Show resolved Hide resolved
albumentations/augmentations/functional.py Show resolved Hide resolved
tests/test_core.py Show resolved Hide resolved
@zakajd
Copy link
Contributor

zakajd commented Jun 14, 2024

@ternaus Did you checkout correct commit? 69396c7 was my last one.
I see some last updates missing.

  • I switched to using "cied" (lowercase) instead of CIED for convenience
  • Added one extra validation check that white light temperature is included

@ternaus ternaus merged commit 834268b into main Jun 17, 2024
17 checks passed
@ternaus ternaus deleted the pr_1789 branch June 17, 2024 23:10
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.

2 participants