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

support voc format in fcos & ttfnet (#2875)

上级 2b7209c3
......@@ -452,9 +452,10 @@ class Gt2FCOSTarget(BaseOperator):
sample['centerness{}'.format(lvl)] = np.reshape(
ctn_targets_by_level[lvl], newshape=[grid_h, grid_w, 1])
sample.pop('is_crowd')
sample.pop('gt_class')
sample.pop('gt_bbox')
sample.pop('is_crowd', None)
sample.pop('difficult', None)
sample.pop('gt_class', None)
sample.pop('gt_bbox', None)
return samples
......@@ -531,11 +532,11 @@ class Gt2TTFTarget(BaseOperator):
sample['ttf_heatmap'] = heatmap
sample['ttf_box_target'] = box_target
sample['ttf_reg_weight'] = reg_weight
sample.pop('is_crowd')
sample.pop('gt_class')
sample.pop('gt_bbox')
if 'gt_score' in sample:
sample.pop('gt_score')
sample.pop('is_crowd', None)
sample.pop('difficult', None)
sample.pop('gt_class', None)
sample.pop('gt_bbox', None)
sample.pop('gt_score', None)
return samples
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.
先完成此消息的编辑!
想要评论请 注册