Skip to content

wama-tw/game-object-tracking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Mario Fixed-ID Tracker

This project provides a custom object tracking system using YOLOv8 and ByteTrack to analyze gameplay videos.
It focuses on tracking specific game characters with fixed IDs โ€” including Luigi, Boo, Peach, and Shy Guy โ€” and dynamically tracks generic obstacles using ByteTrack.


๐Ÿ”ง Features

  • ๐ŸŽฏ Fixed ID tracking for main characters:
    • Luigi โ†’ ID 1
    • Boo โ†’ ID 2
    • Peach โ†’ ID 3
    • Shy Guy โ†’ ID 4
  • ๐ŸŸฉ Dynamic object tracking for 'obstacle' using ByteTrack
  • โœ… Works with YOLOv8 fine-tuned custom models
  • ๐Ÿ•น Accurate for gameplay analysis, emotion interaction, or data collection

๐Ÿ“ Folder Structure


/fine-tune
โ”œโ”€โ”€ test/
โ”‚   โ””โ”€โ”€ Gameplay.mp4               # Input video
โ”œโ”€โ”€ output_tracked/
โ”‚   โ””โ”€โ”€ 20240515-conf0.4.mp4       # Output video with tracked boxes
โ”œโ”€โ”€ runs/
โ”‚   โ””โ”€โ”€ detect/train14/weights/    # Your YOLOv8 trained model
โ”œโ”€โ”€ yolov8_fixedid_bytetrack.py    # Main tracking script


๐Ÿš€ Quick Start

1. Install dependencies

pip install -r requirements.txt

2. Place your fine-tuned YOLOv8 model at:

runs/detect/trainX/weights/best.pt

3. Put your input video here:

./test/Gameplay.mp4

4. Run the tracker

cd fine-tune/
python yolov8_fixedid_bytetrack.py

5. Output will be saved as:

./output_tracked/<timestamp>-conf<score>.mp4

๐Ÿง  Model Requirements

Make sure your YOLOv8 model was trained with the following class names in data.yaml:

names:
  0: Luigi
  1: Boo
  2: Peach
  3: Shy Guy
  4: obstacle

๐Ÿ“ˆ Example Output

Tracking example


๐Ÿ“ค Future Ideas

  • CSV export of tracking logs (frame-by-frame position, ID)
  • Invisible persistence (tracking through occlusion)
  • Web UI to review tracking results
  • Interactive labeling pipeline

๐Ÿ“„ License

MIT License. This repo is designed for research and non-commercial use in gameplay studies and interaction design.

About

๐ŸŽฎ YOLOv8 + ByteTrack-based video tracking system for fixed-ID game characters (Luigi, Boo, Peach, Shy Guy) and dynamic obstacles. Designed for gameplay analysis and interaction experiments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages