val-iisc / 3d-lmnet

Repository for 3D-LMNet: Latent Embedding Matching for Accurate and Diverse 3D Point Cloud Reconstruction from a Single Image [BMVC 2018]
https://val-iisc.github.io/3d-lmnet/
MIT License
113 stars 24 forks source link

NameError: name 'pcl_gt_1K_scaled' is not defined #7

Closed ypzuo closed 4 years ago

ypzuo commented 5 years ago

Hi, I want use the evaluation to see the cd, emd etc. But it report the issue. I see some file but didn't find the detail. I miss something here?

ypzuo commented 5 years ago

I changed the parameter to 'pcl_gt_scaled', it worked. But another problem appeared, in the 'feed_dict={pcl_gt:batch_gt, img_inp:batch_ip}' showed the problem is 'ValueError: cannot feed value of shape(0,) for tensor u'pcl_gt:0',which has hsape '(24,1024,3) ' What should I do ?

BS1396 commented 4 years ago

I changed the parameter to 'pcl_gt_scaled', it worked. But another problem appeared, in the 'feed_dict={pcl_gt:batch_gt, img_inp:batch_ip}' showed the problem is 'ValueError: cannot feed value of shape(0,) for tensor u'pcl_gt:0',which has hsape '(24,1024,3) ' What should I do ?

Hello, did u find the solution ?

CharlesChiuGit commented 4 years ago

I changed the parameter to 'pcl_gt_scaled', it worked. But another problem appeared, in the 'feed_dict={pcl_gt:batch_gt, img_inp:batch_ip}' showed the problem is 'ValueError: cannot feed value of shape(0,) for tensor u'pcl_gt:0',which has hsape '(24,1024,3) ' What should I do ?

I changed the parameter to 'pcl_gt_scaled', it worked. But another problem appeared, in the 'feed_dict={pcl_gt:batch_gt, img_inp:batch_ip}' showed the problem is 'ValueError: cannot feed value of shape(0,) for tensor u'pcl_gt:0',which has hsape '(24,1024,3) ' What should I do ?

Hello, did u find the solution ?

Sorry for bothering, Do you guys find any solution?

CharlesChiuGit commented 4 years ago

I solve the above two problems' by changing lines: 282, 283, 285, 286, 290 in metrics.py:

273: batches = len(train_pair_indices)
274: calculate_metrics(train_models, batches, pcl_gt_1K_scaled, reconstr_img_scaled, train_pair_indices)
276: batches = len(val_pair_indices)
277: calculate_metrics(val_models, batches, pcl_gt_1K_scaled, reconstr_img_scaled, val_pair_indices)
281: batches = len(models)

into

import math
273: batches = int(math.ceil(len(train_pair_indices) / BATCH_SIZE))
274: calculate_metrics(train_models, batches, pcl_gt_scaled, reconstr_img_scaled, train_pair_indices)
276: batches = int(math.ceil(len(val_pair_indices) / BATCH_SIZE))
277: calculate_metrics(val_models, batches, pcl_gt_scaled, reconstr_img_scaled, val_pair_indices)
281: batches = int(math.ceil(len(models) / BATCH_SIZE))

If there is any misunderstanding of the code, please let me know. Thx!