hacksider / Deep-Live-Cam

real time face swap and one-click video deepfake with only a single image
GNU Affero General Public License v3.0
34.85k stars 4.91k forks source link

black square in photo and video output #72

Open moaeddy opened 1 month ago

moaeddy commented 1 month ago

This error pops up during building prcoess, and i got black square output

Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\User/.insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\User/.insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\User/.insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\User/.insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\User/.insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5 set det-size: (640, 640) Frame processor face_enhancer not found [DLC.FACE-SWAPPER] Progressing... Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} inswapper-shape: [1, 3, 128, 128] C:\Python3.12\Lib\site-packages\insightface\model_zoo\inswapper.py:56: RuntimeWarning: invalid value encoun Screenshot_1 tered in cast bgr_fake = np.clip(255 * img_fake, 0, 255).astype(np.uint8)[:,:,::-1]

hacksider commented 1 month ago

Your onnx runtime is not compatible, see the requirements.txt onnxruntime==1.18.0

moaeddy commented 1 month ago

onnxruntime was not installed, i installed it and still bring about the dark square.

c:\python3.12\lib\site-packages\onnxruntime-1.18.0.dist-info* c:\python3.12\lib\site-packages\onnxruntime* c:\python3.12\scripts\onnxruntime_test.exe Would not remove (might be manually added): c:\python3.12\lib\site-packages\onnxruntime\capi\DirectML.dll c:\python3.12\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll c:\python3.12\lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll

hacksider commented 1 month ago

Follow the installation with cuda. It seems you are trying to run it with cuda

On Tue, Aug 6, 2024 at 3:35 PM moaeddy @.***> wrote:

onnxruntime was not installed, i installed it and still bring about the dark square.

c:\python3.12\lib\site-packages\onnxruntime-1.18.0.dist-info c:\python3.12\lib\site-packages\onnxruntime c:\python3.12\scripts\onnxruntime_test.exe Would not remove (might be manually added): c:\python3.12\lib\site-packages\onnxruntime\capi\DirectML.dll

c:\python3.12\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll

c:\python3.12\lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll

— Reply to this email directly, view it on GitHub https://github.com/hacksider/Deep-Live-Cam/issues/72#issuecomment-2270586629, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJVMADYBSV4335ZSQ4THMTZQB4ERAVCNFSM6AAAAABL7AZORCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZQGU4DMNRSHE . You are receiving this because you commented.Message ID: @.***>

moaeddy commented 1 month ago

I was able to fix the cuda and the dark square display has gone, but images attached is still issue

The output is blurry

Screenshot_3 output

if i run python run.py --execution-provider cuda i got the blur face output.

if i run run.py, the dark square display still come in output

cit-gif commented 1 month ago

I have the same problem as you but after I run it on vs code a notification suggestion appears, select it and wait for it to load, something like this appears. that's success

image
hacksider commented 1 month ago

I was able to fix the cuda and the dark square display has gone, but images attached is still issue

The output is blurry

Screenshot_3 output

if i run python run.py --execution-provider cuda i got the blur face output.

if i run run.py, the dark square display still come in output

Here's some reason why

moaeddy commented 1 month ago

I have the same problem as you but after I run it on vs code a notification suggestion appears, select it and wait for it to load, something like this appears. that's success image

The code is pure python, i do not understand how you were able to interact it with VS CODE? can you give a little explanation?

ihad123 commented 1 month ago

I was able to fix the cuda and the dark square display has gone, but images attached is still issue

The output is blurry

Screenshot_3 output

if i run python run.py --execution-provider cuda i got the blur face output.

if i run run.py, the dark square display still come in output

i run it in pycharm ,have the same problems.how to solve it

moaeddy commented 1 month ago

I was able to fix the cuda and the dark square display has gone, but images attached is still issue The output is blurry Screenshot_3 output if i run python run.py --execution-provider cuda i got the blur face output. if i run run.py, the dark square display still come in output

Here's some reason why

  • Face of einstein is very low quality
  • Mustache is not included on the tracking

This happens on every images i have tried with. it's not Einstein face issue.

Have you reproduce this on windows 11? don't know, maybe windows 11 has some issues fulfilling the build out.

hacksider commented 1 month ago

I'm also using windows 11. Just make sure your face is not too near the webcam

pdtan commented 1 month ago

same problem on python3.10.11 windows 10 with CPU p/s: I changed to dml, it fixed.

moaeddy commented 1 month ago

same problem on python3.10.11 windows 10 with CPU p/s: I changed to dml, it fixed.

you mean this python run.py --execution-provider directml?

pdtan commented 1 month ago

same problem on python3.10.11 windows 10 with CPU p/s: I changed to dml, it fixed.

you mean this python run.py --execution-provider directml?

yes. must install dep like instruction:

pip install onnxruntime-directml==1.15.1
zennomi commented 1 month ago

I was able to fix the cuda and the dark square display has gone, but images attached is still issue

The output is blurry

Screenshot_3 output

if i run python run.py --execution-provider cuda i got the blur face output.

if i run run.py, the dark square display still come in output

Hey, did you fix the blurry output? I got same problem.

lithStudy commented 1 month ago

I also encountered the problem of blurred face output, but I found that it was the problem of onnxruntime. Try to strictly follow the official tutorial: pip uninstall onnxruntime onnxruntime-gpu pip install onnxruntime-gpu==1.16.3

moaeddy commented 1 month ago

Body

this is what always pops up anytime i run that command

C:\Users\User>pip install onnxruntime-directml==1.15.1 ERROR: Could not find a version that satisfies the requirement onnxruntime-directml==1.15.1 (from versions: 1.17.0, 1.17.1, 1.17.3, 1.18.0, 1.18.1) ERROR: No matching distribution found for onnxruntime-directml==1.15.1

C:\Users\User>pip install onnxruntime-directml==1.15.1

Had to install 1.17.0 even before i downgrade to 1.17.0, i already installed latest version still end up with bad output.

salman0ansari commented 1 month ago

I also encountered the problem of blurred face output, but I found that it was the problem of onnxruntime. Try to strictly follow the official tutorial: pip uninstall onnxruntime onnxruntime-gpu pip install onnxruntime-gpu==1.16.3

If you try to install 1.16.3 you will get this message

ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.16.3 (from versions: 1.17.0, 1.17.1, 1.18.0, 1.18.1)
ERROR: No matching distribution found for onnxruntime-gpu==1.16.3
moaeddy commented 1 month ago

Those having this same issue, i was able to solve it by installing python3.10 and followed instructions from

https://github.com/hacksider/Deep-Live-Cam/blob/main/README.md

Without leaving any words out. And if you are using Nvidia or any kind of processor that supports cuda, you can only get successful output on this by using

python run.py --execution-provider cuda

or

python run.py --execution-provider openvino

ihad123 commented 1 month ago

I also encountered the problem of blurred face output, but I found that it was the problem of onnxruntime. Try to strictly follow the official tutorial: pip uninstall onnxruntime onnxruntime-gpu pip install onnxruntime-gpu==1.16.3

it works,i solve it thank you

Pancat007 commented 4 weeks ago

I also encountered the problem of blurred face output, but I found that it was the problem of onnxruntime. Try to strictly follow the official tutorial: pip uninstall onnxruntime onnxruntime-gpu pip install onnxruntime-gpu==1.16.3

If you try to install 1.16.3 you will get this message

ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.16.3 (from versions: 1.17.0, 1.17.1, 1.18.0, 1.18.1)
ERROR: No matching distribution found for onnxruntime-gpu==1.16.3

same issue

Pancat007 commented 4 weeks ago

I also encountered the problem of blurred face output, but I found that it was the problem of onnxruntime. Try to strictly follow the official tutorial: pip uninstall onnxruntime onnxruntime-gpu pip install onnxruntime-gpu==1.16.3

If you try to install 1.16.3 you will get this message

ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.16.3 (from versions: 1.17.0, 1.17.1, 1.18.0, 1.18.1)
ERROR: No matching distribution found for onnxruntime-gpu==1.16.3

same issue

try to switch network or turn off the proxy may solve the issue.