ORB-HD / deface

Video anonymization by face detection
MIT License
684 stars 95 forks source link

Error: explicit providers required #21

Closed Aziks0 closed 1 year ago

Aziks0 commented 2 years ago

I have an error using deface on Windows 10, caused by onnx, saying that providers are explicitly required since ORT 1.9.

ValueError: This ORT build has ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider'] enabled.
Since ORT 1.9, you are required to explicitly set the providers parameter when instantiating InferenceSession.
For example, onnxruntime.InferenceSession(..., providers=['TensorrtExecutionProvider', 'CUDAExecutionProvider',
'CPUExecutionProvider'], ...)
mdraw commented 2 years ago

Mostly fixed by #22 but I'll leave this open because of the reasons I gave in #22's discussion.

Aziks0 commented 2 years ago

There are a lot of execution providers, which means that it would be difficult for non-power users to select the best one for them, but at the same time, non-power users probably do not use ML to anonymize images.

By checking the OS, the architecture, the GPU/CPU, it might be possible to select automatically the best provider (if the user hasn't selected any using the CLI arg for example). Many combinations are possible though, so it's a tricky solution.

mdraw commented 1 year ago

This has been fixed in c5552645d69e4a1c2231d5a5b0baafc2a71de52f