Skip to main content

Customizable Advanced Tensorflow Objects to Preprocess, Upload, Model and Augment

Project description

Authors Project Tensorflow PyTorch License Docs
R. Biondi CATOPUMA Windows : Windows CI
Ubuntu : Ubuntu CI
Windows : Windows CI
Ubuntu : Ubuntu CI
license Docs CI
Documentation Status

GitHub pull-requests GitHub issues

GitHub stars GitHub watchers GitHub forks

Customizable Advanced Tensorflow(Torch) Objects for Preoproces, Upload, Model and Augment

Overview

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.

Installation

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.

Supported python version: Python version.

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.

Install with pip

pip installer is not yet available

Install with conda

conda installer is no yet available.

Install from source

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

Select Default Framework

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'

Testing

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

Getting Started

Once you have installed the

Basic Usage

Add Preprocessing and Augmentation

Patch Prediction

Patch Prediction

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

More examples are provided in the documentation.

License

The CATOPUMA package is licensed under the MIT "Expat" License. license

Contribute

Any contribution is more than welcome. Just fill an issue or a pull request and we will check ASAP!

How to Commit

Authors

References

Iakubovskii, P. Segmentation Models. GitHub repository (2019). https://github.com/qubvel/segmentation_models
https://github.com/GianlucaCarlini/Segmentation3D

Citation

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}},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

catopuma_riccardobiondi96-1.0.0.dev1.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

catopuma_RiccardoBiondi96-1.0.0.dev1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file catopuma_riccardobiondi96-1.0.0.dev1.tar.gz.

File metadata

File hashes

Hashes for catopuma_riccardobiondi96-1.0.0.dev1.tar.gz
Algorithm Hash digest
SHA256 b0639cf98a46f17ffa7a865f8277cd8fc840ef42afa0670db08312d1fd248421
MD5 210c5f9b53d6055c601e60193c18f92e
BLAKE2b-256 4a3d187e76ece3b1e535c07a82d7c4659b71c9d674ccbe4b7eea40eb363e219f

See more details on using hashes here.

File details

Details for the file catopuma_RiccardoBiondi96-1.0.0.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for catopuma_RiccardoBiondi96-1.0.0.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ab5bc37140b7fc6f0c681358321de3a2dccae967fd89b7c0d61b9ea8fecb6bd
MD5 3f638788bdb631c43f068094db65140a
BLAKE2b-256 97f3af27ae776466c5b31ce58ae86965023eb70f091b15aaa235d70733c89fbf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page