Closed Jarvis3310 closed 2 years ago
when i run !sh ./scripts/test.sh return this message, how could i fix?
!sh ./scripts/test.sh
+ GPU_ID=0 + DISPLAY_ID=10 + NAME=pifu_demo + BATCH_SIZE=1 + MLP_DIM=257 1024 512 256 128 1 + MLP_DIM_COLOR=513 1024 512 256 128 3 + VOL_RES=256 + CHECKPOINTS_NETG_PATH=./checkpoints/net_G + CHECKPOINTS_NETC_PATH=./checkpoints/net_C + TEST_FOLDER_PATH=./sample_images + CUDA_VISIBLE_DEVICES=0 python ./apps/eval.py --name pifu_demo --batch_size 1 --mlp_dim 257 1024 512 256 128 1 --mlp_dim_color 513 1024 512 256 128 3 --num_stack 4 --num_hourglass 2 --resolution 256 --hg_down ave_pool --norm group --norm_color group --test_folder_path ./sample_images --load_netG_checkpoint_path ./checkpoints/net_G --load_netC_checkpoint_path ./checkpoints/net_C initialize network with normal Using Network: hgpifu loading for net C ... ./checkpoints/net_C initialize network with normal num; 1 0it [00:00, ?it/s]./sample_images/abc.png ./sample_images/abc_mask.png error: ('The size of tensor a (85) must match the size of tensor b (84) at non-singleton dimension 2',) 1it [00:06, 6.00s/it]
I solved it, the input image needs to be square, so I added this img1 = cv2.resize(img1, (512, 512), interpolation=cv2.INTER_AREA) to the generated blackwhite program
img1 = cv2.resize(img1, (512, 512), interpolation=cv2.INTER_AREA)
when i run
!sh ./scripts/test.sh
return this message, how could i fix?