Giter VIP home page Giter VIP logo

face-tracking-using-cnn-and-optical-flow's Introduction

2021.06.06 Pytorch version: https://github.com/HansRen1024/C-OF. Code is released (20210816).

2021.05.10 Pytorch version will be released soon.

2019.01.25 UPDATE

Some guys are not familiar with ncnn, and compile this repo with an error of could not find net.h. Please move to https://github.com/Tencent/ncnn to find what is ncnn and how to install it. Download the version we used from https://github.com/Tencent/ncnn/archive/refs/tags/20180830.zip.

2018.12.20 IMPORTANT UPDATE

I extremely optimized the code, all useless contents were removed. Right now, tracking speed is approximate 3ms. Besides, I deleted initialization funtion and OpenCV 3.x is supported now.

RK3399 20+ ms/frame

Face-Tracking-Using-Optical-Flow-and-CNN

I optimized OpenTLD making it run faster and better for face tracking.

This version of TLD is faster and more stable than that in OpenCV. I delete some funtions to make it run faster. What is more, use RNet to judge the face that TLD produced to avoid TLD tracking a wrong target. In order to get a stable bounding box, I fix the width and height that MTCNN provides. Running time on my PC(Intel® Xeon(R) CPU E5-2673 v3 @ 2.40GHz × 48) is about 16ms(MTCNN, ncnn), 30ms(TLD initialization), 10ms(TLD tracking) on an image of 320*240 resolution. Besides, MTCNN can be replaced by PCN or any other face/object detection algorithms.

中文介绍地址:https://blog.csdn.net/renhanchi/article/details/85089265

Installing

OpenCV 2.4.X is required!(Now OpenCV 3.x is supported)

Install ncnn firstly, and reset ncnn's include and lib pathes in CMakeLists.txt.

mkdir build
cd build
cmake ..
make
cd ..
./demo

Examples

image

image

References

https://github.com/Tencent/ncnn

https://github.com/CongWeilin/mtcnn-caffe

https://github.com/alantrrs/OpenTLD

face-tracking-using-cnn-and-optical-flow's People

Contributors

hansren1024 avatar hyx07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

face-tracking-using-cnn-and-optical-flow's Issues

您好,make的时候报错

/usr/bin/ld: ../demo: hidden symbol `__cpu_model' in /usr/lib/gcc/x86_64-linux-gnu/5/libgcc.a(cpuinfo.o) is referenced by DSO
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
CMakeFiles/demo.dir/build.make:114: recipe for target '../demo' failed
make[2]: *** [../demo] Error 1
CMakeFiles/Makefile2:105: recipe for target 'CMakeFiles/demo.dir/all' failed
make[1]: *** [CMakeFiles/demo.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

if remove the classifiers in the algorithm,the learning module in the original algorithm is gone, then use the tld is not much sense?

Thanks for sharing your work with us.I have a few questions .
If removing the classifiers in the algorithm,the learning module in the original algorithm is gone, then use the tld is not much sense?I think the biggest contribution of TLD is the framework of tracking-learning-detection.
Whether the effect will be better,if i use another tracker,faster than tld?

关于保存视频的问题

我uncomment了视频存储相关的语句,但是运行后目录内没有保存的文件,是哪里还需要调整嘛?

mtcnn.rnet(img, pbox) is nan

Thanks for your job! But when I test your code with a local movie, after function "tld.processFrame(last_gray,current_gray,pbox,status);" in ncnn_mtcnn_tld_so.cpp ,sometimes the x, width,height of pbox will be negative, and "mtcnn.rnet(img, pbox)" will be nan or -nan.

gcc版本是多少?

您好,请问下您make时gcc的版本号是多少?
我的是4.8.2,make时报错:
“/usr/include/c++/4.8.2/bits/stl_algo.h:2266:34: 错误:将类型为‘Bbox&’的引用初始化为类型为‘const Bbox’的表达式无效”
这应该是gcc的bug吧,查到说4.9.0+就不会出现这个问题了。
谢谢~

tld尺度几乎没有变化?

调试的时候发现,在tld跟踪的时候,尺度几乎是都是1,没有变化, 请问这是tld哪里出问题了吗?

clang: error: unsupported option '-fopenmp'

MacOSX 不支持吗?ncnn这个库明确说明了,xcode do not support openmp feature,我就是在mac上用xcode编译的ncnn,然后在Face-Tracking-Based-on-OpenTLD-and-RNet/build编译的时候,就遇到了这个问题。

clang: error: unsupported option '-fopenmp'

Build for MacOSX
install xcode and protobuf

Because the compiler bundled with xcode do not support openmp feature, you cannot enable the multithreading inference feature of ncnn library, if you build with xcode.

$ homebrew install protobuf
$ cd
$ mkdir -p build
$ cd build
$ cmake ..
$ make -j4
$ make install
pick build/install folder for further usage

Ali:build admin$ make
Scanning dependencies of target TLD
[ 16%] Building CXX object CMakeFiles/TLD.dir/include/TLD.o
clang: error: unsupported option '-fopenmp'
make[2]: *** [CMakeFiles/TLD.dir/include/TLD.o] Error 1
make[1]: *** [CMakeFiles/TLD.dir/all] Error 2
make: *** [all] Error 2

what is TLD?

can give some url, i want know what is TLD. thanks.

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.