Last active
September 26, 2023 08:22
-
-
Save ras0q/782e72e100757b551bb6838fb8f103c3 to your computer and use it in GitHub Desktop.
setup https://github.com/graphdeco-inria/gaussian-splatting on Windows 11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # INFO: Run this command on graphdeco-inria/gaussian-splatting project root | |
| # check commands | |
| Get-Command "conda" || { Write-Error "conda is required" && Exit } | |
| Get-Command "ninja" || { Write-Error "ninja is required" && Exit } | |
| # setup CUDA 11.8 | |
| (nvcc -V | Select-String -Pattern "11.8") || { Write-Error "CUDA 11.8 is required" && Exit } | |
| $env:CUDA_HOME = (Get-Command nvcc).Path | Split-Path -Parent | Split-Path -Parent | |
| # setup Visual Studio 2022 | |
| # pass env-vars to powershell | |
| cmd.exe /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vars.txt" | |
| Get-Content "${env:temp}\vars.txt" | Foreach-Object { | |
| if ($_ -match "^(.*?)=(.*)$") { | |
| Set-Content "env:\$($matches[1])" $matches[2] | |
| } | |
| } | |
| # force distutils to use Visual Studio | |
| $env:DISTUTILS_USE_SDK = 1 | |
| # setup conda | |
| if (conda env list | Select-String -Pattern "gaussian_splatting") { | |
| conda env update | |
| } | |
| else { | |
| conda env create --file environment.yml | |
| } | |
| conda activate gaussian_splatting | |
| # install binaries | |
| New-Item -ItemType Directory -Force -Path bin | |
| # COLMAP | |
| Invoke-WebRequest "https://github.com/colmap/colmap/releases/latest/download/COLMAP-3.8-windows-cuda.zip" -OutFile "${env:temp}/COLMAP-3.8-windows-cuda.zip" | |
| Expand-Archive -Path "${env:temp}/COLMAP-3.8-windows-cuda.zip" -DestinationPath bin -Force | |
| Remove-Item "${env:temp}/COLMAP-3.8-windows-cuda.zip" | |
| # Viewer | |
| Invoke-WebRequest "https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/binaries/viewers.zip" -OutFile "${env:temp}/viewers.zip" | |
| Expand-Archive -Path "${env:temp}/viewers.zip" -DestinationPath bin/viewers -Force | |
| Remove-Item "${env:temp}/viewers.zip" | |
| Write-Output "Setup complete. Next steps:" | |
| Write-Output "1. $ ffmpeg -i { { input.mp4 } } -r { { frame rate } } { { images_dir } }/input/frame%04d.png" | |
| Write-Output "2. $ python convert.py --colmap_executable bin/COLMAP-3.8-windows-cuda/COLMAP.bat -s { { images_dir } }" | |
| Write-Output "3. $ python train.py -s { { images_dir } }" | |
| Write-Output "4. $ ./bin/viewers/bin/SIBR_gaussianViewer_app.exe -m ./output/ { { newly trained model } }" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment