diffct 1.2.7__tar.gz → 1.2.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {diffct-1.2.7 → diffct-1.2.9}/PKG-INFO +52 -8
- {diffct-1.2.7 → diffct-1.2.9}/README.md +51 -7
- diffct-1.2.9/diffct/__init__.py +17 -0
- {diffct-1.2.7 → diffct-1.2.9}/diffct/differentiable.py +773 -167
- {diffct-1.2.7 → diffct-1.2.9}/examples/fbp_fan.py +73 -63
- {diffct-1.2.7 → diffct-1.2.9}/examples/fbp_parallel.py +20 -34
- {diffct-1.2.7 → diffct-1.2.9}/examples/fdk_cone.py +48 -43
- {diffct-1.2.7 → diffct-1.2.9}/pyproject.toml +1 -1
- diffct-1.2.9/pytest.ini +3 -0
- diffct-1.2.9/tests/test_cuda_smoke.py +81 -0
- diffct-1.2.9/tests/test_weights.py +62 -0
- diffct-1.2.7/diffct/__init__.py +0 -2
- {diffct-1.2.7 → diffct-1.2.9}/.github/workflows/docs.yml +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/.github/workflows/release.yml +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/.gitignore +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/LICENSE +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/docs/Makefile +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/docs/source/_static/.gitkeep +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/docs/source/api.rst +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/docs/source/conf.py +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/docs/source/examples.rst +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/docs/source/fbp_fan_example.rst +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/docs/source/fbp_parallel_example.rst +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/docs/source/fdk_cone_example.rst +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/docs/source/getting_started.rst +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/docs/source/index.rst +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/docs/source/iterative_reco_cone_example.rst +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/docs/source/iterative_reco_fan_example.rst +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/docs/source/iterative_reco_parallel_example.rst +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/examples/iterative_reco_cone.py +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/examples/iterative_reco_fan.py +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/examples/iterative_reco_parallel.py +0 -0
- {diffct-1.2.7 → diffct-1.2.9}/requirements.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: diffct
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.9
|
|
4
4
|
Summary: A CUDA-based library for computed tomography (CT) projection and reconstruction with differentiable operators
|
|
5
5
|
Project-URL: Homepage, https://github.com/sypsyp97/diffct
|
|
6
6
|
Author-email: Yipeng Sun <yipeng.sun@fau.de>
|
|
@@ -28,6 +28,18 @@ A high-performance, CUDA-accelerated library for circular orbits CT reconstructi
|
|
|
28
28
|
|
|
29
29
|
⭐ **Please star this project if you find it is useful!**
|
|
30
30
|
|
|
31
|
+
## 🔀 Branches
|
|
32
|
+
|
|
33
|
+
### Main Branch (Stable)
|
|
34
|
+
This is the **stable version** supporting circular trajectory CT reconstruction.
|
|
35
|
+
|
|
36
|
+
### Dev Branch (Under Development)
|
|
37
|
+
The `dev` branch includes experimental features:
|
|
38
|
+
- **Random trajectory projection and backprojection operators**
|
|
39
|
+
- **New examples with non-circular trajectories**
|
|
40
|
+
|
|
41
|
+
⚠️ **Note:** The dev branch is under active development. If you find any bugs, please [raise an issue](https://github.com/sypsyp97/diffct/issues).
|
|
42
|
+
|
|
31
43
|
## ✨ Features
|
|
32
44
|
|
|
33
45
|
- **Fast:** CUDA-accelerated projection and backprojection operations
|
|
@@ -69,36 +81,68 @@ diffct/
|
|
|
69
81
|
|
|
70
82
|
### Installation
|
|
71
83
|
|
|
72
|
-
**CUDA 12:**
|
|
84
|
+
**CUDA 12 (Recommended):**
|
|
73
85
|
```bash
|
|
74
86
|
# Create and activate conda environment
|
|
75
87
|
conda create -n diffct python=3.12
|
|
76
88
|
conda activate diffct
|
|
77
89
|
|
|
78
|
-
# Install CUDA
|
|
90
|
+
# Install CUDA (here 12.8.1 as example) PyTorch, and Numba
|
|
79
91
|
conda install nvidia/label/cuda-12.8.1::cuda-toolkit
|
|
80
|
-
|
|
92
|
+
|
|
93
|
+
# Install Pytorch, you can find the commend here: https://pytorch.org/get-started/locally/
|
|
94
|
+
|
|
95
|
+
# Install Numba with CUDA 12
|
|
81
96
|
pip install numba-cuda[cu12]
|
|
82
97
|
|
|
83
98
|
# Install diffct
|
|
84
99
|
pip install diffct
|
|
85
100
|
```
|
|
86
101
|
|
|
87
|
-
|
|
102
|
+
<details>
|
|
103
|
+
<summary>CUDA 13 Installation</summary>
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Create and activate conda environment
|
|
107
|
+
conda create -n diffct python=3.12
|
|
108
|
+
conda activate diffct
|
|
109
|
+
|
|
110
|
+
# Install CUDA (here 13.0.2 as example) PyTorch, and Numba
|
|
111
|
+
conda install nvidia/label/cuda-13.0.2::cuda-toolkit
|
|
112
|
+
|
|
113
|
+
# Install Pytorch, you can find the commend here: https://pytorch.org/get-started/locally/
|
|
114
|
+
|
|
115
|
+
# Install Numba with CUDA 13
|
|
116
|
+
pip install numba-cuda[cu13]
|
|
117
|
+
|
|
118
|
+
# Install diffct
|
|
119
|
+
pip install diffct
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
</details>
|
|
123
|
+
|
|
124
|
+
<details>
|
|
125
|
+
<summary>CUDA 11 Installation</summary>
|
|
126
|
+
|
|
88
127
|
```bash
|
|
89
128
|
# Create and activate conda environment
|
|
90
129
|
conda create -n diffct python=3.12
|
|
91
130
|
conda activate diffct
|
|
92
131
|
|
|
93
|
-
# Install CUDA
|
|
132
|
+
# Install CUDA (here 11.8.0 as example) PyTorch, and Numba
|
|
94
133
|
conda install nvidia/label/cuda-11.8.0::cuda-toolkit
|
|
95
|
-
|
|
134
|
+
|
|
135
|
+
# Install Pytorch, you can find the commend here: https://pytorch.org/get-started/locally/
|
|
136
|
+
|
|
137
|
+
# Install Numba with CUDA 11
|
|
96
138
|
pip install numba-cuda[cu11]
|
|
97
139
|
|
|
98
140
|
# Install diffct
|
|
99
141
|
pip install diffct
|
|
100
142
|
```
|
|
101
143
|
|
|
144
|
+
</details>
|
|
145
|
+
|
|
102
146
|
## 📝 Citation
|
|
103
147
|
|
|
104
148
|
If you use this library in your research, please cite:
|
|
@@ -106,7 +150,7 @@ If you use this library in your research, please cite:
|
|
|
106
150
|
```bibtex
|
|
107
151
|
@software{diffct2025,
|
|
108
152
|
author = {Yipeng Sun},
|
|
109
|
-
title = {diffct: Differentiable Computed Tomography
|
|
153
|
+
title = {diffct: Differentiable Computed Tomography
|
|
110
154
|
Reconstruction with CUDA},
|
|
111
155
|
year = 2025,
|
|
112
156
|
publisher = {Zenodo},
|
|
@@ -11,6 +11,18 @@ A high-performance, CUDA-accelerated library for circular orbits CT reconstructi
|
|
|
11
11
|
|
|
12
12
|
⭐ **Please star this project if you find it is useful!**
|
|
13
13
|
|
|
14
|
+
## 🔀 Branches
|
|
15
|
+
|
|
16
|
+
### Main Branch (Stable)
|
|
17
|
+
This is the **stable version** supporting circular trajectory CT reconstruction.
|
|
18
|
+
|
|
19
|
+
### Dev Branch (Under Development)
|
|
20
|
+
The `dev` branch includes experimental features:
|
|
21
|
+
- **Random trajectory projection and backprojection operators**
|
|
22
|
+
- **New examples with non-circular trajectories**
|
|
23
|
+
|
|
24
|
+
⚠️ **Note:** The dev branch is under active development. If you find any bugs, please [raise an issue](https://github.com/sypsyp97/diffct/issues).
|
|
25
|
+
|
|
14
26
|
## ✨ Features
|
|
15
27
|
|
|
16
28
|
- **Fast:** CUDA-accelerated projection and backprojection operations
|
|
@@ -52,36 +64,68 @@ diffct/
|
|
|
52
64
|
|
|
53
65
|
### Installation
|
|
54
66
|
|
|
55
|
-
**CUDA 12:**
|
|
67
|
+
**CUDA 12 (Recommended):**
|
|
56
68
|
```bash
|
|
57
69
|
# Create and activate conda environment
|
|
58
70
|
conda create -n diffct python=3.12
|
|
59
71
|
conda activate diffct
|
|
60
72
|
|
|
61
|
-
# Install CUDA
|
|
73
|
+
# Install CUDA (here 12.8.1 as example) PyTorch, and Numba
|
|
62
74
|
conda install nvidia/label/cuda-12.8.1::cuda-toolkit
|
|
63
|
-
|
|
75
|
+
|
|
76
|
+
# Install Pytorch, you can find the commend here: https://pytorch.org/get-started/locally/
|
|
77
|
+
|
|
78
|
+
# Install Numba with CUDA 12
|
|
64
79
|
pip install numba-cuda[cu12]
|
|
65
80
|
|
|
66
81
|
# Install diffct
|
|
67
82
|
pip install diffct
|
|
68
83
|
```
|
|
69
84
|
|
|
70
|
-
|
|
85
|
+
<details>
|
|
86
|
+
<summary>CUDA 13 Installation</summary>
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Create and activate conda environment
|
|
90
|
+
conda create -n diffct python=3.12
|
|
91
|
+
conda activate diffct
|
|
92
|
+
|
|
93
|
+
# Install CUDA (here 13.0.2 as example) PyTorch, and Numba
|
|
94
|
+
conda install nvidia/label/cuda-13.0.2::cuda-toolkit
|
|
95
|
+
|
|
96
|
+
# Install Pytorch, you can find the commend here: https://pytorch.org/get-started/locally/
|
|
97
|
+
|
|
98
|
+
# Install Numba with CUDA 13
|
|
99
|
+
pip install numba-cuda[cu13]
|
|
100
|
+
|
|
101
|
+
# Install diffct
|
|
102
|
+
pip install diffct
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
</details>
|
|
106
|
+
|
|
107
|
+
<details>
|
|
108
|
+
<summary>CUDA 11 Installation</summary>
|
|
109
|
+
|
|
71
110
|
```bash
|
|
72
111
|
# Create and activate conda environment
|
|
73
112
|
conda create -n diffct python=3.12
|
|
74
113
|
conda activate diffct
|
|
75
114
|
|
|
76
|
-
# Install CUDA
|
|
115
|
+
# Install CUDA (here 11.8.0 as example) PyTorch, and Numba
|
|
77
116
|
conda install nvidia/label/cuda-11.8.0::cuda-toolkit
|
|
78
|
-
|
|
117
|
+
|
|
118
|
+
# Install Pytorch, you can find the commend here: https://pytorch.org/get-started/locally/
|
|
119
|
+
|
|
120
|
+
# Install Numba with CUDA 11
|
|
79
121
|
pip install numba-cuda[cu11]
|
|
80
122
|
|
|
81
123
|
# Install diffct
|
|
82
124
|
pip install diffct
|
|
83
125
|
```
|
|
84
126
|
|
|
127
|
+
</details>
|
|
128
|
+
|
|
85
129
|
## 📝 Citation
|
|
86
130
|
|
|
87
131
|
If you use this library in your research, please cite:
|
|
@@ -89,7 +133,7 @@ If you use this library in your research, please cite:
|
|
|
89
133
|
```bibtex
|
|
90
134
|
@software{diffct2025,
|
|
91
135
|
author = {Yipeng Sun},
|
|
92
|
-
title = {diffct: Differentiable Computed Tomography
|
|
136
|
+
title = {diffct: Differentiable Computed Tomography
|
|
93
137
|
Reconstruction with CUDA},
|
|
94
138
|
year = 2025,
|
|
95
139
|
publisher = {Zenodo},
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# diffct/__init__.py
|
|
2
|
+
from .differentiable import (
|
|
3
|
+
ParallelProjectorFunction,
|
|
4
|
+
ParallelBackprojectorFunction,
|
|
5
|
+
FanProjectorFunction,
|
|
6
|
+
FanBackprojectorFunction,
|
|
7
|
+
ConeProjectorFunction,
|
|
8
|
+
ConeBackprojectorFunction,
|
|
9
|
+
detector_coordinates_1d,
|
|
10
|
+
angular_integration_weights,
|
|
11
|
+
fan_cosine_weights,
|
|
12
|
+
cone_cosine_weights,
|
|
13
|
+
parker_weights,
|
|
14
|
+
ramp_filter_1d,
|
|
15
|
+
fan_weighted_backproject,
|
|
16
|
+
cone_weighted_backproject,
|
|
17
|
+
)
|