mmcv/docs/understand_mmcv/visualization.md
Zaida Zhou 66cefaffa3
[Docs] Refactor docs (#1102)
* [Docs] Refactor documentation

* [Docs] Refactor documentation

* refactor docs

* refactor docs

* set sphinx==3.1.2

* fix typo

* modify according to comment

* modify according to comment

* modify according to comment

* [Docs] delete unnecessary file

* fix title

* rename

* rename
2021-07-02 20:53:00 +08:00

527 B

Visualization

mmcv can show images and annotations (currently supported types include bounding boxes).

# show an image file
mmcv.imshow('a.jpg')

# show a loaded image
img = np.random.rand(100, 100, 3)
mmcv.imshow(img)

# show image with bounding boxes
img = np.random.rand(100, 100, 3)
bboxes = np.array([[0, 0, 50, 50], [20, 20, 60, 60]])
mmcv.imshow_bboxes(img, bboxes)

mmcv can also visualize special images such as optical flows.

flow = mmcv.flowread('test.flo')
mmcv.flowshow(flow)