ali-vilab / UniAnimate

Code for Paper "UniAnimate: Taming Unified Video Diffusion Models for Consistent Human Image Animation".
https://unianimate.github.io/
982 stars 52 forks source link

cannot convert float NaN/infinity to integer #20

Open storyicon opened 3 months ago

storyicon commented 3 months ago

When using own uploaded videos, a large number of similar errors occur:

File "UniAnimate/dwpose/util.py", line 138, in draw_body_and_foot
    polygon = cv2.ellipse2Poly((int(mY), int(mX)), (int(length / 2), stickwidth), int(angle), 0, 360, 1)
OverflowError: cannot convert float infinity to integer
File "UniAnimate/dwpose/util.py", line 185, in draw_handpose
    x, y = keyponit
ValueError: cannot convert float NaN to integer
File "UniAnimate/dwpose/util.py", line 172, in draw_handpose
    x1 = int(x1 * W)
ValueError: cannot convert float NaN to integer
File "UniAnimate/dwpose/util.py", line 156, in draw_body_and_foot
    x = int(x * W)
OverflowError: cannot convert float infinity to integer
wangxiang1230 commented 3 months ago

Hi, this seems to be because the detected key points overflow, maybe the reason is that the uploaded video can not get the key points. It is suggested to upload a video with clear and complete human body to try again.