Skip to content

Joogzi/FB-Data-Scraper

Repository files navigation

FB Data Scraper

A professional desktop application for extracting telemetry data from racing/motorsport onboard videos using advanced OCR and computer vision.

Version Python Platform

โœจ Features

  • ๐Ÿš€ Advanced OCR Engine - Uses EasyOCR for best accuracy, will test other engines in the future
  • ๐Ÿ“Š Multiple Metrics - Extract speed, G-force, per-wheel torque(beta), and more
  • ๐ŸŽฏ Interactive ROI Selection - Draw regions of interest directly on the video
  • โšก Real-time Preview - See extracted values overlaid on video playback
  • ๐ŸŽจ Modern UI - Polished dark theme with a nice styling
  • ๐Ÿ“ฆ Standalone Executable - Distributable to others without requiring Python

๐Ÿ–ผ๏ธ Screenshots

Coming soon

๐Ÿ“ฅ Installation

Option 1: Download Executable (Easiest)

  1. Download the latest release from the Releases page
  2. Run FB_Data_Scraper_vX.X.X.exe (version number will be in the filename)
  3. No Python installation required!

๐Ÿ’ก Note: The executable is automatically built and released on every commit to master.

๐ŸŽฎ GPU Acceleration is still in testing

Setup Performance
With NVIDIA GPU + CUDA Fast - Uses GPU
Without GPU Works fine - Falls back to CPU

To enable GPU acceleration:

  1. Have an NVIDIA GPU (GTX 10 series or newer recommended)
  2. Install CUDA Toolkit 11.8
  3. That's it! The exe will detect CUDA and use your GPU automatically

The exe works without CUDA - it's just slower. No extra setup needed for CPU-only usage.

Option 2: Install from Source - GPU works here if installed correctly

# Clone the repository
git clone https://github.com/yourusername/fb_data_scraper.git
cd fb_data_scraper

# Create virtual environment
python -m venv venv
venv\Scripts\activate  # Windows
source venv/bin/activate  # Linux/Mac

# Install dependencies
pip install -r requirements.txt

GPU Support (Source Installation)

For GPU acceleration when running from source:

# For EasyOCR GPU support:
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118

๐Ÿš€ Usage

Running the Application

python run.py

Quick Start

  1. Open a Video - File โ†’ Open Video (or Ctrl+O)
  2. Initialize OCR - Tools โ†’ Initialize OCR (first time only, will auto-download models)
  3. Select ROIs - Click "Select ROI" for each metric and draw a box around the data area
  4. Play Video - Use transport controls or Space to play/pause
  5. Export Data - File โ†’ Export Data to save extracted values to CSV

Keyboard Shortcuts

Key Action
Space Play/Pause
โ† โ†’ Step 1 frame
โ†‘ โ†“ Step 10 frames
Ctrl+O Open video
Ctrl+S Save configuration
Ctrl+E Export data

๐Ÿ—๏ธ Building Standalone Executable

To create a distributable executable:

# Install PyInstaller
pip install pyinstaller

# Build the executable
python build.py

# Or with options
python build.py --clean    # Clean first
python build.py --onedir   # Build as folder (easier to debug)

The executable will be in the dist/ folder.

๐Ÿ“ Project Structure

fb_data_scraper/
โ”œโ”€โ”€ run.py                  # Application entry point
โ”œโ”€โ”€ build.py                # Build script for executable
โ”œโ”€โ”€ requirements.txt        # Python dependencies
โ”œโ”€โ”€ fsae_extractor.spec     # PyInstaller configuration
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ core/
โ”‚   โ”‚   โ”œโ”€โ”€ ocr_engine.py   # PaddleOCR/EasyOCR wrapper
โ”‚   โ”‚   โ”œโ”€โ”€ preprocessor.py # Image preprocessing pipeline
โ”‚   โ”‚   โ”œโ”€โ”€ video.py        # Video handling
โ”‚   โ”‚   โ””โ”€โ”€ extractors/     # Metric extractors
โ”‚   โ”‚       โ”œโ”€โ”€ base.py     # Base extractor class
โ”‚   โ”‚       โ”œโ”€โ”€ speed.py    # Speed OCR extractor
โ”‚   โ”‚       โ”œโ”€โ”€ gforce.py   # G-force OCR extractor
โ”‚   โ”‚       โ””โ”€โ”€ torque.py   # Torque color analyzer
โ”‚   โ”œโ”€โ”€ gui/
โ”‚   โ”‚   โ”œโ”€โ”€ main_window.py  # Main application window
โ”‚   โ”‚   โ”œโ”€โ”€ styles.py       # Modern UI styling
โ”‚   โ”‚   โ”œโ”€โ”€ splash.py       # Splash screen
โ”‚   โ”‚   โ””โ”€โ”€ widgets/        # Custom UI widgets
โ”‚   โ””โ”€โ”€ config/
โ”‚       โ””โ”€โ”€ settings.py     # Configuration management
โ”œโ”€โ”€ assets/                 # App icons and images
โ””โ”€โ”€ dist/                   # Built executables (after build)

โš™๏ธ Configuration

Preprocessing Presets

The app includes optimized presets for different video types:

Preset Best For
racing_hud Racing game/sim overlays (default)
f1_tv Official F1 TV broadcasts
digital_display LCD/digital dashboard displays
minimal Clean overlays needing little processing
aggressive Noisy or low-quality video

OCR Engine Selection

  • EasyOCR - Simpler installation, used as fallback
  • PaddleOCR - legacy versions may still have Paddle installed, but it isn't currently used due to innaccurate readings

๐Ÿ“„ License

MIT License - see LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors