Skip to content

Implementations of ITK spatially-aware filters in PyTorch

License

Notifications You must be signed in to change notification settings

Leengit/ITKPyTorch

 
 

Repository files navigation

ITKPyTorch

 Apache 2.0 License  Build, test, package status

Overview

This Insight Toolkit (ITK) module provides support for PyTorch Tensors as ITK Images.

Try it online

We will set up a demonstration of this using Binder that anyone can try. Click here:  Binder

Technical description

The ITK TorchImage< TPixel, VImageDimension > templated class in C++ is a subclass of the corresponding ITK Image< TPixel, VImageDimension > templated class and supports the same pixel types (i.e., integers, real numbers, RGBPixel, RGBAPixel, Vector, and CovariantVector) and the same numbers of dimensions. A TorchImage can be used in lieu of an Image in ITK pipelines but also can be used with filters and transformations that are specialized for TorchImage objects. These specialized pipeline steps are executed on a CUDA GPU using the C++ libTorch interface.

It is intended that this module enable MONAI intergration.

Installation for Python

 PyPI Version

Usage in Python

Functional interface to ITK

ITK pipeline interface

About

Implementations of ITK spatially-aware filters in PyTorch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 88.0%
  • CMake 6.0%
  • Python 3.4%
  • C 2.6%