Openpose 单个GPU训练起来了。

30 篇文章 0 订阅

前几天公司有人脸识别方面性能需求,花了点时间,把insightface 的环境安装后训练了一下。

ubuntu单GPU,rtx2080 这样的配置run insightface太慢,当时没记训练速度,大概是1个晚上训练出来10个epoch,达到》95%精度。开发到AI架构是MxNET(这个架构是华人大神李沐和陈天奇等搞得),,估计训练时间久一些,会轻松达到>99%精度,根据论文介绍,目前insightface是人脸领域的SOTA。  后面由于公司对人体姿态动作预测有性能要求,所以花费了几天的时间在1GPU的环境,搭建起来了openpose训练环境。

openpose,COCO数据集体,下载39G的数据,然后生成189G的数据集,训练了一个晚上,,,1路rtx2080,,batch size 8,大概是12小时训练到3个epoch,50000个iter。loss还比较大。。。根据论文作者描述,openpose至少要4路gpu,训练到800k个iter的时候效果是最好的。。。好吧,需要更高的训练工作站更强配置的gpu然后再来做性能提升。

--------------------------------------------------------

https://github.com/CMU-Perceptual-Computing-Lab/openpose/

按照作者的指导,如下:

Training Steps

  • Run cd training; bash getData.sh to obtain the COCO images in dataset/COCO/images/, keypoints annotations in dataset/COCO/annotations/ and COCO official toolbox in dataset/COCO/coco/.
    •   这里建议开screen,因为要下载超级久
  • Run getANNO.m in matlab to convert the annotation format from json to mat in dataset/COCO/mat/.
  • Run genCOCOMask.m in matlab to obatin the mask images for unlabeled person. You can use 'parfor' in matlab to speed up the code.
    •   注意修改Matlab程序中的路径,在  im = imread(['dataset/COCO/', img_paths]);的COCO后面加上images/,原程序有点问题
    •       这里尝试开启了一下并行运算,速度特别快,将代码中第二个for循环改为parfor i = 1:L,然后使用Matlab的时候,先输入matlabpool open,然后再运行程序。关闭的方法为matlabpool close
  • Run genJSON('COCO') to generate a json file in dataset/COCO/json/ folder. The json files contain raw informations needed for training.
  • Run python genLMDB.py to generate your LMDB. (You can also download our LMDB for the COCO dataset (189GB file) by: bash get_lmdb.sh)
  • Download our modified caffe: caffe_train. Compile pycaffe. It will be merged with caffe_rtpose (for testing) soon.
  • Run python setLayers.py --exp 1 to generate the prototxt and shell file for training.
  • Download VGG-19 model, we use it to initialize the first 10 layers for training.
  • Run bash train_pose.sh 0,1 (generated by setLayers.py) to start the training with two gpus.  ,,当只有1个gpu到时候,后面只给参数0 。

后面继续搞清楚自己收集到的图片如何制作为标签丢到数据集里面,作相应的增强。

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值