Closed liangruofei closed 4 years ago
TrainReader:
dataset:
!VOCDataSet
dataset_dir: dataset/insects
anno_path: train.txt
use_default_label: false
with_background: false
使用昆虫数据集时,需要将reader中的配置文件做以上修改
可以了,非常感谢🙏
梁若飞 邮箱:liangruofeinuc@163.com |
---|
签名由 网易邮箱大师 定制
在2020年08月25日 19:57,wangguanzhong 写道:
TrainReader:
dataset:
!VOCDataSetdataset_dir: dataset/insectsanno_path: train.txtuse_default_label: falsewith_background: false
使用昆虫数据集时,需要将reader中的配置文件做以上修改
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
我是跑昆虫数据集的voc格式,提示这个
%run tools/train.py -c configs/dcn/yolov3_r50vd_dcn_db_obj365_pretrained_coco.yml
运行时长: 5秒802毫秒 结束时间: 2020-08-25 18:11:09 ---------------------------------------------------------------------------KeyError Traceback (most recent call last)~/PaddleDetection-0.4/tools/train.py in
368 help='The profiler output file path. (used for benchmark)')
369 FLAGS = parser.parse_args()
--> 370 main()
~/PaddleDetection-0.4/tools/train.py in main()
204 cfg.TrainReader, (cfg.max_iters - start_iter) * devices_num,
205 cfg,
--> 206 devices_num=devices_num)
207 train_loader.set_sample_list_generator(train_reader, place)
208
~/PaddleDetection-0.4/ppdet/data/reader.py in create_reader(cfg, max_iter, global_cfg, devices_num)
432 cfg['num_classes'] = getattr(global_cfg, 'num_classes', 80)
433 cfg['devices_num'] = devices_num
--> 434 reader = Reader(**cfg)()
435
436 def _reader():
~/PaddleDetection-0.4/ppdet/data/reader.py in init(self, dataset, sample_transforms, batch_transforms, batch_size, shuffle, drop_last, drop_empty, mixup_epoch, cutmix_epoch, class_aware_sampling, worker_num, use_process, use_fine_grained_loss, num_classes, bufsize, memsize, inputs_def, devices_num)
206 devices_num=1):
207 self._dataset = dataset
--> 208 self._roidbs = self._dataset.get_roidb()
209 self._fields = copy.deepcopy(inputs_def[
210 'fields']) if inputs_def else None
~/PaddleDetection-0.4/ppdet/data/source/dataset.py in get_roidb(self)
66 if data_dir:
67 self.dataset_dir = data_dir
---> 68 self.load_roidb_and_cname2cid()
69
70 return self.roidbs
~/PaddleDetection-0.4/ppdet/data/source/voc.py in load_roidb_and_cname2cid(self)
152 if x2 > x1 and y2 > y1:
153 gt_bbox.append([x1, y1, x2, y2])
--> 154 gt_class.append([cname2cid[cname]])
155 gt_score.append([1.])
156 is_crowd.append([0])
KeyError: 'Linnaeus'