hzxie / Pix2Vox

The official implementation of "Pix2Vox: Context-aware 3D Reconstruction from Single and Multi-view Images". (Xie et al., ICCV 2019)
https://haozhexie.com/project/pix2vox
MIT License
473 stars 115 forks source link

Cannot reproduce test results on colab using pretrained weights #29

Closed PradeepSinghMakwana closed 4 years ago

PradeepSinghMakwana commented 4 years ago

Here is the error ... [WARN] 2020-04-14 14:24:54.128112 Ignore sample 04530566/94a0345790869eace074faa875b76f82 since volume file not exists. [WARN] 2020-04-14 14:24:54.128126 Ignore sample 04530566/705df680888e17ed8841beb2e0280e42 since volume file not exists. [WARN] 2020-04-14 14:24:54.128140 Ignore sample 04530566/b4f254a5c49748a2db2b485c26c9f191 since volume file not exists. [INFO] 2020-04-14 14:24:54.128153 Complete collecting files of the dataset. Total files: 0. Downloading: "https://download.pytorch.org/models/vgg16_bn-6c64b313.pth" to /root/.cache/torch/checkpoints/vgg16_bn-6c64b313.pth 100% 528M/528M [00:29<00:00, 18.8MB/s] [INFO] 2020-04-14 14:25:34.705290 Loading weights from ../Pix2Vox-A-ShapeNet.pth ... [INFO/Process-1] child process calling self.run() [INFO/Process-1] process shutting down [INFO/Process-1] process exiting with exitcode 0 /content/Pix2Vox/core/test.py:168: RuntimeWarning: invalid value encountered in double_scalars mean_iou = np.sum(mean_iou, axis=0) / n_samples ============================ TEST RESULTS ============================ Taxonomy #Sample Baseline t=0.20 t=0.30 t=0.40 t=0.50
Overall Traceback (most recent call last): File "runner.py", line 93, in main() File "runner.py", line 77, in main test_net(cfg) File "/content/Pix2Vox/core/test.py", line 192, in test_net for mi in mean_iou: TypeError: 'numpy.float64' object is not iterable [INFO/MainProcess] process shutting down

PradeepSinghMakwana commented 4 years ago

Note: I haven't updated the config C.DATASETS.SHAPENET.RENDERING_PATH = '/path/to/Datasets/ShapeNet/ShapeNetRendering/%s/%s/rendering/%02d.png' __C.DATASETS.SHAPENET.VOXEL_PATH = '/path/to/Datasets/ShapeNet/ShapeNetVox32/%s/%s/model.binvox' C.DATASETS.PASCAL3D.ANNOTATION_PATH = '/path/to/Datasets/PASCAL3D/Annotations/%s_imagenet/%s.mat' C.DATASETS.PASCAL3D.RENDERING_PATH = '/path/to/Datasets/PASCAL3D/Images/%s_imagenet/%s.JPEG' C.DATASETS.PASCAL3D.VOXEL_PATH = '/path/to/Datasets/PASCAL3D/CAD/%s/%02d.binvox' C.DATASETS.PIX3D.ANNOTATION_PATH = '/path/to/Datasets/Pix3D/pix3d.json' __C.DATASETS.PIX3D.RENDERING_PATH = '/path/to/Datasets/Pix3D/img/%s/%s.%s' C.DATASETS.PIX3D.VOXEL_PATH = '/path/to/Datasets/Pix3D/model/%s/%s/%s.binvox'

PradeepSinghMakwana commented 4 years ago

I am sorry for creating this issue, I feel stupid now. Since, I am using a pretrained modal. I was looking for a simple demo "Hello World" test file to test the application of this modal. But it was train-test part of Machine Learning that requires data to evaluate the results on a metrics. I am closing this issue.

fabr0d commented 4 years ago

Here is the error ... [WARN] 2020-04-14 14:24:54.128112 Ignore sample 04530566/94a0345790869eace074faa875b76f82 since volume file not exists. [WARN] 2020-04-14 14:24:54.128126 Ignore sample 04530566/705df680888e17ed8841beb2e0280e42 since volume file not exists. [WARN] 2020-04-14 14:24:54.128140 Ignore sample 04530566/b4f254a5c49748a2db2b485c26c9f191 since volume file not exists. [INFO] 2020-04-14 14:24:54.128153 Complete collecting files of the dataset. Total files: 0. Downloading: "https://download.pytorch.org/models/vgg16_bn-6c64b313.pth" to /root/.cache/torch/checkpoints/vgg16_bn-6c64b313.pth 100% 528M/528M [00:29<00:00, 18.8MB/s] [INFO] 2020-04-14 14:25:34.705290 Loading weights from ../Pix2Vox-A-ShapeNet.pth ... [INFO/Process-1] child process calling self.run() [INFO/Process-1] process shutting down [INFO/Process-1] process exiting with exitcode 0 /content/Pix2Vox/core/test.py:168: RuntimeWarning: invalid value encountered in double_scalars mean_iou = np.sum(mean_iou, axis=0) / n_samples ============================ TEST RESULTS ============================ Taxonomy #Sample Baseline t=0.20 t=0.30 t=0.40 t=0.50 Overall Traceback (most recent call last): File "runner.py", line 93, in main() File "runner.py", line 77, in main test_net(cfg) File "/content/Pix2Vox/core/test.py", line 192, in test_net for mi in mean_iou: TypeError: 'numpy.float64' object is not iterable [INFO/MainProcess] process shutting down

hi, I have the config.py file updated with my paths but when trying: run python3 runner.py --test --weights = / path / to / pretrained / model.pth with the correct path it returns the same error, could you explain in more detail how you solved them, thanks in advance.

hzxie commented 4 years ago

@fbrzflrsprcs Please provide the logs with the stack trace.

fabr0d commented 4 years ago

@fbrzflrsprcs Please provide the logs with the stack trace.

this is the complete message after executing "python3 runner.py --test --weights=/home/fabrod/Desktop/datasets/PIX2VOX/pretrainedmodels/Pix2Vox-A-ShapeNet.pth" command: https://raw.githubusercontent.com/fbrzflrsprcs/Proyectos1/master/message.txt

If you are referring to something else, please guide me, I am a novice.

hzxie commented 4 years ago

@fbrzflrsprcs

Obviously, there is something wrong with your voxel files. As the logs saying, all voxel files CANNOT be found.

[WARN] 2020-06-09 20:13:23.490017 Ignore sample 04530566/62255074b0df6a115fa2a5df3ce5bc40 since volume file not exists. [WARN] 2020-06-09 20:13:23.490025 Ignore sample 04530566/4b7642b98790bd4a58a8952c93ff9829 since volume file not exists. [WARN] 2020-06-09 20:13:23.490032 Ignore sample 04530566/2de6a45649b392d2f7051f81d65f99eb since volume file not exists. [WARN] 2020-06-09 20:13:23.490040 Ignore sample 04530566/fad2e708e354b0315e585de41f56d4fd since volume file not exists. [WARN] 2020-06-09 20:13:23.490047 Ignore sample 04530566/a7444ff7be7aad024c8ad92cfce1307c since volume file not exists. [WARN] 2020-06-09 20:13:23.490055 Ignore sample 04530566/94a0345790869eace074faa875b76f82 since volume file not exists. [WARN] 2020-06-09 20:13:23.490062 Ignore sample 04530566/705df680888e17ed8841beb2e0280e42 since volume file not exists. [WARN] 2020-06-09 20:13:23.490069 Ignore sample 04530566/b4f254a5c49748a2db2b485c26c9f191 since volume file not exists.

fabr0d commented 4 years ago

@fbrzflrsprcs

Obviously, there is something wrong with your voxel files. As the logs saying, all voxel files CANNOT be found.

[WARN] 2020-06-09 20:13:23.490017 Ignore sample 04530566/62255074b0df6a115fa2a5df3ce5bc40 since volume file not exists. [WARN] 2020-06-09 20:13:23.490025 Ignore sample 04530566/4b7642b98790bd4a58a8952c93ff9829 since volume file not exists. [WARN] 2020-06-09 20:13:23.490032 Ignore sample 04530566/2de6a45649b392d2f7051f81d65f99eb since volume file not exists. [WARN] 2020-06-09 20:13:23.490040 Ignore sample 04530566/fad2e708e354b0315e585de41f56d4fd since volume file not exists. [WARN] 2020-06-09 20:13:23.490047 Ignore sample 04530566/a7444ff7be7aad024c8ad92cfce1307c since volume file not exists. [WARN] 2020-06-09 20:13:23.490055 Ignore sample 04530566/94a0345790869eace074faa875b76f82 since volume file not exists. [WARN] 2020-06-09 20:13:23.490062 Ignore sample 04530566/705df680888e17ed8841beb2e0280e42 since volume file not exists. [WARN] 2020-06-09 20:13:23.490069 Ignore sample 04530566/b4f254a5c49748a2db2b485c26c9f191 since volume file not exists.

@hzxie OMG!!! I forgot to save the update of the config.py file that I did in my text editor, I can't believe something like this happened to me, a thousand apologies if I took your time for my question.

Executing the command again no longer displays error messages:

[INFO/Process-1] process shutting down [INFO/Process-1] process exiting with exitcode 0 ============================ TEST RESULTS ============================ Taxonomy #Sample Baseline t=0.20 t=0.30 t=0.40 t=0.50
aeroplane 810 0.5130 0.6665 0.6842 0.6903 0.6889
bench 364 0.4210 0.6024 0.6157 0.6203 0.6151
cabinet 315 0.7160 0.7895 0.7924 0.7919 0.7847
car 1501 0.7980 0.8476 0.8548 0.8568 0.8533
chair 1357 0.4660 0.5638 0.5666 0.5631 0.5493
display 220 0.4680 0.5347 0.5373 0.5336 0.5188
lamp 465 0.3810 0.4481 0.4430 0.4340 0.4170
speaker 325 0.6620 0.7166 0.7144 0.7090 0.6939
rifle 475 0.5440 0.6042 0.6148 0.6147 0.6050
sofa 635 0.6280 0.7061 0.7092 0.7080 0.6984
table 1703 0.5130 0.5977 0.6006 0.5983 0.5857
telephone 211 0.6610 0.7696 0.7764 0.7792 0.7783
watercraft 389 0.5130 0.5898 0.5946 0.5902 0.5779
Overall 0.6555 0.6610 0.6600 0.6506

[INFO/MainProcess] process shutting down

Thanks for responding and again a thousand apologies.