garf 2.5__tar.gz → 2.6__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.
- {garf-2.5/garf.egg-info → garf-2.6}/PKG-INFO +8 -8
- garf-2.6/garf/__init__.py +4 -0
- garf-2.6/garf/bin/__init__.py +0 -0
- garf-2.6/garf/bin/pytorch_info.py +38 -0
- garf-2.6/garf/garf_detector.py +851 -0
- garf-2.6/garf/garf_train.py +260 -0
- {garf-2.5 → garf-2.6/garf.egg-info}/PKG-INFO +8 -8
- garf-2.6/garf.egg-info/SOURCES.txt +22 -0
- garf-2.6/garf.egg-info/entry_points.txt +7 -0
- garf-2.6/garf.egg-info/not-zip-safe +1 -0
- {garf-2.5 → garf-2.6}/garf.egg-info/requires.txt +0 -1
- {garf-2.5 → garf-2.6}/garf.egg-info/top_level.txt +1 -0
- garf-2.6/pyproject.toml +45 -0
- garf-2.6/readme.md +14 -0
- garf-2.5/bin/pytorch_info +0 -38
- garf-2.5/garf/__init__.py +0 -3
- garf-2.5/garf/nn.py +0 -652
- garf-2.5/garf.egg-info/SOURCES.txt +0 -18
- garf-2.5/pyproject.toml +0 -6
- garf-2.5/setup.py +0 -30
- {garf-2.5 → garf-2.6}/LICENSE +0 -0
- /garf-2.5/bin/garf_compare_image_profile → /garf-2.6/garf/bin/garf_compare_image_profile.py +0 -0
- /garf-2.5/bin/garf_nn_info → /garf-2.6/garf/bin/garf_nn_info.py +0 -0
- /garf-2.5/bin/garf_plot_test_dataset → /garf-2.6/garf/bin/garf_plot_test_dataset.py +0 -0
- /garf-2.5/bin/garf_plot_training_dataset → /garf-2.6/garf/bin/garf_plot_training_dataset.py +0 -0
- /garf-2.5/bin/garf_train → /garf-2.6/garf/bin/garf_train.py +0 -0
- /garf-2.5/garf/nn_model.py → /garf-2.6/garf/garf_model.py +0 -0
- {garf-2.5 → garf-2.6}/garf/helpers.py +0 -0
- {garf-2.5 → garf-2.6}/garf.egg-info/dependency_links.txt +0 -0
- {garf-2.5 → garf-2.6}/setup.cfg +0 -0
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: garf
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.6
|
|
4
4
|
Summary: Utility tools for GATE ARF simulations
|
|
5
|
-
|
|
6
|
-
Author: David Sarrut
|
|
7
|
-
Author-email: david.sarrut@creatis.insa-lyon.fr
|
|
8
|
-
License: UNKNOWN
|
|
9
|
-
Platform: UNKNOWN
|
|
5
|
+
Author-email: David Sarrut <david.sarrut@creatis.insa-lyon.fr>
|
|
10
6
|
Classifier: Programming Language :: Python :: 3
|
|
11
7
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
8
|
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.8
|
|
13
10
|
Description-Content-Type: text/markdown
|
|
14
11
|
License-File: LICENSE
|
|
12
|
+
Requires-Dist: itk
|
|
13
|
+
Requires-Dist: numpy
|
|
14
|
+
Requires-Dist: pre-commit
|
|
15
|
+
Requires-Dist: torch>=2.1.0
|
|
16
|
+
Requires-Dist: tqdm
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
GARF = GATE ARF
|
|
@@ -27,5 +29,3 @@ https://www.ncbi.nlm.nih.gov/pubmed/30238925
|
|
|
27
29
|
A method to speed up Monte-Carlo simulations of single photon emission computed tomography (SPECT) imaging is proposed. It uses an artificial neural network (ANN) to learn the angular response function (ARF) of a collimator-detector system. The ANN is trained once from a complete simulation including the complete detector head with collimator, crystal, and digitization process. In the simulation, particle tracking inside the SPECT head is replaced by a plane. Photons are stopped at the plane, and the energy and direction are used as input to the ANN, which provides detection probabilities in each energy window. Compared to histogram-based ARF, the proposed method is less dependent on the statistics of the training data, provides similar simulation efficiency, and requires less training data. The implementation is available within the GATE platform.
|
|
28
30
|
|
|
29
31
|
- Gate10 test: https://github.com/OpenGATE/opengate/blob/master/opengate/tests/src/test043_garf.py
|
|
30
|
-
|
|
31
|
-
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
import torch
|
|
5
|
+
import click
|
|
6
|
+
|
|
7
|
+
CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@click.command(context_settings=CONTEXT_SETTINGS)
|
|
11
|
+
def pytorch_info():
|
|
12
|
+
"""
|
|
13
|
+
\b
|
|
14
|
+
Print pytorch version
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
print("pytorch version", torch.__version__)
|
|
18
|
+
|
|
19
|
+
cuda_mode = torch.cuda.is_available()
|
|
20
|
+
if cuda_mode:
|
|
21
|
+
print("CUDA GPU mode is available")
|
|
22
|
+
print("CUDA version:", torch.version.cuda)
|
|
23
|
+
print("CUDA current device:", torch.cuda.current_device())
|
|
24
|
+
print("CUDA device counts:", torch.cuda.device_count())
|
|
25
|
+
print("CUDA device name:", torch.cuda.get_device_name(0))
|
|
26
|
+
else:
|
|
27
|
+
print("No CUDA GPU")
|
|
28
|
+
|
|
29
|
+
mps_mode = torch.backends.mps.is_available()
|
|
30
|
+
if mps_mode:
|
|
31
|
+
print("MPS GPU mode is available")
|
|
32
|
+
else:
|
|
33
|
+
print("No MPS GPU")
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# -----------------------------------------------------------------------------
|
|
37
|
+
if __name__ == "__main__":
|
|
38
|
+
pytorch_info()
|