Volumentations 3D
3D 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/albumentations
- 3D Conversion: https://github.com/ashawkey/volumentations
- Continued Development: https://github.com/ZFTurbo/volumentations
- Enhancements: https://github.com/qubvel/volumentations
Due to a stop of ongoing development in this subpackage, we decided to create a new repository:
https://github.com/muellerdo/volumentations
Nevertheless, if you are using this subpackage, please give credit to all authors including ashawkey, ZFTurbo and qubvel.
Initially inspired by albumentations library for augmentation of 2D images.
Installation
# Original
pip install volumentations-3D
# Fork
pip install volumentations-aucmedi
Simple Example
from volumentations import *
def get_augmentation(patch_size):
return Compose([
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 mask
data = {'image': img, 'mask': lbl}
aug_data = aug(**data)
img, lbl = aug_data['image'], aug_data['mask']
# without mask
data = {'image': img}
aug_data = aug(**data)
img = aug_data['image']
Check working usage example in tst_volumentations.py
Added another usage example / testing in testing.py
Difference from initial version
- Diverse bug fixes.
- Implemented multiple augmentations.
- Approximation enhancements to be closer to Albumentations.
Implemented 3D augmentations
PadIfNeeded
GaussianNoise
Resize
RandomScale
RotatePseudo2D
RandomRotate90
Flip
Normalize
Float
Contiguous
Transpose
CenterCrop
RandomResizedCrop
RandomCrop
CropNonEmptyMaskIfExists
ResizedCropNonEmptyMaskIfExists
RandomGamma
ElasticTransformPseudo2D
ElasticTransform
Rotate
RandomCropFromBorders
GridDropout
RandomDropPlane
RandomBrightnessContrast
ColorJitter
Citation
For more details, please refer to the publication: https://doi.org/10.1016/j.compbiomed.2021.105089
If 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 License
Added 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. #
#=================================================================================#
Metadata
Release files for volumentations-aucmedi 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| volumentations-aucmedi-1.0.1.tar.gz | 22.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| volumentations_aucmedi-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.6 kB
Release files / volumentations-aucmedi-1.0.1.tar.gz
| Download URL | volumentations-aucmedi-1.0.1.tar.gz |
|---|---|
| Size | 22.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
553af4128a9084f696755f477c79743a7a4bff29991e6a16f734b5b1364ba69e
|
|
BLAKE2b-256 checksum How to use checksums |
054d0fd7fa3d124e1016e5b18b93e90d516ec463e11adbdd0f8a512ec5adb9e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.0
|
Release files / volumentations_aucmedi-1.0.1-py3-none-any.whl
| Download URL | volumentations_aucmedi-1.0.1-py3-none-any.whl |
|---|---|
| Size | 29.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00a1222a240fb5cd9dad6b2ff19b0183ae015eb14acf62a28ccda2d61d6e6f34
|
|
BLAKE2b-256 checksum How to use checksums |
2ae972cffa21bd39e358f84e07d16e1d9a7a3a8e37b038b114159df0e5b32427
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.0
|
Security for volumentations-aucmedi 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.