takuya-takeuchi / UltraFaceDotNet

C# version of Ultra-Light-Fast-Generic-Face-Detector-1MB for Windows, MacOS, Linux, iOS and Android
MIT License
80 stars 16 forks source link

Run demo on WindowOS #5

Closed AzukaPans closed 3 years ago

AzukaPans commented 4 years ago

I ran demo on WindowOS and got this issue: "Unable to load DLL 'NcnnDotNetNative' or one of its dependencies: The specified module could not be found. (0x8007007E)".

takuya-takeuchi commented 4 years ago

@AzukaPans Could you tell me more detail?

AzukaPans commented 4 years ago

@takuya-takeuchi I use .NET Framework, branch source: develop, version not GPU. I tried to build as x64 but got the same issue. Maybe I missed ncnndotnet source code in src folder. I will close this question if that issue is fixed.

AzukaPans commented 4 years ago

@takuya-takeuchi Do I have to use CMake application to build NcnnDotNet.Native source in src ? I have done steps below:

  1. Using Microsoft Visual Studio 2019 to build UltraFaceDotNet.sln and NcnnDotNet.sln with Release mode as x64.
  2. Following guideline in examples/Demo.
takuya-takeuchi commented 4 years ago

@AzukaPans Sorry late reply. I guess VS 2017 shares same binary of 2019. So it should work. Could you check the this exmaple?

#8.zip

This is work on dev machine.

https://github.com/takuya-takeuchi/NcnnDotNet/issues/8#issuecomment-573445271 This issue looks like to wrong.

takuya-takeuchi commented 4 years ago

@AzukaPans Sorry. I did explain wrong. https://github.com/takuya-takeuchi/UltraFaceDotNet/tree/master/examples/Demo needs NcnnDotNet library. But this example links UltraFaceDotNet project from git submodule. So you should delete UltraFaceDotNet link and add nuget package. Or copying NcnnDotNet and UltraFaceDotNet all libs to application bin directory manually. It should works.

breadbyte commented 3 years ago

I encountered this issue, and here's my workaround for it.

  1. remove project reference from NcnnDotNet and UltraFaceDotNet.
  2. install NcnnDotNet and UltraFaceDotNet from nuget.
  3. Build as x64. (It should not build on AnyCPU)
  4. NcnnDotNetNative will be in UltraFaceDotNet/examples/Demo/bin/Release/netcoreapp3.1/runtimes/win-x64/native/NcnnDotNetNative.dll
  5. Copy NcnnDotNetNative to folder where Demo.exe is in.

I think this (https://github.com/takuya-takeuchi/NcnnDotNet/issues/8) could be fixed by changing https://github.com/takuya-takeuchi/NcnnDotNet/blob/master/nuget/nuspec/NcnnDotNet.CPU.nuspec#L30-L33 target to content\NcnnDotNetNative.dll.

takuya-takeuchi commented 3 years ago

This issue could be fixed by latest version