instant ngp简单复现demo
github地址:GitHub - NVlabs/instant-ngp: Instant neural graphics primitives: lightning fast NeRF and more
配置要求:
我用的win11和visual studio 2022目前没发现什么问题
`git clone --recursive https://github.com/nvlabs/instant-ngp
cd instant-ngp`
因为有很多子模块,下载速度会比较慢,而且有的子模块会不能下载。
`Cloning into 'E:/instant-ngp/dependencies/tinylogger'...
fatal: unable to access 'https://github.com/Tom94/tinylogger/': Failed to connect to github.com port 443 after 21104 ms: Timed out
fatal: clone of 'https://github.com/Tom94/tinylogger' into submodule path 'E:/instant-ngp/dependencies/tinylogger' failed
Failed to clone 'dependencies/tinylogger'. Retry scheduled`
Cloning into 'E:/instant-ngp/dependencies/eigen'...
fatal: unable to access 'https://github.com/Tom94/eigen/': Send failure: Connection was reset
fatal: clone of 'https://github.com/Tom94/eigen' into submodule path 'E:/instant-ngp/dependencies/eigen' failed
Failed to clone 'dependencies/eigen'. Retry scheduled
解决办法:给子模块的链接单独设置了代理
#git config <option> <value>
git config submodule.dependencies/eigen.url https://ghproxy.com/https://github.com/Tom94/eigen
git submodule update --init --recursive
然后就可以编译了。
cmake . -B build
cmake --build build --config RelWithDebInfo -j
编译成功后出现可执行文件build/testbed
运行小狐狸demo
instant-ngp> .\build\testbed --scene data\nerf\fox
下载zip后解压到对应路径不可行。因为git clone 的包包含修改历史,下载的没有,只有最终状态。检查版本或者校验和的时候可能会没结果。或许可以单独git clone再移动。