A library for analyzing chewing patterns using computer vision
Project description
orofacIAnalysis
orofacIAnalysis is a Python library for analyzing chewing patterns using computer vision and facial landmark detection. It uses MediaPipe to track jaw movements and provides tools for cycle detection and analysis.
Installation
pip install orofacIAnalysis
Features
- Jaw movement tracking using facial landmarks
- Chewing cycle detection and analysis
- Various signal smoothing methods
- Utilities for data visualization and analysis
Usage
from orofacIAnalysis import ChewAnnotator
# Analyze a video file
annotator = ChewAnnotator(video_path="path/to/video.mp4")
cycles = annotator.analyze_chewing()
# Print cycle information
for cycle in cycles:
print(f"Chew count: {len(cycle['directions'])}")
print(f"Left: {cycle['left']}, Right: {cycle['right']}, Middle: {cycle['middle']}")
Advanced Usage
from orofacIAnalysis import Cycle, SmoothingMethods
import numpy as np
# Create a cycle manually
cycle = Cycle(start_frame=10)
cycle.jaw_movements = np.array([...]) # Your jaw movement data
cycle.fit()
# Print cycle stats
print(cycle)
# Apply different smoothing methods
from orofacIAnalysis.smoothing import apply_smoothing
smoothed_signal = apply_smoothing(jaw_movements, "butterworth")
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orofacianalysis-0.1.2.tar.gz.
File metadata
- Download URL: orofacianalysis-0.1.2.tar.gz
- Upload date:
- Size: 62.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fe859f724b66b16030b99c7fc9f30e56f2552a208e15bea1d5e0a241b9cff75
|
|
| MD5 |
3f7369b023dcf87aa1fae8b52c94cdc0
|
|
| BLAKE2b-256 |
4ff54676aadbecbe82b1f27a3eff1a57a6c08564f53e3baf55a6f101a41d304f
|
File details
Details for the file orofacianalysis-0.1.2-py3-none-any.whl.
File metadata
- Download URL: orofacianalysis-0.1.2-py3-none-any.whl
- Upload date:
- Size: 28.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60ab8e5c16ee67900e50e6d4581e6ceae3a0857673f756ae119a58519f53d62f
|
|
| MD5 |
287cf1a7cdc42e7120c6e64aefe9255c
|
|
| BLAKE2b-256 |
f19576ebbdbe25834248c5128873f1386a19540b88d7ae6df45e9da17b740a9b
|