Authors | Project | Tensorflow | PyTorch | License | Docs |
---|---|---|---|---|---|
R. Biondi | CATOPUMA | Windows : Ubuntu : |
Windows : Ubuntu : |
|
CATOPUMA is a Python package that offers customizable advanced TensorFlow and Torch objects for tasks such as preprocessing, uploading, modeling, and augmenting. It includes several classes that facilitate the loading, augmentation, and preprocessing of images for deep learning models. The vast majprity of these objects are agnostic and can worok both for tensorflow, keras and pytorch.
The main functionalities of CATOPUMA are as follows:
-
Feeder: This module contains classes to helps load images batch-wise from local directories and eventuallly perform data augmentation and image preprocessing on the fly.
-
Losses: The losses module provide a series of custom losses. The overload if the arimetic operators allows to easy combine different losses toghether.
-
Preprocessing: CATOPUMA provides the implementation of some classes to easily perform the basic preprocessing steps on images and labels. Up to now the implemented preprocessing allows voxel normalization and label selection
-
Augmentation: CATOPUMA provides some classes to easily perform data augmentation. Up to now Data augmentation is supported only for 2D images and its based on Albumentation.
-
Loaders: CATOPUMA provides loaders to read images in medical image format (nifti, nrrd, etc.). Moreover allows also a patch based lazy loading.
-
Prediction: CATOPUMA provides context manager to easily conduct a sliding patch based prediction.
-
Core: the core functionality of catopuma are the bastract classess providing a base for each of the basic functionality (like preprocessin, loss, data augmentation, etc.), allowing an easy customization of the various objects.
Overall, CATOPUMA simplifies the process of preparing image datasets for deep learning models by providing convenient classes and functions for loading, augmenting, and preprocessing images. It is compatible both with tensorflow and pytorch.
CATOPUMA offers different installation ways, suitable for each needs. The installation process is the same for each Operative System and it is checked at each commit using github actions.
Note: CATOPUMA work for both tensorflow.keras and pytorch but does not autoamatically install them. Before install this project plaese make sure that at least one of them is installed.
All the other dependences are automatically checked and (eventualy) installed; see requirements.txt for the complete list of dependences.
pip installer is not yet available
conda installer is no yet available.
Download the project or the latest release:
git clone https://github.com/RiccardoBiondi/Catopuma
Now install the required packages:
python -m pip install -r requirements.txt
And you are ready to build the package:
python setup.py develop --user
Once you have installed CATOPUMA, you can specify which framework it should be use.
If only one of tensorflow.keras and pytorch is installed, then it is automatically stted as default.
If both are installed, you can specify which one use as deafult by setting the environment variable CATOPUMA_FRAMEWORK
to torch
or tf.keras
- on Ubuntu:
export CATOPUMA_FRAMEWORK=your_framework
- on Windows:
$env:CATOPUMA_FRAMEWORK = 'your_framwork'
We have provide a test routine in test directory. This routine use:
-
pytest >= 3.0.7
-
hypothesis >= 4.13.0
Please install these packages to perform the test. You can run the full set of test with:
python -m pytest
Once you have installed the
The default framework is keras (if installed on your system or environment), however it is possible to work also with pytorch or tensorflow.keras. Moreover, it is possible
More examples are provided in the documentation.
The CATOPUMA
package is licensed under the MIT "Expat" License.
Any contribution is more than welcome. Just fill an issue or a pull request and we will check ASAP!
Iakubovskii, P. Segmentation Models. GitHub repository (2019). https://github.com/qubvel/segmentation_models
https://github.com/GianlucaCarlini/Segmentation3D
If you have found CATOPUMA
helpful in your project
@misc{catopuma,
author = {Biondi, Riccardo},
title = {CATOPUMA - Customizable Advanced Tensorflow Objects to Preprocess, Upload, Model and Augment},
year = {2023},
publisher = {GitHub},
howpublished = {\url{https://github.com/RiccardoBiondi/Catopuma}},
}