Remove imgaug dependency
imgaug project is not being updated. We should implement the transformations used through imgaug to remove its dependecy completely. The transformations are these:
- [x] #63
- [x] Random rotation
- [ ] Shear
- [x] Zoom
- [ ] Shift
- [ ] Vertical flip
- [ ] Horizontal flip
- [ ] Elastic transformation
- [ ] Gaussian blur
- [ ] Median blur
- [ ] Motion blur
- [x] Gamma contrast
- [ ] Notebook presenting all transformations
Also because we adapted 3D images to use them as 2D images for imgaug, which gives weird messages everytime a transformation is used:
/home/dfranco/anaconda3/envs/BiaPy_env/lib/python3.8/site-packages/imgaug/augmenters/base.py:49: SuspiciousSingleImageShapeWarning: You provided a numpy array of shape (160, 160, 40) as a single-image augmentation input, which was interpreted as (H, W, C). The last dimension however has a size of >=32, which indicates that you provided a multi-image array with shape (N, H, W) instead. If that is the case, you should use e.g. augmenter(imageS=<your input>) or augment_imageS(<your input>). Otherwise your multi-image input will be interpreted as a single image during augmentation.
What about something like albumentations?? I came across this project that uses albumentations but uses it in 3D: https://github.com/ashawkey/volumentations
It uses scikit image transforms under the hood and also considers interpolations
Indeed, that library is commendable, however, we aim to minimise our dependence on external projects as much as possible.
Fair point.