Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Hand recognition ball bouncer

(creative name i know) program that tracks two hands using the camera and mediapipe. drawing a bar between the tips of both index fingers. when an on screen ball hits the line it bounces off so kinda like pong
This program was made because i wanted to test out object recognition and know how to use it so it is a little demo i made showcasing it.

Demo of program

Screenshot 2026-08-04 at 21 47 19 ScreenRecording2026-08-04at21 45 02-ezgif com-video-to-gif-converter

Try it yourself!

Head to releases tab of the git repository and download the .dmg.

Please Note.

  • This release has been made for intel x86_64 Mac
  • It is an unsigned application so when opening right click then open
  • A camera is REQUIRED (i think thats obvious)

Make changes yourself

this is for mac devices with brew installed, if brew is not installed refer to HomeBrew Install Docs to install brew.

install python version 3.11

It is mandatory your using python 3.11 or below otherwise mediapipe wont work

brew install python@3.11

setup and activate vinv

python3.11 -m venv venv
source venv/bin/activate

install dependecies

pip install --upgrade pip
pip install mediapipe opencv-python

Build yourself

This compiling uses nuitka due to its nature it takes quite a while. This is for Mac devices.

installing nuitka

pip install nuitka

Building main.app

python -m nuitka --standalone --macos-create-app-bundle --enable-plugin=numpy --include-package=mediapipe --include-package=cv2 --include-package-data=mediapipe main.py

add camera permitions

open the Info.plist file

open -e main.app/Contents/Info.plist

Add these two lines before </dict>

<key>NSCameraUsageDescription</key>
<string>This app needs camera access for hand and face tracking.</string>

These lines are just in case for the camera permissions because MacOS can be weird about camera permitions sometimes

resign the app file

because we modified Info.plist The app wont open because the signature is no longer valid from our edits.

codesign --force --deep --sign - main.app

open main.app

either double click the application made called main or:

open main.app

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages