Skip to content

[dev] fix infer bug of s2anet #3080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configs/dota/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
# 预测
Expand Down
4 changes: 4 additions & 0 deletions deploy/python/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ def __init__(self, model_dir):
self.preprocess_infos = yml_conf['Preprocess']
self.min_subgraph_size = yml_conf['min_subgraph_size']
self.labels = yml_conf['label_list']
if self.arch == 'S2ANet':
# TODO: move background to num_classes
if self.labels[0] != 'background':
self.labels.insert(0, 'background')
self.mask = False
if 'mask' in yml_conf:
self.mask = yml_conf['mask']
Expand Down