-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The CNN is unusually slow,what am I doing wrong? #198
Comments
This property is not necessary. |
Thank you for your reply, When I remove this property
So I manually copied the file "DlibDotNetNative.dll" and "DlibDotNetNativeDnn.dll" to the program directory. The execution result is the same as before, no change. |
I tried benchmark with cnn.
Then >dotnet run -c Release -- -c -m=D:\Works\OpenSource\FaceRecognitionDotNet.Models
[D:\Works\OpenSource\FaceRecognitionDotNet\examples\Benchmark\Benchmark.csproj]
Benchmarks
Timings at 240p:
- Face locations: 0.0180s (55.56 fps)
- Face landmarks: 0.0014s (714.29 fps)
- Encode face (inc. landmarks): 0.0040s (250.00 fps)
- End-to-end: 0.0226s (44.25 fps)
Timings at 480p:
Unhandled exception. System.EntryPointNotFoundException: Unable to find an entry point named 'cuda_cudaDriverGetVersion' in DLL 'DlibDotNetNativeDnn'.
at DlibDotNet.NativeMethods.dnn_cuda_cudaDriverGetVersion(Int32& version)
at DlibDotNet.Dnn.Cuda.ThrowCudaException(ErrorType error)
at DlibDotNet.Dnn.LossMmod.Operator[T](IEnumerable`1 images, UInt64 batchSize)
at FaceRecognitionDotNet.Dlib.Python.CnnFaceDetectionModelV1.Detect(LossMmod net, Image image, Int32 upsampleNumTimes)
at FaceRecognitionDotNet.FaceRecognition.FaceLocations(Image image, Int32 numberOfTimesToUpsample, Model model)
at Benchmark.Program.TestLocateFaces(Image image) in D:\Works\OpenSource\FaceRecognitionDotNet\examples\Benchmark\Program.cs:line 167
at Benchmark.Program.<>c__DisplayClass3_0`1.<RunTest>b__0() in D:\Works\OpenSource\FaceRecognitionDotNet\examples\Benchmark\Program.cs:line 100
at Benchmark.Program.<>c__DisplayClass3_0`1.<RunTest>b__1(Int32 i) in D:\Works\OpenSource\FaceRecognitionDotNet\examples\Benchmark\Program.cs:line 107
at System.Linq.Enumerable.SelectIPartitionIterator`2.MoveNext()
at System.Linq.Enumerable.Min(IEnumerable`1 source)
at Benchmark.Program.RunTest[T](String path, Func`2 setup, Action`1 test, Int32 iterationsPerTest, Int32 testsToRun, Boolean useCnn) in D:\Works\OpenSource\FaceRecognitionDotNet\examples\Benchmark\Program.cs:line 107
at Benchmark.Program.<>c__DisplayClass2_0.<Main>b__0() in D:\Works\OpenSource\FaceRecognitionDotNet\examples\Benchmark\Program.cs:line 73
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Benchmark.Program.Main(String[] args) in D:\Works\OpenSource\FaceRecognitionDotNet\examples\Benchmark\Program.cs:line 88 Program crashed but CNN works. And Hog mode
Just in case, I confirmed CUDA_PATH. >set CUDA
CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2
CUDA_PATH_V10_0=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0
CUDA_PATH_V10_1=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
CUDA_PATH_V10_2=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2
CUDA_PATH_V11_0=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0
CUDA_PATH_V11_1=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1
CUDA_PATH_V11_2=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2
CUDA_PATH_V11_3=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3
CUDA_PATH_V11_6=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6
CUDA_PATH_V9_0=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0
CUDA_PATH_V9_1=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1
CUDA_PATH_V9_2=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2 So CUDA_PATH does not afffect behaviors of program if proper libraries are present. Does your machine recognize gpu? |
Thank you for your reply. I reinstalled
Now it works normally. after that , "Program crashed but CNN works." but FaceDetection,
|
use cuda92 and cnn mode, about 1s,,,Can you compile a cuda115? TKS!! |
Could you check content of CudaException? |
dotnet --version 6.0.200
CPU: AMD Ryzen 7 1700x 8 core
GPU: NVIDIA GeForce GTX 1080, Driver version 30.0.14.7212
CUDA v11.1
FaceRecognitionDotNet-master\examples\Benchmark>
This is without using CNN
dotnet run -c Release -- "-m=models"
this is proj file
file in models
this is File in \Benchmark\bin\x64\Release\netcoreapp2.0
the cudnn** files, I copy from *C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1*
v11.1 is the only version on my computer.
when use CNN,
It took about half an hour to show these
In project FaceDetection,
if Hog is changed to CNN, it will also be unusually slow. It takes about twenty times the time of Hog.
In Task Manager, the CPU usage at runtime is about 8%, GPU is zero.
I don't know if I need to provide any more information, please help me, thanks.
The text was updated successfully, but these errors were encountered: