arcadelab / deepdrr

Code for "DeepDRR: A Catalyst for Machine Learning in Fluoroscopy-guided Procedures". https://arxiv.org/abs/1803.08606
GNU General Public License v3.0
209 stars 60 forks source link

Insert new material #86

Closed runslowly closed 1 year ago

runslowly commented 1 year ago

I want to get a more accurate drr image. My original image had pure gold metal in it. I wanted to know how to segment the original image with DNN while also segmenting it with threshold segmentation. And calculated the drr using Montecalo. (I already have gold's material coefficients)

benjamindkilleen commented 1 year ago

Hi @runslowly, thank you for your interest in DeepDRR. The easiest way to accomplish what you want is to segment the image separately, either using DeepDRR's segmentation V-Net (built-in) or with TotalSegmentator. You can then add the thresholded segmentation of gold, being sure to mask out the corresponding regions in the NN's segmentation. Pass this into the Volume class manually as a dict mapping material name to boolean numpy arrays. If you fork DeepDRR, you can add the coefficients for gold to the material_coefficients.py file in deepdrr/projector.