lcings / RetinaFaceAntiCov

RetinaFaceAntiCov opencv c++ caffe mask detect

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RetinaFaceAntiCov Implementation with opencv caffe C++

vs2015 opencv caffe c++口罩检测

0x01:result

result

0x02 model convert

参考:https://github.com/cypw/MXNet2Caffe

过程:

python json2prototxt.py --mx-json=./mnet_cov2-symbol.json --cf-prototxt=./mnet_cov2.prototxt

把prototxt中conv_1_conv2d层的输入_mulscalar0改成data,不然会报错: error1 convert

python mxnet2caffe.py --mx-model=./mnet_cov2 --cf-prototxt=./mnet_cov2.prototxt --cf-model=./mnet_cov2.caffemodel

这里说一下这个网络设计的不足:

mask的anchor有可能跟cls的anchor不在同一stride时,会导致mask置信度不对。

0x03:Note

依赖opencv4.51环境,须配置相关目录: project_set

0x04:Reference

官方RetinaFaceAntiCov:

https://github.com/deepinsight/insightface/tree/master/detection/RetinaFaceAntiCov note

无口罩版(源码参考): https://github.com/lcings/opencv_retinaface

About

RetinaFaceAntiCov opencv c++ caffe mask detect


Languages

Language:C++ 100.0%