Comments (11)
takuya-takeuchi/FaceRecognitionDotNet#4
from dlibdotnet.
This is not bug. It can improve by linking Intel MKL to DlibDotNet.Native.Dnn.dll.
from dlibdotnet.
Do I need to compile myself from the source code? Does the version installed from nuget.org use MKL?
from dlibdotnet.
Yes. Intel MKL are distributed from intel web site.
You must do user registration to download it.
And do compile DlibDotNet.Native.Dnn with Inte MKL.
The following is sample CMake command
set CURDIR=%cd%
set DIRLINK=build_cpu
mkdir %DIRLINK%
cd %DIRLINK%
set DLIBVER=19.15
set INTEL_MKL=D:/Works/Lib/Intel/Math Kernel Library/2019.0.117/Windows/windows
cmake -G "Visual Studio 15 2017 Win64" -T host=x64 ^
-DDLIB_PATH=D:/Works/Lib/DLib/%DLIBVER% ^
-DUSE_AVX_INSTRUCTIONS=ON ^
-DUSE_SSE2_INSTRUCTIONS=ON ^
-DUSE_SSE4_INSTRUCTIONS=ON ^
-DLIB_USE_BLAS=ON ^
-DBLAS_libiomp5md_LIBRARY="%INTEL_MKL%/compiler/lib/intel64_win/libiomp5md.lib" ^
-DBLAS_mkl_core_dll_LIBRARY="%INTEL_MKL%/mkl/lib/intel64_win/mkl_core_dll.lib" ^
-DBLAS_mkl_intel_lp64_dll_LIBRARY="%INTEL_MKL%/mkl/lib/intel64_win/mkl_intel_lp64_dll.lib" ^
-DBLAS_mkl_intel_thread_dll_LIBRARY="%INTEL_MKL%/mkl/lib/intel64_win/mkl_intel_thread_dll.lib" ^
..
cmake --build . --config %1
from dlibdotnet.
But it may be easy after you install intel MKL to system.
Because dlib provides find_blas.cmake to link Intel MKL.
https://github.com/davisking/dlib/blob/master/dlib/cmake_utils/find_blas.cmake
However, I did not use it, so I do not know it works.
from dlibdotnet.
tks!
from dlibdotnet.
I compiled DlibDotNet.Native.Dnn with MKL from source(19.15.0.20180916, commit-d7e71be), DlibDotnet and DlibDotNet.Native from nuget, but they didn't work with benchmark. The error message is as follows:
dotnet run -c Release -- "-m=Models"
Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'DlibDotNet.Native.Dnn.dll' or one of its dependencies: The specified module could not be found。 (Exception from HRESULT: 0x8007007E)
at DlibDotNet.Dnn.LossMmod.Native.loss_mmod_deserialize(Byte[] fileName, Int32 type)
at DlibDotNet.Dnn.LossMmod.Deserialize(String path, Int32 networkType) in D:\MyDoc\Desktop\Projects\STB\FaceRecognitionDotNet\DlibDotNet\src\DlibDotNet\Dnn\LossMmod.cs:line 65
at FaceRecognitionDotNet.FaceRecognition..ctor(String directory) in D:\MyDoc\Desktop\Projects\STB\FaceRecognitionDotNet\src\FaceRecognitionDotNet\FaceRecognition.cs:line 71
at Benchmark.Program.<>c__DisplayClass1_0.<Main>b__0() in D:\MyDoc\Desktop\Projects\STB\FaceRecognitionDotNet\examples\Benchmark\Program.cs:line 50
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Benchmark.Program.Main(String[] args) in D:\MyDoc\Desktop\Projects\STB\FaceRecognitionDotNet\examples\Benchmark\Program.cs:line 83
compile script as following:
set CURDIR=%cd%
set DIRLINK=build_cpu
mkdir %DIRLINK%
cd %DIRLINK%
set DLIBVER=19.15
set INTEL_MKL=D:/IntelSWTools/compilers_and_libraries_2019.0.117/windows
cmake -G "Visual Studio 15 2017 Win64" -T host=x64 ^
-DDLIB_PATH=D:/MyDoc/Desktop/Projects/STB/dlib-19.15 ^
-DUSE_AVX_INSTRUCTIONS=ON ^
-DUSE_SSE2_INSTRUCTIONS=ON ^
-DUSE_SSE4_INSTRUCTIONS=ON ^
-DLIB_USE_BLAS=ON ^
-DBLAS_libiomp5md_LIBRARY="%INTEL_MKL%/compiler/lib/intel64_win/libiomp5md.lib" ^
-DBLAS_mkl_core_dll_LIBRARY="%INTEL_MKL%/mkl/lib/intel64_win/mkl_core_dll.lib" ^
-DBLAS_mkl_intel_lp64_dll_LIBRARY="%INTEL_MKL%/mkl/lib/intel64_win/mkl_intel_lp64_dll.lib" ^
-DBLAS_mkl_intel_thread_dll_LIBRARY="%INTEL_MKL%/mkl/lib/intel64_win/mkl_intel_thread_dll.lib" ^
..
cmake --build . --config %1
If I use DlibDotNet.Native.Dnn from nuget, they are work well.
Is there a problem in my compile script?
from dlibdotnet.
Intel MKL library is not source code. It means that you must deploy Intel MKL library dll (or so) files.
I deployed the following libraries.
- libimalloc.dll
- libiomp5md.dll
- mkl_avx.dll
- mkl_avx2.dll
- mkl_avx512.dll
- mkl_avx512_mic.dll
- mkl_blacs_ilp64.dll
- mkl_blacs_intelmpi_ilp64.dll
- mkl_blacs_intelmpi_lp64.dll
- mkl_blacs_lp64.dll
- mkl_blacs_mpich2_ilp64.dll
- mkl_blacs_mpich2_lp64.dll
- mkl_blacs_msmpi_ilp64.dll
- mkl_blacs_msmpi_lp64.dll
- mkl_cdft_core.dll
- mkl_core.dll
- mkl_def.dll
- mkl_intel_thread.dll
- mkl_mc.dll
- mkl_mc3.dll
- mkl_msg.dll
- mkl_pgi_thread.dll
- mkl_rt.dll
- mkl_scalapack_ilp64.dll
- mkl_scalapack_lp64.dll
- mkl_sequential.dll
- mkl_tbb_thread.dll
- mkl_vml_avx.dll
- mkl_vml_avx2.dll
- mkl_vml_avx512.dll
- mkl_vml_avx512_mic.dll
- mkl_vml_cmpt.dll
- mkl_vml_def.dll
- mkl_vml_mc.dll
- mkl_vml_mc2.dll
- mkl_vml_mc3.dll
- tbb.dll
- tbbmalloc.dll
- tbbmalloc_proxy.dll
These should be <IntelMKLLibrary_dir>\Windows\windows\redist\intel64_win*.
from dlibdotnet.
Perhaps, we need not to deploy all these dll. But I do not know which binary is unnecessary.
from dlibdotnet.
It requires these libraries:
- libiomp5md.dll
- mkl_core.dll
- mkl_def.dll
- mkl_intel_thread.dll
from dlibdotnet.
thanks
from dlibdotnet.
Related Issues (20)
- How to dockerize an app that uses this library HOT 6
- create detector issue HOT 4
- Set minimum sensitivity for FrontalFaceDetector.Operator HOT 3
- Add CUDA 112 to document and publish script
- library does not depend on system libjpeg on OSX HOT 2
- How to using in .NET Core 6 HOT 1
- [Memory Leak] Disposing an Array2D<RgbPixel> does not dispose of contained RgbPixels HOT 11
- Extract face coordinates from upsampled image using Frontal Face Detector HOT 4
- BitmapExtensions.ToArray2D<RgbPixel>(image) throws always not supported exception HOT 4
- Rid of System.Drawing
- cuda HOT 4
- DlibDotNet.Xamarin is missing HOT 1
- ToBitmap() ambigous HOT 1
- Memory leak with Array2D HOT 2
- DlibDotNet with FaceRecognitionDotNet Not working HOT 1
- Face recognition in real time (using ar glass and unity and dlibdotnet)
- .NET 7.0 compatibility, Failed to find dll "DlibDotNetNative", for processor architecture AMD64 HOT 2
- Can't load DlibDotNetNativeDnn in Blazor WebAssembly project
- HeadPoseTraining with GPU Support possible ?
- Can't build DlibDotNet.Native.Dnn HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dlibdotnet.