An advanced hand gesture recognition system that transforms hand movements into computer commands and visual effects. Now with AI-powered gesture-to-command conversion, shape recognition, particle effects, and more!
- ๐ Rainbow Cursor: Multi-colored concentric circles following your hand
- ๐ Hologram Cursor: 3D holographic cursor with scan lines
- ๐งฒ Magnetic Field: Cursor with interactive magnetic field visualization
- ๐จ Motion Trail: Smooth motion trails following your gestures
- โจ Particle Effects: Physics-based particle system with gravity and velocity
- Shape Detection: Detect circles, squares, triangles, and polygons drawn with your hand
- Speed Analysis: Real-time gesture speed tracking with visual indicators
- Gesture Recording: Record custom gestures and replay them
- Multi-gesture Sequences: Combine multiple gestures for complex commands
- Record Custom Gestures: Capture your unique hand movements
- Replay Gestures: Playback recorded gestures
- Save to File: Export recorded gestures to JSON
- Gesture Library: Build your own gesture command library
- Gesture Prediction: AI learns from your gesture patterns
- Smart Window Arrangement: Automatically arrange windows based on gestures
- Gesture-Based App Launcher: Launch apps with custom gestures
- Emergency Screenshot: Smart screenshot with blur detection
- Hand Skeleton Visualization: See detected hand joints in real-time
- Hand Tracking Glow: Visual glow effect on hand tracking
- Motion Blur: Real-time motion blur effect
- Gesture Heatmap: Visualize frequently used gesture areas
- Particle Trails: Leave particle trails as you gesture
Press A to enter AI mode and make gesture sequences that execute commands:
- 3-Gesture Combos: Combine any 3 gestures to trigger commands
- 4+ Gesture Power Moves: Longer sequences unlock advanced features
- Visual Feedback: See your gestures in real-time with emoji indicators
Press C for traditional mouse control:
- Index + Thumb = Click
- Middle + Thumb = Scroll
- Ring + Thumb = Right-click
| Key | Action |
|---|---|
| A | Activate AI Mode |
| C | Activate Cursor Mode |
| 1 | Rainbow Cursor Effect |
| 2 | Particle Trail Effect |
| 3 | Hologram Cursor Effect |
| 4 | Magnetic Field Cursor |
| 5 | Motion Trail Effect |
| 6 | Normal Cursor |
| S | Toggle Shape Detection Mode |
| R | Toggle Gesture Recording |
| H | Toggle Hand Skeleton Visualization |
| D | Toggle Debug Info |
| Space | Toggle App Enabled/Disabled |
| ESC | Exit Application |
โ โ๏ธ โ โ = Activate rainbow cursor mode
โ๏ธ โ๏ธ โ๏ธ โ๏ธ โ๏ธ = Enable particle trail effect
๐ ๐ ๐ ๐ = Toggle hologram cursor mode
โ๏ธ โ๏ธ โ๏ธ โ๏ธ = Enable magnetic field cursor
โ โ โ โ = Enable trail effect
Drawing a Circle = Shape detection activates
Drawing a Square = Polygon gesture recognized
Drawing a Line = Line gesture detected
โ โ๏ธ โ๏ธ โ๏ธ = Start gesture recording
โ๏ธ โ๏ธ โ โ = Stop gesture recording
๐ ๐ โ๏ธ = Playback last recorded gesture
โ โ๏ธ โ = Open Chrome browser
โ๏ธ โ๏ธ ๐ = Search Google in new tab
โ โ โ = Take a screenshot
๐ ๐ ๐ = Increase volume
โ โ โ = Decrease volume
Automatically recognizes hand-drawn shapes:
- Circles: Low variance in radial distance
- Lines: Collinear point detection
- Polygons: Corner detection algorithm
Physics-based particles with:
- Gravity simulation
- Velocity and acceleration
- Lifetime management
- Color gradients
Real-time gesture velocity tracking:
- Normalized speed levels (0-1)
- Acceleration measurement
- Visual speed indicators
Professional gesture recording:
- Frame-by-frame hand tracking data
- Timestamp information
- JSON serialization
- Playback capability
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Application:
python app.py
-
Try AI Mode:
- Press A to activate AI mode
- Make a gesture sequence (e.g., fist โ peace โ open hand)
- Watch the command execute!
-
Try Visual Effects:
- Press 1-6 to cycle through different cursor effects
- Press S to enable shape detection
- Press R to record custom gestures
- Open Chrome, Firefox, Edge, Safari
- Open Gmail, Notepad, Terminal, Calculator
- Take screenshots with AI enhancement
- Control volume, brightness, notifications
- Lock screen, restart, shutdown
- Task Manager, Settings, Control Panel
- Maximize, minimize, restore windows
- Window snapping (left, right, top, bottom)
- Alt+Tab window switching
- Smart window arrangement
- Play/Pause music
- Next/Previous track
- Volume up/down
- Mute/Unmute
- Copy, Cut, Paste
- Select All, Undo, Redo
- Find and Replace
- Zoom in/out
- New tab, close tab
- Scroll up/down/left/right
- Zoom in/out/reset
- Back/Forward navigation
- Good Lighting: Ensure adequate lighting for hand detection
- Clear Gestures: Make distinct hand shapes for accurate recognition
- Steady Hand: Keep hand relatively steady for shape detection
- Proper Distance: Stay about 1-2 feet from camera
- Clean Background: Plain background helps with hand isolation
- Ensure good lighting on hand
- Move hand closer to camera
- Adjust camera position
- Check that required applications are installed
- Verify gesture sequence is complete (3+ gestures)
- Look for console output for error details
- Reduce video resolution
- Close other applications
- Check CPU usage in Task Manager
Edit the GESTURE_COMMANDS dictionary in app.py:
('custom', 'gesture', 'sequence'): 'Your custom command',Modify these parameters:
touch_threshold = 0.19 # Lower = more sensitive
scroll_sensitivity = 0.05 # Higher = faster scrolling
min_detection_confidence = 0.7 # Lower = less strictAdd new effect modes in AdvancedGestureFeatures class:
elif self.effect_mode == 'custom':
return self._draw_custom_effect(frame, x, y)Feel free to extend this project with:
- New visual effects
- Additional gesture types
- Machine learning improvements
- Voice command integration
- Multi-hand support
Open source - Use and modify as needed!
This is your playground! Experiment with:
- Different gesture combinations
- Visual effect combinations
- Custom recorded gestures
- Unique command mappings
- Creative applications
Remember: The faster and more dramatic your gestures, the more impressive the effects! ๐โจ