Ruyi-Zha / naf_cbct

MIT License
106 stars 20 forks source link

obtain CT volume from the trained network #14

Closed ziangdi123 closed 6 months ago

ziangdi123 commented 7 months ago

Hi,

I have read the code in src/render/render.py.

I noticed that you obtain the values of sampled points along a set of rays by sending their coordinates into the MLP network. So is it possible to get the values of a CT volume from the trained network just by calling the run_network() function?

And also, what is the range of the output values of the network? And why do you apply a bound to them?

Thank you for your time!

Ruyi-Zha commented 7 months ago

Hi, thanks for your interest. Yes, you can use run_network to get CT volume. Please have a look at line 68 in `train.py'. Simply insert voxel coordinates and you can get the densities.

In terms of network, we set the range of output values to [0,+inf] with ReLU. As for the dataset, we normalize values to [0, 1] for simplicity. The bound is for the hash encoder rather than the network output. It defines the space that the hash encoder covers. Hope this helps.

ziangdi123 commented 7 months ago

Thank you for your reply!