{"id":27443170,"url":"https://github.com/matteo-ronchetti/torch-radon","last_synced_at":"2025-04-15T01:19:46.837Z","repository":{"id":37741189,"uuid":"220028800","full_name":"matteo-ronchetti/torch-radon","owner":"matteo-ronchetti","description":"Computational Tomography in PyTorch","archived":false,"fork":false,"pushed_at":"2023-09-22T15:00:21.000Z","size":16800,"stargazers_count":235,"open_issues_count":31,"forks_count":49,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-15T01:19:35.112Z","etag":null,"topics":["cuda","hacktoberfest","inverse-problems","pytorch","radon-transform","shearlet-transform","tomography"],"latest_commit_sha":null,"homepage":"https://torch-radon.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matteo-ronchetti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-06T15:27:48.000Z","updated_at":"2025-04-11T18:25:22.000Z","dependencies_parsed_at":"2023-01-19T13:16:39.393Z","dependency_job_id":null,"html_url":"https://github.com/matteo-ronchetti/torch-radon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteo-ronchetti%2Ftorch-radon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteo-ronchetti%2Ftorch-radon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteo-ronchetti%2Ftorch-radon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteo-ronchetti%2Ftorch-radon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matteo-ronchetti","download_url":"https://codeload.github.com/matteo-ronchetti/torch-radon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986315,"owners_count":21194025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cuda","hacktoberfest","inverse-problems","pytorch","radon-transform","shearlet-transform","tomography"],"created_at":"2025-04-15T01:19:46.362Z","updated_at":"2025-04-15T01:19:46.826Z","avatar_url":"https://github.com/matteo-ronchetti.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Travis (.com)](https://img.shields.io/travis/com/matteo-ronchetti/torch-radon)\n[![Documentation Status](https://readthedocs.org/projects/torch-radon/badge/?version=latest)](http://torch-radon.readthedocs.io/?badge=latest)\n![GitHub](https://img.shields.io/github/license/matteo-ronchetti/torch-radon)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/10GdKHk_6346aR4jl5VjPPAod1gTEsza9)\n# TorchRadon: Fast Differentiable Routines for Computed Tomography\n\nTorchRadon is a PyTorch extension written in CUDA that implements differentiable routines\nfor solving computed tomography (CT) reconstruction problems.\n\nThe library is designed to help researchers working on CT problems to combine deep learning\nand model-based approaches.\n\nMain features:\n - Forward projections, back projections and shearlet transforms are **differentiable** and\n integrated with PyTorch `.backward()`.\n - Up to 125x **faster** than Astra Toolbox.\n - **Batch operations**: fully exploit the power of modern GPUs by processing multiple images\n in parallel.\n - **Transparent API**: all operations are seamlessly integrated with PyTorch, \n  gradients can  be  computed using `.backward()`,  half precision can be used with Nvidia AMP.\n - **Half precision**: storing data in half precision allows to get sensible speedups \n when  doing  Radon  forward  and  backward projections with a very small accuracy loss.\n \nImplemented operations:\n - Parallel Beam projections\n - Fan Beam projections\n - Shearlet transform\n \n \n## Installation\nCurrently only Linux is supported, if you are running a different OS please use Google Colab or the Docker image.\n### Precompiled packages\nIf you are running Linux you can install Torch Radon by running:\n```shell script\nwget -qO- https://raw.githubusercontent.com/matteo-ronchetti/torch-radon/master/auto_install.py  | python -\n```\n\n### Google Colab\nYou can try the library from your browser using Google Colab, you can find an example\nnotebook [here](https://colab.research.google.com/drive/10GdKHk_6346aR4jl5VjPPAod1gTEsza9?usp=sharing).\n\n### Docker Image\nDocker images with PyTorch CUDA and Torch Radon are available [here](https://hub.docker.com/repository/docker/matteoronchetti/torch-radon).\n```shell script\ndocker pull matteoronchetti/torch-radon\n```\nTo use the GPU in docker you need to use [nvidia-docker](https://github.com/NVIDIA/nvidia-docker)\n\n### Build from source\nYou need to have [CUDA](https://developer.nvidia.com/cuda-toolkit) and [PyTorch](https://pytorch.org/get-started/locally/) installed, then run:\n```shell script\ngit clone https://github.com/matteo-ronchetti/torch-radon.git\ncd torch-radon\npython setup.py install\n```\nIf you encounter any problem please contact the author or open an issue.\n\n## Benchmarks\nThe library is noticeably faster than the Astra Toolbox, especially when data is already on the GPU. Main disadvantage of Astra is that it only takes inputs which are on the CPU, this makes training end-to-end neural networks very inefficient.\nThe following benchmark compares the speed of Astra Toolbox and Torch Radon:\n![V100 Benchmark](pictures/v100.png?raw=true)\n\nIf we set `clip_to_circle=True` (consider only the part of the image that is inside the circle) the speed difference is even larger:\n![V100 Benchmark circle](pictures/v100_circle.png?raw=true)\n\nThese results hold also on a cheap laptop GPU: \n![GTX1650 Benchmark](pictures/gtx1650.png?raw=true)\n\n## Cite\nIf you are using TorchRadon in your research, please cite the following paper:\n```\n@article{torch_radon,\nAuthor = {Matteo Ronchetti},\nTitle = {TorchRadon: Fast Differentiable Routines for Computed Tomography},\nYear = {2020},\nEprint = {arXiv:2009.14788},\njournal={arXiv preprint arXiv:2009.14788},\n}\n```\n\n## Testing\nInstall testing dependencies with `pip install -r test_requirements.txt`\nthen test with:\n```shell script\nnosetests tests/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatteo-ronchetti%2Ftorch-radon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatteo-ronchetti%2Ftorch-radon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatteo-ronchetti%2Ftorch-radon/lists"}