-
Notifications
You must be signed in to change notification settings - Fork 457
HoGS: Unified Near and Far Object Reconstruction via Homogeneous Gaussian Splatting #682
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
base: main
Are you sure you want to change the base?
Conversation
The comparison is certainly not fair (30k vs 50k iterations). However, the default won't get there even with 50k iterations. recorded.mp4 |
wow this is pretty cool! Yeah we should get the benchmarks (maybe at 30k since all other things are run for 30k in this repo?) so we could be confident on how much it improves and also for future reference. This week is kinda crazy for me. happy to review the PR more closely next week! |
I found a bug when saving an PLY. Code used: RESULT_DIR="results/benchmark_HoGS-BS1"
SCENE="garden"
RENDER_TRAJ_PATH="ellipse"
ITERS='50000'
BS='1'
CUDA_VISIBLE_DEVICES=0 python3 examples/simple_trainer.py mcmc --eval_steps $ITERS --disable_viewer --data_factor 2 \
--render_traj_path $RENDER_TRAJ_PATH --max-steps $ITERS --batch-size $BS \
--data_dir data/360_v2/$SCENE/ --use-hom-coords \
--save-ply --ply-steps 30000 50000 \
--result_dir $RESULT_DIR/$SCENE/ Running garden
Warning: image_path not found for reconstruction
[Parser] 185 images, taken by 1 cameras.
Downscaling images by 4x from data/360_v2/garden/images to data/360_v2/garden/images_4_png.
100%|██████████| 185/185 [00:00<00:00, 125720.39it/s]
Scene scale: 1.2265263065808911
Model initialized. Number of GS: 138766
...
...
...
Step 24800: Added 0 GSs. Now having 1000000 GSs.
Step: 29999 {'mem': 1.4372062683105469, 'ellipse_time': 591.6495430469513, 'num_GS': 1000000}
Traceback (most recent call last):
File "/workspace/GSPLAT_160a1_HoGS/gsplat-mcmc/examples/simple_trainer.py", line 1276, in <module>
cli(main, cfg, verbose=True)
File "/usr/local/lib/python3.10/dist-packages/gsplat/distributed.py", line 360, in cli
return _distributed_worker(0, 1, fn=fn, args=args)
File "/usr/local/lib/python3.10/dist-packages/gsplat/distributed.py", line 295, in _distributed_worker
fn(local_rank, world_rank, world_size, args)
File "/workspace/GSPLAT_160a1_HoGS/gsplat-mcmc/examples/simple_trainer.py", line 1204, in main
runner.train()
File "/workspace/GSPLAT_160a1_HoGS/gsplat-mcmc/examples/simple_trainer.py", line 832, in train
means *= w_inv
RuntimeError: a leaf Variable that requires grad is being used in an in-place operation. Additional info: EDIT # 1stIf I remove the Here is it. As comparison, gsplat MCMC-1M with 30k iters only. EDIT # 2ndThe result of HoGS-MCMC-1M for 50k is strange.. EDIT # 3rdMCMC-1M with 50k iters with Gsplat 1.5.0 So, I suspect, HoGS is good because it uses many Gaussian as possible for reconstructing background area. But, for method efficiency, I think MCMC is better. |
Thx @ichsan2895 for testing and evaluating. Maybe the degenerated rendering is caused by the bug you reported. I fixed it but lemme check if the rendering looks correct. Btw, yes. HoGS primary excels at background reconstruction. So you need to look at the output visually as it is not necessarily reflected by the overall psnr. Also, 1m are a bit too low in that case. Anyway, it is optional and can be activated depending on the situation. |
@ichsan2895 I am not 100% sure what you are doing? Is this the simple_viewer.py? Then it is loading the ckpts which are not correctly scaled. |
From @ichsan2895 it seems HoGS does not really win over metrics. But I'm curious about the visuals! If this paper really shifts more GS from foreground to background and improve the quality on background that would also be pretty nice. At least it provides this flexibility. But if it's minor difference on visual as well then i'm not sure if we want to add this complexity to the code base which we would have to maintain going forward. BTW we should really compare in a fair setting tho -- Can't conclude anything from 30k v.s. 50k ... |
Yes, I have ran Gsplat MCMC-1M with 50k iters. Here is the benchmark
Yeah, That is |
@ichsan2895 once you have figured out the viewer stuff, would you mind sharing some comments on how you feel about the visuals? esp how much the background got improved from this approach |
@ichsan2895 I never use the simple_viewer so that's why I was a bit puzzled. But I fixed it now. Please pull the latest commit. @liruilong940607 The visual quality is not minor, it can be quite tremendous with respect to the background. It maybe shows best with the default strategy but it certainly consumes more Gaussians. I doubt that running mcmc with 1m is a good metric here. |
@MrNeRF From the visual you shared initially the difference indeed seems big. But I'm curious why it is not reflected on the metrics. Or it's just because that is 30k v.s. 50k so the visual difference seems big? If there are visuals with same number of iterations that would be very helpful to compare Just trying to convince myself to be more confident about this paper. (For the recorder i read this paper before and I really like it! But I'm always cautious about results in the papers because nowadays many papers are not doing comparison properly ... until you actually try it out) |
@liruilong940607 I pretty much know what you mean. The paper explicitly reports different values "near vs far". I experimented quite a bit with it. In my experience this method can be a bit worse on the foreground especially when there are lots of fine details. However, it pretty much always outperforms in the background 3dgs significantly. So, there is certainly a trade-off. That's also why I made it optional in the first place. I will try to prepare some side-by-side comparisons to visualize that. |
|
I don't have the complete benchmark yet, but this is default strategy 30k steps main vs this branch. I will run bother later on also under the hogs settings for 50k iterations as specified in the paper. edit: left main, right this branch. recorded.mp4recorded.mp4 |
This PR implements this paper, which improves background reconstruction while preserving foreground fidelity compared to training without homogeneous coordinates.
I’d appreciate community support to verify this, but based on my tests, the results should be identical to the reference implementation. I haven't run the benchmarks yet.
You can find explanations and more results on their project page: https://kh129.github.io/hogs/