Prototype accompanying eigenvivek/nanodrr#92, now also compared with the maintainer's soft-labels branch (render(..., soft_labels=True)), which the notebook installs.
In nanodrr 0.1.6, render_torch routes each ray sample to a per-structure channel with a nearest-neighbour label lookup. This gist prototypes soft labels: the one-hot labelmap is interpolated trilinearly, giving, per class, the intensity integral and a projected soft label (the path length in mm that each ray spends in the class). Nothing in the library is modified.
soft_vs_nearest_labels.ipynb(executed; open in Colab): the renderers, figures, and a benchmark that runs on every available torch device.Z_build_nb.py: