注意:由于我保存的原因,pt权值文件没法用,caffe 还是可用的。 一个小型分类模型,用来检测人们是否戴口罩。之所以不用git上现有的口罩检测模型,是因为发现其性能还是不够,而且我们已经有个不错的人脸检测模型,不能丢了西瓜捡芝麻。模型结构没什么好说的,场景简单,随便拿来一个经典的分类模型改了下就用了。 说明:
- 输入的是 112x112 的 RGB 图片,预处理只有统一除以 255;
- 当初找数据时,也想过训成什么样子的模型,但由于数据限制,对于一些不是口罩的东西,如面罩、面纱,最终还是给它算作戴口罩。但用手捂嘴是可以分辨得出的,因为考虑到用户用手的情况,特意做了针对;
- 输出的话,0 是没戴, 1 是戴了口罩;
- 上传了些数据,你们可以看下我的数据,至于数据集公开,如果确实有需要,我不介意公开。暂时就这些吧,训练集正负类各6100张,测试效果也不错,实际跑在海思上面也是表现不错;
- 我是连 模型+ 权值一起保存,你们直接用就好,不用重建网络;
- 鉴于给各位带来不便,链接:https://pan.baidu.com/s/1rbpK1VGra_Ohu5er4Zpltg ;提取码:3mgd ,各位兄弟自己下吧,数据已打好标签并分类好,可以直接使用。