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

[Feature] Add inferencers #1969

Merged
merged 17 commits into from
Mar 2, 2023
Merged

Conversation

Ben-Louis
Copy link
Collaborator

@Ben-Louis Ben-Louis commented Feb 13, 2023

Motivation

Modification

  1. add Pose2DInferencer which can conduct 2D pose estimation on image/video/webcam with top-down/bottom-up models
  2. add an inference wrapper MMPoseInferencer
  3. add demo script to run inferencer
  4. add unittest for inferences
  5. add document about inferences

Usage

  1. Images
    python demo/inferencer_demo.py tests/data/coco/ --pose2d human --show --pred-out-dir predictions
  2. Webcam
    python demo/inferencer_demo.py webcam --pose2d human --vis-out-dir visualization

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.

@codecov
Copy link

codecov bot commented Feb 14, 2023

Codecov Report

Base: 80.17% // Head: 82.15% // Increases project coverage by +1.97% 🎉

Coverage data is based on head (3a7a099) compared to base (0b7abbc).
Patch coverage: 83.50% of modified lines in pull request are covered.

❗ Current head 3a7a099 differs from pull request most recent head d80851c. Consider uploading reports for the commit d80851c to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           dev-1.x    #1969      +/-   ##
===========================================
+ Coverage    80.17%   82.15%   +1.97%     
===========================================
  Files          210      220      +10     
  Lines        12521    13100     +579     
  Branches      2112     2227     +115     
===========================================
+ Hits         10039    10762     +723     
+ Misses        2026     1842     -184     
- Partials       456      496      +40     
Flag Coverage Δ
unittests 82.15% <83.50%> (+1.97%) ⬆️

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

Impacted Files Coverage Δ
mmpose/visualization/local_visualizer.py 79.66% <60.00%> (-1.18%) ⬇️
mmpose/apis/inferencers/base_mmpose_inferencer.py 71.34% <71.34%> (ø)
mmpose/datasets/transforms/bottomup_transforms.py 79.77% <75.00%> (-0.11%) ⬇️
mmpose/apis/inferencers/mmpose_inferencer.py 75.30% <75.30%> (ø)
mmpose/apis/inferencers/pose2d_inferencer.py 75.72% <75.72%> (ø)
mmpose/models/heads/heatmap_heads/cid_head.py 80.45% <80.45%> (ø)
mmpose/models/utils/transformer.py 82.40% <87.50%> (+8.28%) ⬆️
mmpose/codecs/decoupled_heatmap.py 88.42% <88.42%> (ø)
mmpose/codecs/utils/instance_property.py 89.18% <89.18%> (ø)
mmpose/codecs/utils/gaussian_heatmap.py 86.02% <90.00%> (+0.46%) ⬆️
... and 29 more

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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Ben-Louis Ben-Louis requested a review from ly015 February 20, 2023 07:11
@ly015 ly015 merged commit 2016609 into open-mmlab:dev-1.x Mar 2, 2023
@Ben-Louis Ben-Louis deleted the add-inferencer branch March 29, 2023 17:34
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