Giter Club home page Giter Club logo

pcb9382 / facealgorithm Goto Github PK

View Code? Open in Web Editor NEW
248.0 3.0 58.0 18.45 MB

face detection face recognition包含人脸检测(retinaface,yolov5face,yolov7face,yolov8face),人脸检测跟踪(ByteTracker),人脸角度计算(Face_Angle)人脸矫正(Face_Aligner),人脸识别(Arcface),口罩检测(MaskRecognitiion),年龄性别检测(Gender_age),静默活体检测(Silent_Face_Anti_Spoofing),FaceAlignment(106keypoints)

License: MIT License

CMake 2.78% C++ 76.15% Cuda 0.76% C 0.72% Python 0.29% Shell 0.21% Fortran 18.93% JavaScript 0.10% CSS 0.07%
cuda face-detection face-recognition tensorrt yolov5face yolov7face face-alignment yolov8face

facealgorithm's Issues

How to get 106 landmarks?

hi, I have some questions about generate the coordinates of keypoints. Why Face_Alignment_prob need to plus1 and then divide 2? What is the meaning of Face_Alignment_prob

alignmentface.landmarks[start]=int((Face_Alignment_prob[start]+1)*img.cols / 2); alignmentface.landmarks[start+1]=int((Face_Alignment_prob[start+1]+1)*img.cols / 2);

Thanks for your help.

Onnx2Trt Conversion Problem

When I tried to convert my onnx file to trt file (tensorrt7), I got the error below, how can I solve it?

[12/11/2023-16:10:27] [I] [TRT] ModelImporter.cpp:135: No importer registered for op: ScatterND. Attempting to import as plugin.
[12/11/2023-16:10:27] [I] [TRT] builtin_op_importers.cpp:3659: Searching for plugin: ScatterND, plugin_version: 1, plugin_namespace:
[12/11/2023-16:10:27] [E] [TRT] INVALID_ARGUMENT: getPluginCreator could not find plugin ScatterND version 1
ERROR: builtin_op_importers.cpp:3661 In function importFallbackPluginImporter:
[8] Assertion failed: creator && "Plugin not found, are the plugin name, version, and namespace correct?"
[12/11/2023-16:10:27] [E] Failed to parse onnx file
[12/11/2023-16:10:27] [E] Parsing model failed
[12/11/2023-16:10:27] [E] Engine creation failed
[12/11/2023-16:10:27] [E] Engine set up failed

cudaMemcpyDeviceToHost Slow Time

When I provide images in a loop without any delay, the processing time for yolov7-face or yolov8-face is short. However, when I feed the images to the detection function one by one, introducing a 1-second time interval between each photo, the processing time becomes longer. What might be causing this issue?

Here are the processing times for images in a loop:

../images//test1.jpg average: 389.05ms
../images//test3.jpg average: 134.054ms
../images//cam4.jpg average: 104.824ms
../images//test11.jpg average: 93.1855ms
../images//test7.jpg average: 86.4966ms
../images//test8.jpg average: 85.9823ms
../images//arac2.jpg average: 67.5789ms
../images//arac3.jpg average: 69.3688ms
../images//arac4.jpg average: 68.7759ms
../images//test9.jpg average: 75.8391ms

And here are the processing times with 1-second intervals between images:

../images//test1.jpg average: 267.529ms
../images//test3.jpg average: 313.996ms
../images//cam4.jpg average: 159.6ms
../images//test11.jpg average: 315.25ms
../images//test7.jpg average: 296.985ms
../images//test8.jpg average: 237.869ms
../images//arac2.jpg average: 206.976ms
../images//arac3.jpg average: 244.924ms
../images//arac4.jpg average: 185.883ms
../images//test9.jpg average: 239.323ms

Upon analyzing the detect function, I've identified that the following line is taking a long time:
CHECK(cudaMemcpyAsync(decode_ptr_host[i],decode_ptr_device,sizeof(float)(1+MAX_OBJECTSNUM_BOX_ELEMENT),cudaMemcpyDeviceToHost,stream));

What could be the issue and what can be the solution? CudaMemCpy is slower when images are given one by one. How can I solve this?

Model Weights

The Baidu link isn't working, can you share the models via other services like Google Drive or One Drive?

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.