Skip to content

Commit 22ffd0d

Browse files
authored
[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.
1 parent 9801c62 commit 22ffd0d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/en/get_started.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ show_result_pyplot(model, img, result, show=True, out_file='result.jpg', opacity
110110
# test a video and show the results
111111
video = mmcv.VideoReader('video.mp4')
112112
for frame in video:
113-
result = inference_segmentor(model, frame)
114-
show_result_pyplot(model, result, wait_time=1)
113+
result = inference_model(model, frame)
114+
show_result_pyplot(model, frame, result, wait_time=1)
115115
```
116116

117117
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.

docs/zh_cn/get_started.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ show_result_pyplot(model, img, result, show=True, out_file='result.jpg', opacity
110110
# 在一段视频上测试并可视化分割结果
111111
video = mmcv.VideoReader('video.mp4')
112112
for frame in video:
113-
result = inference_segmentor(model, frame)
114-
show_result_pyplot(model, result, wait_time=1)
113+
result = inference_model(model, frame)
114+
show_result_pyplot(model, frame, result, wait_time=1)
115115
```
116116

117117
您可以修改上面的代码来测试单个图像或视频,这两个选项都可以验证安装是否成功。

0 commit comments

Comments
 (0)