Skip to content

Commit

Permalink
[Doc]fix inference_segmentor to inference_model (#3261)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ooooo-create committed Aug 15, 2023
1 parent 9801c62 commit 22ffd0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/en/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/zh_cn/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```

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

0 comments on commit 22ffd0d

Please sign in to comment.