chenhsuanlin / bundle-adjusting-NeRF

BARF: Bundle-Adjusting Neural Radiance Fields 🤮 (ICCV 2021 oral)
MIT License
793 stars 114 forks source link

Reduce memory consumption by gathering a subset of rays earlier #41

Open sirykd opened 2 years ago

sirykd commented 2 years ago

Hi, First of all, great work! Enjoyed your paper, project page, and code (neat options parser, btw!).

I'd like to contribute a small change which makes GPU memory consumption wrt the output image size scale much nicer. I encountered the issue when I tried fitting some pretty big images, which resulted in OOM.

Here you can see a before/after comparison of GPU% usage on a Tesla T4 for the "ship" scene:

Main This PR
400x400 30.43% 24.98%
800x800 55.78% 28.67%