-
Notifications
You must be signed in to change notification settings - Fork 62
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
Spherical harmonics parametrization #150
Comments
I'm afraid matching the order of features isn't enough. I found that the official repo was computing color by I also have this question for the @wanmeihuali : what is the design decision to use sigmoid? |
Hi @jb-ye, you are right. there are some differences between the official repo and this repo. Consider the volume rendering formula: @VladimirYugay Please see
|
@wanmeihuali Thanks for the confirmation. I also tried to switch from sigmoid to ReLU and observed the performance degradation. Any idea why it happens? What makes sigmoid more favorable for optimization/training? I have been trying to find a way to either optimize the color mapping as the official repo did yet don't compromising on the quality or post-process SH to reflect the original color mapping. I have two reasons for doing that: (1) many people will be interested to compare taichi gs to official gs in an interactive viewer (e.g. https://antimatter15.com/splat/ ) (2) It was observed that storing spherical harmonics and quantize them in low bit representation can greatly reduce the file size of GS models. However, with sigmoid mapping, it is not possible to quantize SH. |
I also have been trying to load point clouds from the original repo and try them with the Taichi version.
Figured this out: (log) scale feature which was almost zero in a small number of points. Clamping this at some small value and it's pretty much identical to the original. One thing to note - in the original implementation often times there seem to be large distracting Gaussians in the background which sort to the foreground unexpected, in the Taichi version this doesn't seem to happen and is overall better.
|
@oliver-batchelor @VladimirYugay Latest commit, you can find sample code to order SH to match the one used by official GS. https://github.com/wanmeihuali/taichi_3d_gaussian_splatting/blob/main/taichi_3d_gaussian_splatting/GaussianPointCloudScene.py#L148 |
@wanmeihuali Thanks, that script is helpful! Can you elaborate on I was able to load all the parameters and render the image. However, my image looks pale (colors are not so bright), and I think that's because I need to modify the color formula somehow. |
See the code above - the difference is taichi version: 3dgs original: |
@oliver-batchelor, but I'd also need to change the backward pass if I want to optimize the taichi representation with changed activation functions. Should I change |
Yeah, you would. I have only tried displaying them at the moment.
…On Sat, 28 Oct 2023 at 02:05, Vladimir Yugay ***@***.***> wrote:
@oliver-batchelor <https://github.com/oliver-batchelor>, but I'd also
need to change the backward pass if I want to optimize the taichi
representation with changed activation functions. Or am I missing something?
—
Reply to this email directly, view it on GitHub
<#150 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAITRZIA7HNMNXN7TRWIJW3YBOWRLAVCNFSM6AAAAAA6JMB44OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSHA4DINRRGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
@wanmeihuali I'm not familiar with taichi, and I was wondering whether adding this will also require the change of the gradient for the backward pass:
I found that with this transformation the features from the original report become compatible with the ones in taichi |
@VladimirYugay For backward, it should be here: taichi_3d_gaussian_splatting/taichi_3d_gaussian_splatting/GaussianPoint3D.py Lines 361 to 370 in 2447148
if we remove sigmoid and uses a relu(x+0.5) in stead, then the jocabian shall be the original value when x>0 and 0 then x <=0 |
In the original splatting repo, spherical harmonics parameters are represented as
features_rest
of shape (n, 15, 3) andfeatures_dc
of shape (n, 1, 3) wheren
is the number of points.Here the feature vector is of shape 56 by default. First 4 dimensions for rotation, then 3 dimensions for the scale, 1 dimensions for alpha. This leaves 48 dimensions for the spherical harmonics parameters.
How can I convert the optimized features from the original repo to match the features that you have preserving the correct order?
The text was updated successfully, but these errors were encountered: