- Docker installed on your HP All-in-One
- Webcam (built-in or USB)
cd shadow-puppets
docker build -t shadow-puppets .This will take a few minutes the first time (downloading Python, MediaPipe, etc.)
This tests that Pygame can create a window through Docker:
docker run --rm -it \
--device /dev/dri \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $(pwd):/app \
shadow-puppets \
python test_display.pyIf you get a display error, first run this on your host (outside Docker):
xhost +local:dockerThis tests MediaPipe with webcam:
docker run --rm -it \
--device /dev/dri \
--device /dev/video0 \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $(pwd):/app \
shadow-puppets \
python test_mediapipe.pyNote: Your webcam might be /dev/video0, /dev/video1, etc. Check with:
ls -la /dev/video*docker run --rm -it \
--device /dev/dri \
--device /dev/video0 \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $(pwd):/app \
shadow-puppets \
bashThen you can run Python interactively to debug.
- Run
xhost +local:dockeron your host - Make sure you're running from a terminal in your desktop environment (not SSH)
- Check
ls -la /dev/video*to find your webcam device - Make sure no other app is using the webcam
- Try
/dev/video0,/dev/video1, etc.
The test_mediapipe.py script has detailed diagnostics. Run it and check:
- Are imports succeeding?
- Is the SelfieSegmentation object created?
- Is process() returning a mask?
On your Celeron, expect:
- ~50-100ms per frame for segmentation at 320x240
- 10-20 FPS effective rate We'll optimize further once the basics work!
shadow-puppets/
├── Dockerfile # Docker image definition
├── README.md # This file
├── test_display.py # Test Pygame display
├── test_mediapipe.py # Test MediaPipe segmentation
└── main.py # Main game (coming soon)
Once these tests pass:
- Build the game loop with real-time silhouette display
- Create the shape matching neural network
- Add game modes, scoring, and UI