From 0eb310c229bee120064325e11b09ede72a81de18 Mon Sep 17 00:00:00 2001 From: lupeng Date: Fri, 14 Jul 2023 17:18:15 +0800 Subject: [PATCH] fix demo scripts --- demo/body3d_pose_lifter_demo.py | 9 +++++---- demo/bottomup_demo.py | 9 +++++---- demo/topdown_demo_with_mmdet.py | 9 +++++---- projects/just_dance/README.md | 2 +- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/demo/body3d_pose_lifter_demo.py b/demo/body3d_pose_lifter_demo.py index 840cd4edc9..9802a0a5c8 100644 --- a/demo/body3d_pose_lifter_demo.py +++ b/demo/body3d_pose_lifter_demo.py @@ -452,10 +452,11 @@ def main(): video_writer.write(mmcv.rgb2bgr(frame_vis)) - # press ESC to exit - if cv2.waitKey(5) & 0xFF == 27: - break - time.sleep(args.show_interval) + if args.show: + # press ESC to exit + if cv2.waitKey(5) & 0xFF == 27: + break + time.sleep(args.show_interval) video.release() diff --git a/demo/bottomup_demo.py b/demo/bottomup_demo.py index 3d6fee7a03..c4b13eff55 100644 --- a/demo/bottomup_demo.py +++ b/demo/bottomup_demo.py @@ -196,11 +196,12 @@ def main(): video_writer.write(mmcv.rgb2bgr(frame_vis)) - # press ESC to exit - if cv2.waitKey(5) & 0xFF == 27: - break + if args.show: + # press ESC to exit + if cv2.waitKey(5) & 0xFF == 27: + break - time.sleep(args.show_interval) + time.sleep(args.show_interval) if video_writer: video_writer.release() diff --git a/demo/topdown_demo_with_mmdet.py b/demo/topdown_demo_with_mmdet.py index 38f4e92e4e..53b25eaf73 100644 --- a/demo/topdown_demo_with_mmdet.py +++ b/demo/topdown_demo_with_mmdet.py @@ -261,11 +261,12 @@ def main(): video_writer.write(mmcv.rgb2bgr(frame_vis)) - # press ESC to exit - if cv2.waitKey(5) & 0xFF == 27: - break + if args.show: + # press ESC to exit + if cv2.waitKey(5) & 0xFF == 27: + break - time.sleep(args.show_interval) + time.sleep(args.show_interval) if video_writer: video_writer.release() diff --git a/projects/just_dance/README.md b/projects/just_dance/README.md index 1255996766..70390215f9 100644 --- a/projects/just_dance/README.md +++ b/projects/just_dance/README.md @@ -17,7 +17,7 @@ We provide a Jupyter Notebook [`just_dance_demo.ipynb`](./just_dance_demo.ipynb) Users can simply run the following command to generate the comparison video: ```shell -python process_video ${TEACHER_VIDEO} ${STUDENT_VIDEO} +python process_video.py ${TEACHER_VIDEO} ${STUDENT_VIDEO} ``` ### Gradio