Grand Diomande Research · Full HTML Reader
cc-gesture
`cc-gesture` provides gesture recognition that integrates with `cc-anticipation`'s commitment/uncertainty signals and MotionPhraseIndex for neighbor-based classification.
Full Public Reader
cc-gesture
Anticipation-based gesture recognition for motion control.
Overview
`cc-gesture` provides gesture recognition that integrates with `cc-anticipation`'s commitment/uncertainty signals and MotionPhraseIndex for neighbor-based classification.
Architecture
Two separate pipelines:
1. Full-Body Pipeline (Mokopi): Uses `AnticipationPacket` from `cc-anticipation`
2. Hand Pipeline (iPhone/Watch): Lightweight kernel for 6DOF IMU data
MotionWindow → cc-anticipation → AnticipationPacket → GestureClassifier → GestureEvent
↑
MotionPhraseLibrary (neighbors)Core Concepts
- Commitment = Gesture Lock-in: High commitment means motion is deterministic
- Uncertainty = Ambiguity: Low uncertainty + high commitment = confident classification
- Transition Pressure = Completion: Spike signals gesture boundary
- Neighbor Voting = Label Propagation: Similar past motions vote for current label
Usage
Full-Body Classification
rust
use cc_gesture::{GestureClassifier, AnticipationData, NeighborMatch, GestureLabel};
// Create classifier
let mut classifier = GestureClassifier::default_config();
// Register gestures
classifier.register_label(GestureLabel::full_body(1, "t_pose"));
classifier.register_label(GestureLabel::full_body(2, "arms_up"));
// Associate phrases with labels
classifier.add_phrase_labels("phrase_123", vec![1]);
// Classify from anticipation data
let data = AnticipationData::new(0.8, 0.2, 0.3, embedding);
let neighbors = vec![NeighborMatch { ... }];
if let Some(gesture) = classifier.classify(&data, &neighbors) {
println!("Detected: {} (confidence: {})", gesture.label.name, gesture.confidence);
}Hand Gesture Recognition
rust
use cc_gesture::{HandAnticipationKernel, HandWindow, HandFrame};
// Create kernel
let mut kernel = HandAnticipationKernel::default_config();
// Create window and add frames
let mut window = HandWindow::new(50);
window.push(HandFrame::new(timestamp, accel, gyro));
// Process
let packet = kernel.process(&window);
println!("Commitment: {}, Uncertainty: {}", packet.commitment, packet.uncertainty);Training Pipeline
rust
use cc_gesture::training::{LabeledSession, GestureExtractor};
// Create session manager
let mut session = LabeledSession::new();
session.register_label(GestureLabel::hand(1, "swipe_left"));
// Start recording
session.start_recording("Training Session 1");
// Add frames and labels during recording
session.add_frame(frame);
session.add_label(1, timestamp);
// Stop and extract segments
let recording = session.stop_recording().unwrap();
let mut extractor = GestureExtractor::default_config();
let segments = extractor.extract(&recording);Schema Version
Current: `0.1.0`
License
MIT
Promotion Decision
Attach run IDs, datasets, metrics, and reproduction commands.
Source Anchor
Comp-Core/core/motion/cc-gesture/README.md
Detected Structure
Method · Evaluation · Figures · Architecture