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

More general "Custom" solution + PoseTracker to also work without detection model + Fixed RTMO NMS + Fixed wholebody solution #45

Merged
merged 24 commits into from
Jan 25, 2025

Conversation

davidpagnon
Copy link
Contributor

@davidpagnon davidpagnon commented Jan 8, 2025

  • Added the "Custom" class, a more general solution which works with any detection and/or pose estimation class
  • Made PoseTracker work when no detection model is used

@davidpagnon
Copy link
Contributor Author

Unless I am mistaken, non maximum suppression did not work with RTMO. I edited postprocess in rtmo.py to make it work. I also had to slightly edit multiclass_nms in post_processing.py to output the indices of the bboxes to keep.

@davidpagnon davidpagnon changed the title More general "Custom" solution + PoseTracker to also work without detection model Fixed RTMO NMS + More general "Custom" solution + PoseTracker to also work without detection model Jan 10, 2025
@davidpagnon
Copy link
Contributor Author

davidpagnon commented Jan 11, 2025

Illustration of the previous issue with Whole body solution in balanced mode. rtmw-x_simcc-cocktail13_pt-ucoco_270e-256x192-fbef0d61_20230925 predicts toes on top of the head:

image

Replaced with rtmw-dw-x-l_simcc-cocktail14_270e-256x192_20231122

@davidpagnon davidpagnon changed the title Fixed RTMO NMS + More general "Custom" solution + PoseTracker to also work without detection model More general "Custom" solution + PoseTracker to also work without detection model + Fixed RTMO NMS + Fixed wholebody solution Jan 11, 2025
Comment on lines 97 to 107
# apply nms
dets, keep = multiclass_nms(final_boxes,
final_scores[:, np.newaxis],
nms_thr=0.45,
score_thr=0.7)
if keep is not None:
keypoints = keypoints[keep]
scores = scores[keep]
else:
keypoints = np.expand_dims(np.zeros_like(keypoints[0]), axis=0)
scores = np.expand_dims(np.zeros_like(scores[0]), axis=0)
Copy link
Owner

@Tau-J Tau-J Jan 24, 2025

Choose a reason for hiding this comment

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

I think nms_thr and score_thr can be used as parameters for __call__() and postprocess(), allowing users to conveniently set these two parameters when calling rtmo. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Certainly! Does my last commit correspond to your idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry one minute, I need to edit my commit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should be fine now. You can call it two different ways:

  • keypoints, scores = rtmo(image)
  • keypoints, scores = rtmo(image, nms_thr=0.5, score_thr=0.8)

setup.py Outdated
Comment on lines 104 to 115
setup(name='rtmlib_pose2sim',
version=get_version(),
description='A library for real-time pose estimation.',
author='Tau-J',
author_email='taujiang@outlook.com',
author='Tau-J, David Pagnon',
author_email='taujiang@outlook.com, contact@david-pagnon.com',
keywords='pose estimation',
long_description=readme(),
long_description_content_type='text/markdown',
packages=find_packages(),
include_package_data=True,
url='https://github.com/Tau-J/rtmlib',
url='https://github.com/davidpagnon/rtmlib_Pose2Sim', #'https://github.com/Tau-J/rtmlib',
license='Apache License 2.0',
Copy link
Owner

@Tau-J Tau-J Jan 24, 2025

Choose a reason for hiding this comment

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

These information seem refer to your repo, would you mind modifying?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Of course! I needed to push it to pypi so I gave it another temporary name. Back to the origins now!

Copy link
Owner

@Tau-J Tau-J left a comment

Choose a reason for hiding this comment

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

LGTM

@Tau-J Tau-J merged commit 9f51b34 into Tau-J:main Jan 25, 2025
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.

3 participants