gaussian-splatting/docker/run.sh

34 lines
1.1 KiB
Bash
Raw Normal View History

2023-10-25 15:57:21 +00:00
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
2023-10-30 14:40:34 +00:00
#cd ..
2023-10-25 15:57:21 +00:00
mkdir -p $1-data/input
mkdir -p $1-data/output
2023-10-25 18:05:06 +00:00
FPS="5" #<-change this to change framerate
2023-10-25 19:01:43 +00:00
if [ -f $1-data/input/0001.jpg ]
2023-10-25 18:05:06 +00:00
then
echo "File $1 appears to have already been split .."
else
ffmpeg -i $1 -qscale:v 1 -qmin 1 -vf fps=$FPS $1-data/input/%04d.jpg
fi
2023-10-25 15:57:21 +00:00
2023-10-28 23:33:24 +00:00
python3.10 convert.py -s $1-data/ --camera SIMPLE_RADIAL --no_gpu #GPU produces worse results (?)
2023-11-02 20:00:49 +00:00
python3.10 train.py -s $1-data/ -r 1 --model_path=$1-data/output/ --position_lr_init 0.000016 --position_lr_final 0.000001 --scaling_lr 0.001 --iterations 100000 #Test more training budget
2023-10-25 15:57:21 +00:00
2023-10-31 16:03:28 +00:00
python3.10 3dgsconverter/3dgsconverter.py -i $1-data/output/point_cloud/iteration_30000/point_cloud.ply -o $1-data/output/point_cloud/iteration_30000/output_cc.ply -f cc --rgb --density_filter --remove_flyers
python3.10 3dgsconverter/3dgsconverter.py -i $1-data/output/output/point_cloud/iteration_30000/output_cc.ply -o $1-data/output/output/point_cloud/iteration_30000/point_cloud_clean.ply -f 3dgs
2023-10-28 20:20:04 +00:00
#pack it in
2023-10-28 21:03:22 +00:00
#tar cvfjh "$1.tar.bz2" $1-data/
2023-10-28 20:20:04 +00:00
2023-10-25 15:57:21 +00:00
exit 0