-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fourier Feature encodings and polyhedron encodings #2463
Fourier Feature encodings and polyhedron encodings #2463
Conversation
Rework RFFEncoding to be a subclass of the more general Fourier Feature Encodings and introduce Polyhedron encodings as introduced in mipnerf360.
|
Thank you for this PR! |
What is the exact error? |
|
Can you just add an assert at the beginning of the block code where you have the error?
|
I think I had to uninstall torchtyping, but I don't remember, sorry :/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove type:ignore
Thanks, that indeed did the trick! I have dropped the ignore lines now. |
nerfstudio/utils/math.py
Outdated
|
||
Adapted from https://github.com/google-research/multinerf/blob/5b4d4f64608ec8077222c52fdf814d40acc10bc1/internal/geopoly.py | ||
Args: | ||
base_shape: string, the name of the starting polyhedron, must be either |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This have to be offset. See the docs error:
/home/runner/work/nerfstudio/nerfstudio/nerfstudio/utils/math.py:docstring of nerfstudio.utils.math.generate_polyhedron_basis:8: ERROR: Unexpected indentation.
/home/runner/work/nerfstudio/nerfstudio/nerfstudio/utils/math.py:docstring of nerfstudio.utils.math.generate_polyhedron_basis:9: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/runner/work/nerfstudio/nerfstudio/nerfstudio/utils/math.py:docstring of nerfstudio.utils.math.generate_polyhedron_basis:14: WARNING: Definition list ends without a blank line; unexpected unindent.
nerfstudio/utils/math.py
Outdated
eps: float, a small number used to determine symmetries. | ||
|
||
Returns: | ||
basis: a matrix with shape [3, n]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
nerfstudio/utils/math.py
Outdated
return weights | ||
|
||
|
||
def tesselate_geodesic( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we perhaps make private functions (not needed to be exported) to start with underscore (_)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, and is it fine that I put them in utils/math.py or would you prefer to have them in a new separate utils file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its fine to have them there I think
@tancik , do you agree with merging? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice abstraction
Rework
RFFEncoding
to be a subclass of the more general Fourier Feature Encodings and introduce Polyhedron encodings as introduced in mipnerf360.