Skip to content

Releases: bnsware/SubLens

v1.0

17 May 20:21

Choose a tag to compare

SubLens v1.0.0 — Initial Release

Real-time OCR-powered game dialog translator for Windows


What is SubLens?

SubLens reads text from any region of your screen using OCR and instantly translates it — displaying the result in a transparent, draggable overlay that sits above your game. No need to alt-tab, copy-paste, or leave your game.


Highlights

🎮 3 Translation Engines

  • LM Studio — fully offline local AI, zero data sent to the internet
  • DeepL Free — 500,000 characters/month, highest quality neural translation
  • Google Translate — no API key required, works out of the box

🔍 Smart OCR (Tesseract-powered)

  • 6 preprocessing modes automatically adapt to any in-game background:
    • Auto, Light text, Dark text, Subtitle (top-hat), Stroke/Outline, Equalize
  • Automatic best-mode detection — tries all 6 modes and picks the highest-confidence result
  • 2× / 3× / 4× upscaling for small or low-resolution text
  • Full PSM mode selection (single block, single line, sparse text, raw line)
  • Otsu thresholding + median filter + contrast enhancement pipeline

🖥️ Game-Friendly Design

  • Global hotkeys (F2 / F3 / F4 + Ctrl+Alt+R/T/G/H) — work in fullscreen games
  • Auto-pause — scanning suspends when the game window loses focus
  • Draggable overlay — color-coded per engine, always on top
  • System tray — minimize SubLens while keeping it active in the background
  • Multi-monitor support via mss (fast screen capture)

⚡ Performance & Accuracy

  • LRU translation cache (200 entries) — avoids redundant API calls for repeated text
  • Similarity threshold — ignores minor OCR jitter to prevent unnecessary re-translations
  • Fast subtitle mode — short interval + hash-based change detection for action games

📖 Glossary & Context

  • Glossary — protect proper nouns and custom terms from being mistranslated
  • Game Context (LM Studio only) — give the AI a tone/setting hint for more accurate translations

Download

File Description
SubLens.exe Standalone executable — Tesseract bundled, no installation required
Source code (zip) Run with Python 3.9+
Source code (tar.gz) Run with Python 3.9+

The .exe build includes Tesseract OCR internally. You do not need a separate Tesseract installation to use it.

For the Python source version, install dependencies first:

pip install pillow pytesseract PySide6 mss keyboard pywin32

Quick Start (EXE)

  1. Download SubLens.exe
  2. Run it — no installation needed
  3. Select a translation engine (Google works with zero setup)
  4. Press F2 to draw a box around the dialog text in your game
  5. Press F3 to translate once, or F4 to start continuous scanning

Hotkeys

Key Action
F2 Select screen region
F3 Translate once
F4 Start / stop continuous scan
ESC Hide overlay
Ctrl+Alt+R Select region (global, works in fullscreen)
Ctrl+Alt+T Translate once (global)
Ctrl+Alt+G Toggle scan (global)
Ctrl+Alt+H Hide overlay (global)

Known Limitations

  • Google Translate uses an unofficial endpoint — it may occasionally be rate-limited or blocked by Google
  • LM Studio is resource-intensive; running it alongside GPU-heavy games may reduce FPS
  • Global hotkeys require the keyboard package and may need administrator privileges on some systems
  • Auto-pause requires pywin32; without it, scanning continues regardless of window focus

System Requirements

  • Windows 10 / 11 (64-bit)
  • For source version: Python 3.9 or later

License

Released under the MIT License — free to use, modify, and distribute, including commercially.
Attribution required: you must keep the original copyright notice in all copies or substantial portions.


Feedback & Contributions

Found a bug or have a feature request? Open an Issue.
Want to contribute? Pull requests are welcome — see README.md for the project structure.