Pytorch_Realtime_Multi-Person_Pose_Estimation icon indicating copy to clipboard operation
Pytorch_Realtime_Multi-Person_Pose_Estimation copied to clipboard

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

Open RZJM opened this issue 6 years ago • 3 comments

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!

RZJM avatar Nov 28 '17 13:11 RZJM

Don't understand the question.

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

last-one avatar Nov 28 '17 16:11 last-one

Thanks for your quick response.

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

RZJM avatar Nov 29 '17 13:11 RZJM

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.

qy-feng avatar Dec 21 '17 01:12 qy-feng