Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ˆ Stock Pattern Detector Pro

A modern, professional desktop application for real-time stock pattern detection using YOLO11. This application provides a beautiful GUI interface for monitoring your screen and detecting stock chart patterns in real-time.

โœจ Features

๐ŸŽจ Modern Professional UI

  • Dark theme with professional styling
  • Real-time video feed with live pattern detection
  • Interactive controls for model and monitor selection
  • Performance monitoring with FPS counter
  • Detection logging with timestamps and confidence scores

๐Ÿ”ง Advanced Controls

  • Model selection - Choose your trained YOLO model
  • Monitor selection - Select which monitor to monitor
  • Confidence threshold - Adjust detection sensitivity
  • Real-time settings - Change settings while running

๐Ÿ“Š Detection Features

  • Live pattern detection with bounding boxes
  • Detection counting and statistics
  • Screenshot saving with timestamps
  • Export detection logs to text files
  • Pattern confidence tracking

๐Ÿš€ Standalone Executable

  • No Python required on target machines
  • Pre-loaded model - Your trained model is bundled
  • One-click installation with desktop shortcut
  • Cross-platform Windows executable

๐Ÿ› ๏ธ Installation & Setup

For Development

# Install dependencies
pip install -r requirements_gui.txt

# Run the application
python stock_detector_app.py

For Building Executable

# Run the build script
python build_exe.py

The build script will:

  1. Install PyInstaller if needed
  2. Create a professional icon
  3. Bundle your trained model
  4. Build a standalone executable
  5. Create an installer script

๐Ÿ“ File Structure

YOLO_11_Stocks/
โ”œโ”€โ”€ stock_detector_app.py      # Main GUI application
โ”œโ”€โ”€ realtime.py                # Original command-line version
โ”œโ”€โ”€ build_exe.py              # Build script for executable
โ”œโ”€โ”€ requirements_gui.txt       # GUI app dependencies
โ”œโ”€โ”€ runs/detect/train/weights/
โ”‚   โ””โ”€โ”€ best.pt               # Your trained YOLO model
โ””โ”€โ”€ dist/
    โ””โ”€โ”€ StockPatternDetector.exe  # Built executable

๐ŸŽฎ Usage

Starting Detection

  1. Launch the app - Run stock_detector_app.py or the executable
  2. Select model - Choose your trained YOLO model file
  3. Select monitor - Pick which monitor to monitor
  4. Adjust settings - Set confidence threshold
  5. Start detection - Click "Start Detection"

Controls

  • โ–ถ Start Detection - Begin real-time monitoring
  • โน Stop Detection - Stop monitoring
  • ๐Ÿ“ธ Save Screenshot - Capture current detection
  • ๐Ÿ“Š Export Log - Save detection history
  • ๐Ÿ—‘๏ธ Clear Log - Clear detection log

Keyboard Shortcuts

  • 'q' - Quit application (when focused on video)
  • 's' - Save screenshot (when focused on video)
  • 'r' - Reset FPS counter (when focused on video)

๐Ÿ”ง Configuration

Model Requirements

  • YOLO11 format (.pt files)
  • Trained for stock patterns - Your custom trained model
  • Confidence threshold - Adjustable from 0.1 to 1.0

Monitor Selection

  • Automatic detection - Finds all available monitors
  • Resolution display - Shows monitor specs
  • Position tracking - Monitors can be positioned anywhere

Performance Settings

  • FPS monitoring - Real-time performance display
  • Auto-resizing - Optimizes for performance
  • Error handling - Robust error recovery

๐Ÿ“Š Output Files

Screenshots

  • Format: JPG
  • Naming: detection_screenshot_YYYYMMDD_HHMMSS.jpg
  • Content: Annotated frame with detection boxes

Detection Logs

  • Format: TXT
  • Naming: detection_log_YYYYMMDD_HHMMSS.txt
  • Content: Timestamp, count, confidence for each detection

Settings

  • File: settings.json
  • Auto-saved: Model path and confidence settings
  • Persistent: Remembers your preferences

๐Ÿš€ Building Executable

Prerequisites

  • Python 3.8+ installed
  • Your trained YOLO model in runs/detect/train/weights/best.pt
  • All dependencies installed

Build Process

# Install build dependencies
pip install -r requirements_gui.txt

# Run build script
python build_exe.py

Output

  • Executable: dist/StockPatternDetector.exe
  • Installer: install.bat (creates desktop shortcut)
  • Size: ~200-300MB (includes model and dependencies)

๐ŸŽฏ Use Cases

Day Trading

  • Real-time monitoring of multiple charts
  • Pattern alerts for trading opportunities
  • Screenshot capture for analysis

Research & Analysis

  • Pattern logging for backtesting
  • Confidence tracking for model validation
  • Export capabilities for further analysis

Education

  • Visual learning of chart patterns
  • Real-time feedback on pattern recognition
  • Historical tracking of detection accuracy

๐Ÿ” Troubleshooting

Common Issues

  1. Model not found - Ensure model path is correct
  2. No monitors detected - Check display settings
  3. Low FPS - Reduce confidence threshold or resize window
  4. Detection errors - Check model compatibility

Performance Tips

  • Close unnecessary applications for better FPS
  • Use lower confidence for more detections
  • Monitor single screen for best performance
  • Update graphics drivers for optimal performance

๐Ÿ“ License

This project is for educational and research purposes. Please ensure you have proper licensing for any commercial use of the YOLO model and training data.

๐Ÿค Contributing

Feel free to submit issues, feature requests, or pull requests to improve the application.


Stock Pattern Detector Pro - Professional real-time pattern detection for traders and analysts.

About

Using CV yolo11n model for stock pattern detection

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages