minghanqin / LangSplat

Official implementation of the paper "LangSplat: 3D Language Gaussian Splatting" [CVPR2024 Highlight]
https://langsplat.github.io/
Other
674 stars 72 forks source link

Rendered Segmentation Map is All Black #27

Closed RockyatASU closed 7 months ago

RockyatASU commented 7 months ago

Thanks for your excellent work. I noticed the rendered segmentation maps generated by render.py are all black, no matter whether on the sofa dataset provided with the pre-trained model or my dataset. Could you help me fix this?

minghanqin commented 7 months ago

Thanks for your attention!

The output generated by the render.py script is a rendering of the feature map. Should you require a mask, I would recommend referencing the code available within the eval directory for guidance. It is important to note that if the output manifests as black, this may be attributable to the range of the feature map values, which span from -1 to 1. Specifically, features within the range of -1 to 0 might be visualized as black. I trust that this information regarding the visualization process will be of assistance to you.

    img = (rendering_lf.permute(1,2,0).cpu().numpy() + 1) / 2

    img = (img * 255).astype(np.uint8)

    img = Image.fromarray(img)

    img.save(os.path.join(render_path, '{0:05d}'.format(idx) + ".png"))