Code Monkey home page Code Monkey logo

viewfacecore's Issues

示例程序打开不了

用了台比较老的电脑去打开示例程序,打开不了,双击没反应。去查看了计算机管理的事件查看器提示有错误,就是这个 => 错误模块名称: KERNELBASE.dll。。请问这个应该怎么解决?还有啊用手头上比较新的电脑打开示例程序倒是没问题。。具体报错如下。

错误应用程序名称: FaceDetectionDemo.exe,版本: 1.0.0.0,时间戳: 0xf543f690
错误模块名称: KERNELBASE.dll,版本: 10.0.17763.292,时间戳: 0x02385dc9
异常代码: 0xe0434352
错误偏移量: 0x0011b022
错误进程 ID: 0x7f8
错误应用程序启动时间: 0x01d695ba7c7c5fd7
错误应用程序路径: C:\Users\Administrator\Desktop\Debug\FaceDetectionDemo.exe
错误模块路径: C:\Windows\System32\KERNELBASE.dll
报告 ID: 15eab584-857d-492b-bff9-fc90a0c95005
错误程序包全名:
错误程序包相对应用程序 ID:

  • 1000 2 100 0x80000000000000 82 Application DESKTOP-5A53TU9
  • FaceDetectionDemo.exe 1.0.0.0 f543f690 KERNELBASE.dll 10.0.17763.292 02385dc9 e0434352 0011b022 7f8 01d695ba7c7c5fd7 C:\Users\Administrator\Desktop\Debug\FaceDetectionDemo.exe C:\Windows\System32\KERNELBASE.dll 15eab584-857d-492b-bff9-fc90a0c95005

故障存储段 ,类型 0
事件名称: CLR20r3
响应: 不可用
Cab ID: 0

问题签名:
P1: FaceDetectionDemo.exe
P2: 1.0.0.0
P3: f543f690
P4: ViewFaceCore
P5: 0.3.4.0
P6: 8756fe63
P7: cc
P8: 0
P9: System.DllNotFoundException
P10:

附加文件:

可在此处获取这些文件:
\?\C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_FaceDetectionDem_794690b9ff5ef43941c7fc4f9056b34ad43d3df_201518c4_0eb06610

分析符号:
重新检查解决方案: 0
报告 ID: 15eab584-857d-492b-bff9-fc90a0c95005
报告状态: 4102
哈希存储段: nCab GUID: 0

  • 1001 4 0 0x80000000000000 83 Application DESKTOP-5A53TU9
  • 0 CLR20r3 不可用 0 FaceDetectionDemo.exe 1.0.0.0 f543f690 ViewFaceCore 0.3.4.0 8756fe63 cc 0 System.DllNotFoundException \\?\C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_FaceDetectionDem_794690b9ff5ef43941c7fc4f9056b34ad43d3df_201518c4_0eb06610 0 15eab584-857d-492b-bff9-fc90a0c95005 4102 0

增加了新的api的库要如何引用

今天收到邮件说增加了口罩监测,但是在NuGet上的版本仍然为0.3.5,自己下了源码,但是ViewFaceBridge那里编不过,一堆奇怪的问题,我上个版本编译的时候没遇到过。能否将新版的ViewFaceBridge.dll以及ViewFaceCore.dll通过邮件发我一份。万分感谢

识别出错

调用方法 ViewFace.FaceMark()的时候,,返回的永远都是空数组,精度已经设置的很低了,换了很多张图片问题依旧

图片人脸识别不出来

请问为什么开摄像头对准图片能把图片的人脸识别出来,直接传入图片人脸却识别不出来了呢?只是个别图片识别不出来,识别不出来人脸的图片像素也不大。。

tennis.dll文件读取

貌似程序运行起来后只会读取tennis.dll文件,其它例如tennis_haswell.dll,tennis_pentium.dll,tennis_sandy_bridge.dll不会根据不同cpu的指令集去动态读取,只能修改文件名将之改tennis.dll才能去适应不同硬件环境,比如奔腾的机器就要将tennis_pentium.dll改名为tennis.dll程序才能跑起来,请问有什么好的方法去解决这个问题呢?

性能如何提升

你好 按照示例测试,完成一次人脸比对的完整过程大概需要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);
}

`

能编译Linux版本的ViewFace库吗

SeetaFace6支持Linux,但是我自己不会C++,也不知道项目中ViewFace能否编译为Linux的动态链接库。可以的话,项目也可以在Linux中使用。

On Windows7 not working. windows7上无法正常启动。

windows 10上一切正常,但是win7上会报DllNotFoundException异常。

应用程序: FaceDemo.exe
Framework 版本: v4.0.30319
说明: 由于未经处理的异常,进程终止。
异常信息: System.DllNotFoundException
   在 ViewFaceCore.Plus.ViewFacePlus32.SetModelPath(Byte[])
   在 ViewFaceCore.Plus.ViewFacePlus32.SetModelPath(System.String)
   在 ViewFaceCore.Sharp.ViewFace..ctor(System.String)
   在 ViewFaceCore.Sharp.ViewFace..ctor()
   在 FaceDemo.FormMain..ctor(System.String[])
   在 FaceDemo.Program.Main(System.String[])

X64运行不起来,报错期待更新

跑十几次就会报错,如下问题 期待作者更新
托管调试助手 "FatalExecutionEngineError"
运行时遇到了错误。此错误的地址为 0x1f6a7a22,在线程 0x55a0 上。错误代码为 0xc0000005。此错误可能是 CLR 中的 bug,或者是用户代码的不安全部分或不可验证部分中的 bug。此 bug 的常见来源包括用户对 COM-interop 或 PInvoke 的封送处理错误,这些错误可能会损坏堆栈。

能否加入口罩检测

 我看到SeetaFace6 是有MaskDetector的,但是这个库没有口罩检测的api,目前刚好项目上要用到口罩检测。请问作者能够抽时间把口罩检测加上,不胜感激

调用会随机报错

托管调试助手 "FatalExecutionEngineError":“运行时遇到了错误。此错误的地址为 0x2f767932,在线程 0x1ba0 上。错误代码为 0xc0000005。此错误可能是 CLR 中的 bug,或者是用户代码的不安全部分或不可验证部分中的 bug。此 bug 的常见来源包括用户对 COM-interop 或 PInvoke 的封送处理错误,这些错误可能会损坏堆栈。”

使用不同大小的图片测试,480p及以上会崩溃

测试代码:https://gitee.com/Protear/face-detection-console

托管调试助手 "FatalExecutionEngineError":“运行时遇到了错误。此错误的地址为 0x2f767932,在线程 0x1ba0 上。错误代码为 0xc0000005。此错误可能是 CLR 中的 bug,或者是用户代码的不安全部分或不可验证部分中的 bug。此 bug 的常见来源包括用户对 COM-interop 或 PInvoke 的封送处理错误,这些错误可能会损坏堆栈。”

linux下返回不支持的操作系统

ViewFaceCore\Plus\RuntimeInformation.Extension.cs
这段代码

    public static bool IsOSPlatform(OSPlatform platform) => platform == OSPlatform.Windows;

咨询一个Similarity效率问题,比如5000个特征与一张图片的比对。

不好意思,对这块技术不熟悉,弱弱的咨询个问题。
如果人脸库中有几万张,那一张一张Similarity过去,即便每一次比对只花5ms,最多要比上万张肯定很慢。
有没有办法像数据库查询一样的,对特征数据进行预处理来加快比对效率呢?
还是只能用加机器做分布运行解决了?

app崩溃,FatalExecutionEngineError

问题描述:造了个单例, 在wpf控件写dispatcher timer , 在timer的tick事件用这个单例去识别人脸, 总是报FatalExecutionEngineError这个错误直接崩溃了, 线程在viewFace.FaceDetector(mybitmap)这里停住了.用windbg查看了内存堆栈,只有一个实例在执行人脸识别.
单例的代码
veiwfacecore版本:0.3.4

        public class FaceCaptureViewModel
        {

            public ViewFace viewFace = new ViewFace("./FaceLibraries/model/", (str) => { Debug.WriteLine(str); });
            public static FaceCaptureViewModel Instance = new FaceCaptureViewModel();
            public Action<string> OnFaceBeCapture;
            public FaceCaptureViewModel()
            {
                viewFace.DetectorConfig = new ViewFaceCore.Sharp.Configs.FaceDetectorConfig { FaceSize = 20, MaxWidth = 2000, MaxHeight = 2000, Threshold = 0.9 };
                // 系统默认使用的轻量级识别模型。如果对精度有要求,请切换到 Normal 模式;并下载需要模型文件 放入生成目录的 model 文件夹中
                viewFace.FaceType = FaceType.Normal;
                // 系统默认使用5个人脸关键点。//不建议改动,除非是使用口罩模型。
                viewFace.MarkType = MarkType.Light;

            }

        }


调用的代码:

                        src = (Bitmap)_currentFrame.Clone();
                        var _result = FaceCaptureViewModel.Instance.viewFace.FaceDetector(src);

simillarity value

@View12138
How much similarity should be so
Confirm the similarity of the two photos ???

0.65 or higher ??

in this function :

float similarity = viewFace.Similarity(oldEigenValues, newEigenValues);

Attempted to read or write protected memory. This is often an indication that other memory is corrupt

1.多次调用ViewFace.FaceDetectorAsync方法后,有时vs会报这个错误。程序会停止
System.AccessViolationException:“Attempted to read or write protected memory. This is often an indication that other memory is corrupt.”
2.这是控制台的日志信息。
Fatal error. System.AccessViolationException: Attempted to read or write protect
ed memory. This is often an indication that other memory is corrupt.
at ViewFaceCore.Plus.Platform.ViewFacePlus64.ViewDispose()
at ViewFaceCore.Plus.Platform.ViewFacePlus64.ViewDispose()
at ViewFaceCore.Plus.ViewFacePlus.ViewDispose()
at ViewFaceCore.Sharp.ViewFace.Finalize()

Can not use this repo in .NET 6.0 X64 for Window 10

Hello:
I found this repo, it seems to be a good software. I want to do some testing.
I have create one Windows Forms App targeting .NET 6.0 (CPU: x64, but x86 has the same error)
I installed latest version of Nuget:
PM> Install-Package ViewFaceCore -Version 0.3.5
The following is my C# code:

using System;
using System.Drawing;
using ViewFaceCore.Sharp;

namespace ViewFaceCoreFaceDetectForm
{
public partial class Form1 : Form
{
public const string Face1_JPG_File = @"D:\Images\Temp\1.jpg";

    public Form1()
    {
        InitializeComponent();
    }

    private void Form1_Load(object sender, EventArgs e)
    {
        ViewFace face = new();
        Bitmap bitmap = (Bitmap)Image.FromFile(Face1_JPG_File);
        var infos = face.FaceDetector(bitmap);
        Console.WriteLine($"Face # detected {infos.Length}");
        Console.WriteLine($"Score and Position");
        for (int i = 0; i < infos.Length; i++)
        {
            Console.WriteLine($"{i}\t{infos[i].Score:f8}\t{infos[i].Location}");
        }
        Console.Read();
    }
}

}

But when I run this, I got error:
Inner Exception 1:
DirectoryNotFoundException: 找不到本机库目录: C:\SoccerVideos\Images\ViewFaceCoreFaceDetectForm\ViewFaceCoreFaceDetectForm\bin\Debug\net6.0-windows10.0.19041.0\viewfacecore\win\x64

I also download the repo source code (ViewFaceCore-main), and try to build it in Visual Studio 2022 (Version 17.1.1). I am using Windows 10 (Version 21H2, OS build 19044.1586)
But I also got some errors, like the following:
Error MSB8020 The build tools for Remote_GCC_1_0 (Platform Toolset = 'Remote_GCC_1_0') cannot be found. To build using the Remote_GCC_1_0 build tools, please install Remote_GCC_1_0 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".

Error C1083 Cannot open include file: 'seeta/FaceDetector.h': No such file or directory

Let me know how to fix this issue.
PS: You can reply in Chinese, if not easy to reply in English.
I think if I can install NUGET package, all necessary libraries should be OK, there should be no more errors. By the way, if there is any library which is only available in Baidu Pan, then all the people outside China can’t access.
Thanks,

建议移除对System.Drawing.Common的依赖

.net 6发布后微软移除了非Windows平台System.Drawing.Common模块的支持,继续使用Bitmap作为接口会导致在linux上无法使用这个库。
事实上Bitmap仅仅只是读取图像信息,这一步很多库都可以做到,比如Silk.Net(opencv),SkiaSharp(skia),不如内置一个ImageInfo,包含width\height\channels\data信息,作为参数,至于用户爱用Bitmap生成这个ImageInfo,还是爱用其他库,随用户自己。

[Bug]CompareByCroppedFace返回的值为一个非数字 -nan

#include "seeta/FaceDetector.h"
#include "seeta/FaceLandmarker.h"
#include "seeta/FaceDatabase.h"
#include "seeta/FaceRecognizer.h"
#include "seeta/Struct_cv.h"

#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include
#include

int main() {

seeta::ModelSetting FRsetting;
seeta::ModelSetting FDsetting;
seeta::ModelSetting FLsetting;

FRsetting.set_device(SEETA_DEVICE_GPU);
FRsetting.set_id(0);
FRsetting.append("./models/face_recognizer.csta");

FDsetting.set_device(SEETA_DEVICE_GPU);
FDsetting.set_id(0);
FDsetting.append("./models/face_detector.csta");

FLsetting.set_device(SEETA_DEVICE_GPU);
FLsetting.set_id(0);
FLsetting.append("./models/face_landmarker_pts5.csta");

seeta::FaceDatabase     FDB_gpu(FRsetting);
seeta::FaceDetector     FD_gpu(FDsetting);
seeta::FaceLandmarker   FL_gpu(FLsetting);


seeta::cv::ImageData image1 = cv::imread("./img/huge.jpg");
seeta::cv::ImageData image2 = cv::imread("./img/liuyifei.jpg");

std::cout << "Got image: [" << image1.width << ", " << image1.height << ", " << image1.channels << "]" << std::endl;

    seeta::cv::ImageData facedate1(FDB_gpu.GetCropFaceWidthV2(),FDB_gpu.GetCropFaceHeightV2(),FDB_gpu.GetCropFaceChannelsV2());
    seeta::cv::ImageData facedate2(FDB_gpu.GetCropFaceWidthV2(),FDB_gpu.GetCropFaceHeightV2(),FDB_gpu.GetCropFaceChannelsV2());

    auto faces1 = FD_gpu.detect(image1);
    auto points1 = FL_gpu.mark(image1,faces1.data[0].pos);
    FDB_gpu.CropFaceV2(image1,points1.data(),facedate1);


    auto faces2 = FD_gpu.detect(image2);
    auto points2 = FL_gpu.mark(image2,faces2.data[0].pos);
    FDB_gpu.CropFaceV2(image2,points2.data(),facedate2);


    cv::imwrite("./img/test1.jpg", seeta::cv::ImageData(facedate1).toMat());
    cv::imwrite("./img/test2.jpg", seeta::cv::ImageData(facedate2).toMat());

    float score1 = FDB_gpu.CompareByCroppedFace(facedate1,facedate2);

    std::cout << "score: " << score1 << std::endl;

return 0;

}

结果为:score: -nan

System.IO.DirectoryNotFoundException: 找不到本机库目录: c:\windows\system32\inetsrv\viewfacecore\win\x64

I use viewfaceCore in asp.net application and it works on local But
when I Published My app and uploaded it to server and it gave this error .

System.IO.DirectoryNotFoundException: 找不到本机库目录: c:\windows\system32\inetsrv\viewfacecore\win\x64

I go to this path

c:\windows\system32\inetsrv\viewfacecore\win\x64
and copy files there .

But it does not solve .

My photo Attach .

photo_2022-04-30_14-52-46

image_2022-04-30_14-48-53

间歇性异常停止响应

在Windows Server 2012 R2 Standard服务器IIS上部署面部识别程序,.netmvc。
多次请求会出现异常停止响应,这种情况偶发多现,当停止响应时,会卡住直到超时,程序中try catch无法捕获。

通过DebugDiag监测clr异常日志如下
`***********************

  • EXCEPTION DETAILS *

DetailID = 1
Count: 1
Exception #: 0XC0000005
Stack:
clr!GetMetaDataPublicInterfaceFromInternal+0xc33a
clr!GetMetaDataPublicInterfaceFromInternal+0xbd40
clr!GetMetaDataPublicInterfaceFromInternal+0x1d7e7
clr!GetMetaDataPublicInterfaceFromInternal+0x1a9f2
clr!GetMetaDataPublicInterfaceFromInternal+0x18578
clr!GetMetaDataPublicInterfaceFromInternal+0x191d6
clr!GetMetaDataPublicInterfaceFromInternal+0xc6da
clr!StrongNameSignatureVerification+0x18b06
clr!GetMetaDataPublicInterfaceFromInternal+0xae45
clr!NGenCreateNGenWorker+0xbe05
clr!LogHelp_LogAssert+0x68c5
KERNEL32!BaseThreadInitThunk+0x22
ntdll!RtlUserThreadStart+0x34


  • EXCEPTION SUMMARY *

|--------------------|
| Count | Exception  |
|--------------------|
| 1     | 0XC0000005 |
|--------------------|

Debugging Overhead Cost:
Total Elapsed Ticks = 34437 (100%)
Total Ticks Spent in Debugger Engine = 6984 (20%)
Total Ticks Spent in Crash Rule Script = 2050 (6%)`

调用活体识别或人脸识别时,摄像头显示界面卡顿

708897B0-4A85-408b-AE55-8405888650B5

请教个问题,把算法集成到浏览器中时,在调用活体识别方法或者人脸识别方法时,因为识别方法需要时间,页面上显示的画面存在稍微卡顿,想保持显示画面一直流畅,有什么好的解决思路吗?谢谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.