Skip to content

Commit da6a5d3

Browse files
committed
misc: add direct PLY file loading and rendering
1 parent d82742e commit da6a5d3

File tree

5 files changed

+1601
-1
lines changed

5 files changed

+1601
-1
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,6 @@ examples/benchmarks/compression/rebuttal
145145
examples/benchmarks/viewer
146146

147147
examples/readme_on_STG.md
148-
examples/benchmarks/stg/old
148+
examples/benchmarks/stg/old
149+
150+
examples/benchmarks/mpeg

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ pip install .
3030
## Examples
3131

3232
**Preparations**
33+
3334
Same as gsplat, we need to install some extra dependencies and download the relevant datasets before the evaluation.
3435

3536
```bash
@@ -82,6 +83,15 @@ cd examples
8283
bash benchmarks/dyngs/export_plys.sh
8384
```
8485

86+
**Load .ply File and Render**
87+
88+
If you want to directly read and render splats exported as PLY files, you can use the following script.
89+
Note: You need to modify the PLY file path in the scripts.
90+
```bash
91+
cd examples
92+
bash benchmarks/load_ply_and_render.sh
93+
```
94+
8595
## Contributors
8696

8797
This project is developed by the following contributors:
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
SCENE_DIR=data/tandt
2+
SCENE_LIST="truck"
3+
SCENE=truck
4+
5+
PLY_FILE=./results/Ours_TT/truck/ply/splats.ply
6+
7+
RESULT_DIR=results/ply_rendering
8+
9+
for SCENE in $SCENE_LIST;
10+
do
11+
CUDA_VISIBLE_DEVICES=0 python ply_loader_renderer.py mcmc --disable_viewer --data_factor 1 \
12+
--data_dir $SCENE_DIR/$SCENE/ \
13+
--result_dir $RESULT_DIR/$SCENE/ \
14+
--lpips_net vgg \
15+
--compression png \
16+
--ply_path $PLY_FILE
17+
done
18+
19+
# Zip the compressed files and summarize the stats
20+
if command -v zip &> /dev/null
21+
then
22+
echo "Zipping results"
23+
python benchmarks/compression/summarize_stats.py --results_dir $RESULT_DIR --scenes $SCENE_LIST
24+
else
25+
echo "zip command not found, skipping zipping"
26+
fi

0 commit comments

Comments
 (0)