-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add random equalize #2143
Add random equalize #2143
Conversation
Reviewer's Guide by SourceryThis PR adds a new RandomEqualize transform class that provides a simplified interface for histogram equalization, designed for Kornia compatibility. The implementation inherits from the existing Equalize transform with fixed parameters. Additionally, there are minor fixes to the targets_as_params property in existing transforms. Class diagram for the new RandomEqualize transformclassDiagram
class Equalize {
<<abstract>>
+mode: str
+by_channels: bool
+mask: Optional
+mask_params: tuple
+p: float
+get_transform_init_args_names() tuple[str, ...]
}
class RandomEqualize {
+always_apply: bool | None
+p: float
+get_transform_init_args_names() tuple[str, ...]
}
Equalize <|-- RandomEqualize
note for RandomEqualize "RandomEqualize is a specialized version of Equalize with fixed parameters for Kornia compatibility."
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this 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 - here's some feedback:
Overall Comments:
- Consider splitting this PR into two separate ones: one for adding RandomEqualize, and another for the targets_as_params changes. This would make the changes easier to review and track.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2143 +/- ##
=========================================
+ Coverage 0 90.32% +90.32%
=========================================
Files 0 48 +48
Lines 0 8044 +8044
=========================================
+ Hits 0 7266 +7266
- Misses 0 778 +778 ☔ View full report in Codecov by Sentry. |
Addresses: #2091
Summary by Sourcery
Add the RandomEqualize transformation to the library, allowing users to apply histogram equalization to images with a specified probability. Enhance the crops and transforms modules by refining the targets_as_params properties. Update tests to include the new RandomEqualize transformation.
New Features:
Enhancements:
Tests: