Skip to content

Ace3Z/Meme-CV-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Meme-CV-project

A small experimental computer vision workspace for gesture/object detection and data collection. Don't ask why it's called six-seven. (Disclaimer: This README is AI-assisted)

Overview

Three primary scripts live in this repo:

  • src/capture_training_data.py: A fast image capture utility for labeled gesture datasets with continuous mode, single-shot capture, adjustable FPS, and per-gesture folders.
  • src/detect.py: Real-time YOLOv8 + DeepFace emotion analysis on webcam frames, with emotion confidence overlays.
  • src/infer.py: Runs a Roboflow workflow (InferencePipeline) for detection + classification, annotates frames with boxes/labels, and can display per-class reference images.

Features

  • Lightweight YOLOv8 model (yolov8n.pt) bundled for quick prototyping.
  • Keyboard-driven gesture dataset capture (g, c, space, +/-, q).
  • Live DeepFace emotion percentage overlays.
  • Roboflow workflow integration for composed inference.
  • Reference image caching to cut I/O overhead.

Requirements

Create and activate a virtual environment, then install dependencies:

pip install ultralytics deepface python-dotenv supervision networkx

If you use Roboflow workflows, set your API key in a .env file at project root:

ROBOFLOW_API_KEY="YOUR_KEY"

Usage

Capture gesture training data:

python src/capture_training_data.py

Run YOLO + emotion detection:

python src/detect.py

Run Roboflow workflow inference:

python src/infer.py

Exit any live window with q.

Data Output

Captured gesture images are written to public/training-data/<gesture_name>/ with timestamped filenames. Reference images for display should live in public/reference-images/ and be named by class (e.g., thumbs-up.png).

Performance Tips

  • Reduce frame resolution before inference for higher FPS.
  • Use FRAME_SKIP in infer.py (if present) to process every Nth frame.
  • Cache reference images (already implemented) to avoid repeated disk reads.
  • Throttle expensive emotion analysis (every N frames) if adding to other scripts.

Future Improvements

  • Log predictions to CSV / JSON.
  • Integrate a model training pipeline for collected gestures.
  • Optional GPU acceleration / ONNX export.

About

Computer vision sandbox for real-time gesture and emotion detection: YOLOv8 + DeepFace webcam pipeline, Roboflow workflow inference, and a keyboard-driven gesture dataset capture tool.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages