explaingit

ruthvikj/realityframe

24PythonAudience · vibe coderComplexity · 2/5Setup · easy

TLDR

RealityFrame is a Python webcam app that applies real-time visual effects like thermal vision, ghost mode, and sketch filters, all controlled by hand gestures, no keyboard needed once it's running.

Mindmap

mindmap
  root((RealityFrame))
    Visual effects
      Vintage film
      Ghost mode
      Thermal camera
      Sketch filter
      Clone mode
    Gesture controls
      Pinch to switch effects
      Fist for clone mode
      Portal frame gesture
    How it works
      MediaPipe hand tracking
      OpenCV video capture
      Background calibration
    Tech stack
      Python 3.11
      MediaPipe
      OpenCV
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run real-time webcam effects like thermal, sketch, or ghost mode using only hand gestures as the controller

USE CASE 2

Add a portal gesture to your own webcam project that constrains any effect to a box drawn with both hands

USE CASE 3

Use the clone mode as a starting point for building background-removal or greenscreen tools in Python

USE CASE 4

Study how MediaPipe hand landmarks can map to custom gestures for controlling any computer vision pipeline

Tech stack

PythonMediaPipeOpenCV

Getting it running

Difficulty · easy Time to first run · 30min

Requires a working webcam and Python 3.11+, calibration step needs you to step out of frame for a few seconds on first launch.

No license information was provided in the explanation.

In plain English

RealityFrame is a Python project that applies real-time visual effects to your webcam feed using hand gestures as the controls. You do not need a keyboard to switch between effects once the app is running. Instead, the camera watches your hands and recognizes specific poses to trigger actions. The effects include a vintage film look with sepia and grain, a ghost mode that makes you semi-transparent against your background, a thermal camera simulation with heat-map colors, a sketch filter that turns the video into something resembling a pencil drawing, and a clone mode that cuts your body out of the background using a machine learning model and duplicates you across the screen. You switch between effects by pinching your thumb and index finger together. Making a fist activates and deactivates clone mode. A distinctive feature is the portal gesture. If you form a photographer's frame with both hands (thumbs and index fingers extended at right angles to form a box), a glowing boundary appears between your fingers. After that, whichever effect is active renders only inside that box rather than across the whole screen. Dropping the gesture closes the portal. When the app first starts, it asks you to step out of the camera frame for a few seconds. This calibration step captures a clean image of your background without you in it, which the ghost and clone effects rely on to separate you from the scene. The project uses two main libraries: MediaPipe for tracking 21 points on each hand in real time, and OpenCV for capturing video and rendering the effects. Python 3.11 or later is required. Keyboard shortcuts are available as fallbacks for quitting, recording video, and manually switching effects. The README notes this is a side project and lists a few planned improvements, including hooking in an experimental finger-snap detector and separating the rendering step from the machine learning inference to improve frame rates.

Copy-paste prompts

Prompt 1
How do I install RealityFrame's dependencies (MediaPipe and OpenCV) on Python 3.11 and run the app for the first time?
Prompt 2
I want to add a new gesture to RealityFrame that raises my hand to pause the effect. How do I read the 21 MediaPipe hand landmarks and map a specific pose to an action?
Prompt 3
The clone mode in RealityFrame requires background calibration. How does it separate me from the background, and how do I trigger the calibration step again after the app has started?
Prompt 4
I want to use the portal gesture feature in my own project to render an effect only inside a hand-drawn box. How does RealityFrame detect the frame shape and limit rendering to that region?
Open on GitHub → Explain another repo

← ruthvikj on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.