last-one / Pytorch_Realtime_Multi-Person_Pose_Estimation

Pytorch version of Realtime Multi-Person Pose Estimation project
MIT License
216 stars 70 forks source link

What's the inference time? And a transforms error happened. #5

Open RZJM opened 7 years ago

RZJM commented 7 years ago

Hi,

What's the  inference time (FPS) and backforward time?

BTW, I get this error when training for some steps.

Traceback (most recent call last) File "train_pose.py", line 258, in <module> train_val(model, args) File "train_pose.py", line 131, in train_val for i, (input, heatmap, vecmap, mask) in enumerate(train_loader): File "/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py", line 187, in __next__ return self._process_next_batch(batch) File "/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py", line 221, in _process_next_batch raise batch.exc_type(batch.exc_msg) ValueError: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py", line 40, in _worker_loop samples = collate_fn([dataset[i] for i in batch_indices]) File "../CocoFolder.py", line 147, in __getitem__ img, mask, kpt, center = self.transformer(img, mask, kpt, center, scale) File "../Mytransforms.py", line 437, in __call__ img, mask, kpt, center = t(img, mask, kpt, center) File "../Mytransforms.py", line 362, in __call__ return crop(img, mask, kpt, center, offset_left, offset_up, self.size[0], self.size[1]) File "../Mytransforms.py", line 306, in crop new_img[st_y: ed_y, st_x: ed_x, :] = img[or_st_y: or_ed_y, or_st_x: or_ed_x, :].copy() ValueError: could not broadcast input array from shape (368,0,3) into shape (368,218,3)

Thanks!

last-one commented 7 years ago

Don't understand the question.

And I think the cause of the error is the data error. Please check the data and debug.

RZJM commented 7 years ago

Thanks for your quick response.

I think the filename in json and images train list and mask train list must one to one match.

qy-feng commented 6 years ago

I've encountered with the same problem. With printing all the indexes like 'st_x', 'or_st_x', sometimes it turns out that 'or_st_x' > 'or_ed_x' which makes the second dimension 0. I choose to simply exchange them in that case. I'm not quite sure if it is a right choice.