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 hashes)

Uploaded Source

Built Distribution

Supported by

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