未验证 提交 22c6e80a 编写于 作者: W wangguanzhong 提交者: GitHub

support voc format in fcos & ttfnet (#2875)

上级 2b7209c3
...@@ -452,9 +452,10 @@ class Gt2FCOSTarget(BaseOperator): ...@@ -452,9 +452,10 @@ class Gt2FCOSTarget(BaseOperator):
sample['centerness{}'.format(lvl)] = np.reshape( sample['centerness{}'.format(lvl)] = np.reshape(
ctn_targets_by_level[lvl], newshape=[grid_h, grid_w, 1]) ctn_targets_by_level[lvl], newshape=[grid_h, grid_w, 1])
sample.pop('is_crowd') sample.pop('is_crowd', None)
sample.pop('gt_class') sample.pop('difficult', None)
sample.pop('gt_bbox') sample.pop('gt_class', None)
sample.pop('gt_bbox', None)
return samples return samples
...@@ -531,11 +532,11 @@ class Gt2TTFTarget(BaseOperator): ...@@ -531,11 +532,11 @@ class Gt2TTFTarget(BaseOperator):
sample['ttf_heatmap'] = heatmap sample['ttf_heatmap'] = heatmap
sample['ttf_box_target'] = box_target sample['ttf_box_target'] = box_target
sample['ttf_reg_weight'] = reg_weight sample['ttf_reg_weight'] = reg_weight
sample.pop('is_crowd') sample.pop('is_crowd', None)
sample.pop('gt_class') sample.pop('difficult', None)
sample.pop('gt_bbox') sample.pop('gt_class', None)
if 'gt_score' in sample: sample.pop('gt_bbox', None)
sample.pop('gt_score') sample.pop('gt_score', None)
return samples return samples
def draw_truncate_gaussian(self, heatmap, center, h_radius, w_radius): def draw_truncate_gaussian(self, heatmap, center, h_radius, w_radius):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册