未验证 提交 85a82d9b 编写于 作者: W wangguanzhong 提交者: GitHub

fix voc eval on release/2.0 (#2732)

上级 0bd26c56
......@@ -21,6 +21,10 @@ TrainReader:
mixup_epoch: 350
batch_size: 12
EvalReader:
batch_transforms:
- PadBatch: {pad_gt: True}
epoch: 583
LearningRate:
......
......@@ -6,3 +6,7 @@ _BASE_: [
'_base_/ssd_mobilenet_reader.yml',
]
weights: output/ssd_mobilenet_v1_300_120e_voc/model_final
EvalReader:
batch_transforms:
- PadBatch: {pad_gt: True}
......@@ -6,3 +6,7 @@ _BASE_: [
'_base_/ssd_reader.yml',
]
weights: output/ssd_vgg16_300_240e_voc/model_final
EvalReader:
batch_transforms:
- PadBatch: {pad_gt: True}
......@@ -8,3 +8,7 @@ _BASE_: [
snapshot_epoch: 5
weights: output/yolov3_darknet53_270e_voc/model_final
EvalReader:
batch_transforms:
- PadBatch: {pad_gt: True}
......@@ -40,6 +40,10 @@ TrainReader:
drop_last: true
mixup_epoch: 250
EvalReader:
batch_transforms:
- PadBatch: {pad_gt: True}
LearningRate:
base_lr: 0.001
schedulers:
......
......@@ -41,6 +41,10 @@ TrainReader:
drop_last: true
mixup_epoch: 250
EvalReader:
batch_transforms:
- PadBatch: {pad_gt: True}
LearningRate:
base_lr: 0.001
schedulers:
......
......@@ -40,6 +40,10 @@ TrainReader:
drop_last: true
mixup_epoch: 250
EvalReader:
batch_transforms:
- PadBatch: {pad_gt: True}
LearningRate:
base_lr: 0.001
schedulers:
......
......@@ -41,6 +41,10 @@ TrainReader:
drop_last: true
mixup_epoch: 250
EvalReader:
batch_transforms:
- PadBatch: {pad_gt: True}
LearningRate:
base_lr: 0.001
schedulers:
......
......@@ -115,6 +115,7 @@ class PadBatch(BaseOperator):
gt_box_data = -np.ones([gt_num_max, 4], dtype=np.float32)
gt_class_data = -np.ones([gt_num_max], dtype=np.int32)
is_crowd_data = np.ones([gt_num_max], dtype=np.int32)
difficult_data = np.ones([gt_num_max], dtype=np.int32)
if pad_mask:
poly_num_max = max(poly_num)
......@@ -127,7 +128,12 @@ class PadBatch(BaseOperator):
gt_num = data['gt_bbox'].shape[0]
gt_box_data[0:gt_num, :] = data['gt_bbox']
gt_class_data[0:gt_num] = np.squeeze(data['gt_class'])
if 'is_crowd' in data:
is_crowd_data[0:gt_num] = np.squeeze(data['is_crowd'])
data['is_crowd'] = is_crowd_data
if 'difficult' in data:
difficult_data[0:gt_num] = np.squeeze(data['difficult'])
data['difficult'] = difficult_data
if pad_mask:
for j, poly in enumerate(data['gt_poly']):
for k, p_p in enumerate(poly):
......@@ -136,7 +142,6 @@ class PadBatch(BaseOperator):
data['gt_poly'] = gt_masks_data
data['gt_bbox'] = gt_box_data
data['gt_class'] = gt_class_data
data['is_crowd'] = is_crowd_data
return samples
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册