Closed premchedella closed 2 years ago
Thanks for the links. It seems conda environment is not able to find cl.exe in it's path. I am using Windows work station. Let me figure it out.
I was able to solve the subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1
. by adding cl.exe to the system path in the windows.
For example
set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64
I am able to run the demo.py with the example_yud.jpg file.
With .png file, I am getting the run-time error.
(D:\KAUST\projects\datasets\street_sings\env) D:\KAUST\projects\datasets\street_sings\VanishingPoint_HoughTransform_GaussianSphere>python demo.py -d 0 config\nyu.yaml checkpoints\nyu\checkpoint_latest.pth.tar example_yud.jpg
<Box: {'io': {'logdir': 'logs/', 'resume_from': None, 'dataset': 'NYU', 'datadir': 'dataset/nyu_vp/processed_data', 'ht_mapping': 'parameterization/nyu/ht_240_320_403_180.npz', 'sphere_mapping': 'parameterization/nyu/sphere_neighbors_403_180_32768.npz', 'focal_length': 1.0, 'num_neighbors': 20, 'num_vpts': None, 'num_nodes': 32768, 'percentage': 1, 'num_workers': 2}, 'model': {'batch_size': 3, 'backbone': 'stacked_hourglass', 'depth': 4, 'num_stacks': 1, 'num_blocks': 1, 'lpos': 1.0, 'lneg': 1.0, 'num_channels': 64, 'im2col_step': 32}, 'optim': {'name': 'Adam', 'lr': 0.0004, 'amsgrad': True, 'weight_decay': 1e-05, 'max_epoch': 36, 'lr_decay_epoch': 24}}>
Let's use 1 GPU(s)!
kth, device name 0 NVIDIA TITAN Xp
vote_ht_dict memory MB torch.Size([13824000, 3]) 158.203125
vote_sphere_dict memory MB 32768 torch.Size([17134246, 3]) 196.08588409423828
#################### im2ht compiling ############################
#################### done! ############################
#################### ht2im compiling ############################
#################### done! ############################
#################### ht2sphere compiling ############################
#################### done! ############################
############# MultiscaleRadiusGraph ######################################
args["<checkpoint>"] checkpoints\nyu\checkpoint_latest.pth.tar
checkpoint 29376 35
num of total parameters 7997443
num of trainable parameters 6686723
processing: example_yud.jpg
D:\KAUST\projects\datasets\street_sings\env\lib\site-packages\sklearn\neighbors\_base.py:199: EfficiencyWarning: Precomputed sparse input was not sorted by data.
warnings.warn(
(D:\KAUST\projects\datasets\street_sings\env) D:\KAUST\projects\datasets\street_sings\VanishingPoint_HoughTransform_GaussianSphere>python demo.py -d 0 config\nyu.yaml checkpoints\nyu\checkpoint_latest.pth.tar image_10.png
<Box: {'io': {'logdir': 'logs/', 'resume_from': None, 'dataset': 'NYU', 'datadir': 'dataset/nyu_vp/processed_data', 'ht_mapping': 'parameterization/nyu/ht_240_320_403_180.npz', 'sphere_mapping': 'parameterization/nyu/sphere_neighbors_403_180_32768.npz', 'focal_length': 1.0, 'num_neighbors': 20, 'num_vpts': None, 'num_nodes': 32768, 'percentage': 1, 'num_workers': 2}, 'model': {'batch_size': 3, 'backbone': 'stacked_hourglass', 'depth': 4, 'num_stacks': 1, 'num_blocks': 1, 'lpos': 1.0, 'lneg': 1.0, 'num_channels': 64, 'im2col_step': 32}, 'optim': {'name': 'Adam', 'lr': 0.0004, 'amsgrad': True, 'weight_decay': 1e-05, 'max_epoch': 36, 'lr_decay_epoch': 24}}>
Let's use 1 GPU(s)!
kth, device name 0 NVIDIA TITAN Xp
vote_ht_dict memory MB torch.Size([13824000, 3]) 158.203125
vote_sphere_dict memory MB 32768 torch.Size([17134246, 3]) 196.08588409423828
#################### im2ht compiling ############################
#################### done! ############################
#################### ht2im compiling ############################
#################### done! ############################
#################### ht2sphere compiling ############################
#################### done! ############################
############# MultiscaleRadiusGraph ######################################
args["<checkpoint>"] checkpoints\nyu\checkpoint_latest.pth.tar
checkpoint 29376 35
num of total parameters 7997443
num of trainable parameters 6686723
processing: image_10.png
warning: images resized to [480, 640]!
Traceback (most recent call last):
File "D:\KAUST\projects\datasets\street_sings\VanishingPoint_HoughTransform_GaussianSphere\demo.py", line 253, in <module>
main()
File "D:\KAUST\projects\datasets\street_sings\VanishingPoint_HoughTransform_GaussianSphere\demo.py", line 211, in main
result = model(input_dict)
File "D:\KAUST\projects\datasets\street_sings\env\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "D:\KAUST\projects\datasets\street_sings\env\lib\site-packages\torch\nn\parallel\data_parallel.py", line 166, in forward
return self.module(*inputs[0], **kwargs[0])
File "D:\KAUST\projects\datasets\street_sings\env\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "D:\KAUST\projects\datasets\street_sings\VanishingPoint_HoughTransform_GaussianSphere\vpd\models\vanishing_net.py", line 36, in forward
x = self.backbone(image)[0]
File "D:\KAUST\projects\datasets\street_sings\env\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "D:\KAUST\projects\datasets\street_sings\VanishingPoint_HoughTransform_GaussianSphere\vpd\models\hourglass_pose.py", line 177, in forward
x = self.conv1(x)
File "D:\KAUST\projects\datasets\street_sings\env\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "D:\KAUST\projects\datasets\street_sings\env\lib\site-packages\torch\nn\modules\conv.py", line 457, in forward
return self._conv_forward(input, self.weight, self.bias)
File "D:\KAUST\projects\datasets\street_sings\env\lib\site-packages\torch\nn\modules\conv.py", line 453, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [64, 3, 7, 7], expected input[1, 4, 480, 640] to have 3 channels, but got 4 channels instead
Is demo.py works only with .jpg file?
input is expected to be RGB. It seems your input has 4 channels.
input is expected to be RGB. It seems your input has 4 channels.
Yes, I do agree with you. PNG file has 4 channels where as JPG has 3 channels. With the JPG file, it works.
You can close this issue. Thanks for the support.
For one of our project, we would like to use this project.
python demo.py -d 0 config\nyu.yaml checkpoints\nyu\checkpoint_latest.pth.tar example_yud.jpg
Results the following error.
Created and checkpoints and parameterization directories and then copied necessary files from the https://surfdrive.surf.nl/files/index.php/s/nKOCFAgZxulxHH0?path=%2FNYU.
Could you please help me to solve the error. Thanks