-
Notifications
You must be signed in to change notification settings - Fork 170
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 SegmentationReconstruction augmentation #608
Add SegmentationReconstruction augmentation #608
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #608 +/- ##
==========================================
+ Coverage 87.20% 87.25% +0.05%
==========================================
Files 67 67
Lines 5925 5980 +55
==========================================
+ Hits 5167 5218 +51
- Misses 758 762 +4 |
Hey @gustavohenriquesr, Thank you for your first contribution! I am super happy about this ;) I made some initial comments and I will try to ask for some extra revision, as I am already familiar with the code. |
Extra comment, please edit the source doc to include in the documentation page. |
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.
Thanks a lot for the contribution @gustavohenriquesr ! It's been a while I wanted an augmentation like this to be added to the library and I'm glad you are doing it!
I think the PR is great and have just a few comments. Most of them are small things, except maybe for the location where randomness should be introduced: we made the design choice of only sampling:doing random operations outside functionals.py
, to stay close to torchvision design.
I have removed some functional tests that no longer apply with the new rearrangement of functions here |
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.
LGTM!!
Thanks for the changes and explanations!
Thank you so much, @gustavohenriquesr! I hope this makes our script simpler with this augmentation now integrated, and I am hoping for the paper to be accepted! 🤞🏽 Thank you so much, too, for your revision, @cedricrommel; I would love to have more reviews from you here if you have time for open source 🙏🏽 |
Glad to contribute! I also thank you @bruAristimunha @cedricrommel for helping me improve the code. I hope to be able to make further contributions in the future! |
Hi, I created a new data augmentation class named SegmentationReconstruction to braindecode. This process was originally proposed in this paper, which I implemented and used in my own work.
This technique works on the time domain, and the ideia is to segment each trial into several segments and then generate new artificial trials, as a concatenation of segments coming from different and randomly selected training trials from the same class.