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

Bugfix/remove components crash (and tests for pose.remove_components()) #150

Merged

Conversation

cleong110
Copy link
Contributor

Fix #149, crash when removing specific points

@cleong110
Copy link
Contributor Author

@cleong110
Copy link
Contributor Author

cleong110 commented Feb 7, 2025

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

@AmitMY
Copy link
Collaborator

AmitMY commented Feb 9, 2025

There is no such function pose_remove_legs in master / this branch

@cleong110
Copy link
Contributor Author

There is no such function pose_remove_legs in master / this branch

Right, it's in pose_evaluation

@cleong110 cleong110 changed the title Bugfix/remove components crash Bugfix/remove components crash (and tests for pose.remove_components()) Feb 10, 2025
@cleong110
Copy link
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.

@cleong110 cleong110 mentioned this pull request Feb 11, 2025
@AmitMY AmitMY merged commit e07ca68 into sign-language-processing:master Feb 13, 2025
8 checks passed
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.

Bug: remove_components crash
2 participants