File size: 1,802 Bytes
684943d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash

first_image=$1
last_image=$2

sam_model_path="sam/ckpt"
sam2_model_path="sam2/ckpt"
model_path="CogVideo-X/ckpt"

mkdir -p demo/rgb
cp $first_image demo/rgb/0001.png
cp $last_image demo/rgb/0002.png

# get segmentation maps
python auto-seg/auto-mask-align.py \
    --sam1_checkpoint $sam_model_path \
    --sam2_checkpoint $sam2_model_path \
    --video_path demo/rgb \
    --output_dir demo/seg \
    --level "default"

# get normal maps
python get_normal.py --base_path demo

RGB video interpolation
python video_inference.py \
    --model_path $model_path \
    --output_dir demo/video/rgb \
    --first_image demo/rgb/0001.png \
    --last_image demo/rgb/0002.png
# Segmentation map video interpolation
python video_inference.py \
    --model_path $model_path \
    --output_dir demo/video/seg \
    --first_image demo/seg/0001.png \
    --last_image demo/seg/0002.png
# Normal map video interpolation
python video_inference.py \
    --model_path $model_path \
    --output_dir demo/video/normal \
    --first_image demo/normal/0001.png \
    --last_image demo/normal/0002.png

# 3DGS field construction
mkdir -p demo/data
cp demo/seg/colors.npy demo/data

python entry_point.py \
    pipeline.rgb_video_path="demo/video/rgb/video_ckpt_800.mp4" \
    pipeline.normal_video_path="demo/video/normal/video_ckpt_800.mp4" \
    pipeline.seg_video_path="demo/video/seg/video_ckpt_800.mp4" \
    pipeline.data_path="demo/data" \
    gaussian.dataset.source_path="demo/data" \
    gaussian.dataset.model_path="demo/output" \
    pipeline.selection=False \
    gaussian.opt.max_geo_iter=1500 \
    gaussian.opt.normal_optim=True \
    gaussian.opt.optim_pose=False \
    pipeline.skip_video_process=False \
    pipeline.skip_pose_estimate=False \
    pipeline.skip_lang_feature_extraction=False