Closed achmstein closed 1 week ago
Thanks for the kind words. Instead of
dotnet add package Microsoft.ML.OnnxRuntime
dotnet add package FaceAiSharp.Bundle
you could do
dotnet add package Microsoft.ML.OnnxRuntime.Gpu
// or
dotnet add package Microsoft.ML.OnnxRuntime.DirectML
dotnet add package FaceAiSharp.Bundle
Then, for e.g. DirectML you could do
_embedderSessOpts = new SessionOptions
{
EnableMemoryPattern = false,
};
_embedderSessOpts.AppendExecutionProvider_DML();
_emb = new ArcFaceEmbeddingsGenerator(
new()
{
ModelPath = arcFaceModel.FullName,
},
_embedderSessOpts);
Also take a look here: https://onnxruntime.ai/docs/get-started/with-csharp.html#running-on-gpu-optional
Let me know if this works for you.
Hello,
Thank you for the great library.
How to use GPU for face detection and recognition? I want to use it with Frigate for camera's stream!