-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconvert
More file actions
executable file
·33 lines (30 loc) · 1006 Bytes
/
convert
File metadata and controls
executable file
·33 lines (30 loc) · 1006 Bytes
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
#!/bin/bash
(
source ./detect-python
cd ml-sharp &&
if [ -z "$( ls -A '../input' )" ]; then
echo "No files found in the ./input folder, exiting quietly"
exit 0
fi
for file in ../input/*; do
echo "Current input file is $file"
BASE=`basename "$file" .jpg` || exit 1
if [ -f "../output/$BASE.ply" ]; then
echo "../output/$BASE.ply exists, skipping"
else
# Generate splat from photo
echo "Running the sharp model to create a .ply splat file..."
time sharp predict -i "$file" -o ../output || exit 1
fi
if [ -f "../output/$BASE-reduced.ply" ]; then
echo "../output/$BASE-reduced.ply exists, skipping"
else
# Decimate (adjust --percentage as needed)
echo "Creating reduced-size version for Quest 3 compatibility..."
time python Gaussian_Decimator/decimate.py \
--path_to_model "../output/$BASE.ply" \
--save_path "../output/$BASE-reduced.ply" || exit 1
fi
done
) &&
echo "Conversion complete."