https://github.com/shrikarswami/nicheapple
This is a realtime wbcam app that uses Mediapipe and OpenCV to determine the facial experession of the user and reflect that as a niche apple
https://github.com/shrikarswami/nicheapple
mediapipe opencv python
Last synced: about 2 months ago
JSON representation
This is a realtime wbcam app that uses Mediapipe and OpenCV to determine the facial experession of the user and reflect that as a niche apple
- Host: GitHub
- URL: https://github.com/shrikarswami/nicheapple
- Owner: ShrikarSwami
- Created: 2025-10-28T15:02:53.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-10-28T16:00:06.000Z (8 months ago)
- Last Synced: 2025-10-28T17:12:06.346Z (8 months ago)
- Topics: mediapipe, opencv, python
- Language: Python
- Homepage:
- Size: 3.27 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**# NicheApple
Face driven reactions with OpenCV and MediaPipe.
Shows an Apple face in a second window that reacts to your expressions.
## Setup
python3.11 -m venv .venv311
source .venv311/bin/activate
pip install --upgrade pip
pip install opencv-python mediapipe numpy
## Run
python apple_mouth_react.py
Press c to recalibrate
Press q to quit
**# NicheApple — Face-Driven Apple Reactions (OpenCV + MediaPipe)
[▶️ Demo Video](https://youtu.be/56XS_4H8a_w)
NicheApple is a tiny real-time face-reaction toy. It uses a webcam feed and MediaPipe Face Mesh to classify a few simple expressions and swaps an on-screen apple sprite accordingly.
## Features
- **Neutral** – baseline calibrated from your face.
- **Tongue-Out (closed lips ok)** – detects a protruding tongue without requiring a wide open mouth.
- **Shock** – big mouth + brows/eyes up.
- **Cry** – mouth corners pulled down with a neutral mouth opening.
- **One-key Recalibration** – press `c` for a quick neutral recalibration (~2s).
- **Camera Switching** – press `[` and `]` to cycle cameras at runtime.
- **Lightweight Logging** – periodic metrics print to the terminal for quick tuning.
> ⚠️ I may add a **“mad/angry”** expression in a future update. For now, please enjoy the current set—and feel free to contact me if you hit any issues.
---
## Quick Start (macOS / Apple Silicon)
### 1) Create and activate a Python 3.11 venv
```bash
cd /path/to/NicheApple
/opt/homebrew/bin/python3.11 -m venv .venv311
source .venv311/bin/activate
python -V # should show 3.11.x