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

Add support for RealityCapture #1055

Merged
merged 6 commits into from
Jan 20, 2023
Merged

Add support for RealityCapture #1055

merged 6 commits into from
Jan 20, 2023

Conversation

tancik
Copy link
Contributor

@tancik tancik commented Nov 30, 2022

Not fully working yet. Poses seem good for some datasets, but not all. Still debuging.

@machenmusik
Copy link
Contributor

machenmusik commented Nov 30, 2022

Some quick questions

  • Looking at RealityCapture export options, there are many; which CSV export option(s) are supported? (Answer seems to be "Internal / external camera parameters")
  • Would it help to use non-CSV alignment export options such as Bundler v0.3? (Probably not, assuming this works)

@machenmusik
Copy link
Contributor

FYI, I found that this needed #1057 as well as same fix in another spot.

nerfstudio\data\dataparsers\nerfstudio_dataparser.py:215
idx_tensor = torch.tensor(indices).type(torch.long)

@machenmusik
Copy link
Contributor

(Thanks for better suggestion #1057 (comment) )

@machenmusik
Copy link
Contributor

(Any update?)

@tancik
Copy link
Contributor Author

tancik commented Jan 7, 2023

(Any update?)

Sorry for the lack of updates, other tasks pushed this down the priority stack. It currently mostly works, but the scene is currently flipped and the quality seems a bit blurrier than expected. Im not sure if this is a problem with how I am processing he poses, or if the data I am testing with has issues. I am also unsure if the camera model I am using for distortions exactly matches the one that realitycapture uses. I hope to get back to this PR at somepoint, but if probably won't be anytime in the immediate future. Others are welcome to hop onto this PR to see if they can fix / answers some of the issues I've listed above.

@machenmusik
Copy link
Contributor

Did a quick test, something is definitely strange

  • compared to Polycam, and COLMAP processing for same image set, RealityCapture values for focal length seem off
  • using Polycam/COLMAP values with RealityCapture transforms, one gets much better quality, but it appears mirrored, so maybe LHS/RHS issue

Copy link
Contributor

@machenmusik machenmusik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the output sample I tried, and the changes mentioned, I was able to get a quite good nerfacto result, with the only annoyance being that I needed to rotate the view 180 degrees.

Obviously we want more than one sample to try in order to confirm.
(Unfortunately I am not at liberty to share my output sample.)

nerfstudio/process_data/realitycapture_utils.py Outdated Show resolved Hide resolved
nerfstudio/process_data/realitycapture_utils.py Outdated Show resolved Hide resolved
@dkorolov
Copy link
Contributor

I make some own debugging related RealityCaprure data import. We have some mess in nerfstudio related to the Orientation EXIF tag in source images and FFMPEG images autorotation behavior. This significantly influences on RealityCaprure data import.
I created a topic related to this
#1260

@dkorolov
Copy link
Contributor

I tested the autorotation issue on my data I can not share. But for public testing, we can use the Gingerbread Man dataset (it is free for everyone) - https://www.capturingreality.com/download/files/Calendar-gingerbread-man
Also here are many free datasets that come with RealityCapture - https://www.capturingreality.com/free-datasets.

@machenmusik machenmusik self-requested a review January 19, 2023 23:32
@machenmusik
Copy link
Contributor

Thanks @dkorolov.
The original issues with this PR branch appear to be resolved;
wondering if we want to clean up EXIF orientation metadata behavior in a subsequent PR.
@tancik thoughts?

@machenmusik
Copy link
Contributor

machenmusik commented Jan 20, 2023

Some good news, looks like -noautorotate makes the Gingy sample process correctly. Incoming separate PR #1261.

Copy link
Contributor

@machenmusik machenmusik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When rebased against latest main including #1261, this PR now successfully processes data and trains against both CottageMiniature (ordinary images) and Gingy (rotated images) sample sets from RealityCapture, yielding nice looking results (at least to my eye).

@tancik
Copy link
Contributor Author

tancik commented Jan 20, 2023

@machenmusik Thanks for helping out with this!

@tancik tancik merged commit af41819 into main Jan 20, 2023
@tancik tancik deleted the tancik/realitycapture branch January 20, 2023 04:50
lucasthahn pushed a commit to tne-ai/nerfstudio that referenced this pull request Jan 26, 2023
* Add support for RealityCapture

* Fix coordinate bug

* Remove transform

* Update focal lengths

* isort
chris838 pushed a commit to chris838/nerfstudio that referenced this pull request Apr 22, 2023
* Add support for RealityCapture

* Fix coordinate bug

* Remove transform

* Update focal lengths

* isort
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

Successfully merging this pull request may close these issues.

3 participants