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

How to use input equirectangular images for training? #1252

Open
HungNgoCT opened this issue Jan 18, 2023 · 21 comments
Open

How to use input equirectangular images for training? #1252

HungNgoCT opened this issue Jan 18, 2023 · 21 comments

Comments

@HungNgoCT
Copy link

HungNgoCT commented Jan 18, 2023

Hi,

I saw in a PR that nerfstudio support equirectangular images as this link:
#1024

Can anyone guide me that how to use equirectagular images for training?
I understood that I will use ns-process-data for for images and pose generation, then use ns-train for training. I checked ns-process-data but don't know how to use it with input equirectangular images as the image below.

Highly appreciate if anyone can help.

Hung
2_000004

@tancik
Copy link
Contributor

tancik commented Jan 18, 2023

We currently don't have a pipeline for inputing equirectangular images. This is because the method used to find the poses (COLMAP) does not support equirectangular. There was some work on integrating OpenSFM which does support 360, but the PR has become stale - #969

@machenmusik
Copy link
Contributor

For clarity - I see #966 which claims it adds equirectangular image support, but it sounds as though there is no ns-process-data method that uses that yet - is that right?

@mgupta70
Copy link

I have been experimenting with 360 videos. I split them into multiple overlapping perspective images and register those in colmap. Registration was successful but the 3D reconstruction with Instant NGP is not good. Although, The dense 3D reconstruction in Colmap is much better. I tried the same set of photos in RealityCapture and 3d reconstruction is comparatively of a very high quality.

Can you think of a reason why it could happen?

colmap
instantNGP
reality_capture

@tancik
Copy link
Contributor

tancik commented Feb 15, 2023

How does it looks with the nerfacto method?

@mgupta70
Copy link

I did not try with nerfacto. Will try it and post it here. But any guesses @tancik as to why this could be happening ?

@tancik
Copy link
Contributor

tancik commented Feb 15, 2023

Maybe you don't have enough images. I'd also like to see a viewpoint from inside the room.

@mgupta70
Copy link

I have attached an equirectangular image and two of the perspective images from it. I have 12 equirectangular images and 120 perspective images.

9
9_71
9_80

@tancik
Copy link
Contributor

tancik commented Feb 15, 2023

Can you post a screenshot of a nerf reconstruction from inside the room. Right away though, I can tell you that the helmet in the view will cause issues. It will likely lead to lots of floating geometry around the locations where the images were captured

@mgupta70
Copy link

mgupta70 commented Feb 15, 2023

It does create a lot of floating geometry. I was wondering why and now what you said makes sense.
I am attaching a small video and 2 snapshots from inside the reconstructed scene

img1
img2

cloudy.mp4

@tancik
Copy link
Contributor

tancik commented Feb 15, 2023

It looks like you aren't using nerfstudio.

@mgupta70
Copy link

Will do it 🤞

@mgupta70
Copy link

mgupta70 commented Feb 16, 2023

I used nerfacto to train this time. I split equirectangular images [5760x2880] into 8 perspective images [1200x1200] (from meshlab) such that helmet is not present. I am attaching a equirectangular image and 2 of its perspective images. The reconstruction was not good again. I am attaching snapshots of it however, path of cameras and camera poses look accurate because I captured the data.
1
2
3
im1
im2

media1.mp4

@tancik
Copy link
Contributor

tancik commented Feb 16, 2023

It is very likely that the poses are incorrect. These are the artifacts that you would expect in this case.
Did you run your images through ns-process-data?

@mgupta70
Copy link

yes, I did it with ns-process-data which then ran Colmap 3.8. I cannot understand why is this happening?

I have 2 queries in this regard:

  1. Can it be related to the scale of cube in which we render? (Like aabb_scale in NGP)?
  2. Is it a good idea to remove those images which have less information. I mean For ex: if an image only has plain white wall in background and only a small portion in that image is occupied by another object.

Thank you @tancik for replying

@tancik
Copy link
Contributor

tancik commented Feb 16, 2023

  1. The nerfacto model autoscales the scene so you don't need to worry about aabb_scale.
  2. Including that data is fine.

Can you send me your processed data.

@mgupta70
Copy link

mgupta70 commented Feb 16, 2023

I am sharing it on drive. I am sending you an email for this.

@tancik
Copy link
Contributor

tancik commented Feb 17, 2023

I tested the data, it also doesn't work for me, Im not sure why. We will be releasing some 360 processing tools soon, they might help with this data.

@mgupta70
Copy link

mgupta70 commented Feb 17, 2023

oh :(
Thanks for looking. I will be eagerly waiting for the updates. Meanwhile, I will play around with other parameters like Sampler and matching method to be exhaustive
Can you point me to some areas which I could explore? For now, I am trying preprocessing to filter out blurry images using Laplace of variance and performing some techniques like Histogram Equalization for enhancing exposure.

@tancik
Copy link
Contributor

tancik commented Feb 19, 2023

2023-02-19_140116.mp4

There was a bug introduced in nerfstudio 0.1.17
A patch will be coming soon. Alternatively you can use 0.1.16 in the meantime.

@mgupta70
Copy link

Woah!!! This looks good.
Thanks a lot. I will shift to 0.1.16.

@tancik
Copy link
Contributor

tancik commented Feb 20, 2023

v0.1.18 is out, use that instead.

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

4 participants