tesseract-ocr

Activity

Stars and mentions · Last 30 days, Oct 9 – Nov 7

GitHub stars0
Mentions14
01234Oct 9Oct 23Nov 7
UTC days · repositories tesseract-ocr owns0 repositories

Top repositories

tesseract-ocr’s repositories ranked by new forks, as on trending.

Loading

Contributes to

Repositories outside tesseract-ocr’s account where tesseract-ocr opened or reviewed pull requests in the past 365 days.

Who noticed tesseract-ocr

Everyone who starred or forked tesseract-ocr’s repositories since the archive began in 2011.

Notable accounts

Ordered by the stars their own repositories have received.

Biggest fans

Accounts that starred the most of these repositories.

Breakout weeks

Each repository’s best week of new stars, with the release published around it.

Mentions

14posts
Nov 80 posts
  1. Hacking Your Own Keyboard: Building a Custom Screenshot Tool in Python When Windows Won't Let You Own Win+Shift+S Originally published on tamiz.pro. Windows has a built-in screenshot tool (Snip & Sketch / Snipping Tool) that owns the Win+Shift+S shortcut, and it's notoriously difficult to override. But what if you want your own custom screenshot utility—one that captures to clipboard, saves with custom filenames, or even runs OCR? This tutorial shows you how to build a Python-based screenshot tool that can intercept global hotkeys, including the elusive Win+Shift+S, by using low-level keyboard hooks and a little Windows API trickery. By the end, you'll have a working, extensible tool that you can bind to your own hotkey or even attempt to hijack the system shortcut (with caveats). Table of Contents - [1. Why Windows Won't Let You Own Win+Shift+S](#1-why-windows-wont-let-you-own-winshifts) - [2. Prerequisites and Setup](#2-prerequisites-and-setup) - [3. Building the Screenshot Capture Module](#3-building-the-screenshot-capture-module) - [4. Global Hotkey Interception with keyboard Library](#4-global-hotkey-interception-with-keyboard-library) - [5. Attempting to Override Win+Shift+S](#5-attempting-to-override-winshifts) - [6. Adding OCR and Clipboard Integration](#6-adding-ocr-and-clipboard-integration) - [7. Packaging as a Background App](#7-packaging-as-a-background-app) - [8. Full Code Example](#8-full-code-example) - [9. Frequently Asked Questions](#frequently-asked-questions) 1. Why Windows Won't Let You Own Win+Shift+S On Windows 10 and 11, Win+Shift+S is a system-level shortcut registered by the built-in screen snipping tool. The Windows shell (explorer.exe) registers this hotkey globally, and it takes precedence over most user-level hotkeys. This is because the hotkey is registered with the MOD_WIN modifier and is handled at a higher privilege level. When you try to register a hotkey with the same combination using standard APIs (like RegisterHotKey), you'll get a conflict error. However, there are workarounds: - Low-level keyboard hooks: Using SetWindowsHookEx with WH_KEYBOARD_LL, you can intercept keystrokes before the system processes them. This allows you to "swallow" the key combination and execute your own code instead. - Modifying the system shortcut: You can disable the built-in shortcut via registry settings or Group Policy, but that's invasive and not always reliable. - Using a different hotkey: The simplest and most robust approach is to use your own hotkey (e.g., Ctrl+Alt+S). This tutorial covers both: building a custom tool with your own hotkey, and an attempt to override Win+Shift+S using low-level hooks. 2. Prerequisites and Setup You'll need Python 3.8+ and the following libraries: - Pillow – for image capture and processing - keyboard – for global hotkey registration (works on Windows, Linux, and macOS) - pytesseract – for OCR (optional) - pyperclip – for clipboard operations - pywin32 (optional) – for low-level Windows API access if you want to try the hook approach Install them with pip: pip install Pillow keyboard pytesseract pyperclip pywin32 Note: keyboard requires administrator privileges on Windows to register global hooks. Run your script as administrator. 3. Building the Screenshot Capture Module First, let's create a simple module that captures the entire screen or a region. We'll use Pillow's ImageGrab which works cross-platform on Windows. Create a file screenshotter.py: import time import tkinter as tk from PIL import ImageGrab class Screenshotter: @staticmethod def capture_fullscreen(): """Capture the entire screen.""" return ImageGrab.grab() @staticmethod def capture_region(bbox): """Capture a specific region given a bounding box (x1, y1, x2, y2).""" return ImageGrab.grab(bbox=bbox) @staticmethod def select_region(): """Let the user select a region with a crosshair overlay.""" # Create a fullscreen overlay window root = tk.Tk() root.attributes('-fullscreen', True) root.attributes('-alpha', 0.3) root.configure(bg='gray') # Canvas for drawing selection rectangle canvas = tk.Canvas(root, cursor='cross', bg='gray') canvas.pack(fill=tk.BOTH, expand=True) start_x = start_y = 0 rect = None def on_press(event): nonlocal start_x, start_y, rect start_x, start_y = event.x, event.y rect = canvas.create_rectangle(start_x, start_y, start_x, start_y, outline='red', width=2) def on_drag(event): nonlocal rect canvas.coords(rect, start_x, start_y, event.x, event.y) def on_release(event): nonlocal root # Get final coordinates x1 = min(start_x, event.x) y1 = min(start_y, event.y) x2 = max(start_x, event.x) y2 = max(start_y, event.y) root.destroy() # Capture the region img = ImageGrab.grab(bbox=(x1, y1, x2, y2)) return img canvas.bind('<ButtonPress-1>', on_press) canvas.bind('<B1-Motion>', on_drag) canvas.bind('<ButtonRelease-1>', on_release) root.mainloop() # The function will return after mainloop ends, but we need to get the image # This is a simplified version; for a full implementation, use a callback. # We'll improve this later. return None This is a basic version. For a robust region selection, we'll use a more advanced approach later. 4. Global Hotkey Interception with keyboard Library The keyboard library makes it easy to register global hotkeys. It uses low-level hooks on Windows, so it can detect keys even when your app is not focused. However, it cannot intercept Win+Shift+S directly because the system handles it first. But you can register your own hotkey like Ctrl+Alt+S. Let's create a script that listens for a hotkey and triggers a screenshot action: import keyboard from screenshotter import Screenshotter from PIL import Image import time def on_hotkey(): print("Hotkey pressed! Taking screenshot...") img = Screenshotter.capture_fullscreen() timestamp = time.strftime("%Y%m%d_%H%M%S") filename = f"screenshot_{timestamp}.png" img.save(filename) print(f"Saved {filename}") keyboard.add_hotkey('ctrl+alt+s', on_hotkey) print("Listening for Ctrl+Alt+S...") keyboard.wait() This works, but it's not very interesting. Let's make it more feature-rich: capture region, copy to clipboard, and run OCR. 5. Attempting to Override Win+Shift+S Now, the fun part: trying to intercept Win+Shift+S. The keyboard library allows you to register a hotkey with the Windows key, but it won't work because the system captures it first. However, we can use keyboard.hook to listen for all key events and suppress them if they match our combination. Here's an attempt: import keyboard import time def on_key_event(event): # Check if the combination Win+Shift+S is pressed # event.name gives the key name, event.is_keypad, etc. # We need to track state of modifiers if event.event_type == 'down': if event.name == 's' and keyboard.is_pressed('win') and keyboard.is_pressed('shift'): # Suppress the event to prevent system action # But this might not work because the system may have already handled it print("Intercepted Win+Shift+S") return False # Suppress the key event return True keyboard.hook(on_key_event) keyboard.wait() Why this fails: On Windows, the Win+Shift+S shortcut is processed by the shell at a very low level, likely before the keyboard library's hook can see it. The keyboard library uses WH_KEYBOARD_LL, which is a low-level hook, but the shell may have a higher priority or handle it in a different thread. In practice, the hook may receive the event but returning False might not prevent the system from opening the snipping overlay. Alternative approach: Use SetWindowsHookEx directly with WH_KEYBOARD_LL and set the LLKHF_INJECTED flag to detect injected events? Not helpful. Actually, the only reliable way is to disable the system shortcut via registry or use a utility like AutoHotkey that uses a different hooking mechanism. Let's try a more aggressive approach: use keyboard.block_key for the Windows key and then listen for Shift+S? That would break the Windows key entirely. Not ideal. Practical solution: Accept that you can't easily override Win+Shift+S and instead use Ctrl+Alt+S or Ctrl+Shift+S. This is what most custom screenshot tools do. If you really want to hijack Win+Shift+S, you can disable the built-in shortcut by modifying the registry: - Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced - Create a DWORD value DisabledHotkeys with a string value containing the hotkey, e.g., "S"? That's for disabling Win+S, not Win+Shift+S. Actually, you can use DisabledHotkeys to disable specific hotkeys that include the Windows key. Setting it to "S" disables Win+S, but Win+Shift+S may still work. A more reliable method is to disable the Snipping Tool via Group Policy or remove the shortcut from the Start Menu. But that's beyond the scope of this tutorial. For the sake of this tutorial, we'll focus on building a robust tool with your own hotkey. If you still want to attempt Win+Shift+S, you can try the hook approach and see if it works on your system—sometimes it does if you run as administrator and use a lower-level hook like WH_KEYBOARD_LL with SetWindowsHookEx from pywin32. Here's a more advanced implementation: import ctypes from ctypes import wintypes # Define necessary structures user32 = ctypes.WinDLL('user32', use_last_error=True) # SetWindowsHookExW function WH_KEYBOARD_LL = 13 WM_KEYDOWN = 0x0100 WM_KEYUP = 0x0101 # Define callback type HOOKPROC = ctypes.WINFUNCTYPE(ctypes.c_long, ctypes.c_int, wintypes.WPARAM, wintypes.LPARAM) # Define KBDLLHOOKSTRUCT class KBDLLHOOKSTRUCT(ctypes.Structure): _fields_ = [ ("vkCode", wintypes.DWORD), ("scanCode", wintypes.DWORD), ("flags", wintypes.DWORD), ("time", wintypes.DWORD), ("dwExtraInfo", wintypes.ULONG_PTR), ] # Global hook handle hook_handle = None def hook_proc(nCode, wParam, lParam): global hook_handle if nCode >= 0: kb = ctypes.cast(lParam, ctypes.POINTER(KBDLLHOOKSTRUCT)).contents # VK codes: VK_LWIN=0x5B, VK_RSHIFT=0xA1, VK_S=0x53 if wParam == WM_KEYDOWN and kb.vkCode == 0x53: # S key # Check if Win and Shift are pressed if (user32.GetAsyncKeyState(0x5B) & 0x8000) and (user32.GetAsyncKeyState(0xA1) & 0x8000): print("Intercepted Win+Shift+S") # Return 1 to suppress the event return 1 return user32.CallNextHookEx(hook_handle, nCode, wParam, lParam) # Set the hook CALLBACK = HOOKPROC(hook_proc) hook_handle = user32.SetWindowsHookExW(WH_KEYBOARD_LL, CALLBACK, None, 0) if not hook_handle: raise ctypes.WinError(ctypes.get_last_error()) # Message loop import threading import time def message_loop(): msg = wintypes.MSG() while user32.GetMessageW(ctypes.byref(msg), None, 0, 0) != 0: user32.TranslateMessage(ctypes.byref(msg)) user32.DispatchMessageW(ctypes.byref(msg)) thread = threading.Thread(target=message_loop) thread.start() print("Listening for Win+Shift+S...") try: while True: time.sleep(1) except KeyboardInterrupt: user32.UnhookWindowsHookEx(hook_handle) This code sets a low-level keyboard hook and checks for the specific key combination. It might work on some systems, but it's not guaranteed. In practice, the Windows shell may still open the snipping bar before the hook runs, because the shell has its own hook that runs earlier. The only way to guarantee it is to disable the system shortcut. 6. Adding OCR and Clipboard Integration Let's make our tool genuinely useful. We'll add a region selector that lets the user draw a rectangle, then capture, copy to clipboard, and optionally run OCR. For region selection, we'll use tkinter with a fullscreen transparent overlay. Here's a more complete implementation: # region_selector.py import tkinter as tk from PIL import ImageGrab class RegionSelector: def __init__(self): self.root = tk.Tk() self.root.attributes('-fullscreen', True) self.root.attributes('-alpha', 0.3) self.root.configure(bg='gray') self.canvas = tk.Canvas(self.root, cursor='cross', bg='gray') self.canvas.pack(fill=tk.BOTH, expand=True) self.start_x = 0 self.start_y = 0 self.rect = None self.image = None self.canvas.bind('<ButtonPress-1>', self.on_press) self.canvas.bind('<B1-Motion>', self.on_drag) self.canvas.bind('<ButtonRelease-1>', self.on_release) def on_press(self, event): self.start_x = event.x self.start_y = event.y self.rect = self.canvas.create_rectangle(self.start_x, self.start_y, self.start_x, self.start_y, outline='red', width=2) def on_drag(self, event): self.canvas.coords(self.rect, self.start_x, self.start_y, event.x, event.y) def on_release(self, event): x1 = min(self.start_x, event.x) y1 = min(self.start_y, event.y) x2 = max(self.start_x, event.x) y2 = max(self.start_y, event.y) self.root.destroy() # Capture after destroying overlay self.image = ImageGrab.grab(bbox=(x1, y1, x2, y2)) def select(self): self.root.mainloop() return self.image Now, integrate it into the main tool. We'll also add OCR with pytesseract and clipboard copy with pyperclip. 7. Packaging as a Background App To run the tool in the background, you can either run the script directly (with pythonw.exe on Windows to avoid a console window) or package it with PyInstaller into a standalone executable. We'll cover both. - To run without console: use pythonw.exe your_script.py - To package: pyinstaller --onefile --noconsole screenshot_tool.py Make sure to include the required libraries. PyInstaller will bundle them. 8. Full Code Example Let's put it all together into a single script screenshot_tool.py: import sys import time import tkinter as tk import keyboard import pyperclip import pytesseract from PIL import ImageGrab, Image # Configuration SAVE_DIR = "screenshots" USE_OCR = True class RegionSelector: def __init__(self): self.root = tk.Tk() self.root.attributes('-fullscreen', True) self.root.attributes('-alpha', 0.3) self.root.configure(bg='gray') self.canvas = tk.Canvas(self.root, cursor='cross', bg='gray') self.canvas.pack(fill=tk.BOTH, expand=True) self.start_x = 0 self.start_y = 0 self.rect = None self.image = None self.canvas.bind('<ButtonPress-1>', self.on_press) self.canvas.bind('<B1-Motion>', self.on_drag) self.canvas.bind('<ButtonRelease-1>', self.on_release) def on_press(self, event): self.start_x = event.x self.start_y = event.y self.rect = self.canvas.create_rectangle(self.start_x, self.start_y, self.start_x, self.start_y, outline='red', width=2) def on_drag(self, event): self.canvas.coords(self.rect, self.start_x, self.start_y, event.x, event.y) def on_release(self, event): x1 = min(self.start_x, event.x) y1 = min(self.start_y, event.y) x2 = max(self.start_x, event.x) y2 = max(self.start_y, event.y) self.root.destroy() self.image = ImageGrab.grab(bbox=(x1, y1, x2, y2)) def select(self): self.root.mainloop() return self.image def take_screenshot(): # Choose mode: 1=fullscreen, 2=region print("Choose mode: 1=fullscreen, 2=region") # For demo, we'll just do fullscreen if no input # In real app, you can bind different hotkeys for different modes # Here we'll use the hotkey to trigger a region capture selector = RegionSelector() img = selector.select() if img is None: return # Save to file import os os.makedirs(SAVE_DIR, exist_ok=True) timestamp = time.strftime("%Y%m%d_%H%M%S") filename = os.path.join(SAVE_DIR, f"screenshot_{timestamp}.png") img.save(filename) print(f"Saved {filename}") # Copy to clipboard img.save_to_clipboard() print("Copied to clipboard") # OCR if enabled if USE_OCR: try: text = pytesseract.image_to_string(img) if text.strip(): pyperclip.copy(text) print("OCR text copied to clipboard") except Exception as e: print(f"OCR failed: {e}") def main(): # Register hotkey: Ctrl+Alt+S keyboard.add_hotkey('ctrl+alt+s', take_screenshot) print("Screenshot tool running. Press Ctrl+Alt+S to capture a region.") print("Press Ctrl+C to exit.") keyboard.wait() if __name__ == "__main__": main() To run this, you need to have pytesseract installed and the Tesseract OCR engine separately. You can download it from GitHub or use a package manager. Also, img.save_to_clipboard() is a method in Pillow that works on Windows to put the image on the clipboard. 9. Frequently Asked Questions Q: Why can't I override Win+Shift+S? A: Windows registers this hotkey at the system level, and it takes precedence over user-level hooks. Even low-level keyboard hooks may not be able to suppress it because the shell processes it early. The most reliable way is to disable the built-in shortcut via registry or Group Policy, or use a different hotkey. Q: Do I need administrator privileges to run the global hotkey? A: Yes, the keyboard library requires admin rights on Windows to set global hooks. Run your script as administrator, or use a task scheduler with highest privileges. Q: Can I make the region selector work without Tkinter? A: Yes, you can use pygame or PyQt, but Tkinter is built-in and sufficient for this purpose. For a more polished overlay, you could use PyQt5 with a transparent window. This tool is a starting point. You can extend it with features like delayed screenshots, multi-monitor support, or uploading to cloud services. The key takeaway is that while you can't easily own Win+Shift+S, you can build a powerful custom screenshot tool that fits your workflow. For more developer insights and tools, check out Tamiz's Insights.

  2. An old manual can look readable yet be impossible to search. Tesseract turns page images into text. Useful when you're hunting for one detail in a long scan. The output still needs checking. tesseract-ocr/tesseract

    1 like
  3. Tesseract OCR: renderer failures used to exit with code 0. Every script downstream believed a failed render had succeeded. Fixed and merged by the lead maintainer. Neovim. curl. Tesseract: three upstream fixes in six days. PR: tesseract#4669

    6 views
  4. Your Screenshots Have a Memory. So Why Can't You Find Them? This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine. What I Built There is a particular kind of digital ghost that every developer knows. You capture a screenshot of an error you just fixed. Maybe it contains a PostgreSQL query, a useful command, a UI reference, an invoice, or an important piece of documentation. You promise yourself that you'll find it when you need it. A few weeks later, you have hundreds of screenshots scattered across your computer. Their names tell you almost nothing: - Screenshot_20261012_184205.png - Screenshot_20261014_102134.png - Screenshot_20261018_230512.png The information is still there. You just can't find it. For Hacktoberfest's final challenge, Ghost in the Machine, I wanted to build something that brings these forgotten digital memories back to life. That idea became SiftShot. SiftShot is a privacy-first, local-first screenshot management application for Windows. Its central idea is simple: Search screenshots by what they contain, not just by what they're named. Instead of uploading screenshots to a cloud service or manually opening hundreds of files, SiftShot uses locally executed neural LSTM OCR to extract readable text and make screenshot collections searchable. What can SiftShot do? - Recursively discover screenshots in configured directories. - Extract text locally using Tesseract's neural LSTM OCR. - Store screenshot metadata and extracted text in SQLite. - Search screenshots by OCR text and filenames. - Browse screenshots in a modern dashboard. - Preview original images and inspect extracted text. - Avoid unnecessarily reprocessing unchanged files. - Restrict image access to configured directories. Original screenshots are never silently renamed, moved or deleted. SiftShot in action Dashboard overview !SiftShot dashboard The dashboard provides an overview of indexed screenshots, OCR availability, processing statistics and the screenshot collection. Screenshot gallery !SiftShot screenshot gallery Browse discovered screenshots with their filenames, thumbnails, file sizes and OCR status. OCR preview !SiftShot OCR preview Inspect the original image alongside its locally extracted text and filesystem metadata. Search by screenshot contents !SiftShot OCR text search Search for a phrase contained inside an image and retrieve the screenshot without remembering its original filename. Demo Watch the SiftShot walkthrough: ▶ Watch SiftShot on YouTube The 81-second demonstration covers the actual application workflow: 1. Open the SiftShot dashboard. 2. Scan a configured screenshot directory. 3. Browse the discovered screenshots. 4. Open a screenshot and inspect its extracted OCR text. 5. Search for a phrase contained inside an image. 6. Open the matching screenshot preview. The demonstration uses synthetic screenshots processed by the actual local Tesseract installation. There is no mocked frontend data. Code GitHub repository: adarsh-singh106/SiftShot SiftShot uses a modular architecture: SiftShot/ ├── apps/ │ └── desktop/ │ └── React + TypeScript │ ├── engine/ │ └── src/siftshot/ │ ├── domain/ │ ├── config/ │ ├── ingestion/ │ ├── ocr/ │ ├── storage/ │ └── api/ │ ├── docs/ │ ├── ARCHITECTURE.md │ ├── SETUP-GUIDE.md │ ├── DEMO-SCRIPT.md │ └── FINAL-RELEASE-REPORT.md │ └── README.md The repository includes the project architecture, dependency lockfiles, automated tests, setup instructions, security documentation and contribution guidelines. How I Built It I didn't want SiftShot to be another OCR script with a frontend attached. I wanted independent, understandable components that could be tested and maintained. 1. Screenshot discovery The Python ingestion engine recursively scans configured directories using standard filesystem APIs. It handles: - Multiple watch directories. - Overlapping directory paths. - Case-insensitive extension matching. - Duplicate path prevention. - Metadata extraction. - Symbolic-link restrictions. - Missing and inaccessible files. The discovery process does not load entire image files into memory. 2. Local neural LSTM OCR This is the intelligence layer of SiftShot. I chose Tesseract OCR, an open-source OCR engine with an LSTM-based neural recognition architecture. The final implementation explicitly selects the LSTM engine: cmd = [ str(binary), str(target), "stdout", "--oem", "1", ] The engine runs locally through a controlled subprocess invocation. It uses: - Explicit command arguments. - shell=False. - A 10-second default execution timeout. - Structured success and failure results. - Text normalization. - Graceful handling when Tesseract is unavailable. The application does not send screenshot contents to an external OCR API. 3. SQLite persistence Extracted text and screenshot metadata are stored locally using SQLite. The repository layer handles: - Transactional persistence. - Parameterized SQL queries. - Write-Ahead Logging (WAL). - Duplicate path prevention. - Updating changed screenshots. - Reusing OCR results for unchanged files. - Case-insensitive substring search across OCR text and filenames. Image binaries remain ordinary files on the user's filesystem. 4. API and desktop dashboard The backend uses FastAPI and communicates through a loopback-only HTTP service. The frontend uses React, TypeScript and Vite. The dashboard provides: - Screenshot statistics. - Scanning controls. - Screenshot gallery. - OCR status indicators. - Search results. - Full-resolution image previews. - Extracted text inspection. The current release uses a browser-hosted dashboard connected to the local FastAPI service. Native Tauri packaging remains a future milestone. 5. Privacy and security A screenshot can contain much more than a picture. It can contain source code, database information, receipts, personal documents or internal application data. SiftShot therefore follows several safety principles: - Local screenshot processing. - Loopback-only API binding. - Restricted CORS origins. - Canonical path validation. - Protection against path traversal. - No unrestricted image-serving endpoint. - Parameterized database queries. - Subprocess execution without shell commands. - OCR execution timeouts. - No automatic modification of original images. The project has automated security tests, but has not undergone a formal third-party penetration test. 6. Engineering and testing One of the most interesting parts of building SiftShot was its development workflow. I coordinated six AI coding instances: | Instance | Responsibility | |---|---| | 0 | Architecture and integration | | 1 | OCR engine | | 2 | SQLite storage | | 3 | FastAPI and security | | 4 | React frontend | | 5 | Documentation | The five specialist instances worked in isolated Git worktrees and feature branches. Their changes were integrated and reviewed by the engineering lead. The final release verification recorded: - 225 passing backend tests. - Clean Ruff linting. - 49 files passing the formatting check. - No mypy errors across 25 source files. - Successful TypeScript compilation. - Successful Vite production build. - A real Windows OCR and search integration test. - SQLite persistence verified after a backend restart. - SHA-256 confirmation that the synthetic test image remained unchanged. One issue discovered during final Windows verification was UTF-8 BOM handling in TOML configuration files. Some Windows tools save UTF-8 files with a Byte Order Mark, which initially caused configuration parsing failures. I fixed the loader and added a regression test. This was a useful reminder that production-minded software is not just about making the happy path work. It is also about handling the environments in which real users run it. Why Does Open Innovation Matter? This is the most important design decision behind SiftShot. Screenshots often contain information people wouldn't casually upload to an external service. Using a closed, cloud-hosted OCR API would introduce an unnecessary dependency for a problem that can be solved locally. With open-source Tesseract and local inference: Privacy: Screenshots can be processed without sending their contents to an external OCR provider. Offline capability: Once the application, Tesseract and compatible language data are installed, the core processing workflow can run without an internet connection. Transparency: The recognition engine and its invocation are inspectable. Its behavior is not hidden behind an inaccessible hosted service. Cost: There are no per-image cloud inference charges or mandatory API subscriptions. Control: The OCR engine can be replaced or extended without redesigning the entire application. Open innovation gives users more control over their data and software dependencies. There are limitations. OCR accuracy depends on image resolution, typography, language data and hardware. During our LSTM verification, the engine correctly recognized most of a synthetic technical screenshot but confused a few similar-looking characters and punctuation marks. SiftShot currently provides OCR substring search, not semantic vector search or visual reasoning. I deliberately chose an open-source neural OCR engine that solves the actual problem rather than adding a generative model simply to call the project an AI application. The Spirit of It A screenshot is often a tiny record of a moment. A bug we solved. A command we needed. A design that inspired us. A receipt we might need months later. But when those fragments disappear into folders, their usefulness disappears with them. The idea behind SiftShot is to give those forgotten fragments an afterlife. The machine already has the memories. We just needed to make them searchable. SiftShot: Capture less chaos. Find anything. Thank you to everyone building, maintaining and contributing to open-source software this Hacktoberfest.

  5. Some handwriting only a neural net could love. Tesseract OCR turns stubborn notebooks into text you can actually search—just proofread the important stuff. tesseract-ocr/tesseract t.co

  6. YouTube · · YouTube description · Wolf | AI Tools & Projects · tesseract-ocr/tesseract

    Choose a parser before feeding PDFs to AI | 6 open-source choices Bad parsing can ruin good AI answers. Six options, with different use cases and adoption checks. Docling, PaddleOCR, olmOCR, Tesseract, EasyOCR, Unstructured. Explore the original cards: channel profile → AI Open Source Radar → Collections. Choose the collection for this task and inspect the project cards. useaistation.com Sources checked 23 Oct 2026. This is a project-selection guide, not hands-on testing or a live ranking. These are different choices, not a verified integrated stack. Software licenses, model weights, hardware and external service costs must be checked separately. Community/core and enterprise features may differ. Developer disclosure: we build AI Open Source Radar, not the featured projects. Narration: Microsoft free Aria neural voice. Project and License sources (observed branch references, subject to change): Docling: docling-project/docling License: raw.githubusercontent.com PaddleOCR: PaddlePaddle/PaddleOCR License: raw.githubusercontent.com olmOCR: allenai/olmocr License: raw.githubusercontent.com Tesseract: tesseract-ocr/tesseract License: raw.githubusercontent.com EasyOCR: JaidedAI/EasyOCR License: raw.githubusercontent.com Unstructured: Unstructured-IO/unstructured License: raw.githubusercontent.com #OpenSource #AITools #DocumentAI

    32 views
  7. YouTube · · YouTube description · 辰星說Github · tesseract-ocr/tesseract

    圖片文字不用重打?Tesseract 開源文字辨識|GitHub 開源快報 #Shorts Tesseract 是 OCR 引擎和命令列,不附 GUI,可搭語言 traineddata 輸入 PNG/JPEG/TIFF 等影像並輸出文字/可搜尋 PDF;不是直接讀 PDF 輸入或自動重建原版面。影像歪斜、噪點、解析度與語言影響準確度,手寫和表格不保證,需要人工複查。本片只有軟體介紹,不安裝或處理使用者私密文件。API Apache-2.0,依賴另有授權。README:tesseract-ocr/tesseract 專案:tesseract-ocr/tesseract 資料核對:2026-10-13 GitHub API 與專案 README。星數為當日快照。 畫面含 AI 生成的情境示意圖;GitHub 頁面為實際截圖。旁白為 AI 語音。 訂閱「辰星說Github」,每天兩支,用白話認識開源工具。 #Shorts #GitHub #開源

    6 likes · 99 views
  8. HacktoberFest Week 2 Challenge LocalLedger AI: A Private Invoice and Receipt Organizer for Freelancers LocalLedger AI: A Private Invoice and Receipt Organizer for Freelancers This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle. What I Built LocalLedger AI is a privacy-first invoice and receipt organizer built for freelancers, consultants, and independent workers. Managing invoices and receipts manually can become frustrating. Financial documents end up scattered across folders, searching for a particular expense takes time, and preparing monthly summaries involves repetitive work. Uploading these documents to cloud-based AI services can also raise privacy concerns. I built LocalLedger AI to make this workflow simpler while keeping documents on the user's computer. Here’s what it does: - Smart data extraction: Extracts vendor names, invoice numbers, dates, currency, subtotal, tax, total, and payment status from invoices and receipts. - Human-reviewed results: Flags missing, ambiguous, or inconsistent fields so users can verify and correct the extracted information. - Duplicate detection: Identifies exact duplicates using file hashes and flags possible duplicates using document details. - Local document organization: Organizes original documents into folders while avoiding filename collisions. - Expense insights: Generates monthly and vendor-wise summaries with CSV export. The potential customers are freelancers and small independent businesses that want less manual bookkeeping without depending on cloud AI services. A paid desktop edition could be a future direction, although I haven't validated pricing or paying customers yet. Demo There isn't a hosted demo or video walkthrough available yet. LocalLedger AI is designed to run on the user's own computer rather than requiring a hosted service. To run it locally: 1. Install Ollama and Tesseract OCR. 2. Download the Qwen2.5 model: ollama pull qwen2.5:3b-instruct 3. Install the Python dependencies: pip install -r requirements.txt 4. Start the application: streamlit run app.py After the required software and model are installed, document processing can run offline. The application also indicates whether Ollama and the selected model are available. Code Check out the source code and implementation here: LocalLedger AI — GitHub Repository Contributions and suggestions for improving local document processing, extraction accuracy, and privacy are welcome! How I Built It I wanted to build around open-source tools and a locally running model instead of depending on a proprietary, cloud-hosted AI API. Here's the technology stack: - Python: Core application logic and document-processing pipeline. - Streamlit: User interface for importing documents, reviewing extracted fields, and exploring expense summaries. - Qwen2.5 Instruct (3B): Open-weight language model used for structured invoice and receipt data extraction. - Ollama: Runs the model locally and provides the interface for local inference. - PyMuPDF: Extracts text from text-based PDF documents. - Tesseract OCR: Extracts text from scanned PDFs and image-based receipts. - SQLite: Stores document metadata and extracted information locally. - Pandas and Plotly: Support data analysis, monthly summaries, and vendor-wise visualizations. - Python hashlib: Generates SHA-256 hashes for exact duplicate detection. The workflow is straightforward: a user imports a document, the application extracts its text, and the local model identifies relevant financial fields. The returned JSON is validated before the results are saved to SQLite. An important design decision was to treat AI-generated results as suggestions rather than unquestionable facts. Missing or uncertain values are flagged for human review. Original files are retained, filenames are made collision-safe, and documents remain available for review even if a model request fails. Why Does Open Innovation Matter? Financial documents can contain sensitive information, including client names, addresses, invoice details, and transaction amounts. Sending this information to an external AI service isn't always desirable, especially for freelancers handling client data. Open-source tooling and local inference make a different approach possible. With LocalLedger AI, users can run the model on their own machines, inspect the processing pipeline, and keep document content within their local workflow. After the initial setup, they can process documents offline without depending on a hosted inference API or paying per-request API charges. Open innovation also gives developers the freedom to experiment with different models, improve extraction and validation, and adapt the application to their own workflows without being locked into a single proprietary AI provider. Of course, local AI has trade-offs. Performance depends on available hardware, OCR quality varies between documents, and model outputs still need verification. That's why human review is an important part of this project rather than an afterthought. For me, this project was an opportunity to explore how open-weight AI can solve a practical problem while keeping privacy at the center of the design. My Agent Session Optional section — add this if you have a saved DevRelay agent session. I used this project to explore an open-source AI workflow for a practical, privacy-focused application. If a shareable DevRelay session becomes available, I'll link it here. Prize Categories Open-Source AI Challenge — Week 2: Side Hustle No partner-specific prize category claimed. The project uses the open-source and locally runnable tools described above. --- Built with Python, local AI, and a focus on keeping financial documents private. Hacktoberfest #Hacktoberfest2026 #BuildForAFriend #OpenSource #DSA #DevTools #JavaScript #NodeJS #WebDevelopment

  9. ReceiptRecall: My Groceries Got Expensive, So I Gave My Receipts a Memory --- title: "ReceiptRecall: My Groceries Got Expensive, So I Gave My Receipts a Memory" published: true description: "A local-AI receipt scanner: photograph a receipt, let Tesseract + Gemma draft it, correct it, and keep a price history you can actually use. Built around the one honest truth about small models — they draft, you confirm." tags: devchallenge, hf26challenge, ai, opensource cover_image: dev-to-uploads.s3.us-east-2.amazonaws.com canonical_url: --- <!-- BEFORE PUBLISHING — fill these, then delete this comment: 1. Demo: add the video link, and either a live URL or keep the "run it locally" steps. 2. Make the GitHub repo public and verify the link in an incognito window. 3. Upload banners/devto-cover.png as the DEV cover (a private GitHub raw URL won't render). 4. Prize category: keep "Best Use of Gemma" only — it's genuinely used. 5. No tester session yet, so there is no "My First User" section. Add it only after a real trial with permission to quote. --> This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle. Started as: "what did I pay for milk last time?" Ended as: a local-AI pipeline, one production-only crash, a format war with my own iPhone, and a language model confidently inventing a Big Mac that was never on the receipt. What I Built Somewhere between the cashier and my front door, my brain deletes the price of milk. It keeps song lyrics from 2020. That, apparently, is essential infrastructure. The price of soap from last week? Evicted without notice. That gap is ReceiptRecall: a receipt scanner that turns the slip of paper from the till into something useful after you leave the shop. The loop is deliberately small: photograph a receipt → check the extracted draft → confirm → keep a purchase history you can actually use. No barcode-by-barcode scanning. No spreadsheet guilt. It exists to answer ordinary questions without an archaeological dig through my handbag: - What did I pay for this last time? - Did the brand get pricier, or did the packet quietly get smaller? - Is the cheaper-looking option actually cheaper per litre? - What have I spent this month? The review step is the whole point. OCR misreads faded ink; a small model will cheerfully confuse a row total with a unit price. So you get an editable draft before anything is saved. A confident wrong total is still a wrong total — just better dressed. What's shipped: photo upload (including iPhone HEIC), OCR + AI draft, review-and-correct, atomic confirm, and a spending history. Pantry stock and the shopping list are designed and in the schema, but I deferred them to keep the first version honest about what works today. Who would pay for it? My hypothesis: a household that shops regularly and wants a private receipt archive with real price history — paid value in backup, shared access, or a supported self-hosted install. That's a hypothesis to test, not proof of demand. A subscription button can't tell me whether reviewing a scan actually beats typing. Demo <!--Video walkthrough: ADD YOUR ACTUAL VIDEO LINK --> Run it locally (the flow I verified end to end): git clone https://github.com/CynthiaWahome/receipt-recall && cd receipt-recall npm install ollama pull gemma3:1b # local, open-weight, no API key npm run dev # http://localhost:3000 Then: Scan Receipt → upload a photo → Extract with OCR + AI → correct the rows → Confirm → check History. Code ReceiptRecall on GitHub Stack: Next.js 16 + TypeScript, SQLite (better-sqlite3), Tesseract CLI OCR, Gemma 3 1B via Ollama, Zod, sharp. Receipt images live in private storage, never a public folder; money is stored in integer minor units so no float ever rounds my milk into oblivion. How I Built It The architecture separates reading a receipt from trusting it: Photo → OCR text → structured AI draft → human review → confirmed history. Tesseract turns the picture into text. Gemma 3 1B (open weights, run locally through Ollama) organises that text into fields. Gemma is text-only here — nobody is asking a text model to squint at a JPEG and pray. Output is constrained with Zod + Ollama's JSON Schema format, which enforces shape, not truth. Hence the review step. Then reality showed up, in four acts. 1. The scanner that couldn't scan. The OCR and extraction code existed, got merged, then got reverted — because the one thing it depended on, actually uploading a photo, was never built. So the model had nothing to read and looked broken. Lesson I keep re-learning: build the boring plumbing before the clever part. 2. My iPhone declared format war. Every photo is HEIC, and HEIC hides its pixels behind HEVC compression that sharp's bundled libheif can't decode. It read the metadata fine and then failed on the actual image — the most polite kind of failure. Fix: a pure-JS HEIC→JPEG step before sharp, so it works on my laptop and in Docker without system libraries. Bonus trap: newer iPhones shoot 48MP, which blew past my pixel cap. The cap was guarding against decompression bombs, not punishing people for owning a good camera. 3. The crash that only existed in production. Locally, flawless. Built for deploy, every write died with no such table: receipts. The database schema was loaded from a file via __dirname, which the bundler rewrites to a path that doesn't exist in the server output. Inlined the schema; crash gone. A green local run proves exactly nothing about the bundle. 4. Gemma invented a Big Mac. On a real Pandamart receipt — rope, sponge cloth, towels — the model returned four line items all named "Big Mac," mangled the quantities, and filed the discount as a product. This is not a bug to patch away; it's a 1B model being a 1B model. It's also the entire argument for the review screen. The AI drafts; you confirm. I made the draft schema permissive (so one weird field doesn't nuke the whole extraction) and kept the strictness at confirm, where it belongs. The arithmetic stays in plain code, where it's boring and testable: two 1L packets at 260 total = 130/litre; one 500ml packet at 70 = 140/litre. The smaller sticker loses. Money in integer minor units, row totals kept distinct from unit prices, units and currencies never mixed, confirm wrapped in one idempotent transaction so a double-tap can't buy your milk twice. 39 unit tests guard the maths; I verified the upload→OCR→draft path end to end on a synthetic receipt and a 48MP HEIC, plus duplicate-upload and cross-origin rejection. Why Does Open Innovation Matter? A receipt quietly reveals where you shop, when, and what you buy. I wanted to control where that gets processed. With OCR and inference running locally, extraction can stay on my machine after the initial downloads. Host it on a server instead and the photos travel there — so I say it plainly: self-hosted is not the same as "never leaves your phone." The privacy claim has to match the deployment. Open made three things real: 1. Control over processing — local inference instead of a third-party API per receipt. 2. Room to fix the weak link — I can swap OCR engines or models against the same test receipts without rebuilding the product around one vendor's response format. 3. A different cost curve — no per-token billing. Hardware, power and hosting still cost money, so I won't call it free to run. Credit where due: Tesseract is open-source software; Gemma ships open weights under its own model terms. Different licences, both worth reading. Prize Categories - Best Use of Gemma: Gemma 3 1B (open weights, local via Ollama) is the extraction brain — it turns numbered OCR lines into a structured, schema-validated draft, and its honest roughness is exactly why the human-in-the-loop review is the product, not an afterthought.

    2 reactions
  10. 아 찾았다 테서렉트입니다 말고 할콘도 써보긴 했는데 이건 애초에 개비싼(몇백하는) 비전 전문 유료 라이브러리라 논외 tesseract-ocr/tesseract

    1 like · 53 views

Achievements

Awards earned by the repositories tesseract-ocr owns. Select an award to embed its badge.

No awards yet

Repositories earn awards by reaching the top three in a completed trending day or week.

A repository earns an award for finishing first, second or third in a completed trending day or week, ranked by new stars, new forks or pull request authors. Awards follow a repository through renames and transfers and count toward its current owner. Weeks run Monday to Sunday, UTC.