Open yogesh030 opened 1 year ago
Any Update on this issue?
i am facing same issue please help
this problem is caused by seamless clone, I have a less optimal approach to solve this problem.
Modify the "location" variable in /src/utils/paste_pic.py.
location = (min((ox1 + ox2 ) // 2, frame_w - (ox2 - ox1 ) // 2), min((oy1 + oy2) // 2, frame_h - (oy2 - oy1) // 2))
This will cause a problem of inconsistency between the upper and lower images, but it won't have a significant impact in the videos I generate.
+1
找到问题了,原因是图片的像素大小的问题, 这里面要求图片的长宽需要能被16整除,修改图片大小之后一切正常,点赞吧!~
this problem is caused by seamless clone, I have a less optimal approach to solve this problem. Modify the "location" variable in /src/utils/paste_pic.py.
location = (min((ox1 + ox2 ) // 2, frame_w - (ox2 - ox1 ) // 2), min((oy1 + oy2) // 2, frame_h - (oy2 - oy1) // 2))
This will cause a problem of inconsistency between the upper and lower images, but it won't have a significant impact in the videos I generate.
This is still generating distorted output to me with an image of 560 × 640 dimensions and the --preprocess full parameter activated.
-215:Assertion failed
Traceback (most recent call last): File "E:\SadTalker\inference.py", line 144, in
main(args)
File "E:\SadTalker\inference.py", line 87, in main
result = animate_from_coeff.generate(data, save_dir, pic_path, crop_info, \
File "E:\SadTalker\src\facerender\animate.py", line 230, in generate
paste_pic(path, pic_path, crop_info, new_audio_path, full_video_path, extended_crop= True if 'ext' in preprocess.lower() else False)
File "E:\SadTalker\src\utils\paste_pic.py", line 63, in paste_pic
gen_img = cv2.seamlessClone(p, full_img, mask, location, cv2.NORMAL_CLONE)
cv2.error: OpenCV(4.8.0) D:\a\opencv-python\opencv-python\opencv\modules\core\src\matrix.cpp:809: error: (-215:Assertion failed) 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows in function 'cv::Mat::Mat'
this is where the error pops out.
What can be the solution?