Fix the wrong examples for Visualizer.draw_polygons (#798)

* examples wrong

* Update visualizer.py

Thanks, learn more.
solve "lint failed"

* Update visualizer.py
pull/802/head
Youfu 2022-12-08 11:44:59 +08:00 committed by GitHub
parent 491d71c0ef
commit 57f6644ea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -110,11 +110,11 @@ class Visualizer(ManagerMixin):
>>> vis.draw_circles(circle_coord=np.array([2, 2]), radius=np.array[1])
>>> vis.draw_circles(circle_coord=np.array([[2, 2], [3, 5]),
>>> radius=np.array[1, 2], colors=['g', 'r'])
>>> vis.draw_polygons(np.array([0, 0, 1, 0, 1, 1, 0, 1]),
>>> edge_colors='g')
>>> vis.draw_polygons(bbox=[np.array([0, 0, 1, 0, 1, 1, 0, 1],
>>> np.array([2, 2, 3, 2, 3, 3, 2, 3]],
>>> edge_colors=['g', 'r'])
>>> square = np.array([[0, 0], [100, 0], [100, 100], [0, 100]])
>>> vis.draw_polygons(polygons=square, edge_colors='g')
>>> squares = [np.array([[0, 0], [100, 0], [100, 100], [0, 100]]),
>>> np.array([[0, 0], [50, 0], [50, 50], [0, 50]])]
>>> vis.draw_polygons(polygons=squares, edge_colors=['g', 'r'])
>>> vis.draw_binary_masks(binary_mask, alpha=0.6)
>>> heatmap = vis.draw_featmap(featmap, img,
>>> channel_reduction='select_max')