-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetect.py
26 lines (19 loc) · 952 Bytes
/
detect.py
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
import os
# Training
GPU_ID = 0
DISPLAY_ID = GPU_ID * 10 + 10
NAME = 'pifu_demo/rp_Man'
# Network configuration
BATCH_SIZE = 1
MLP_DIM = '257 1024 512 256 128 1'
MLP_DIM_COLOR = '513 1024 512 256 128 3'
# Reconstruction resolution
# NOTE: one can change here to reconstruct mesh in a different resolution.
VOL_RES = 256
CHECKPOINTS_NETG_PATH = './checkpoints/example/netG_epoch_1'
CHECKPOINTS_NETC_PATH = './checkpoints/example/netC_epoch_2'
TEST_FOLDER_PATH = './sample_images/rp_Man'
# Command
os.environ['CUDA_VISIBLE_DEVICES'] = str(GPU_ID)
cmd = f"python ./apps/eval.py --name {NAME} --batch_size {BATCH_SIZE} --mlp_dim {MLP_DIM} --mlp_dim_color {MLP_DIM_COLOR} --num_stack 4 --num_hourglass 2 --resolution {VOL_RES} --hg_down ave_pool --norm group --norm_color group --test_folder_path {TEST_FOLDER_PATH} --load_netG_checkpoint_path {CHECKPOINTS_NETG_PATH} --load_netC_checkpoint_path {CHECKPOINTS_NETC_PATH} --num_views 4"
os.system(cmd)