-
-
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
Fix pixel dropout #2280
Fix pixel dropout #2280
Conversation
Reviewer's Guide by SourceryThis pull request addresses an issue in the PixelDropout augmentation where the Class diagram for updated PixelDropout transformclassDiagram
class PixelDropout {
+dropout_prob: float
+per_channel: bool
+drop_value: ColorType
+mask_drop_value: ColorType
+p: float
+__init__(dropout_prob: float, per_channel: bool, drop_value: ColorType, mask_drop_value: ColorType, p: float)
+apply(img: ndarray, drop_mask: ndarray, drop_values: ndarray): ndarray
}
class DualTransform {
<<parent>>
}
DualTransform <|-- PixelDropout
note for PixelDropout "Changed drop_value and mask_drop_value
type from ScaleFloatType to ColorType
Removed per_channel restriction"
Flow diagram for pixel dropout processflowchart TD
A[Input Image] --> B{Per Channel?}
B -->|Yes| C[Apply dropout per channel]
B -->|No| D[Apply dropout globally]
C --> E[Apply drop values per channel]
D --> F[Apply single drop value]
E --> G[Output Image]
F --> G
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: 3 issues 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 #2280 +/- ##
=========================================
+ Coverage 0 89.85% +89.85%
=========================================
Files 0 50 +50
Lines 0 8818 +8818
=========================================
+ Hits 0 7923 +7923
- Misses 0 895 +895
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Fixes: #2279
Summary by Sourcery
Fix bugs related to the PixelDropout transform, including incorrect drop value handling for multi-channel images and per-channel dropout with sequence values.
Bug Fixes:
Tests: