Giter VIP home page Giter VIP logo

Comments (3)

coneypo avatar coneypo commented on May 12, 2024

Hi,

  1. Build Dlib with CUDA, 编译 Dlib 时候选择用 CUDA 加速;
  2. 这里是实时的做识别,所以对于每一帧,都要做 检测 ROI -> 特征点提取 -> 计算欧氏距离比对,所以很慢;所以就算一直一张人脸,它还是要去算,所以其实很费资源,优化的话可以,比如对于第 N 帧,检测出来是 person_n,那对于下一帧,其实要做的就是做 OT 跟踪就好了,不需要再去比对了;

from dlib_face_recognition_from_camera.

coneypo avatar coneypo commented on May 12, 2024

Hi,

image

可以看到耗时占资源导致 FPS 低的原因是由于计算特征描述子的时候,所以利用 OT 跟踪,只对初始帧做检测+识别,后续帧只做检测+质心跟踪:
https://github.com/coneypo/Dlib_face_recognition_from_camera/blob/master/face_reco_from_camera_ot_single_person.py

FPS 可以提高到 28FPS;

from dlib_face_recognition_from_camera.

coneypo avatar coneypo commented on May 12, 2024

改用 OT 算法之后可以提高 FPS,如果只有人脸数目增加/减少才会做识别,要不然只做检测;
可以参考最新的代码,多谢

from dlib_face_recognition_from_camera.

Related Issues (20)

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.