From c9935ef3a67b3947e91ddadebf51b1a03aaa860a Mon Sep 17 00:00:00 2001 From: lupeng Date: Mon, 13 Feb 2023 15:19:33 +0800 Subject: [PATCH] add argument `show` for image_demo --- demo/image_demo.py | 7 ++++++- docs/en/installation.md | 4 +--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/demo/image_demo.py b/demo/image_demo.py index ab3740bfea..d595ed43c9 100644 --- a/demo/image_demo.py +++ b/demo/image_demo.py @@ -20,6 +20,11 @@ def parse_args(): '--draw-heatmap', action='store_true', help='Visualize the predicted heatmap') + parser.add_argument( + '--show', + action='store_true', + default=False, + help='whether to show img') args = parser.parse_args() return args @@ -56,7 +61,7 @@ def main(): draw_gt=False, draw_bbox=True, draw_heatmap=args.draw_heatmap, - show=True, + show=args.show, out_file=args.out_file) diff --git a/docs/en/installation.md b/docs/en/installation.md index 5047505cf5..b3c9f93045 100644 --- a/docs/en/installation.md +++ b/docs/en/installation.md @@ -117,12 +117,10 @@ python demo/image_demo.py \ --draw-heatmap ``` -If everything goes fine, you will get this visualization result: +If everything goes fine, you will be able to get the following visualization result from `vis_results.jpg` in your current folder, which displays the predicted keypoints and heatmaps overlaid on the person in the image. ![image](https://user-images.githubusercontent.com/87690686/187824033-2cce0f55-034a-4127-82e2-52744178bc32.jpg) -And the visualization result will be saved as `vis_results.jpg` on your current folder, where the predicted keypoints and heatmaps are plotted on the person in the image. - Option (B). If you install mmpose with pip, open you python interpreter and copy & paste the following codes. ```python