Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Use opencv backend in Webcam API visualization #2089

Merged
merged 5 commits into from
Mar 20, 2023

Conversation

Ben-Louis
Copy link
Collaborator

Motivation

The visualization step in Webcam API is slow due the matplotlib backend used by PoseVisualizer (#2035)

Modification

  1. use imshow_bboxes and imshow_keypoints, which are used by Webcam API in 0.x version for visualization, to replace PoseVisualizer
  2. rename webcam_demo to webcam_api_demo
  3. add DeprecationWarning in demo/webcam_api_demo.py

BC-breaking (Optional)

Use cases (Optional)

Checklist

Before PR:

  • I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
  • Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
  • Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
  • New functionalities are covered by complete unit tests. If not, please add more unit tests to ensure correctness.
  • The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

  • CLA has been signed and all committers have signed the CLA in this PR.

@Ben-Louis Ben-Louis force-pushed the fix-visualization-node-webcam branch from b92ce32 to 8f827f6 Compare March 20, 2023 02:23
@codecov
Copy link

codecov bot commented Mar 20, 2023

Codecov Report

Patch coverage: 40.42% and project coverage change: -0.43 ⚠️

Comparison is base (cd71020) 81.92% compared to head (c2fce8c) 81.49%.

❗ Current head c2fce8c differs from pull request most recent head 8f827f6. Consider uploading reports for the commit 8f827f6 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           dev-1.x    #2089      +/-   ##
===========================================
- Coverage    81.92%   81.49%   -0.43%     
===========================================
  Files          227      227              
  Lines        13447    13513      +66     
  Branches      2286     2306      +20     
===========================================
- Hits         11017    11013       -4     
- Misses        1913     1980      +67     
- Partials       517      520       +3     
Flag Coverage Δ
unittests 81.49% <40.42%> (-0.43%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...m/nodes/visualizer_nodes/object_visualizer_node.py 49.56% <40.42%> (-40.24%) ⬇️

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -51,6 +52,10 @@ def set_device(cfg: Config, device: str):


def run():

warnings.warn('The Webcam API will be deprecated in future. ',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a reference to the inferencer-based webcam demo.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, the inferencer utilizing webcam input encounters a similar issue as the webcam API, where the visualization process is too slow to render keypoints in real time. As a result, users might have a less satisfactory experience with the inferencer compared to the updated webcam API.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think this PR can be merged as it is.

@ly015 ly015 merged commit 3af7fed into open-mmlab:dev-1.x Mar 20, 2023
@Ben-Louis Ben-Louis deleted the fix-visualization-node-webcam branch March 29, 2023 17:33
shuheilocale pushed a commit to shuheilocale/mmpose that referenced this pull request May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants