未验证 提交 40cabbde 编写于 作者: C cnn 提交者: GitHub

[dev] fix infer bug of s2anet (#3080)

* fix infer bug of s2anet
上级 19124833
......@@ -97,7 +97,7 @@ python3.7 tools/infer.py -c configs/dota/s2anet_1x_dota.yml -o weights=./weights
## 预测部署
Paddle中`multiclass_nms`算子的输入支持四边形输入,因此部署时可以不需要依赖旋转框IOU计算算子。
Paddle中`multiclass_nms`算子的输入支持四边形输入,因此部署时可以不需要依赖旋转框IOU计算算子。
```bash
# 预测
......
......@@ -112,6 +112,11 @@ def _dump_infer_config(config, path, image_shape, model):
config['TestReader'], config['TestDataset'], config['metric'],
label_arch, image_shape)
if infer_arch == 'S2ANet':
# TODO: move background to num_classes
if infer_cfg['label_list'][0] != 'background':
infer_cfg['label_list'].insert(0, 'background')
yaml.dump(infer_cfg, open(path, 'w'))
logger.info("Export inference config file to {}".format(os.path.join(path)))
return image_shape
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册