Comments (4)
Thank you, i did it and i resolved that issue. Now it loads the params without any exception.
Here's how i managed to do it
cd src/ncnn
git checkout master
git submodule update --init --recursive
I had to modify src/NcnnDotNet.Native/CMakeLists.txt by removing the following lines
glslang
GenericCodeGen
MachineIndependent
OGLCompiler
OSDependent
SPIRV
otherwise the following error would rise
[ 2%] Linking CXX shared library NcnnDotNetNative.dll
LINK: command "C:\PROGRA~2\MICROS~1\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\NcnnDotNetNative.dir\objects1 /out:NcnnDotNetNative.dll /implib:NcnnDotNetNative.lib /pdb:C:\Users\andre\Desktop\ML\NcnnDotNet\src\NcnnDotNet.Native\build_win_desktop_vulkan_x64\NcnnDotNetNative.pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO ncnn\install\lib\ncnn.lib opencv\install\x64\vc15\staticlib\opencv_highgui341.lib opencv\install\x64\vc15\staticlib\opencv_imgcodecs341.lib opencv\install\x64\vc15\staticlib\opencv_imgproc341.lib C:\VulkanSDK\1.3.236.0\Lib\vulkan-1.lib glslang.lib GenericCodeGen.lib MachineIndependent.lib OGLCompiler.lib OSDependent.lib SPIRV.lib C:\VulkanSDK\1.3.236.0\Lib\vulkan-1.lib ncnn\install\lib\glslang.lib ncnn\install\lib\SPIRV.lib ncnn\install\lib\MachineIndependent.lib ncnn\install\lib\OGLCompiler.lib ncnn\install\lib\OSDependent.lib ncnn\install\lib\GenericCodeGen.lib opencv\install\x64\vc15\staticlib\opencv_videoio341.lib opencv\install\x64\vc15\staticlib\opencv_imgcodecs341.lib opencv\install\x64\vc15\staticlib\libjpeg.lib opencv\install\x64\vc15\staticlib\libwebp.lib opencv\install\x64\vc15\staticlib\libpng.lib opencv\install\x64\vc15\staticlib\libtiff.lib opencv\install\x64\vc15\staticlib\libjasper.lib opencv\install\x64\vc15\staticlib\IlmImf.lib opencv\install\x64\vc15\staticlib\opencv_imgproc341.lib opencv\install\x64\vc15\staticlib\opencv_core341.lib opencv\install\x64\vc15\staticlib\zlib.lib vfw32.lib comctl32.lib gdi32.lib ole32.lib setupapi.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:NcnnDotNetNative.dll.manifest" failed (exit code 1181) with the following output:
LINK : fatal error LNK1181: impossibile aprire il file di input 'MachineIndependent.lib'
finally i had to remove those lines from nuget/BuildUtils.ps1
Write-Host "git submodule update --init --recursive" -ForegroundColor Yellow
git submodule update --init --recursive
otherwise it would pull the old ncnn
then i could launch
pwsh BuildWindows.ps1
thanks again for your time
from ncnndotnet.
@andreae293
I think you can use
NcnnDotNet/src/NcnnDotNet/Option/Option.cs
Line 199 in 758e11f
and
NcnnDotNet/src/NcnnDotNet/Option/Option.cs
Line 169 in 758e11f
from ncnndotnet.
oh well that was easy, thanks
but i do have another question now, not sure if i should open another issue or not
the following code
var net = new NcnnDotNet.Net();
net.LoadParam("./assets/FrozenCLIPEmbedder-fp16.param");
throw an exception:
System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
i already checked that file is not corrupted or read/write protected
the file in question is this, which loads correctly in the original project
do you have any idea on what is causing the issue? thanks again
from ncnndotnet.
Oh... I didn't know ncnn suport Stable Diffusion!!
But current code base is old (2021/05/07) so it may cause issue you faced.
So we would have to use latest ncnn.
You can try to load this param file by using latest ncnn c++.
If you do not face issue, you can do the followign steps.
- Checkout lastest ncnn https://github.com/takuya-takeuchi/NcnnDotNet/tree/master/src
- Build ncnndotnet yourself by using https://github.com/takuya-takeuchi/NcnnDotNet/blob/master/nuget/BuildUbuntu16.ps1
But I'm not sure you can update code base w/o any issue.
from ncnndotnet.
Related Issues (20)
- Could not return label greater than 10 HOT 5
- How should I use NcnnDotNet.C.Ncnn.MatToPixels() method? HOT 1
- How to load params and models from memory? HOT 5
- Unhandled exception. System.EntryPointNotFoundException: Unable to find an entry point named 'mat_Mat_create2' in DLL 'NcnnDotNetNative'. HOT 1
- windows server运行出错 HOT 8
- Do you support the scrfd algorithm model? HOT 15
- How to Build for Windows x86 using VS2019 HOT 7
- how to use? no doc. HOT 4
- Memory overhead against original ncnn HOT 7
- How to convert Mat to Bitmap ? HOT 14
- Typo: Substract HOT 1
- CvLoadImage enum has wrong values
- NcnnDotNet v0.0.0.20230101 - System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.' HOT 3
- Speed in GPU is slower than Cpu HOT 3
- what wrong of the code? scoreBlob, bboxBlob,landmarkBlob are all zero! HOT 2
- how using NcnnDotNet in android for license plate Cars
- NcnnDotNet with OpencvSharp HOT 1
- Extractor error when using with camera
- (System.AccessViolationException) Bitmap ToMat Issues 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 ncnndotnet.