hzxie / Pix2Vox

The official implementation of "Pix2Vox: Context-aware 3D Reconstruction from Single and Multi-view Images". (Xie et al., ICCV 2019)

Home Page:https://haozhexie.com/project/pix2vox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Size discrepency

xphn opened this issue · comments

commented

Hi thank you so much for answering my previous question. I have successfully train/test with Pix3D dataset; however, when I tried to test with ShapeNet dataset, from time to time I would run into the following issue. It seems that output Vox is little bit off. I am wondering if you are aware of this issue?

Thanks

ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Users\peng\Desktop\pix2vox\venv_GPU\lib\site-packages\torch\utils\data_utils\worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "C:\Users\peng\Desktop\pix2vox\venv_GPU\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\peng\Desktop\pix2vox\venv_GPU\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\peng\Desktop\pix2vox\utils\data_loaders.py", line 43, in getitem
taxonomy_name, sample_name, rendering_images, volume = self.get_datum(idx)
File "C:\Users\peng\Desktop\pix2vox\utils\data_loaders.py", line 86, in get_datum
volume = utils.binvox_rw.read_as_3d_array(f)
File "C:\Users\peng\Desktop\pix2vox\utils\binvox_rw.py", line 144, in read_as_3d_array
data = np.repeat(values, counts).astype(np.int32)
File "<array_function internals>", line 180, in repeat
File "C:\Users\peng\Desktop\pix2vox\venv_GPU\lib\site-packages\numpy\core\fromnumeric.py", line 479, in repeat
return _wrapfunc(a, 'repeat', repeats, axis=axis)
File "C:\Users\peng\Desktop\pix2vox\venv_GPU\lib\site-packages\numpy\core\fromnumeric.py", line 57, in _wrapfunc
return bound(*args, **kwds)
ValueError: operands could not be broadcast together with shape (943,) (942,)

commented

I found out that the reason seems to me is that the original binvox file is broken