Following this tutorial
https://thedronetrainer.com/nerf/
https://www.youtube.com/watch?v=8pfPUN8NyZE
But it was a bit outdated but its important to understand the steps necessary.
Then tried this
https://www.youtube.com/watch?v=-ummgy1Qy00
Download this
https://github.com/NVlabs/instant-ngp
https://github.com/jonstephens85/instantngp-batch
Install NV instant NGP
Inside Scripts run > download_colmap.bat and >download_ffmpeg.bat to get colmap and ffmpeg installed
In terminal type>> pip install opencv-python to install OpenCV
Copy the 2 bat files of instantngp-batch into the NV instant NGP folder >> nerf_photos.bat and >> nerf_video.bat
In order to run your own nerfs, you need to create a folder with your photos , and drag it into the nerf_photos.bat
The bat is only helping not having to type, the rest is performed by the NV software.
Photos:
@echo off
rem Get the folder path of the dropped folder
set folderpath=%~1
rem Get parent folder of the images folder
for %%i in ("%~dp1") do set "parent_folder=%%~fi"
rem Call the colmap2nerf python script, passing the folder path as an argument
rem Modify --colmap_matcher to "sequential" if you images are taken in spatial sequence
python "%~dp0\scripts\colmap2nerf.py" --colmap_matcher exhaustive --run_colmap --aabb_scale 16 --images "%folderpath%"
rem Call the instant-ngp GUI and pass the transforms file for dataset training
%~dp0\instant-ngp.exe %parent_folder%\transforms.json
rem keep the command window open
cmd /k
Video:
@echo off
rem Get the file path of the dropped file
set filepath=%~1
rem Set the root_folder variable as the root folder of the dropped file
set root_folder=%~dp1
rem Prompt the user for the FPS value
set /p fps=Enter FPS value:
rem Call the Python script, passing the file path as an argument
python "%~dp0\scripts\colmap2nerf.py" --video_in "%filepath%" --video_fps %fps% --run_colmap --aabb_scale 16
rem Call the instant-ngp GUI and pass the transforms file for dataset training
%~dp0\instant-ngp.exe %root_folder%\transforms.json
rem keep the command window open
cmd /k
Comments