-
Notifications
You must be signed in to change notification settings - Fork 47
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
AugDiskCachedDataset to map the copy index to augmentation parameter #274
AugDiskCachedDataset to map the copy index to augmentation parameter #274
Conversation
Hello @MinaKh! Currently I don't understand how what you're trying to achieve with this class cannot already be done with existing classes.
Before I can merge this, this class would need a test as well, it might be helpful to add that as well. |
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #274 +/- ##
===========================================
+ Coverage 76.80% 77.34% +0.53%
===========================================
Files 53 54 +1
Lines 3001 3165 +164
===========================================
+ Hits 2305 2448 +143
- Misses 696 717 +21 ☔ View full report in Codecov by Sentry. |
Hi @biphasic! Thanks for your feedback.
|
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.
Hello Mina, I have two small changes that I request, then I can merge this
tonic/cached_dataset.py
Outdated
from warnings import warn | ||
|
||
import h5py | ||
import numpy as np | ||
from torchvision.transforms import Compose |
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.
Tonic should work without having torch installed, can you move this line to wherever it is used? So just wherever torchvision.transforms.Compose is used, import it one line above.
During testing and documentation, of course we can say that torch must be installed. That's why torch requirements are only used in the testing and documentation Github Actions steps
…/tonic into add_Aug_DiskCachedDataset merging last minor modifications of the branch with latest tonim master
This branch added a child class for
DiskCachedDataset
calledAugDiskCachedDataset
.Its main use is for a family of so-called deterministic augmentations with a rather discrete parameter space. For instance a noise augmentation on audio samples in which SNR can have only 5 values.
DiskCachedDataset
num_copies can be used to generate N copies of a data sample. This is ok when used transforms/augmentations have an infinite/probabilistic parameter space. So the chance of generating repetitive augmented versions is very low.