File size: 1,730 Bytes
1ac2018
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
export PYTHONWARNINGS="ignore"


# Blender installation configuration
BLENDER_LINK='https://download.blender.org/release/Blender3.0/blender-3.0.1-linux-x64.tar.xz'
BLENDER_INSTALLATION_PATH='/tmp'
export BLENDER_HOME="${BLENDER_INSTALLATION_PATH}/blender-3.0.1-linux-x64/blender"

# Function to install Blender
install_blender() {
    if [ ! -f "$BLENDER_HOME" ]; then
        echo "Installing Blender..."
        sudo apt-get update
        sudo apt-get install -y libxrender1 libxi6 libxkbcommon-x11-0 libsm6
        wget "$BLENDER_LINK" -P "$BLENDER_INSTALLATION_PATH"
        tar -xvf "${BLENDER_INSTALLATION_PATH}/blender-3.0.1-linux-x64.tar.xz" -C "$BLENDER_INSTALLATION_PATH"
        echo "Blender installed at $BLENDER_HOME"
    else
        echo "Blender already installed at $BLENDER_HOME"
    fi
}

install_blender

# Appearance Guidance (with rendered image)
# python run.py \
#   --guidance_mode appearance \
#   --appearance_mesh examples/B07QC84LP1.glb \
#   --structure_mesh examples/example1.glb \
#   --output_dir outputs/experiment1 \
#   --convert_yup_to_zup \

# # Appearance Guidance
# python run.py \
#   --guidance_mode appearance \
#   --appearance_mesh examples/B07QC84LP1.glb \
#   --structure_mesh examples/example1.glb \
#   --output_dir outputs/experiment2 \
#   --appearance_image examples/B07QC84LP1_orig.png \
#   --convert_yup_to_zup

# Similarity Guidance
python run.py \
  --guidance_mode similarity \
  --structure_mesh examples/example1.glb \
  --output_dir outputs/experiment3 \
  --appearance_text "A light-colored wooden chair with a straight-back design, cushioned rectangular backrest and seat in light beige, slightly outward back legs, and tapered front legs." \
  --convert_yup_to_zup