localrf
localrf copied to clipboard
Masking ray sampling
Hi,
Because my dataset has black regions in the images, I would like to ask how I can add my mask for ray sampling to avoid those black regions.
I checked the code and I think I should start from idx_sample. Do I have to be aware anywhere else? Thank you.
The easiest would be to add a mask that zeros the loss. Would this suit your needs?
Hi,
The dataloader uses the valid masks in ${SCENE_DIR}/masks
if they exist. Masks should have the same names as the files in images
except for the extension that should be .png
. Masks are then used to weigh the loss so that zero areas don't affect the training.
Hi,
Thank you for updating the code.
Currently, I'm using my modified version at this line which is random.choice
only index inside the mask.
I will test your new update and compare it.