A fully offline, Python-based desktop application that automatically indexes your screenshots and allows you to search through them using natural language or keywords via OCR.
- Fully Offline: No API keys, no cloud dependencies. Your data stays on your machine.
- Background OCR: Extracts text from images using PyTesseract without freezing the UI.
- Smart Search: Combines exact keyword matching with fuzzy matching to tolerate typos.
- Auto-Indexing: Uses a file watcher to automatically index new screenshots added to watched folders.
- Duplicate Detection: Uses Perceptual Hashing (pHash) to prevent indexing exact duplicates.
- Modern UI: Built with CustomTkinter for a sleek, dark-mode ready interface.
This app uses a clean architecture pattern:
- GUI: CustomTkinter handles the modern look and feel.
- Database: SQLite3 stores image paths, metadata, hashes, and OCR text.
- OCR Engine: PyTesseract handles text extraction. OpenCV is used for image preprocessing (grayscale, Otsu's thresholding) to improve accuracy on UI screenshots.
- Background Workers:
watchdogmonitors folders, while a threaded queue processes images sequentially. - Search Engine:
thefuzzranks results based on filename exact matches, OCR text exact matches, and fuzzy token ratio scores.
Before running the application, you must install Tesseract-OCR on your system.
- Download the installer from UB Mannheim.
- Run the installer.
- Ensure Tesseract is installed in a standard location like
C:\Program Files\Tesseract-OCR\tesseract.exe. The app will attempt to auto-detect it.
- Clone this repository or download the source code.
- Install Python 3.9+ and pip.
- Install the dependencies:
pip install -r requirements.txt
- Run the application:
python app/main.py
You can build a standalone .exe using PyInstaller.
- Install PyInstaller:
pip install pyinstaller
- Run the following build command from the root directory:
pyinstaller --noconfirm --onedir --windowed --add-data "app/database/schema.sql;app/database/" --add-data "assets;assets/" --name "ScreenshotSearchEngine" app/main.py
- The built application will be located in the
dist/ScreenshotSearchEnginefolder.
Note: Even as an executable, the user's system must have Tesseract-OCR installed. To create a completely standalone app, you would need to bundle the Tesseract binaries within the
assets/folder and updateapp/ocr/engine.pyto point to the bundled executable relative path.
- Open the App.
- Go to Settings and click Add Folder. Select your screenshots folder.
- The app will immediately start indexing in the background. You can see logs in
app.log. - Go to the Search tab and type keywords.
- Click a thumbnail to see a large preview and copy the extracted text.
- Semantic search using local sentence-transformers.
- Image similarity search (finding visually similar screenshots).
- Multi-language OCR configuration from the UI.
