Closed iraj465 closed 1 year ago
Hello, your train_res [800, 800]
parameter must match the dataset image size, e.g., DatasetNERF: 143 images with shape [3024, 4032]
, so I would recommend to either increase train_res in the config, or scaling down your training images, for example, by a factor 3x or 4x to save memory.
With a batch size of 8, training in native res of [3024, 4032] will consume lots of memory so I would recommend scaling down your training data
Thanks @jmunkberg for this. Although, I'm getting the same error after i downscaled my images by 4x. What could be the reason for this?
@iraj465 Just to double check, are you using the exact same resolution on train_res
and your image sizes?
If you downscaled [3024,4032] to [756, 1008]
then in the config, set
"train_res": [756, 1008],
@iraj465,
From the error message it also looks like your images are missing the alpha component. We assume that the dataset loader generates a 4-component output image (r,g,b,a) where alpha is supposed to contain the coverage mask (0 for background and 1 for object).
The dataloaders achieve this slightly differently, for the NeRF dataset reference images are (r,g,b,a) and are simply loaded. For NeRD, masks are separate images and are concatenated to the (r,g,b) color images.
Ah gotcha! It is missing the alpha channel. Thanks for this! How can i convert my images to images with alpha channel? Can you point to any leads or scripts for that? It would be really helpful.
There is no trivial solution. We require a segmentation mask that is 1 for all pixels of the object and 0 for background.
For rendered datasets you can configure e.g. blender to generate this mask, but for photographs it requires manual work or relying on image segmentation AI such as rembg. See issue #58 for more information.
Hi, I have been stuck on this error for some time now, the
optimize_mesh
function is not functioning properly on CUDA I'm running a custom dataset with colmap transforms matrix generated from colmap2nerf script of instant-ngp.Any help is appreciated
Resources used :