Comments (4)
Hi @SophieOstmeier,
Yes, it should work for CT scans, just set this parameter to True
, e.g.:
sett.ct = True
Note that estimating the noise standard deviation is more complicated for CT scans, so that the algorithm may not be as robust for denoising/super-resolving CT images. To get acceptable results you may therefore need to increase/decrease the regularisation scaling:
sett.reg_scl = 1.0 # default value
from unires.
Thank you! I will try that. Great idea BTW!
from unires.
Could you help me with this error?
Performing multi-channel (N=2) alignment...Traceback (most recent call last):
File "/home/sophie/miniconda3/envs/UniRes/bin/unires", line 8, in
sys.exit(run())
^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/unires/_cli.py", line 289, in run
_preproc(**vars(args))
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/unires/_cli.py", line 75, in _preproc
dat_y, mat_y, pth_y = preproc(pth, s)
^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/unires/run.py", line 313, in preproc
x, y, sett = init(data, sett)
^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/unires/run.py", line 265, in init
x, sett = _init_reg(x, sett)
^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/unires/_core.py", line 330, in _init_reg
mat_a = affine_align(imgs, **sett.coreg_params, fix=fix, device=sett.device)[1]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/nitorch/tools/preproc.py", line 166, in affine_align
mat_a, mat_fix, dim_fix, _ = _affine_align(dat, mat,
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/nitorch/tools/affine_reg/_align.py", line 150, in _affine_align
q, args = _fit_q(q, dat_fix, grid, mat_fix, dat, mat, mov,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/nitorch/tools/affine_reg/_core.py", line 199, in _fit_q
q[m, ...] = _do_optimisation(q[m, ...], args, s, opt, dim)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/nitorch/tools/affine_reg/_core.py", line 139, in _do_optimisation
res = minimize(_compute_cost, q, args, method='Powell',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/scipy/optimize/_minimize.py", line 701, in minimize
res = _minimize_powell(fun, x0, args, callback, bounds, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/scipy/optimize/_optimize.py", line 3507, in _minimize_powell
fval, x, direc1 = _linesearch_powell(func, x, direc1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/scipy/optimize/_optimize.py", line 3195, in _linesearch_powell
res = _minimize_scalar_bounded(myfunc, bound, xatol=tol / 100)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/scipy/optimize/_optimize.py", line 2285, in _minimize_scalar_bounded
fx = func(x, args)
^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/scipy/optimize/_optimize.py", line 3176, in myfunc
return func(p + alphaxi)
^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/scipy/optimize/_optimize.py", line 620, in function_wrapper
fx = function(np.copy(x), *(wrapper_args + args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/nitorch/tools/affine_reg/_costs.py", line 86, in _compute_cost
dat_new = grid_pull(dat[m], grid, bound='dft', extrapolate=True, interpolation=1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/nitorch/spatial/_grid.py", line 201, in grid_pull
out = GridPull.apply(input, grid, interpolation, bound, extrapolate)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/torch/cuda/amp/autocast_mode.py", line 106, in decorate_fwd
return fwd(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/nitorch/_C/grid.py", line 210, in forward
output = grid_pull(input, grid, *opt)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sophie/miniconda3/envs/UniRes/lib/python3.11/site-packages/nitorch/_C/_ts/pushpull.py", line 38, in grid_pull
return iso1.pull3d(inp, grid, bound_fn, extrapolate)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: r INTERNAL ASSERT FAILED at "../aten/src/ATen/core/jit_type_base.h":549, please report a bug to PyTorch.
from unires.
This issue is likely related to #22. Let's see if it is resolved if #22 gets solved.
from unires.
Related Issues (14)
- Deal with cross-talk?
- Boolean values are difficult to set in the command-line tool HOT 1
- Pre-conditioning CG
- Add release/tag and dependencies version HOT 5
- nitorch.core.datasets.download_url name change HOT 2
- preprocessing with Label HOT 7
- Implement projection operator as torch layer
- Question about how to create low-resolution images from high-resolution images to run on UniRes HOT 1
- Error when trying to run HOT 9
- Inconsistent results when passing single vs multi-modalities HOT 7
- Support read/write nifti when large number of observations. HOT 1
- Check accuracy of noise estimate
- Refactor into modules instead of using a Class
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unires.