![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
The Head Gesture Detection (HGD) library provides a pre-trained model and a simple inference API for detecting head gestures in short videos. Under the hood, it uses Google MediaPipe for collecting the landmark features.
Tested for Python 3.8, 3.9, and 3.10.
The best way to install HGD with its dependencies is from PyPI:
python3 -m pip install --upgrade hgd
Alternatively, to obtain the latest version from this repository:
git clone git@github.com:bhky/head-gesture-detection.git
cd head-gesture-detection
python3 -m pip install .
An easy way to try this library and the pre-trained model is to make a short video with your head gesture.
The code snippet below will perform the following:
$HOME/.hgd/weights
,
if not exists, the file will be downloaded from this repository.60
) for the model.q
to end earlier).from hgd.inference import predict_video
result = predict_video()
print(result)
Alternatively, you could provide a pre-recorded video file:
from hgd.inference import predict_video
result = predict_video(
"your_head_gesture_video.mp4",
from_beginning=False,
motion_threshold=0.5, # Optionally tune the thresholds.
gesture_threshold=0.9
)
# The `from_beginning` flag controls whether the needed frames will be obtained
# from the beginning or toward the end of the video.
# Thresholds can be adjusted as needed, see explanation below.
The result is returned as a Python dictionary.
{
'gesture': 'turning',
'probabilities': {
'has_motion': 1.0,
'gestures': {
'nodding': 0.009188028052449226,
'turning': 0.9908120036125183
}
}
}
The following gesture
types are available:
nodding
- Repeatedly tilt your head upward and downward.turning
- Repeatedly turn your head leftward and rightward.stationary
- Not tilting or turning your head; translation motion is still treated as stationary.undefined
- Unrecognised gesture or no landmarks detected (usually means no face is shown).To determine the final gesture
:
has_motion
probability is smaller than motion_threshold
(default 0.5
),
gesture
is stationary
. Other probabilities are irrelevant.gestures
:
gesture_threshold
(default 0.9
), gesture
is undefined
,nodding
).gesture
is undefined
.
The probabilities
dictionary is empty.FAQs
Detection and classification of head gestures in videos
We found that hgd demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.