mks0601 / 3DMPPE_ROOTNET_RELEASE

Official PyTorch implementation of "Camera Distance-aware Top-down Approach for 3D Multi-person Pose Estimation from a Single RGB Image", ICCV 2019
MIT License
477 stars 65 forks source link

About 3DPW dataset #49

Open Ared521 opened 1 year ago

Ared521 commented 1 year ago

Hi, I'm sorry to bother you, but I have a problem that has been bothering me for a long time. I want to ask you something. I downloaded 3DPW and MPII datasets to try to train ROOTNET, but the following error was reported to me. I am a single GPU and have changed num_worker = 0. Traceback (most recent call last): File "D:/DeepLearning/3DMPPE_ROOTNET/3DMPPE_ROOTNET_RELEASE-master/main/train.py", line 83, in main() File "D:/DeepLearning/3DMPPE_ROOTNET/3DMPPE_ROOTNET_RELEASE-master/main/train.py", line 43, in main for itr, (input_img, k_value, root_img, root_vis, joints_have_depth) in enumerate(trainer.batch_generator): File "D:\Software\Anaconda\envs\topdown3d\lib\site-packages\torch\utils\data\dataloader.py", line 683, in next data = self._next_data() File "D:\Software\Anaconda\envs\topdown3d\lib\site-packages\torch\utils\data\dataloader.py", line 723, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "D:\Software\Anaconda\envs\topdown3d\lib\site-packages\torch\utils\data_utils\fetch.py", line 52, in fetch return self.collate_fn(data) File "D:\Software\Anaconda\envs\topdown3d\lib\site-packages\torch\utils\data_utils\collate.py", line 175, in default_collate return [default_collate(samples) for samples in transposed] # Backwards compatibility. File "D:\Software\Anaconda\envs\topdown3d\lib\site-packages\torch\utils\data_utils\collate.py", line 175, in return [default_collate(samples) for samples in transposed] # Backwards compatibility. File "D:\Software\Anaconda\envs\topdown3d\lib\site-packages\torch\utils\data_utils\collate.py", line 149, in default_collate return default_collate([torch.as_tensor(b) for b in batch]) File "D:\Software\Anaconda\envs\topdown3d\lib\site-packages\torch\utils\data_utils\collate.py", line 141, in default_collate return torch.stack(batch, 0, out=out) RuntimeError: stack expects each tensor to be equal size, but got [] at entry 0 and [1] at entry 1

I also tried to add transforms.Resize((256, 256)) to trainset3d_loader.append(DatasetLoader ()) in base.py. I don't know how much img_size is, I tried 128. 256, but the problem was never solved. What should I do? I look forward to your explanation. Thank you very much.

mks0601 commented 1 year ago

This is because same item has different shape for each dataset.

MarigoldDrift commented 1 year ago

Hello, I have just encountered the exact same problem. How did you resolve this issue in the end?