Projector can't work correctly with scatter
LexTran opened this issue · 2 comments
Hi! It's great that you've developed such a good framework, I'm trying to run your geometry_testing.py program, however, I found out that when using the default setting, which is "photon_count=100000, scatter_num=10e7", it shows "cuMemFree failed: an illegal memory access was encountered", and when I checking out this problem, I accidentally got an error reporting says "got NaN values from negative log transform", but unfortunately I forgot to save the picture, and I didn't encounter it again.
Anyway, I can't run it with scatter, but if I drop the scatter setting, it can run till the end.
I'm new to this, and I've searched it on google, but I got nothing, so I'm not sure what's the problem, is it a bug or is my hardware not good enough?
Besides, I found out that if I tried to use V-Net to do the segment, which is provided by the framework, I got nothing, the output image would be all black, and when I output the materials list, I got all 1 in "air", and 0 in both "soft tissue" and "bone", why would this happen?
First, the VNet: we're currently working on a replacement because we've found it to be brittle. Most of our own recent experiments are using thresholding for segmentation. In addition to just the VNet acting silly, there can be other issues in the I/O of your CT scan, so make sure you check that your data input etc. works as expected.
Scatter: Depending on the issue above, scatter may be a direct derivate of this, i.e., segmentation did not work, the resulting projection is empty, so scatter throws an error. There may be related issues. All of this being said, we do not use scatter right now in our simulations. This is because the scatter kernels have been trained on very little data and thus are not really high fidelity. Most radiographs will have some scatter reduction applied before you see them in reality, anyway. We have been working on some MC-based scatter but have not gotten around to integrating it yet. There is also no ETA on when this will be done.
So TL/DR: switch scatter off and use threshold-based segmentation for now; it should get you very close to where you want to be.
Thanks for replying! Appreciate your work