CoolFace
Apppublic

LPDoctor/AIGC-3D

sourceHugging Faceupdated 2y agoView on Hugging Face
3likes
image_to_3d_std_separately.sh54 linesDownload Raw Back to scripts
1# !/usr/bin/bash 2# ------------------------------------3#      stage     | Minimum Memory Support4# ------------------------------------5# text_to_image  | ~14G6# ------------------------------------7# image_to_views | lite ~8G8# image_to_views | std ~16G9# ------------------------------------10# views_to_mesh  | ~10G (90000 faces)11# ------------------------------------12 13# Usage: 14# bash scripts/image_to_3d_std_separately.sh ./demos/example_000.png ./outputs/test15# # need Memory > 16G16 17rgb_path=$118save_folder=$2 19 20# init21use_lite=false22do_texture_mapping=true23max_faces_num=9000024 25 26mkdir -p $save_folder27 28python infer/removebg.py \29    --rgb_path $rgb_path \30    --output_rgba_path $save_folder/img_nobg.png \31&& \32python infer/image_to_views.py \33    --rgba_path $save_folder/img_nobg.png \34    --output_views_path $save_folder/views.jpg \35    --output_cond_path $save_folder/cond.jpg \36    --seed 0 \37    --steps 50 \38    --device "cuda:0" \39    --use_lite $use_lite \40&& \41python infer/views_to_mesh.py \42    --views_path $save_folder/views.jpg \43    --cond_path $save_folder/cond.jpg \44    --save_folder $save_folder \45    --max_faces_num $max_faces_num \46    --mv23d_cfg_path ./svrm/configs/svrm.yaml \47    --mv23d_ckt_path ./weights/svrm/svrm.safetensors \48    --device "cuda:0" \49    --use_lite $use_lite \50    --do_texture_mapping ${do_texture_mapping} \51&& \52python infer/gif_render.py \53    --mesh_path $save_folder/mesh.obj \54    --output_gif_path $save_folder/output.gif