Project Info
Inspiration
We've all tried air drumming to our favorite songs. But what if any surface could become a drum? What if your kitchen table, desk, or even textbooks could transform into a full drum kit? We watched street performers turn buckets into instruments and got inspired. We wanted to democratize music creation by removing the barrier of expensive equipment. With just drumsticks, a webcam, and our app, anyone can start drumming anywhere.
What it does
VODKA (Virtual Online Drum Kit App) transforms any ordinary surface into a virtual drum kit using computer vision and accelerometer data. the workflow: Point your webcam at any surface (table, floor, pillows). Our model segments the frame into distinct regions. Use our ESP32-powered drumsticks with motion sensors Hit any surface and hear appropriate drum sounds with velocity sensitivity Capture your performance and share it with friends!
How we built it
Hardware Stack: ESP32 microcontrollers (2x) - one per drumstick MPU6050 6-axis sensors Electrical tape CV/ML Pipeline: YOLOV8nano (drumstick tip detection) and FastSAM trained on material segmentation Backend: Flask, Python services, pygame.mixer Frontend: React + Vite, SocketIO
Challenges we ran into
We've never touched hardware Pushed a commit that killed all processes somehow at some point
Accomplishments we're proud of
Got our hardware component to work! Working around a convoluted workflow (drum hit -> sound) with multiple ingestion streams
What we learned
How to (not) solder stuff + hardware in general Surface segmentation is pretty hard
What's next
Should have probably hosted drumstick tip inference on Baseten since inference time is critical
Virtual Online Drum Kit App (VODKA)
Transform any surface into a drum kit using computer vision and accelerometer data!
System Architecture
┌─────────────┐
│ Drumstick │
│ ESP32+MPU │
└──────┬──────┘
│ USB
↓
┌──────────────────┐ ┌────────────┐
│ Python Backend │←────→│ Webcam │
│ - Hit Detection │ │ (CV) │
│ - Sound Engine │ └────────────┘
└────────┬─────────┘
│ WebSocket
↓
┌──────────────────┐
│ React Frontend │
│ - Visualization │
│ - Controls │
└──────────────────┘
Quick Start
1. Hardware Setup
See firmware/esp32_sensor/README.md
2. Backend Setup
cd backend
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your configuration
python app.py
3. Frontend Setup
cd frontend
npm install
npm run dev
4. Upload Firmware
Open firmware/esp32_sensor/esp32_sensor.ino in Arduino IDE and upload to ESP32.
Project Structure
virtual-drum-kit/
├── firmware/ # ESP32 code
├── backend/ # Python Flask server
│ ├── services/ # Core logic modules
│ ├── utils/ # Helper functions
│ └── app.py # Main server
├── frontend/ # React web app
│ └── src/
│ ├── components/
│ └── services/
├── sounds/ # Audio samples
├── config/ # Configuration files
└── docs/ # Documentation
Team Roles
- Person 1: Hardware + Sensor Integration
- Person 2: Computer Vision + ML
- Person 3: Web UI + Sound Engine
Model Integration - YOLO/FastSAM
🚀 Quick Start: Test Locally (No Deployment)
Open http://localhost:5173 in your browser and click "Start Streaming".
Model Options
Option 1: Local YOLO (Development)
pip install ultralytics
python app.py
- ✅ No deployment needed
- ✅ Real segmentation
- ✅ Fast iteration
Option 2: Baseten (Production)
# Deploy your model to Baseten
# Update .env with endpoint
python app.py
- ✅ GPU acceleration
- ✅ Scalable
- ✅ Production ready
Architecture
- Webcam captures frames at 10fps
- Frame buffer keeps last 2 seconds
- Calibration runs: once, 2s after clicking "Start Streaming"
- Segments stored in memory for hit localization
- Hits map to nearest segment → drum pad
Testing
Hit Mapping & Segmentation Store Test
cd backend
python3 test/test_hit_mapping.py
Verifies:
- Segmentation store saves/retrieves segments
- Hit localizer maps coordinates to objects
- Object class names are properly associated
Simulate Hits via Browser Console
socketService.emit('simulate_hit', {
intensity: 500,
timestamp: Date.now()
});
Troubleshooting
ESP32 not detected
- Check USB cable (must support data transfer)
- Install CH340 drivers if needed
- Try different USB port
No sound playing
- Check
sounds/directory has .wav files - Verify pygame.mixer initialized correctly
- Check system audio isn't muted
High latency
- Reduce webcam resolution
- Disable CV and use accelerometer only
- Check network latency if using hosted model EOF
Analysis
View
Metric
- 10
- 5
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- FlaskIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- ReactIn code
- Tailwind CSSIn code
7 of 7 appear in the indexed code.
AI coding agents
- CursorConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
157 KB
Source files
49
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
jasukej/vodka
82 files · 12.7 MB · @ b7531ee
Structure
Interface
10 files · 12%Screens, components and styles rendered to the user.
Application logic
50 files · 61%Domain rules, services and shared utilities.
Data & schema
5 files · 6%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python70%
- JavaScript26%
- Markdown3%
- HTML0%
- YAML0%
- CSS0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
frontend/package.json
npm · 16- axios
- react
- react-dom
- socket.io-client
- +12 more
backend/requirements.txt
pypi · 14- flask
- flask-cors
- flask-sock
- flask-socketio
- numpy
- opencv-python
- pillow
- pygame
- pyserial
- python-dotenv
- requests
- scipy
- simple-websocket
- ultralytics
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.