-
-
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 frequecny masking #2123
Add frequecny masking #2123
Conversation
Reviewer's Guide by SourceryThis PR adds a new FrequencyMasking transform class that implements frequency domain masking for spectrograms, based on the SpecAugment paper. The implementation extends the existing XYMasking base class, configuring it specifically for frequency masking with a single vertical mask. Class diagram for FrequencyMaskingclassDiagram
class XYMasking {
<<abstract>>
+float p
+bool|None always_apply
+int fill_value
+int|None mask_fill_value
+tuple mask_y_length
+int num_masks_x
+int num_masks_y
+get_transform_init_args_names() tuple[str, ...]
}
class FrequencyMasking {
+int freq_mask_param
+float p
+bool|None always_apply
+get_transform_init_args_names() tuple[str, ...]
}
XYMasking <|-- FrequencyMasking
note for FrequencyMasking "Specialized for frequency masking with a single vertical mask"
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:
- It looks like TimeMasking was accidentally removed from test_transforms.py - please restore this test case while adding the new FrequencyMasking test.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟡 Complexity: 1 issue found
- 🟢 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 #2123 +/- ##
=========================================
+ Coverage 0 90.25% +90.25%
=========================================
Files 0 47 +47
Lines 0 7748 +7748
=========================================
+ Hits 0 6993 +6993
- Misses 0 755 +755 ☔ View full report in Codecov by Sentry. |
Fixes: #2075
Summary by Sourcery
Add a new FrequencyMasking transform to the spectrogram augmentations, update documentation, and include tests for the new feature.
New Features:
Documentation:
Tests: