Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuickOCR

Select any text on your screen. It's on your clipboard before you let go of the mouse.

A local, privacy-first alternative to TextSniper — for Windows, macOS, and Linux.

Build License: Apache 2.0 Platforms Python 3.10+

Hotkey  →  drag a box  →  OCR  →  text on your clipboard

Text recognition runs entirely on your device. After the one-time model download (~15 MB), QuickOCR works fully offline — no screenshot and no recognized text ever leaves your machine.

Why QuickOCR

  • Local, always. No cloud API, no account, no telemetry. The OCR model runs on your CPU (or GPU, if you want it to).
  • Fast. Sub-second recognition on ordinary screenshots — the default model tier is tuned for exactly that case, not for scanning documents.
  • Cross-platform, natively. One codebase, three real platform integrations — not a wrapped web view.
  • Multi-monitor done right. Drag across monitors with different DPI, scaling, or Retina density; the crop still lines up pixel-for-pixel.
  • Open license, top to bottom. App and OCR models are both Apache 2.0 — free to use commercially.

Installation

Windows 10/11

Run QuickOCR-1.0.0-Setup.exe. Installing into your user profile needs no administrator rights.

Default hotkey: Ctrl + Shift + X

macOS 11+

Open QuickOCR-1.0.0.dmg and drag QuickOCR into Applications.

Default hotkey: ⌘ ⇧ X

On first launch, macOS will ask for Screen Recording permission:

System Settings → Privacy & Security → Screen Recording → QuickOCR

Then restart QuickOCR once — macOS only applies the change on the next launch. Without this permission, the system silently captures the desktop wallpaper instead of your windows; recognition then simply finds nothing.

An Accessibility permission is normally not needed: QuickOCR registers its hotkey via Carbon, which works without it. Only if a combination is rejected there does the app fall back to a mechanism that needs it — and explains that when it happens.

Linux (X11)

tar xzf QuickOCR-1.0.0-linux-x86_64.tar.gz
cd QuickOCR-1.0.0-linux-x86_64
./install.sh

Installs without root, into ~/.local/share/quickocr, links ~/.local/bin/QuickOCR, and adds QuickOCR to your application menu. If appimagetool was available at build time, there's also a .AppImage.

Default hotkey: Ctrl + Shift + X

X11 only — no Wayland. Wayland compositors deliberately don't give ordinary applications a general interface for system-wide hotkeys or direct screen access — that's part of Wayland's security model, not a missing QuickOCR feature. On GNOME/KDE with a Wayland session: pick a session with "X11" or "Xorg" in the name at login. QuickOCR detects a Wayland session itself and shows an explanation instead of failing silently.


Usage

  1. Press the hotkey — the screen freezes and dims.
  2. Drag a rectangle over the text with your mouse.
  3. Let go. The recognized text is on your clipboard.

Esc or a right-click cancels. Double-clicking the tray icon also starts a capture.

Selections may span monitor boundaries, even across different resolutions and scale factors.


Models

Tier Model Time¹ Best for
Fast PP-OCRv6 tiny ~0.5 s clear, large text
Balanced (default) PP-OCRv6 small ~1.5–2 s everyday use
Accurate PP-OCRv5 server detection ~8–10 s dense or messy text

¹ measured on a 6-core notebook, CPU only, no GPU.

Languages: German/English/Latin (default), Chinese, Japanese, Korean, Cyrillic. Scripts not covered by PP-OCRv6 automatically fall back to PP-OCRv5 and explain that in the settings dialog.

All models are PaddleOCR models in ONNX format under Apache 2.0 — commercial use is not a concern. They run on ONNX Runtime (MIT) via RapidOCR (Apache 2.0).

The download happens on first use and lands in:

  • Windows: %LOCALAPPDATA%\QuickOCR\Cache\models
  • macOS: ~/Library/Caches/QuickOCR/models
  • Linux: ~/.cache/QuickOCR/models

After that, everything loads from the cache.


Settings

Reachable from the tray icon / menu bar entry:

  • keyboard shortcut (recorded by pressing it)
  • model tier and language
  • image preprocessing: automatic / off / force all steps
  • line-break handling: smart / verbatim / single line
  • auto-copy, notifications
  • launch at login
  • computation: automatic / CPU only / prefer GPU
  • interface language (German / English, applies after restart)

Stored as readable JSON:

  • Windows: %APPDATA%\QuickOCR\settings.json
  • macOS: ~/Library/Application Support/QuickOCR/settings.json
  • Linux: ~/.config/QuickOCR/settings.json

Logs under %LOCALAPPDATA%\QuickOCR\Logs, ~/Library/Logs/QuickOCR, or ~/.local/state/QuickOCR/log/.


Running from source

# Windows
py -m venv .venv
.venv\Scripts\pip install -e ".[dev]"
.venv\Scripts\python -m quickocr

# macOS / Linux (X11)
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/python -m quickocr

Pass --verbose for detailed logging.

Tests

pytest                    # everything, incl. real OCR (downloads the model on first run)
pytest -m "not slow"      # skip the model download

Translations

python packaging/update_translations.py

Rescans the source for translatable strings and recompiles assets/i18n/quickocr_en.ts into the .qm file QuickOCR loads at runtime. See the docstring in that script for how to add another language.


Building

Windows

.\packaging\windows\build.ps1

Produces dist\QuickOCR\ (~310 MB unpacked) and, if Inno Setup is installed, dist\QuickOCR-1.0.0-Setup.exe.

macOS

# Build only (runs on your own machine, Gatekeeper blocks it on others)
./packaging/macos/build.sh

# Build signed
SIGN_IDENTITY="Developer ID Application: Your Name (TEAMID)" \
  ./packaging/macos/build.sh

# Then notarize
export APPLE_ID="you@example.com"
export APPLE_TEAM_ID="ABCDE12345"
export APPLE_APP_PASSWORD="xxxx-xxxx-xxxx-xxxx"
./packaging/macos/notarize.sh

The app runs with Hardened Runtime but no App Sandbox — the sandbox allows neither system-wide Carbon hotkeys nor calling /usr/sbin/screencapture. For direct distribution outside the App Store, signing + notarization is the right approach.

Linux

./packaging/linux/build.sh

Produces dist/QuickOCR/, a release tarball dist/QuickOCR-1.0.0-linux-<arch>.tar.gz (includes install.sh), and, if appimagetool is on PATH, a .AppImage as well.

CI

.github/workflows/build.yml builds all three platforms in parallel on every push of a v* tag (or manually via Actions → Build → Run workflow) and attaches the results to a draft GitHub Release.


Architecture

src/quickocr/
├── core/                  platform-independent, Qt-free where possible
│   ├── ocr/               engine, model registry, worker thread, text assembly
│   ├── preprocessing/     automatic image preprocessing
│   ├── clipboard/         clipboard access
│   ├── config/            settings
│   └── geometry.py        multi-monitor coordinates (logical ↔ physical)
├── platform/              OS specifics behind shared protocols
│   ├── windows/           RegisterHotKey, BitBlt, registry autostart, DPI
│   ├── macos/             Carbon hotkey, Quartz capture, TCC, LaunchAgent
│   └── linux/             XGrabKey (X11), mss capture, XDG autostart
├── ui/                    overlay, tray/menu bar, settings
└── app.py                 wires everything together

Three decisions that explain the rest:

Capture first, show the overlay second. The overlay displays a frozen image instead of the live screen. That means it never photographs itself, there's no race condition with animations, and only one capture happens instead of two.

One buffer per monitor, not one for the whole desktop. With mixed DPI there is no shared pixel grid the monitors could sit on without distortion. The mapping uses the measured ratio buffer size / logical size — not the assumed scale factor, which is off by rounding at 125% and 150%.

Preprocessing only when it measurably helps. A measurement series on German text showed: below ~6 px x-height, 2x upscaling gives a real improvement (0.957 → 0.984); above that the model already reads flawlessly, and 3x upscaling makes the result consistently worse. Thresholding is deliberately not part of the pipeline: it destroys the antialiasing that PP-OCR relies on heavily at small font sizes.


Known limitations

  • Windows: windows that protect themselves against capture via WDA_EXCLUDEFROMCAPTURE (some video services, password managers) show up black. QuickOCR detects this and says so, but can't work around it.
  • macOS: Carbon hotkeys work with physical key positions of the US layout. On a German keyboard, Y and Z end up swapped as a result — that affects every program equally.
  • Linux: X11 only. Under Wayland, applications fundamentally lack the interface for system-wide hotkeys and direct screen access — that's Wayland's design, not a QuickOCR limitation. QuickOCR detects the session type and explains it. Mixed scaling across multiple monitors is inherently less precise under X11 than on Windows/macOS, since X11 provides no reliable source for it.
  • The Accurate tier takes roughly 8–10 seconds. It's meant for difficult source material, not everyday use.

License

Apache 2.0 — see LICENSE.

About

Grab text off your screen — instantly. 100% local, no cloud.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages