mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
[Doc]fix inference_segmentor to inference_model (#3261)
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. ## Motivation there is a code mistake in `docs\zh_cn\get_started.md` and `docs\en\get_started.md`,it use the 0.x api,which is changed in 1.x ## Modification `docs\zh_cn\get_started.md` ,`docs\en\get_started.md` fix inference_segmentor --> inference_model ## BC-breaking (Optional) Does the modification introduce changes that break the backward-compatibility of the downstream repos? If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR. ## Use cases (Optional) If this PR introduces a new feature, it is better to list some use cases here, and update the documentation. ## Checklist 1. Pre-commit or other linting tools are used to fix the potential lint issues. 2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness. 3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMDet3D. 4. The documentation has been modified accordingly, like docstring or example tutorials.
This commit is contained in:
parent
9801c62fd7
commit
22ffd0d2f6
@ -110,8 +110,8 @@ show_result_pyplot(model, img, result, show=True, out_file='result.jpg', opacity
|
||||
# test a video and show the results
|
||||
video = mmcv.VideoReader('video.mp4')
|
||||
for frame in video:
|
||||
result = inference_segmentor(model, frame)
|
||||
show_result_pyplot(model, result, wait_time=1)
|
||||
result = inference_model(model, frame)
|
||||
show_result_pyplot(model, frame, result, wait_time=1)
|
||||
```
|
||||
|
||||
You can modify the code above to test a single image or a video, both of these options can verify that the installation was successful.
|
||||
|
@ -110,8 +110,8 @@ show_result_pyplot(model, img, result, show=True, out_file='result.jpg', opacity
|
||||
# 在一段视频上测试并可视化分割结果
|
||||
video = mmcv.VideoReader('video.mp4')
|
||||
for frame in video:
|
||||
result = inference_segmentor(model, frame)
|
||||
show_result_pyplot(model, result, wait_time=1)
|
||||
result = inference_model(model, frame)
|
||||
show_result_pyplot(model, frame, result, wait_time=1)
|
||||
```
|
||||
|
||||
您可以修改上面的代码来测试单个图像或视频,这两个选项都可以验证安装是否成功。
|
||||
|
Loading…
x
Reference in New Issue
Block a user