deeplake
deeplake copied to clipboard
One to many augmentations and trivial_augment extension
🚀 🚀 Pull Request
Checklist:
- [ ] My code follows the style guidelines of this project and the Contributing document
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have kept the
coverage-rateup - [ ] I have performed a self-review of my own code and resolved any problems
- [ ] I have checked to ensure there aren't any other open Pull Requests for the same change
- [ ] I have described and made corresponding changes to the relevant documentation
- [ ] New and existing unit tests pass locally with my changes
Changes
The PR adds two functionalities. Augmenter enables one to many augmentations. The other lets the user alter TrivialAugmentWide's augmentation space and use it with Augmenter.
aug = Augmenter()
include_transforms=["Rotate", "Identity", "ShearX", "ShearY", "TranslateX", "TranslateY"]
aug.add_step(["images"], [adjust_saturation(0.75), trivial_augment(include_transforms)])
loader = aug.augment(ds) #returns a dataloader
Checklist:
- [ ] Add remaining arguments from hub.integrations.pytorch
- [ ] Add functionality to save dataset to Hub.
- [ ] Add tests
- [ ] Add necessary transforms like normalize and resize