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

[Enhancement] Accelerate Associative Embedding inference #1102

Closed
wants to merge 9 commits into from
Closed

[Enhancement] Accelerate Associative Embedding inference #1102

wants to merge 9 commits into from

Conversation

QwQ2000
Copy link
Contributor

@QwQ2000 QwQ2000 commented Dec 24, 2021

Motivation

Improve the inference speed of bottom-up human pose estimators.

Modification

Re-implement AssociativeEmbedding.refine with torch instead of numpy. Accelerate tensor operations and avoid moving large tensors from GPU to CPU. AssociativeEmbedding.parse is also adjusted to fit the changes in AssociativeEmbedding.refine.

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.

ly015 and others added 8 commits December 9, 2021 16:57
* use offical markdownlint hook

* add lint.yml

* add circleci config

* Updated config.yml

* Updated config.yml

* Updated config.yml

* Updated config.yml
* update fap (#1070)

* fix a bug in post_dark_udp

* fix a bug in post_dark_udp

* Modified a bad comment

* add unit test for udp

* add unit test for udp

* use numpy instead math for math ops

* fix lint

Co-authored-by: Jas <jinsheng@sensetime.com>
Co-authored-by: quyang <quyang@qiyi.com>
Co-authored-by: ly015 <liyining0712@gmail.com>
* [Enhancement] inference speed and flops tools. (#986)

* add the function to test the dummy forward speed of models.

* add tools to test the flops and inference speed of multiple models.

* [Feature] Add ViPNAS models for wholebody keypoint detection (#1009)

* add configs

* add dark configs

* add checkpoint and readme

* update webcam demo

* fix model path in webcam demo

* fix unittest

* update model metafiles (#1001)

* [Feature] Add ViPNAS mbv3 (#1025)

* add vipnas mbv3

* test other variants

* submission for mmpose

* add unittest

* add readme

* update .yml

* fix lint

* rebase

* fix pytest

Co-authored-by: jin-s13 <jinsheng13@foxmail.com>

* add cfg file for flops and speed test,  change the bulid_posenet to init_pose_model and fix some typo in cfg (#1028)

* Skip CI when some specific files were changed (#1041)

* add voxelpose

* unit test

* unit test

* unit test

* add docs/ckpts

* del unnecessary comments

* correct typos in comments and docs

* Add or modify docs

* change variable names

* reduce memory cost in test

* get person_id

* rebase

* resolve comments

* rebase master

* rename cfg files

* fix typos in comments

Co-authored-by: zengwang430521 <zengwang430521@gmail.com>
Co-authored-by: Yining Li <liyining0712@gmail.com>
Co-authored-by: Lumin <30328525+luminxu@users.noreply.github.com>
Co-authored-by: jin-s13 <jinsheng13@foxmail.com>
Co-authored-by: Qikai Li <87690686+liqikai9@users.noreply.github.com>
Co-authored-by: QwQ2000 <396707050@qq.com>
* support soft_wing_loss

* add unittest for soft wing loss

* update model md

* update doc
* add adaptive wingloss

* move adaptive wingloss to heatmap_loss

* match shape in wingloss

* rename loss

* mean for loss

* add configs

* fix unittest

* rename mse_loss to heatmap_loss

* add docs

* fix lint

Co-authored-by: ly015 <liyining0712@gmail.com>
* fix doc patch1

* fix docstring

* fix docstring

* fix dataset

* fix dataset

* fix docstring

* resolve warnings

* fix multilines
@codecov
Copy link

codecov bot commented Dec 24, 2021

Codecov Report

❗ No coverage uploaded for pull request base (dev-0.22@cfd4d2e). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             dev-0.22    #1102   +/-   ##
===========================================
  Coverage            ?   82.46%           
===========================================
  Files               ?      203           
  Lines               ?    16069           
  Branches            ?     2862           
===========================================
  Hits                ?    13252           
  Misses              ?     2095           
  Partials            ?      722           
Flag Coverage Δ
unittests 82.40% <0.00%> (?)

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


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cfd4d2e...985f843. Read the comment docs.

@ly015 ly015 changed the base branch from dev-0.22 to dev-0.23 January 5, 2022 06:24
@ly015
Copy link
Member

ly015 commented Jan 26, 2022

This PR did not show a significant effect on the inference speed in tests.

@ly015 ly015 closed this Jan 26, 2022
HAOCHENYE added a commit to HAOCHENYE/mmpose that referenced this pull request Jun 27, 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.

5 participants