tomer196 / Learned_dMRI

Learn diffusion gradient directions for accelrated dMRI
2 stars 1 forks source link

Ask for Help about how to achieve fixed sampling and learned sampling without reconstruction? If I just frozee those parameters, gradients can not prapogate. #3

Open JingYang321 opened 1 year ago

tomer196 commented 1 year ago

Hi, For fixed sampling without reconstruction, you don't need to run training at all. Just run inference and extract the DWI after subsampling and before the reconstruction network. For learned sampling, you must run the network and train both the sampling and the reconstruction. After training is done, you can run the inference and again extract the DWI before the reconstruction network. If you have any more questions feel free to ask. Tomer

JingYang321 commented 1 year ago

Thanks for your reply. If I extract the DWI, I just can measure the perfomance by downstream task, such as tractography and other metrics. But I want to measure perfomance for DWI. Could you have some methods for this? Thanks  a lot

芸草 @.***

 

------------------ 原始邮件 ------------------ 发件人: "tomer196/Learned_dMRI" @.>; 发送时间: 2023年4月24日(星期一) 中午1:26 @.>; @.**@.>; 主题: Re: [tomer196/Learned_dMRI] Ask for Help about how to achieve fixed sampling and learned sampling without reconstruction? If I just frozee those parameters, gradients can not prapogate. (Issue #3)

Hi, For fixed sampling without reconstruction, you don't need to run training at all. Just run inference and extract the DWI after subsampling and before the reconstruction network. For learned sampling, you must run the network and train both the sampling and the reconstruction. After training is done, you can run the inference and again extract the DWI before the reconstruction network. If you have any more questions feel free to ask. Tomer

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

tomer196 commented 1 year ago

You can't check DWI directly because the downsampled DWI and the full one have a different number of gradient directions (and also different directions). We also found that it is less meaningful to compare DWI's and evaluate the performance of the end-task is much more powerful.

JingYang321 commented 1 year ago

Oh,Thanks

芸草 @.***

 

------------------ 原始邮件 ------------------ 发件人: "tomer196/Learned_dMRI" @.>; 发送时间: 2023年4月24日(星期一) 中午1:44 @.>; @.**@.>; 主题: Re: [tomer196/Learned_dMRI] Ask for Help about how to achieve fixed sampling and learned sampling without reconstruction? If I just frozee those parameters, gradients can not prapogate. (Issue #3)

You can't check DWI directly because the downsampled DWI and the full one have a different number of gradient directions (and also different directions). We also found that it is less meaningful to compare DWI's and evaluate the performance of the end-task is much more powerful.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

JingYang321 commented 1 year ago

Hi, Could you tell me how fixed sampling with reconstruction?Thank you very much.

芸草 @.***

 

------------------ 原始邮件 ------------------ 发件人: "tomer196/Learned_dMRI" @.>; 发送时间: 2023年4月24日(星期一) 中午1:26 @.>; @.**@.>; 主题: Re: [tomer196/Learned_dMRI] Ask for Help about how to achieve fixed sampling and learned sampling without reconstruction? If I just frozee those parameters, gradients can not prapogate. (Issue #3)

Hi, For fixed sampling without reconstruction, you don't need to run training at all. Just run inference and extract the DWI after subsampling and before the reconstruction network. For learned sampling, you must run the network and train both the sampling and the reconstruction. After training is done, you can run the inference and again extract the DWI before the reconstruction network. If you have any more questions feel free to ask. Tomer

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

tomer196 commented 1 year ago

I didn't understand your question. Can you explain what you meant?

JingYang321 commented 1 year ago

I actually want to know how to get the corresponding fixed-direction sample file, for example, if I want to get three directions, how do I get file like dir90.mat. Thank you very much.

tomer196 commented 1 year ago

https://github.com/tomer196/Learned_dMRI/tree/master/bvecs

JingYang321 commented 1 year ago

I checked the code, but I find that these mats are about Learned directions for few acceleration factors. Does this mean the direction mat is learned from the subsample network, rather than using the electrostatic repulsion algorithm?

tomer196 commented 1 year ago

The initialization of the direction is done in: https://github.com/tomer196/Learned_dMRI/blob/master/models/subsampling_model.py#:~:text=def-,initialize_dir,-(self%2C First, we sample random direction and then we apply the electrostatic repulsion algorithm from: https://dipy.org/documentation/1.1.0./reference/dipy.core/#dipy.core.gradients.disperse_charges:~:text=gradient%20table%20used.-,disperse_charges,-dipy.core.gradients

JingYang321 commented 1 year ago

Oh,I see. SO these mat files in https://github.com/tomer196/Learned_dMRI/tree/master/bvecs from dipy.core.gradients.disperse_charges?

tomer196 commented 1 year ago

I actually don't remember if this are the fixed or learned directions ;-)

JingYang321 commented 1 year ago

Probably these are learned directions, "We consider the following baselines: learned directions (joint opti- mization of diffusion directions and the reconstruction network, φ and θ were initialized randomly), and fixed directions (optimizing the reconstruction net- work alone). " from your paper. But I do not know how to train reconstructe network with fixed direction

tomer196 commented 1 year ago

You just need to specify the --sub-lr param to 0. https://github.com/tomer196/Learned_dMRI/blob/master/train.py#:~:text=Learning%20rate%27)-,parser,-.add_argument(

JingYang321 commented 1 year ago

oh,It is so simple. Thank you very much