In some cases it may occur that theestimated joint keypoints provided by the model have negative coordinates.
In this case in the function parse_pose from_meta() the setting of the circle_params with xc and yc as well as the setting of the line_params with x1, y1,x2, y2 will throw a TypeError. Setting these params to negative values is not allowed.
My suggestion is to make sure, the given coordinates are not negative like:
xc = max(0, int((data[i 3 + 0] - pad_x) / gain))
yc = max(0, int((data[i 3 + 1] - pad_y) / gain))
instead of:
xc = int((data[i 3 + 0] - pad_x) / gain)
yc = int((data[i 3 + 1] - pad_y) / gain)
In some cases it may occur that theestimated joint keypoints provided by the model have negative coordinates.
In this case in the function parse_pose from_meta() the setting of the circle_params with xc and yc as well as the setting of the line_params with x1, y1,x2, y2 will throw a TypeError. Setting these params to negative values is not allowed.
My suggestion is to make sure, the given coordinates are not negative like: xc = max(0, int((data[i 3 + 0] - pad_x) / gain)) yc = max(0, int((data[i 3 + 1] - pad_y) / gain)) instead of: xc = int((data[i 3 + 0] - pad_x) / gain) yc = int((data[i 3 + 1] - pad_y) / gain)
Same for the calculation of x1, x2, y1, y2.