th1nhhdk/local_ai_ocr
About
A local, offline (after initial setup), portable OCR application that processes images and PDF files using DeepSeek-OCR-2 AI running directly on your machine.
Design & MediaMeasured star growth
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README_en.md
OriginalLanguages:
Tiếng Việt | English
Local AI OCR (v3.0.0)
An local, offline (after initial setup), portable OCR software that can process images and PDF files, using DeepSeek-OCR AI (running directly on your machine).

Features
- Runs offline (locally): No network connection required, and it doesn't communicate anywhere, ensuring absolute data security.
- GPU (and CPU) support: Automatically detects and uses GPU for acceleration; if GPU is not available, it automatically switches to CPU (CPU will be much slower).
- Multi language support: English, Vietnamese, Chinese, Japanese, ...
- Multiple file format support: Images
.png,.jpg,.webp,.heic,.heifand.pdfdocuments. - Smart PDF processing: Allows selecting page range for processing (for PDF files with >=2 pages).
- Queue system: Allows processing multiple files sequentially.
- Automatic Image Extraction: Automatically detects and extracts graphs, charts, etc., to insert them as images into the result.
- Fancy Output: Supports displaying Formatted text instead of raw text, allows keeping formatting for pasting into Word, ...
- Export to Word: Supports exporting the result directly to a
.docxfile alongside the standard Copy to Clipboard option. - OCR process illustration: See exactly what the AI detected as OCR progresses (pretty cool).
- 3 processing modes:
- Markdown Document (keep formatting): Extracts text, attempts to preserve layout (Tables, ...)
- Free OCR: Extracts text, preserve layout better than "
Standard OCR". - Standard OCR: Extracts text, does not preserve layout well.
- Auto-unload AI Model to free memory: After the first "
Start Processing", the AI Model will be loaded into memory; after completion, it will automatically free memory after 5 minutes (Or press the "Unload AI Model" button to free memory immediately).
System Requirements (Recommended)
Note: You can still run this software even if you don't meet the system requirements (even without a GPU, it still works), but the speed will be much slower.
OS: Windows 10 or newer, or Linux
CPU: Minimum 4 cores/8 threads
RAM: Minimum 16GB
Free storage: About 11GB
GPU: Nvidia GPU available, with minimum 8GB VRAM
- Note: The software will try to use the GPU, even when VRAM capacity doesn't meet requirements, to accelerate the software.
Download and Setup
- Download the
.zipfile (or.tar.gzfor Linux) in the Releases section (on the right, under About) and extract it. - Windows: Run
env_setup.cmdLinux: Open Terminal in the project folder, grant execution rights viachmod +x *.shand run./env_setup_linux.sh- Note: This script will download the AI weights file, which is 6.67 GB
- You have completed the software setup; the software will no longer need a network connection.
Notes Before Use
- Although
DeepSeek-OCR-2has extremely high accuracy, you should still verify the results, especially for important documents. - The first run always takes some time to load the AI Model into memory.
- Dragging and dropping files may not preserve the file order, this is a software limitation and there is currently no way to fix it.
Usage Guide
Starting the software:
- Windows: Run
run.cmdto start the software (uses GPU if available). If you want to force CPU execution, userun_cpu-only.cmd. - Linux: Run
./run_linux.sh(GPU) or./run_linux_cpu-only.sh(CPU-only).
- Windows: Run
Using the software:
- 2a. File management:
- Add Image/Add PDF: Select document pages to add to the
Processing Queue. - Clear Queue: Clear the
Processing Queuelist.
- Add Image/Add PDF: Select document pages to add to the
- 2b. Select mode (recommended to keep default): Choose between 2 OCR modes, default is the best.
- 2c. Start OCR: Press the "
Start Processing" button to begin OCR. - 2d. Output: The processed text will be displayed in the right panel; you should look at "
Fancy Output" (the software will automatically switch to that Tab when OCR finishes). - 2e. Copy output & Export to Word: Press this button to copy the content in the "
Output" box. If you're on the "Fancy Output" Tab, the formatting will be preserved, and you can paste it into Word or other software. You can also use the "Export to Word" option to save the result directly as a.docxfile.
- 2a. File management:
- Tip: Press the "
Unload AI Model" button to free RAM/VRAM when you don't intend to continue using OCR but don't want to close the software yet.
Troubleshooting
This program uses CPU and RAM, but not my Nvidia GPU:
- Check
Nvidia Control Paneland see what Driver version are you using? You must have531or newer for the program to ultilize the GPU. - Visit Nvidia's Website to download newer drivers.
- Check
env_setup.batfails at[1/6]:- Are you using Windows 10/11 21H2? try to upgrade to at least 22H2 and see if it works.
If you encounter GPU-related errors, use
run_cpu-only.cmdso the software won't use the GPU.
Explore related projects
Loading…