deformetrica issueshttps://gitlab.com/icm-institute/aramislab/deformetrica/-/issues2019-09-09T09:28:11Zhttps://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/30Automatic kernel and device selection2019-09-09T09:28:11ZBenoit MartinAutomatic kernel and device selectionTake in account:
- wall time
- number of available cores
- available RAM memory
- available GPUs
- available GPU memory
- take in account benchmark results
- ?Take in account:
- wall time
- number of available cores
- available RAM memory
- available GPUs
- available GPU memory
- take in account benchmark results
- ?v4.3.0Benoit MartinBenoit Martinhttps://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/62Harmonize the outputs of the API methods2019-09-09T08:14:47ZAlexandre BôneHarmonize the outputs of the API methodsMaybe always return the pair `model, estimator`. Maybe always return the pair `model, estimator`. v4.3.0Benoit MartinBenoit Martinhttps://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/59Adapt installation instructions to manage CUDA versions when installing PyTorch2019-06-24T07:47:26ZAlexandre BôneAdapt installation instructions to manage CUDA versions when installing PyTorchv4.3.0Alexandre BôneAlexandre Bônehttps://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/57Improve the matrix inversion method in parallel transport.2019-06-26T09:55:40ZAlexandre BôneImprove the matrix inversion method in parallel transport.Maybe work in collaboration with the PyKeops team, if they are interested.Maybe work in collaboration with the PyKeops team, if they are interested.v4.3.0Alexandre BôneAlexandre Bônehttps://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/79Mac GPU2023-06-23T13:17:10ZSimao LaranjeiraMac GPUHello,
First of all, thank you very much for your package.
It has been beneficial to make it easier to create an SSM in my research.
However, we use Macs in our lab, which means we cannot use the torch kernel's GPU capabilities.
I h...Hello,
First of all, thank you very much for your package.
It has been beneficial to make it easier to create an SSM in my research.
However, we use Macs in our lab, which means we cannot use the torch kernel's GPU capabilities.
I have used torch.gpu before in much simpler Python codes on a Mac.
So could you tell me where I should alter your code to make this possible?
In particular, the instances where you define the torch.device().
Combing through it with a fine comb has proven to be a frustrating endeavour.
Any help would be appreciated, and I will, of course, share the code with you if I get it working.
Thank you very much,
Best wishes,
Simãohttps://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/78Scipy optimize result message should not be converted using .decode("utf-8)"2022-08-11T13:29:25ZQuentinRapillyScipy optimize result message should not be converted using .decode("utf-8)"Using Deformetrica API for registration with `otpimization_method_type : "ScipyLBFGS"`, I faced the following problem. Sometimes I get the error :
`AttributeError: 'str' object has no attribute 'decode'`
This error comes from
```
resul...Using Deformetrica API for registration with `otpimization_method_type : "ScipyLBFGS"`, I faced the following problem. Sometimes I get the error :
`AttributeError: 'str' object has no attribute 'decode'`
This error comes from
```
result = minimize([...])
msg = result.message.decode("utf-8")
```
in file `deformetrica/core/estimators/scipy_optimize.py` line 111
According to what I have seen, minimize return a `scipy.optimize.OptimizeResult` which have "message" field but this field is a string, and it doesn't recquire to use `decode` which creates the error.https://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/77IndexError: index 3 is out of bounds for dimension 1 with size 22021-08-02T14:33:30Zzzc11111IndexError: index 3 is out of bounds for dimension 1 with size 2
Zicheng Zhu
Jul 30, 2021, 8:13:15 PM (2 days ago)
to Deformetrica
Hello,
I tried to run the examples/atlas/landmark/3d/brain_structures
command: "deformetrica estimate model.xml data_set.xml -p optimization_parameters.xml"
problem:...
Zicheng Zhu
Jul 30, 2021, 8:13:15 PM (2 days ago)
to Deformetrica
Hello,
I tried to run the examples/atlas/landmark/3d/brain_structures
command: "deformetrica estimate model.xml data_set.xml -p optimization_parameters.xml"
problem:
self.centers, self.normals = SurfaceMesh._get_centers_and_normals(
File "/Users/Ricky/opt/anaconda3/lib/python3.8/site-packages/deformetrica/core/observations/deformable_objects/landmarks/surface_mesh.py", line 61, in _get_centers_and_normals
c = points[triangles[:, 3]]
IndexError: index 3 is out of bounds for dimension 1 with size 3.
When I run 2d example, it was fine.
data_set.xml:
<?xml version="1.0"?>
<data-set>
<subject id="00-1-AP-15L0214">
<visit id="experiment">
<filename object_id="NR-00-1-AP">Data/mc115L0214.vtk</filename>
<filename object_id="NR-00-1-AP">Data/tpm15L0214.vtk</filename>
</visit>
</subject>
<subject id="00-1-AP-15L0222">
<visit id="experiment">
<filename object_id="NR-00-1-AP">Data/mc115L0222.vtk</filename>
<filename object_id="NR-00-1-AP">Data/tpm15L0222.vtk</filename>
</visit>
</subject>
</data-set>
model.xml:
<?xml version="1.0"?>
<model>
<model-type>DeterministicAtlas</model-type>
<dimension>2</dimension>
<template>
<object id="NR-00-1-AP">
<deformable-object-type>SurfaceMesh</deformable-object-type>
<attachment-type>Varifold</attachment-type>
<noise-std>1</noise-std>
<kernel-width>3</kernel-width>
<kernel-type>keops</kernel-type>
<filename>Data/FM_template-AP.vtk</filename>
</object>
<object id="NR-00-1-AP">
<deformable-object-type>SurfaceMesh</deformable-object-type>
<attachment-type>Varifold</attachment-type>
<noise-std>1</noise-std>
<kernel-width>3</kernel-width>
<kernel-type>keops</kernel-type>
<filename>Data/TPM_template-AP.vtk</filename>
</object>
</template>
<deformation-parameters>
<kernel-width>4</kernel-width>
<kernel-type>keops</kernel-type>
<number-of-timepoints>10</number-of-timepoints>
</deformation-parameters>
</model>
optimization_parameters:
<?xml version="1.0"?>
<optimization-parameters>
<optimization-method-type>GradientAscent</optimization-method-type>
<!-- <max-iterations>300</max-iterations>-->
<!-- <convergence-tolerance>1e-5</convergence-tolerance>-->
<!-- <use-sobolev-gradient>On</use-sobolev-gradient>-->
<!-- <freeze-template>On</freeze-template>-->
</optimization-parameters>https://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/76Requirements MAC2021-07-04T10:54:15ZSavine MinderhoudRequirements MACWhat are required system requirements to run 100 STL meshes of about 300 KB each? We would like to create an average 3D geometry of aortas. Thank you in advance for any suggestions!What are required system requirements to run 100 STL meshes of about 300 KB each? We would like to create an average 3D geometry of aortas. Thank you in advance for any suggestions!Alexandre RoutierAlexandre BôneSavine MinderhoudAlexandre Routierhttps://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/75Installation instructions2021-06-24T09:41:56ZMartino Andrea ScarpoliniInstallation instructionsHello, I am trying to learn how to use this interesting software. During the installation I followed your instructions, but many requirements were not clear. Since to install deformetrica we need pykeops, we also need the tools to compil...Hello, I am trying to learn how to use this interesting software. During the installation I followed your instructions, but many requirements were not clear. Since to install deformetrica we need pykeops, we also need the tools to compile pykeops kernels.
In the pykeops page they say that cmake, g++ (or similars), nvcc, etc. are required. Without these I coulden't properly install deformetrica. I think that if this is in fact the case, you should add this info in the installations instructions !https://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/74Obtaining inverse transformation2021-04-29T21:34:06ZPaul YushkevichObtaining inverse transformationThis is a question and perhaps a feature request. I have found Deformetrica very effective for shape registrations I have been struggling with (patches of very folded cortex). I am using surface registration.
I would like to be able to...This is a question and perhaps a feature request. I have found Deformetrica very effective for shape registrations I have been struggling with (patches of very folded cortex). I am using surface registration.
I would like to be able to compute inverse transformations (warp target shape into the template space). There does not seem to be a built-in function to do this. However, I think that what I should to is as follows:
- Perform registration/estimation between template and target surfaces
- Use the control points from this estimation to shoot template forward to target
- Use the time point 1 controls points from this estimation with negative time point 1 moments to shoot the target backward to the template
However, trying this worked for some surface pairs and did not work for others. In one example, the second (backward) shooting simply exploded, sending points to infinity (almost).
So I wanted to ask what is the best practice for this scenario and to suggest providing some documentation!
Thanks for making this great software!
Paul
PS: here is a script I wrote to do this inverse shooting - but as I said it sometimes fails.
[dmca_shoot_back.py](/uploads/b3e835f6ce69c3af954617e2115d8cdd/dmca_shoot_back.py)https://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/73Google Colab Notebook not working2020-10-21T09:05:43ZEmanuele OlivettiGoogle Colab Notebook not workingHi, thank you for deformetrica and the nice documentation!
I was trying out your Google Colab notebook (Wiki -> User Manual -> Python API) but it does not work because the first cell installs deformetrica and Miniconda in the wrong way....Hi, thank you for deformetrica and the nice documentation!
I was trying out your Google Colab notebook (Wiki -> User Manual -> Python API) but it does not work because the first cell installs deformetrica and Miniconda in the wrong way. It seems that the installation has not been updated to the recent instructions. Anyway, replacing the first cell with
```
!apt install tree
!pip install deformetrica
```
solve the issue and let the notebook run with no problems.https://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/71Problem installing Deformetrica2020-06-01T21:30:00ZHadi MirgolbabaeeProblem installing DeformetricaI am struggling with installing Deformetrica on both Ubuntu 18.04 and Ubuntu 20.04. Since I am new to the linux platform, I would appreciate it if you could help me to solve this issue.
In the first trial, I have used the following comm...I am struggling with installing Deformetrica on both Ubuntu 18.04 and Ubuntu 20.04. Since I am new to the linux platform, I would appreciate it if you could help me to solve this issue.
In the first trial, I have used the following commands to install Deformetrica (after installing Anaconda3):
**• conda create -n deformetrica python=3.7 && source activate deformetrica**
**• conda install -c pytorch -c conda-forge -c anaconda -c aramislab deformetrica**
Unfortunately, this did not work and it gave me the following error:
*Solving environments: failed with initial frozen solve. Retrying with flexible solve.*
*Solving environments:*
*Found conflicts! Looking for incompatible packages.*
*This can take several minutes. Press CTRL-C to abort.*
*Faild*
Thereafter, I tried to install Deformetrica manually using the following steps directly after installation of Ubuntu:
Step 1: *sudo apt-get update*
Step 2: *sudo apt-get upgrade*
Step 3: *Install anaconda3 (https://docs.anaconda.com/anaconda/install/linux/ )*
Step 4: *conda create -n deformetrica python=3.7 && source activate deformetrica*
step 5: *cuda installation (https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=deblocal)*
Step 6: *conda install pytorch*
Step 7: *conda install -c conda-forge conda-forge-build-setup*
Step 8: *sudo apt install git*
Step 9: Clone the Deformetrica repository in the gitlab by:
*git clone "HTTPS link"*
Step 10: Now go to the main directory, where the files from deformetrica has been downloaded.
1. *python setup.py build*
2. *python setup.py install*
3. *pip install pykeops==1.0.1* (after some try and error, I found that this version is required by Deformtrica, am I correct?)
4. *pip install scipy*
5. *pip install nibabel*
6. *pip install vtk*
7. *pip install pyqt5*
8. *pip install matplotlib*
9. *pip install sklearn*
10. *pip install psutil*
if this is not working try:
*sudo apt-get install gcc python3-dev*
*pip install psutil ( or pip3 install psutil)*
11. *pip install cmake*
12. *conda install anaconda*
After executing the above command , I will be able to open Deformetrica GUI by typing "deformetrica gui". When I tried to run the "Deterministic atlas" example of 2D skull (as described in the Wiki), I got the following error:
*No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'*
*Bad key "text.kerning_factor" on line 4 in
/home/hadi/anaconda3/envs/deformetrica/lib/python3.7/site-packages/matplotlib/mpl-data/stylelib/_classic_test_patch.mplstyle.
You probably need to get an updated matplotlibrc file from
https://github.com/matplotlib/matplotlib/blob/v3.1.3/matplotlibrc.template
or from the matplotlib source distribution*
*Logger has been set to: WARNING*
I performed the same installation procedure on another system and I got the following error after installing Deformetrica and running the same example:
Bad key "text.kerning_factor" on line 4 in
/home/hadi/anaconda3/envs/deformetrica/lib/python3.7/site-packages/matplotlib/mpl-data/stylelib/_classic_test_patch.mplstyle.
You probably need to get an updated matplotlibrc file from
https://github.com/matplotlib/matplotlib/blob/v3.1.3/matplotlibrc.template
or from the matplotlib source distribution
Logger has been set to: WARNING
Traceback (most recent call last):
File "/home/hadi/anaconda3/envs/deformetrica/bin/deformetrica", line 11, in <module>
load_entry_point('deformetrica==4.2.0', 'console_scripts', 'deformetrica')()
File "/home/hadi/anaconda3/envs/deformetrica/lib/python3.7/site-packages/deformetrica-4.2.0-py3.7.egg/deformetrica.py", line 137, in main
model_options=get_model_options(xml_parameters))
File "/home/hadi/anaconda3/envs/deformetrica/lib/python3.7/site-packages/deformetrica-4.2.0-py3.7.egg/api/deformetrica.py", line 224, in estimate_bayesian_atlas
statistical_model.initialize_noise_variance(dataset, individual_RER)
File "/home/hadi/anaconda3/envs/deformetrica/lib/python3.7/site-packages/deformetrica-4.2.0-py3.7.egg/core/models/bayesian_atlas.py", line 163, in initialize_noise_variance
dataset, template_data, template_points, control_points, momenta))
File "/home/hadi/anaconda3/envs/deformetrica/lib/python3.7/site-packages/deformetrica-4.2.0-py3.7.egg/core/models/bayesian_atlas.py", line 482, in _compute_residuals
self.exponential.update()
File "/home/hadi/anaconda3/envs/deformetrica/lib/python3.7/site-packages/deformetrica-4.2.0-py3.7.egg/core/model_tools/deformations/exponential.py", line 175, in update
self.shoot()
File "/home/hadi/anaconda3/envs/deformetrica/lib/python3.7/site-packages/deformetrica-4.2.0-py3.7.egg/core/model_tools/deformations/exponential.py", line 212, in shoot
new_cp, new_mom = self._euler_step(self.shoot_kernel, self.control_points_t[i], self.momenta_t[i], dt)
File "/home/hadi/anaconda3/envs/deformetrica/lib/python3.7/site-packages/deformetrica-4.2.0-py3.7.egg/core/model_tools/deformations/exponential.py", line 485, in _euler_step
return cp + h * kernel.convolve(cp, cp, mom), \
File "/home/hadi/anaconda3/envs/deformetrica/lib/python3.7/site-packages/deformetrica-4.2.0-py3.7.egg/support/kernels/keops_kernel.py", line 81, in convolve
res = self.gaussian_convolve[d - 2](gamma, x.contiguous(), y.contiguous(), p.contiguous(), device_id=device_id)
File "/home/hadi/anaconda3/envs/deformetrica/lib/python3.7/site-packages/pykeops/torch/generic/generic_red.py", line 313, in call
out = GenredAutograd.apply(self.formula, self.aliases, backend, self.dtype, device_id, ranges, *args)
File "/home/hadi/anaconda3/envs/deformetrica/lib/python3.7/site-packages/pykeops/torch/generic/generic_red.py", line 41, in forward
result = myconv.genred_pytorch(nx, ny, tagCPUGPU, tag1D2D, tagHostDevice, device_id, ranges, *args)
*RuntimeError: [KeOps] This KeOps shared object has been compiled without cuda support:*
*1) to perform computations on CPU, simply set tagHostDevice to 0*
*2) to perform computations on GPU, please recompile the formula with a working version of cuda.*
This is strange error, since I aleady installed cuda on my systems. This was checked by running "nvcc --verion", which poped up the following message:
*nvcc: NVIDIA (R) Cuda compiler driver*
*Copyright (c) 2005-2019 NVIDIA Corporation*
*Built on Wed_Oct_23_19:24:38_PDT_2019*
*Cuda compilation tools, release 10.2, V10.2.89*
I would appreciate it if you could guide me through the installation procedure.
Many thanks in advance,
Hadihttps://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/68How to increase allocated memory for computation?2019-09-11T12:49:27ZSteven AHow to increase allocated memory for computation?Sorry if this is a stupid question, but how do you go about increasing the allocated memory for the computations. When attempting to run the example, I am getting a memory error where it says I attempted to allocate 0GB of ram for the pr...Sorry if this is a stupid question, but how do you go about increasing the allocated memory for the computations. When attempting to run the example, I am getting a memory error where it says I attempted to allocate 0GB of ram for the process. I have 16 GBs so I think I should be able to run it, it's just not using it?https://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/67Tutorials on using the GUI2019-09-11T12:50:09ZSteven ATutorials on using the GUIAre there any tutorials on how to work with the GUI? I'm confused by what you mean when the gui opens and says freeze template, and which file would the template file be, etc? I'm just trying to run the examples right now for 3d before t...Are there any tutorials on how to work with the GUI? I'm confused by what you mean when the gui opens and says freeze template, and which file would the template file be, etc? I'm just trying to run the examples right now for 3d before trying with my own data.https://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/63GradientAscent estimator convergence_tolerance should resemble scipy's minimize2019-05-10T08:15:17ZBenoit MartinGradientAscent estimator convergence_tolerance should resemble scipy's minimizeThe GradientAscent estimator should use the same `convergence_tolerance` criteria than Scipy's L-BFGS-B `ftol`.
We should use the max of the last function values instead of the last iteration.
cf: https://docs.scipy.org/doc/scipy/refer...The GradientAscent estimator should use the same `convergence_tolerance` criteria than Scipy's L-BFGS-B `ftol`.
We should use the max of the last function values instead of the last iteration.
cf: https://docs.scipy.org/doc/scipy/reference/optimize.minimize-lbfgsb.htmlhttps://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/61Add the API option to initialize the longitudinal atlas2019-04-05T09:06:02ZAlexandre BôneAdd the API option to initialize the longitudinal atlasThis might need some refactoring of the code, which currently uses the possibility to read / write XML files. This might need some refactoring of the code, which currently uses the possibility to read / write XML files. https://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/60Unify the XML system, the API dictionnaries, and the GUI dump files2019-04-05T08:35:49ZAlexandre BôneUnify the XML system, the API dictionnaries, and the GUI dump filesThose three concurrent systems are carrying the same information: parameters of the run. Those three concurrent systems are carrying the same information: parameters of the run. https://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/56Batch the get_deformed_data method in the case of images.2019-04-16T09:36:47ZAlexandre BôneBatch the get_deformed_data method in the case of images.Batch as well the L2 attachment cost.Batch as well the L2 attachment cost.Alexandre BôneAlexandre Bônehttps://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/39performance optimization2019-04-08T09:24:10ZBenoit Martinperformance optimizationsteps to better parallelization:
* [x] multi-processing
* [x] multi-gpu
* [ ] multi-node
apply multi-processing to:
* [x] deterministic_atlas
* [ ] registration
* [ ] bayesian_atlas
* [x] longitudinal_atlas
* [ ] logitudinal_reg...steps to better parallelization:
* [x] multi-processing
* [x] multi-gpu
* [ ] multi-node
apply multi-processing to:
* [x] deterministic_atlas
* [ ] registration
* [ ] bayesian_atlas
* [x] longitudinal_atlas
* [ ] logitudinal_registration
* [ ] affine_atlas
* [ ] geodesic_registration
* [ ] parallel_trasport
Known issues:
* ~~PyKeops v0.0.14 multi-gpu (when device_index is not 0)~~
* ~~multi-processing high number of open files (linux)~~Benoit MartinBenoit Martinhttps://gitlab.com/icm-institute/aramislab/deformetrica/-/issues/20Allow the combinaison of mesh + image objects2019-04-08T16:15:22ZBenoit MartinAllow the combinaison of mesh + image objects