Skip to main content

A CUDA-based library for computed tomography (CT) projection and reconstruction with differentiable operators

Project description

DiffCT: Differentiable Computed Tomography Operators

License DOI PyPI version Ask DeepWiki

A high-performance, CUDA-accelerated library for circular orbits CT reconstruction with end-to-end differentiable operators, enabling advanced optimization and deep learning integration.

โญ Please star this project if you find it useful!

โœจ Features

  • Fast: CUDA-accelerated projection and backprojection operations
  • Differentiable: End-to-end gradient propagation for deep learning workflows

๐Ÿ“ Supported Geometries

  • Parallel Beam: 2D parallel-beam geometry
  • Fan Beam: 2D fan-beam geometry
  • Cone Beam: 3D cone-beam geometry

๐Ÿงฉ Code Structure

diffct/
โ”œโ”€โ”€ diffct/
โ”‚   โ”œโ”€โ”€ __init__.py            # Package initialization
โ”‚   โ”œโ”€โ”€ non_differentiable.py  # CUDA implementation
โ”‚   โ”œโ”€โ”€ differentiable.py      # Differentiable implementation
โ”œโ”€โ”€ examples/                  # Example usages
โ”‚   โ”œโ”€โ”€ non_differentiable     # Non-differentiable examples
โ”‚   โ”‚   โ”œโ”€โ”€ parallel.py        
โ”‚   โ”‚   โ”œโ”€โ”€ fan.py             
โ”‚   โ”‚   โ”œโ”€โ”€ cone.py            
โ”‚   โ”œโ”€โ”€ differentiable         # Differentiable examples
โ”‚   โ”‚   โ”œโ”€โ”€ parallel.py        
โ”‚   โ”‚   โ”œโ”€โ”€ fan.py             
โ”‚   โ”‚   โ”œโ”€โ”€ cone.py            
โ”œโ”€โ”€ pyproject.toml             # Project metadata
โ”œโ”€โ”€ README.md                  # README
โ”œโ”€โ”€ LICENSE                    # License
โ”œโ”€โ”€ requirements.txt           # Dependencies

๐Ÿš€ Quick Start

Prerequisites

  • CUDA-capable GPU
  • Python 3.10+
  • PyTorch, NumPy, Numba with CUDA support

Installation

# Create and activate environment
conda create -n diffct python=3.10
conda activate diffct

# Install CUDA support
conda install cudatoolkit

git clone https://github.com/sypsyp97/diffct.git
cd diffct

pip install -r requirements.txt
pip install diffct

๐Ÿ“ Citation

If you use this library in your research, please cite:

@software{DiffCT2025,
  author       = {Yipeng Sun},
  title        = {DiffCT: Differentiable Computed Tomography 
                 Reconstruction with CUDA},
  year         = 2025,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.14999333},
  url          = {https://doi.org/10.5281/zenodo.14999333}
}

๐Ÿ“„ License

This project is licensed under the Apache 2.0 - see the LICENSE file for details.

๐Ÿ™ Acknowledgements

This project was highly inspired by:

Issues and contributions are welcome!

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

diffct-1.1.6.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

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

diffct-1.1.6-py2.py3-none-any.whl (13.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file diffct-1.1.6.tar.gz.

File metadata

  • Download URL: diffct-1.1.6.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for diffct-1.1.6.tar.gz
Algorithm Hash digest
SHA256 36b2b0469443b04e10a77f9daa9c3af0deae82b240619c4be2c13b3b6b2e91ed
MD5 278932d4809023d0fa058e1decf62454
BLAKE2b-256 6ad7ee2dd0e660336594683c33ba9dd0f8a494347a4bc8e3ed597b80a647cae5

See more details on using hashes here.

File details

Details for the file diffct-1.1.6-py2.py3-none-any.whl.

File metadata

  • Download URL: diffct-1.1.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for diffct-1.1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8459b6839d8d07946498121e5b583ef044796784e2101f36c01d7049d7867672
MD5 8ce113ec0f39cc8e5942274cfa5544b2
BLAKE2b-256 0e15e37fe53c3cdb26a92853e42d5cdf6c949fddcfc7b0df5338a0c7332ffb24

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