python - Can I retrain OpenCV DNN face detector using my own face dataset and .pb .pbtxt files provided by OpenCV?
问题描述
I want to fine tune existing OpenCV DNN face detector to a face images database that I own. I have opencv_face_detector.pbtxt and opencv_face_detector_uint8.pb tensorflow files provided by OpenCV. I wonder if based on this files is there any way to fit the model to my data? So far, I haven't also managed to find any tensorflow training script for this model in OpenCV git repository and I only know, that given model is and SSD with resnet-10 as a backbone. I am also not sure, reading the information on the internet, if I can resume training from .pb file. Are you aware of availability of any scripts defining the model, that could be used for training? Would pbtxt and pb files be enough to continue training on new data?
Also, I noticed that there is a git containing caffe version of this model https://github.com/weiliu89/caffe/tree/ssd. Although I never worked with caffe before, would it be possible/easier to use existing weight (caffe .pg and .pbtxt files are also available in OpenCV's github) and fit the model to my dataset?
解决方案
我在 opencv 中看不到这样做的方法,但我认为您可以将模型加载到 tensorflow 中并使用model.fit()进行重新训练。
关于迁移学习的通常建议适用。您可能想冻结大部分早期层,只重新训练最后一两个层。也建议使用缓慢的学习率。
推荐阅读
- python - 通过应用函数更新循环内的列表
- reactjs - 带有 react-native 列表的无限循环滚动
- javascript - 如何在nodejs中设置配置sendmail?
- sql - 如何将平均值与总和相加
- php - 根据其他分类列表drupal 8创建分类列表?
- handlebars.js - 车把模板循环遍历 json 数据
- bash - 尝试将 if 语句添加到脚本
- hyperledger-fabric - 多主机(本地网络)中的超级账本作曲家
- sql-server - 使用 Web 服务方法从 SQL Server Pivot 检索数据
- c++ - 帧缓冲纹理出现白色(片段着色器不影响它)