How xiangg67/naruto-jutsu works
This repository builds a webcam-based Naruto jutsu game and includes workflows for collecting and training its hand-seal and visual-seal models. In play, the webcam feeds the game runtime; detected seals are sequenced into jutsu, which trigger visual and audio effects. Separate workflows gather hand samples and seal photos, prepare labels and datasets, and train models. The sampled source shows the main runtime integrations and hand-data pipeline; some image-training links are supported by tool docstrings rather than inspected training code.
Main entry points: main.py Game runtime · train.py Hand classifier training · prepare_dataset.py YOLO dataset preparation · collect_data.py Hand sample capture
Components 19
Live game
- Game runtime
main.py - Jutsu sequences
jutsu.py - Visual effects
effects.py - Shadow clones
clones.py
Hand classifier
- Hand sample capture
collect_data.py - Hand features
features.py - Hand samples
data/seals.csv - Hand classifier training
train.py
Seal detector
- Seal photo capture
capture_images.py - Photo labeling
label_images.py - Raw seal photos
- YOLO dataset preparation
prepare_dataset.py - YOLO training
train_yolo.py - Seal class names
seals.py
Models and media
- Hand classifier model
models/seal_classifier.pkl - YOLO seal model
models/seal_yolo.pt - Game audio
assets
Other components
- Player
- Webcam
Connections 23
- Player → Webcam: poses for
- Webcam → Game runtime: supplies frames
main.py - Game runtime → YOLO seal model: detects seals
main.py - Game runtime → Hand classifier model: classifies hands
- Game runtime → Jutsu sequences: updates
main.py - Jutsu sequences → Game runtime: returns jutsu
main.py - Game runtime → Visual effects: runs effects
main.py - Game runtime → Shadow clones: renders clones
main.py - Game runtime → Game audio: plays sounds
main.py - Player → Hand sample capture: records poses
collect_data.py - Hand sample capture → Hand features: extracts features
collect_data.py - Hand sample capture → Hand samples: writes samples
collect_data.py - Hand classifier training → Hand samples: reads samples
train.py - Hand classifier training → Hand features: uses feature columns
train.py - Hand classifier training → Hand classifier model: saves model
train.py - Player → Seal photo capture: makes seal poses
capture_images.py - Seal photo capture → Raw seal photos: saves photos
capture_images.py - Photo labeling → Raw seal photos: labels photos
label_images.py - Photo labeling → Seal class names: uses class names
label_images.py - YOLO dataset preparation → Raw seal photos: arranges photos
prepare_dataset.py - YOLO dataset preparation → Seal class names: writes class mapping
prepare_dataset.py - YOLO dataset preparation → YOLO training: provides training data
- YOLO training → YOLO seal model: trains detector