Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help!Why is the resulting mesh of such poor quality #139

Open
520jz opened this issue Jul 4, 2023 · 3 comments
Open

Help!Why is the resulting mesh of such poor quality #139

520jz opened this issue Jul 4, 2023 · 3 comments

Comments

@520jz
Copy link

520jz commented Jul 4, 2023

I use my own dataset, the dataset is in llff format, and below is my dataset format
image

Below is an RGB image and mask display of my dataset
image
image

This is my config file
image

This is a bad result
image

Is there a problem with my dataset or with my config file settings?

@jmunkberg
Copy link
Collaborator

jmunkberg commented Jul 4, 2023

Hello,
Please see the discussion here: #84

  • Use a sufficient number of views. I would recommend 50+ views, nicely distributed around the object.
  • Verify the accuracy of the camera poses. I assume you used colmap? We sometimes check the poses by creating a NeRF using https://github.com/NVlabs/instant-ngp as a sanity check. We assume perfect poses, and do not correct for inaccuracies, so if the poses are bad, nvdiffrec will fail.
  • Accuracy of masks. Even a few pixel differences, as shown above, may make the optimization harder. If you have the possibility to create masks with higher accuracy, that will help.
  • Is the lighting constant in all images, and is the object fully static across all views?

@520jz
Copy link
Author

520jz commented Jul 4, 2023

Hello, Please see the discussion here: #84

  • Use a sufficient number of views. I would recommend 50+ views, nicely distributed around the object.
  • Verify the accuracy of the camera poses. I assume you used colmap? We sometimes check the poses by creating a NeRF using https://github.com/NVlabs/instant-ngp as a sanity check. We assume perfect poses, and do not correct for inaccuracies, so if the poses are bad, nvdiffrec will fail.
  • Accuracy of masks. Even a few pixel differences, as shown above, may make the optimization harder. If you have the possibility to create masks with higher accuracy, that will help.
  • Is the lighting constant in all images, and is the object fully static across all views?

Hi, thank you for reply! I appreciate your help. I'm going to take a look at #84
1、My number of views is 66. I feel like my number of views should be adequate.
2、This dataset was downloaded from the Internet, and the dataset itself has camera poses. But the camera pose should also be colmap generated. I thought I should Verify the accuracy of the camera poses.
3、Masks may be less accurate. Original image with white background, I used the following code to generate the mask.
cv2.threshold(gray, 250, 255, cv2. THRESH_BINARY_INV)
4、yes

Some other problems:
Dear author, forgive me for my ignorance.
1、Does the resolution of the input RGB image have any effect on the generated mesh? My original image is relatively large in resolution, so I lowered the resolution of the picture.
2、Do the input RGB images need an alpha channel? That is, must the background of the image be transparent?

@jmunkberg
Copy link
Collaborator

jmunkberg commented Jul 5, 2023

Resolution:
Higher is better for reconstruction quality (better texture detail), but requires more memory. For the paper, we usually trained in 800x800 or 1024x1024 resolution with a batch size of 4-8 using GPUs with 32-48GB of memory

Alpha:
If you are using the llff reader, the color images are expected to be three-channel RGB without any alpha channel or transparency. See the code here: https://github.com/NVlabs/nvdiffrec/blob/main/dataset/dataset_llff.py#L83
You can easily modify that to your needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants