EverybodyDanceNow_reproduce_pytorch
EverybodyDanceNow_reproduce_pytorch copied to clipboard
ValueError: zero-size array to reduction operation minimum which has no identity
Hello,
I met the title problem in step 2 make_target.py, the 1918 image. I think the reason is pytorch version. I use pytorch 1.0.0. In line 98&99 of make_target.py
img[int(head_cord[1] - crop_size): int(head_cord[1] + crop_size), int(head_cord[0] - crop_size): int(head_cord[0] + crop_size), :]
the start index might be negative when the person is on the edge of images. So I add a constraint on it :
head = img[max(0, int(head_cord[1] - crop_size)): int(head_cord[1] + crop_size), max(0, int(head_cord[0] - crop_size)): int(head_cord[0] + crop_size), :]
This would guarantee the index at least be 0.
Thank you very much for your advice. If you find any further problems in the future, you can let me know at any time. :)
Hello,
I met the title problem in step 2 make_target.py, the 1918 image. I think the reason is pytorch version. I use pytorch 1.0.0. In line 98&99 of make_target.py
img[int(head_cord[1] - crop_size): int(head_cord[1] + crop_size), int(head_cord[0] - crop_size): int(head_cord[0] + crop_size), :]
the start index might be negative when the person is on the edge of images. So I add a constraint on it :
head = img[max(0, int(head_cord[1] - crop_size)): int(head_cord[1] + crop_size), max(0, int(head_cord[0] - crop_size)): int(head_cord[0] + crop_size), :]
This would guarantee the index at least be 0.
Thank you very much!