warmshao / FasterLivePortrait

Bring portraits to life in Real Time!onnx/tensorrt support!实时肖像驱动!
460 stars 43 forks source link

Error with windows fast installation #85

Open yohlimem opened 2 weeks ago

yohlimem commented 2 weeks ago

Traceback (most recent call last): File "D:\FasterLivePortrait-windows-20240811\run.py", line 86, in dri_crop = cv2.resize(dri_crop, (512, 512)) cv2.error: OpenCV(4.10.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\resize.cpp:4152: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

nvcc --version: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2023 NVIDIA Corporation Built on Tue_Jun_13_19:42:34_Pacific_Daylight_Time_2023 Cuda compilation tools, release 12.2, V12.2.91 Build cuda_12.2.r12.2/compiler.32965470_0

I think the model returns None but I'm not 100% sure. Any help would be great.

mmattyg commented 2 weeks ago

I'm getting a similiar problem. It looks like the onnx models are returning empty (None) results.

Any good way to debug this?

yohlimem commented 2 weeks ago

It looks like if I set the cfg file to configs/onnx_mp_infer.yaml The media pip config is not working, and after that, NOTHING is working anymore (even if going back to regular onnx_infer.yaml) It just breaks everything somehow.

Anyone has any idea what could be going wrong? Only workaround I found is reinstalling everything..

yohlimem commented 2 weeks ago

update: it's still working with a driving video, just not with the camera as a driving source still weird..

leetraman822 commented 2 weeks ago

👋Hello, the cv:resize error could be due to your camera not working, being occupied, or not detecting a face within it. Before running run.py, ensure there is a clear, visible face in the camera's view. This significantly reduces the occurrence of cv:resize errors. In rare cases, despite meeting all previous conditions, the cv:resize error might still occasionally appear. This could be because, during face detection, the face was not successfully recognized in that particular frame due to lighting or angle issues. Nonetheless, this approach is generally effective.🙂

warmshao commented 2 weeks ago

👋Hello, the cv:resize error could be due to your camera not working, being occupied, or not detecting a face within it. Before running run.py, ensure there is a clear, visible face in the camera's view. This significantly reduces the occurrence of cv:resize errors. In rare cases, despite meeting all previous conditions, the cv:resize error might still occasionally appear. This could be because, during face detection, the face was not successfully recognized in that particular frame due to lighting or angle issues. Nonetheless, this approach is generally effective.🙂

Thank you, I will handle this kind of error in the code update later.