未验证 提交 ae27dcd9 编写于 作者: W Wenyu 提交者: GitHub

fix train dataset get_anno (#6076)

上级 9d0c8dbd
...@@ -218,13 +218,14 @@ class Trainer(object): ...@@ -218,13 +218,14 @@ class Trainer(object):
# when do validation in train, annotation file should be get from # when do validation in train, annotation file should be get from
# EvalReader instead of self.dataset(which is TrainReader) # EvalReader instead of self.dataset(which is TrainReader)
anno_file = self.dataset.get_anno()
dataset = self.dataset
if self.mode == 'train' and validate: if self.mode == 'train' and validate:
eval_dataset = self.cfg['EvalDataset'] eval_dataset = self.cfg['EvalDataset']
eval_dataset.check_or_download_dataset() eval_dataset.check_or_download_dataset()
anno_file = eval_dataset.get_anno() anno_file = eval_dataset.get_anno()
dataset = eval_dataset dataset = eval_dataset
else:
dataset = self.dataset
anno_file = dataset.get_anno()
IouType = self.cfg['IouType'] if 'IouType' in self.cfg else 'bbox' IouType = self.cfg['IouType'] if 'IouType' in self.cfg else 'bbox'
if self.cfg.metric == "COCO": if self.cfg.metric == "COCO":
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册