-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 GaussNoise #2263
Updated GaussNoise #2263
Conversation
Reviewer's Guide by SourceryThis pull request refactors the Class diagram showing changes to GaussNoise, Solarize, and Equalize transformsclassDiagram
class GaussNoise {
-std_range: tuple[float, float]
-mean_range: tuple[float, float]
-per_channel: bool
-noise_scale_factor: float
+apply(img: ndarray)
+get_params_dependent_on_data()
}
note for GaussNoise "Removed deprecated var_limit and mean parameters"
class Solarize {
+threshold_range: tuple[float, float]
+normalize_threshold(threshold, threshold_range)
}
note for Solarize "Added threshold normalization"
class Equalize {
+mode: Literal[cv, pil]
+by_channels: bool
+mask: ndarray|Callable
+mask_params: Sequence[str]
}
note for Equalize "Updated mode type from ImageMode to Literal"
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 and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 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 #2263 +/- ##
=========================================
+ Coverage 0 89.88% +89.88%
=========================================
Files 0 50 +50
Lines 0 8855 +8855
=========================================
+ Hits 0 7959 +7959
- Misses 0 896 +896
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Summary by Sourcery
Refactor the
GaussNoise
,Solarize
, andEqualize
augmentations to use standard deviation instead of variance, and to normalize parameters to the range [0, 1]. Additionally, deprecate legacy parameters in favor of more consistent alternatives.Enhancements:
GaussNoise
.Solarize
andGaussNoise
.var_limit
andmean
inGaussNoise
, andthreshold
inSolarize
.