-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Docs] Translate visualization documentation (#1350)
- Loading branch information
Showing
1 changed file
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
## 可视化 | ||
|
||
欢迎有兴趣的朋友一起翻译 MMCV 文档。如有兴趣,请在 [MMCV issue](https://github.com/open-mmlab/mmcv/issues) 提 issue 确定翻译的文档。 | ||
`mmcv` 可以展示图像以及标注(目前只支持标注框) | ||
|
||
```python | ||
# 展示图像文件 | ||
mmcv.imshow('a.jpg') | ||
|
||
# 展示已加载的图像 | ||
img = np.random.rand(100, 100, 3) | ||
mmcv.imshow(img) | ||
|
||
# 展示带有标注框的图像 | ||
img = np.random.rand(100, 100, 3) | ||
bboxes = np.array([[0, 0, 50, 50], [20, 20, 60, 60]]) | ||
mmcv.imshow_bboxes(img, bboxes) | ||
``` | ||
|
||
`mmcv` 也可以展示特殊的图像,例如光流 | ||
|
||
```python | ||
flow = mmcv.flowread('test.flo') | ||
mmcv.flowshow(flow) | ||
``` |