Open SleepyGinger opened 6 years ago
Faced the same issue.
Try adding the following line points=points.astype(numpy.int32)
to the draw_convex_hull
function.
def draw_convex_hull(im, points, color):
points=points.astype(numpy.int32)
points = cv2.convexHull(points)
cv2.fillConvexPoly(im, points, color=color)
This is to make the data type compatible with the cv2 function.
Was wondering if anyone else got this error...
Here is the full traceback:
File "./faceswap.py", line 208, in
mask = get_face_mask(im2, landmarks2)
File "./faceswap.py", line 120, in get_face_mask
color=1)
File "./faceswap.py", line 111, in draw_convex_hull
points = cv2.convexHull(points)
TypeError: points data type = 9 is not supported