-
Notifications
You must be signed in to change notification settings - Fork 672
Implement Fisheye-GS. #398
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
Implement Fisheye-GS. #398
Conversation
examples/simple_trainer.py
Outdated
| # Normalize the world space | ||
| normalize_world_space: bool = True | ||
| # Camera model | ||
| camera_model: str = "pinhole" |
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.
minor note: it would be nice to use Literal["fisheye", "pinhole"] here and elsewhere!
|
@ichsan2895 Use the dataset download script to download the fisheye dataset and then run the benchmarking script. |
liruilong940607
left a comment
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 is super cool! Thanks for consolidating the camera_model. LGTM!
|
Amazing work, can't wait to try! How can we remap our own fisheye images to an ideal fisheye equidistant camera? I use a Samyang 8mm lens on APS-C, which is very similar to the ZipNeRF dataset (12mm fisheye on full-frame I think) and also circular fisheyes from 360 cameras, which need the black edges masked out. Thanks! |
|
The dataloader will do it automatically. You just need to use COLMAP to provide the fisheye distortion parameters. Support for masks right now is not great. You will need to follow the code and feed your own masks into the training process. |
|
@jefequien I follow your comments, |
* baseline * fisheye forward works * torch implementation of fisheye projection * test basic * close 0.3% * 19 mismatched * pass tests * comment out * crashing * remove dead code * reduce diff * video * distortion not handled correctly * test remap * remove hardcoded roi * cleanup tests * fix bug * bug * edit imsize_dict * format c++ * T * use mask * remove test_remap * mask roi * scripts * reduce diff * minor * weird ortho bug * vectorize * ellipse * unify python side camera_model * fisheye packed mode * cuda enum * use c++ enum * download dataset * refactor dataset download to download zipnerf * use lists * use bilateral grid as default for zipnerf
|
@szhang963 sorry just saw this. It feels normal to me to have black surroundings. That is just how fisheye barrel distortion looks like. Illustration on this page might be helpful: |
|
@szhang963 I probably don't get why would you like to render with negative z, and unfortunately I probably don't have capacity recently too look into this. But a quick thought is that we assume gsplat/gsplat/cuda/include/Utils.cuh Line 572 in d09ba43
If consider z might be negative (tho i don't know why that is a valid case), we should update that line of code to Maybe you could try this and let me know if it resolve your issue? |
|
are you using the impl from _torch_impl to render it instead of the cuda impl? If you use the |
|
what would it look like if you render with pinhole? |
|
I don't have any idea on what might cause this. Maybe could start with checking if the same issue exists with pinhole camera by setting |
|
Thanks for doing the testing! This helps me to identify the issue: converting the depth value into bits for radixsort needs some extra care on the sign bit. should have fixed in #638 |
* baseline * fisheye forward works * torch implementation of fisheye projection * test basic * close 0.3% * 19 mismatched * pass tests * comment out * crashing * remove dead code * reduce diff * video * distortion not handled correctly * test remap * remove hardcoded roi * cleanup tests * fix bug * bug * edit imsize_dict * format c++ * T * use mask * remove test_remap * mask roi * scripts * reduce diff * minor * weird ortho bug * vectorize * ellipse * unify python side camera_model * fisheye packed mode * cuda enum * use c++ enum * download dataset * refactor dataset download to download zipnerf * use lists * use bilateral grid as default for zipnerf

This PR follows the formulation from Fisheye-GS and implements new fisheye_proj and fisheye_proj_vjp functions. This allows gsplat to train with a wider FOV and thus achieve higher metrics on the ZipNerf dataset. The images in the ZipNerf dataset need to be preprocessed by remapping them to an ideal fisheye (equidistant) camera. This PR also implements masking during training.
Results
Alameda scene with bilateral grid, fisheye, mcmc w/ 2M (CC PSNR: 23.77)
alameda_ellipse.mp4