m-lyon / dMRI-RCNN

Diffusion MRI Recurrent CNN for Angular Super-resolution
MIT License
20 stars 3 forks source link

这个代码缺少一些东西 #3

Open caojiangege opened 4 months ago

caojiangege commented 4 months ago

这个代码缺少predction

m-lyon commented 3 months ago

我不确定你的意思,你能详细说明一下吗?

m-lyon commented 3 months ago

The code to perform inference is clearly documented within the README.md, I'm not able to provide code to exactly reproduce the results here because they require large datasets (the HCP dataset) as input. If you're able to get access to the HCP dataset then I can readily provide the subject IDs that were used to generate the results within the paper. Once you have the data for this it would be straightforward to reproduce the results; first denoise the data via patch2self, then perform inference as described in the 'Inference' section within the README.md.

m-lyon commented 3 months ago

就是没有prediction代码

Inference is prediction here. The Inference section outlines how to do prediction.

caojiangege commented 3 months ago

bvec_out是咋生成的啊,我预训练和训练都没有生成bvec_out,导致没办法进行推理

m-lyon commented 3 months ago

bvec_out is an array of b-vectors at which you want to predict the dMRI intensity image for. When validating a model, you'd want to have some set of b-vectors and associated ground truth dMRI intensity images that you want to predict / test against. So you would give this set of b-vectors as the bvec_out and compare the predicted dMRI intensity image against the ground truth measured dMRI intensity image.

If you want to predict when you have no ground truth to compare against, you can just sample points from a unit sphere in cartesian co-ordinates. One way to do this would be like so

import numpy as np

bvecs = np.random.randn(3, 10) # Here we're creating 10 random b-vectors
bvecs = bvecs / np.linalg.norm(bvecs, axis=0)
caojiangege commented 3 months ago

亲爱的教授:我好像明白了 就是HCP里面的相当于groud true,我们用随机生成的当作输入