Bugfix/remove components crash (and tests for pose.remove_components())#150
Merged
AmitMY merged 15 commits intosign-language-processing:masterfrom Feb 13, 2025
Merged
Conversation
…pose into sign-language-processing-master
Contributor
Author
|
Needs more testing: https://chatgpt.com/share/67a683c5-b510-800e-8973-95dbffcce12d |
Contributor
Author
|
Right now, this does not work! For example the following test case fails: def test_pose_remove_legs(mediapipe_poses_test_data: List[Pose]):
points_that_should_be_hidden = ["KNEE", "HEEL", "FOOT", "TOE"]
for pose in mediapipe_poses_test_data:
# pose_hide_legs(pose)
pose = pose_remove_legs(pose)
for component in pose.header.components:
point_names = [point.upper() for point in component.points]
for point_name in point_names:
for point_that_should_be_hidden in points_that_should_be_hidden:
assert point_that_should_be_hidden not in point_name |
Collaborator
|
There is no such function |
Contributor
Author
Right, it's in pose_evaluation |
…so header matches body
Contributor
Author
|
@AmitMY The fixed remove_components() and accompanying tests are now ready for review. Tested to ensure that it won't crash if you try to remove points from components that don't exist, or if you you remove both a component and a point IN that component, etc. |
Closed
AmitMY
approved these changes
Feb 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #149, crash when removing specific points