shap-e icon indicating copy to clipboard operation
shap-e copied to clipboard

How to render images with white background?

Open LordLiang opened this issue 2 years ago • 1 comments

Wonderful work! I want to know how to render images with white background? The default bg color of "decode_latent_images" is black. How should I change the code? Thank you!

LordLiang avatar Dec 08 '23 10:12 LordLiang

My solution is to change the line 125 in shap-e/shap_e/models/nerf/ray.py:

results.output.channels = results.output.channels + results.transmittance * void_model(Query(origin, direc))

into:

results.output.channels = results.output.channels + results.transmittance * torch.ones_like(results.output.channels)

You can give it a try.

SOTAMak1r avatar Mar 06 '24 05:03 SOTAMak1r