Giter VIP home page Giter VIP logo

electrautistic / dlib-face-landmark-compression Goto Github PK

View Code? Open in Web Editor NEW

This project forked from miaoerduo/dlib-face-landmark-compression

0.0 0.0 0.0 22 KB

Dlib中的人脸landmark检测的模型压缩

Home Page: https://www.miaoerduo.com/c/dlib%E4%BA%BA%E8%84%B8%E5%85%B3%E9%94%AE%E7%82%B9%E6%A3%80%E6%B5%8B%E7%9A%84%E6%A8%A1%E5%9E%8B%E5%88%86%E6%9E%90%E4%B8%8E%E5%8E%8B%E7%BC%A9.html

C++ 100.00%

dlib-face-landmark-compression's Introduction

dlib-face-landmark-compression

Dlib中的人脸landmark检测的模型压缩

具体介绍见博客:https://www.miaoerduo.com/2018/01/08/dlib-landmark-model-compression/

使用前,需要修改dlib的源码: DLIB_PATH/include/dlib/image_processing/image_processing/shape_predictor.h

修改 shape_predictor 类的成员变量的属性为public。

另外,有同学反映说不能正常加载模型,后来换了dlib 19.8之后,就可以了。这里也请大家出现类似的问题注意一下。

请注意,压缩之后的模型,存储格式发生变化,因此是不能通过dlib原本的方式去加载的,要换成下面的方式:

dlib::shape_predictor sp;
med::load_shape_predictor_model(sp, "/path/to/compressed_model");

需要使用该项目的同学,只需要加huffman.hppmodel_utils.hpp加入项目中即可。

编译方式如下,建议每个人先运行main.cpp的Demo:

git clone https://github.com/miaoerduo/dlib-face-landmark-compression.git
cd dlib-face-landmark-compression
g++ main.cpp -o main.bin -O2 -I ./ -I DLIB_PATH/include -L DLIB_PATH/lib -ldlib -std=c++11
./main.bin src_dlib_shape_predictor_model dest_model

为了方便大家的调试,这里上传一个dlib的68点landmark的原模型和使用main.cpp的代码压缩之后的模型。

链接: https://pan.baidu.com/s/1OnT45TUHkQnqkN2h2zCc9g 密码: 22ju

dlib-face-landmark-compression's People

Contributors

danlx avatar miaoerduo avatar

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.