-
Notifications
You must be signed in to change notification settings - Fork 755
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
[Feature] Refactor Inferencers #1608
Conversation
Codecov ReportBase: 85.58% // Head: 88.42% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev-1.x #1608 +/- ##
===========================================
+ Coverage 85.58% 88.42% +2.84%
===========================================
Files 175 175
Lines 10950 10881 -69
Branches 1526 1523 -3
===========================================
+ Hits 9372 9622 +250
+ Misses 1313 979 -334
- Partials 265 280 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
## Motivation Support `MMSegInferencer` for providing an easy and clean interface for single or multiple images inferencing. Ref: open-mmlab/mmengine#773 open-mmlab/mmocr#1608 ## Modification - mmseg/apis/mmseg_inferencer.py - mmseg/visualization/local_visualizer.py - demo/image_demo_with_inferencer.py ## Use cases (Optional) Based on https://github.com/open-mmlab/mmengine/tree/inference Add a new image inference demo with `MMSegInferencer` - demo/image_demo_with_inferencer.py ```shell python demo/image_demo_with_inferencer.py demo/demo.png fcn_r50-d8_4xb2-40k_cityscapes-512x1024 ``` --------- Co-authored-by: MeowZheng <meowzheng@outlook.com>
Refactor inferencers and their entry script based on
mmengine.BaseInferencer
For colleagues:
BaseMMOCRInferencer
,TextDetInferencer
andTextRecInferencer
are good reference points.Attention
To users who have been using
1.x
/dev-1.x
branch on Windows and wish to upgrade MMOCR to use new Inferencers: You may encounter the following error:Which has to be manually fixed by running the command under
mmocr\
root directory:mklink /D mmocr\.mim\dicts dicts\