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

calculate body part position using temporal data #11

Open
MasterMedo opened this issue Sep 3, 2021 · 0 comments
Open

calculate body part position using temporal data #11

MasterMedo opened this issue Sep 3, 2021 · 0 comments

Comments

@MasterMedo
Copy link
Owner

MasterMedo commented Sep 3, 2021

Instead of trusting the MoveNet blindly, we can make the position of each body part a weighted exponential moving average that depends on the last position of the body part, current position of the body part and the confidence. The weight of the exponential equation will depend on the confidence of the detected body part. For example, if the confidence is above 60%, then the weight should be big enough that we consider the body part basically at that exact position. Otherwise, we move the body part from the last position towards the new position based on the confidence.

Also, it would be great to limit the speed a body part can move at! This can be in cm/s!

Create a function:

def adjust_body_part_positions(body_parts: np.array) -> np.array:
    """Calculates the body part positions based on temporal data.
    It takes into account:
        - historical position(s) of the body parts
        - current position of the body parts
        - confidence levels
        - maximal speed a body_part can move at
    """
    global body_parts_history
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

No branches or pull requests

1 participant