viewfacecore / viewfacecoredemo Goto Github PK
View Code? Open in Web Editor NEWViewFaceCore WinForm Demo,using Aforge
ViewFaceCore WinForm Demo,using Aforge
src/Examples
目录下run demo has some problem:
System.TypeInitializationException
HResult=0x80131534
Message=“ViewFaceCore.Plus.ViewFaceBridge”的类型初始值设定项引发异常。
Source=ViewFaceCore
StackTrace:
在 ViewFaceCore.Plus.ViewFaceBridge.set_ModelPath(String value)
在 ViewFaceCore.Sharp.ViewFace..ctor(String modelPath)
在 ViewFaceCore.Sharp.ViewFace..ctor()
在 FaceDetectionDemo.FormDemo..ctor() 在 E:\学习\项目\git\ViewFaceCoreDemo\FaceDetectionDemo\FormDemo.cs 中: 第 51 行
在 FaceDetectionDemo.Program.Main() 在 E:\学习\项目\git\ViewFaceCoreDemo\FaceDetectionDemo\Program.cs 中: 第 19 行
此异常最初是在此调用堆栈中引发的:
[外部代码]
内部异常 1:
DirectoryNotFoundException: 找不到本机库目录:...\ViewFaceCoreDemo\FaceDetectionDemo\bin\Debug\viewfacecore\win\x86
ViewFace.Extract(bitmap1,ViewFace.FaceMark(bitmap1, new ViewFaceCore.Sharp.Model.FaceInfo() { Location = info.Location, Score = info.Score }))
缺nseetface.dll
麻烦问下,用webapi做成服务然后调用一切正常,但是连续多访问几次服务就会蹦掉,是我哪里出问题了么?
你好 按照示例测试,完成一次人脸比对的完整过程大概需要3秒钟时间,加上其它逻辑处理后会更长。
请问如何再优化调用,能够进入到1秒内或者较短时间完成整个过程,2个测试图片均不超过300K。
下面是测试代码
`
private void button1_Click(object sender, EventArgs e)
{
ViewFace.FaceType = FaceType.Normal;
//目标图片
Bitmap targetImg = (Bitmap)Image.FromFile(@"D:\\测试文件\\裁.jpg");
FaceInfo[] targetFaces = ViewFace.FaceDetector(targetImg);
FaceMarkPoint[] targetMark = ViewFace.FaceMark(targetImg, targetFaces[0]);
AntiSpoofingStatus targetass = ViewFace.AntiSpoofing(targetImg, targetFaces[0], targetMark, true);
float[] targetExtract = ViewFace.Extract(targetImg, targetMark);
//基准图片
Bitmap baseImg = (Bitmap)Image.FromFile("D:\\测试文件\\2\\大文件4压缩后.png");
FaceInfo[] baseFaces = ViewFace.FaceDetector(baseImg);
FaceMarkPoint[] baseMark = ViewFace.FaceMark(baseImg, baseFaces[0]);
//AntiSpoofingStatus baseass = ViewFace.AntiSpoofing(baseImg, baseFaces[0], baseMark, true);
float[] baseExtract = ViewFace.Extract(baseImg, baseMark);
//结果
float similarity = ViewFace.Similarity(baseExtract, targetExtract);
bool isSelf = ViewFace.IsSelf(similarity);
}
`
Hello @View12138
I am new in ViewFaceCoreDemo
when I want to test this code ,
I got this error ,
Error :
System.OverflowException: 'Arithmetic operation resulted in an overflow.'
this line:
ViewFace.Extract(oldImg, oldPoints)
My Code :
Bitmap _oldImg = new Bitmap(@"images/Jay_4.jpg");
Bitmap oldImg = (Bitmap)ResizeBitmap(_oldImg, 1024, 768);
var oldFaceInfos = ViewFace.FaceDetector(oldImg);
var oldPoints = ViewFace.FaceMark(oldImg, oldFaceInfos[0]);
var oldEigenValues = ViewFace.Extract(oldImg, oldPoints);
托管调试助手 "FatalExecutionEngineError":“运行时遇到了错误。此错误的地址为 0x29276e66,在线程 0x608 上。错误代码为 0xc0000005。此错误可能是 CLR 中的 bug,或者是用户代码的不安全部分或不可验证部分中的 bug。此 bug 的常见来源包括用户对 COM-interop 或 PInvoke 的封送处理错误,这些错误可能会损坏堆栈。”
大概定位到这里 var infos = await ViewFace.FaceTrackAsync(bitmap); // 识别画面中的人脸,机器不支持 fma和AVX,会是因为机器性能问题?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.