ssdvoc2012 分割训练要训练多久

posts - 8,&
comments - 0,&
trackbacks - 0
Traceback (most recent call last):
File "./tools/test_net.py", line 90, in
test_net(net, imdb, max_per_image=args.max_per_image, vis=args.vis)
File "/home/rs/myGithub/py-faster-rcnn/tools/../lib/fast_rcnn/test.py", line 295, in test_net
imdb.evaluate_detections(all_boxes, output_dir)
File "/home/rs/myGithub/py-faster-rcnn/tools/../lib/datasets/pascal_voc.py", line 322, in evaluate_detections
self._do_python_eval(output_dir)
File "/home/rs/myGithub/py-faster-rcnn/tools/../lib/datasets/pascal_voc.py", line 285, in _do_python_eval
use_07_metric=use_07_metric)
File "/home/rs/myGithub/py-faster-rcnn/tools/../lib/datasets/voc_eval.py", line 127, in voc_eval
R = [obj for obj in recs[imagename] if obj['name'] == classname]
KeyError: '000001'
-----------------------------------------------------------------------------------------------------------
Just delete it
rm data/VOCdevkit2007/annotations_cache/annots.pkl and run the program again.
You should also delete the roidb cache:
rm data/cache/voc_2007_trainval_gt_roidb.pkl
阅读(...) 评论()机器学习(9)
Caffe(2)
C/C++(31)
可以参照前一篇文章配置windows下的ssd,本文假设ssd已经通过windows下的编译。
1.准备数据
需要根据PASCAL VOC格式&准备对应的数据,推荐一个好用的贴标签软件(/tzutalin/labelImg)
拿VOC2012为例,VOC2012目录下需要Annotations、ImageSets、JPEGImages文件夹,Annotations存储对应的标签xml信息,JPEGImages存储图片数据,ImageSets 主要使用Main文件夹下的数据,Main文件夹保存了对应的训练、验证数据集的txt文本
然后使用caffe-ssd-microsoft\data\VOC0712目录下create_data.bat来生成所需要的lmdb文件(create_data.bat根据实际情况修改内容)
caffe-ssd-microsoft\data\VOC0712目录下get_image_size.bat用于生成test.txt中对应图片的大小映射,生成的结果写入test_name_size.txt
对于后面的训练需要准备以下文件:
test.txt &用于测试的文件集定义
labelmap_voc.prototxt & 标签定义文件
test_name_size.txt 测试图片大小定义文件(可通过get_image_size.bat生成)
trainval.txt 训练验证集文件定义(数据排列为乱序,可根据实际情况设定)
train.prototxt &训练网络定义文件
test.prototxt & &测试网络定义文件
deploy.prototxt & &部署定义文件
solver.prototxt & &训练配置文件
2.修改训练文件
caffe-ssd-microsoft\examples\ssd下的ssd_pascal.bat是用来训练数据用的程序(它是调用ssd_pascal.py运行的,ssd_pascal.py用来配置整个的训练环境),因为windows下的对 路径和linux的不同,所以对应的windows下需要找到ssd_pascal.py对应的内容进行修改:
train_data = &{}/data/VOC0712/trainval_lmdb&.format(caffe_root)
test_data = &{}/data/VOC0712/test_lmdb&.format(caffe_root)
save_dir = &{}/models/VGGNet/VOC0712/{}&.format(caffe_root,job_name)
snapshot_dir = &{}/models/VGGNet/VOC0712/{}&.format(caffe_root,job_name)
job_dir = &{}/jobs/VGGNet/VOC0712/{}&.format(caffe_root,job_name)
output_result_dir = &{}/data/VOC0712/results/{}/Main&.format(caffe_root,job_name)
name_size_file = &{}/data/VOC0712/test_name_size.txt&.format(caffe_root)
pretrain_model = &{}/models/VGGNet/VGG_ILSVRC_16_layers_fc_reduced.caffemodel&.format(caffe_root)
label_map_file = &{}/data/VOC0712/labelmap_voc.prototxt&.format(caffe_root)
f.write('{}\Build\{}\Debug\caffe train ^\n'.format(caffe_root,'x64'))
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:216743次
积分:2787
积分:2787
排名:第11137名
原创:43篇
转载:28篇
译文:17篇
评论:39条
(1)(1)(1)(1)(2)(5)(3)(1)(1)(1)(1)(5)(8)(3)(2)(8)(1)(6)(10)(4)(1)(3)(2)(1)(7)(1)(6)(1)(1)

我要回帖

更多关于 yolo v2 训练voc数据 的文章

 

随机推荐