Package: volumentations-aucmedi
Volumentations 3D3D Volume data augmentation package inspired by albumentations.Volumentations is a working project, which originated from the following Git repositories:Original:https://github.com/albumentations-team/albumentations3D Conversion:https://github.com/ashawkey/volumentationsContinued Development:https://github.com/ZFTurbo/volumentationsEnhancements:https://github.com/qubvel/volumentationsDue to a stop of ongoing development in this subpackage, we decided to create a new repository:https://github.com/muellerdo/volumentationsNevertheless, if you are using this subpackage, please give credit to all authors including ashawkey, ZFTurbo and qubvel.Initially inspired byalbumentationslibrary for augmentation of 2D images.Installation# Originalpipinstallvolumentations-3D# Forkpipinstallvolumentations-aucmediSimple Examplefromvolumentationsimport*defget_augmentation(patch_size):returnCompose([Rotate((-15,15),(0,0),(0,0),p=0.5),RandomCropFromBorders(crop_value=0.1,p=0.5),ElasticTransform((0,0.25),interpolation=2,p=0.1),Resize(patch_size,interpolation=1,always_apply=True,p=1.0),Flip(0,p=0.5),Flip(1,p=0.5),Flip(2,p=0.5),RandomRotate90((1,2),p=0.5),GaussianNoise(var_limit=(0,5),p=0.2),RandomGamma(gamma_limit=(0.5,1.5),p=0.2),],p=1.0)aug=get_augmentation((64,128,128))# with maskdata={'image':img,'mask':lbl}aug_data=aug(**data)img,lbl=aug_data['image'],aug_data['mask']# without maskdata={'image':img}aug_data=aug(**data)img=aug_data['image']Check working usage example intst_volumentations.pyAdded another usage example / testing intesting.pyDifference from initial versionDiverse bug fixes.Implemented multiple augmentations.Approximation enhancements to be closer to Albumentations.Implemented 3D augmentationsPadIfNeededGaussianNoiseResizeRandomScaleRotatePseudo2DRandomRotate90FlipNormalizeFloatContiguousTransposeCenterCropRandomResizedCropRandomCropCropNonEmptyMaskIfExistsResizedCropNonEmptyMaskIfExistsRandomGammaElasticTransformPseudo2DElasticTransformRotateRandomCropFromBordersGridDropoutRandomDropPlaneRandomBrightnessContrastColorJitterCitationFor more details, please refer to the publication:https://doi.org/10.1016/j.compbiomed.2021.105089If you find this code useful, please cite it as:@article{solovyev20223d,
  title={3D convolutional neural networks for stalled brain capillary detection},
  author={Solovyev, Roman and Kalinin, Alexandr A and Gabruseva, Tatiana},
  journal={Computers in Biology and Medicine},
  volume={141},
  pages={105089},
  year={2022},
  publisher={Elsevier},
  doi={10.1016/j.compbiomed.2021.105089}
}Credits and LicenseAdded some credits/license to each file.#=================================================================================#
#  Author:       Pavel Iakubovskii, ZFTurbo, ashawkey, Dominik Müller             #
#  Copyright:    albumentations:    : https://github.com/albumentations-team      #
#                Pavel Iakubovskii  : https://github.com/qubvel                   #
#                ZFTurbo            : https://github.com/ZFTurbo                  #
#                ashawkey           : https://github.com/ashawkey                 #
#                Dominik Müller     : https://github.com/muellerdo                #
#                                                                                 #
#  Volumentations History:                                                        #
#       - Original:                 https://github.com/albumentations-team/album  #
#                                   entations                                     #
#       - 3D Conversion:            https://github.com/ashawkey/volumentations    #
#       - Continued Development:    https://github.com/ZFTurbo/volumentations     #
#       - Enhancements:             https://github.com/qubvel/volumentations      #
#       - Further Enhancements:     https://github.com/muellerdo/volumentations   #
#                                                                                 #
#  MIT License.                                                                   #
#                                                                                 #
#  Permission is hereby granted, free of charge, to any person obtaining a copy   #
#  of this software and associated documentation files (the "Software"), to deal  #
#  in the Software without restriction, including without limitation the rights   #
#  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell      #
#  copies of the Software, and to permit persons to whom the Software is          #
#  furnished to do so, subject to the following conditions:                       #
#                                                                                 #
#  The above copyright notice and this permission notice shall be included in all #
#  copies or substantial portions of the Software.                                #
#                                                                                 #
#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR     #
#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,       #
#  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE    #
#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER         #
#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,  #
#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE  #
#  SOFTWARE.                                                                      #
#=================================================================================#