百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

tools-ocr

> 数据库
开源

树洞 OCR 文字识别(一款跨平台的 OCR 小工具)

3.1K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

树洞 OCR 文字识别(一款跨平台的 OCR 小工具)

Tree Hole OCR

English | 中文

Introduction

  • Local OCR Recognition: Tree Hole OCR text recognition tool does not require internet connection. It leverages local OCR technology, based on Paddle OCR model and deep learning frameworks such as PyTorch, DJL, to provide fast and accurate text recognition.
  • Cross-platform compatibility: Developed with Java 1.8 and JavaFX, it supports operation on different operating systems, including Mac OS X 12.6 and above.
  • Powerful functionality: In addition to basic text recognition, it also includes PDF recognition, image text recognition, shortcut key screenshot recognition, and more.

Dependencies Library

  • JDK 1.8
  • JavaFX
  • DJL
  • PyTorch
  • ONNX
  • Paddle OCR
  • OpenCV

Open Source Address

gitee | github

Documentation

https://tree-hole-ocr-docs.vercel.app/

Requirements

  • Mac OS X 12.6 due to dependency on DJL 0.25.0

Installation

  • Please do not include Chinese characters in the installation path;
  • This program is developed with JavaFX, and the installation package provided already includes Java.
  • Download the latest version from release and unzip it for installation.

Using the Program

Screenshot

  • Method one: Click the screenshot button on the main interface of the program;
  • Method two: Press the screenshot shortcut key F4.

Selecting Area

After entering the screenshot interface, press and hold the left mouse button, then drag to select the area you want to capture; After completing the selection, you can fine-tune the selected area:

  • Use arrow keys to adjust the right and top borders of the selected area;
  • Use Shift + arrow keys to adjust the left and bottom borders of the selected area;
  • Use Ctrl + A to select the entire screen.

Confirm Selection

After completing the selection, press Enter or Space key, or double-click the left mouse button to confirm the selection; Once confirmed, the program will automatically perform OCR text recognition on the selected area.

  • image

  • result:

Local Build

Download and Unzip the Models

wget https://github.com/litongjava/tools-ocr/releases/download/model-ppocr-v4/ch_PP-OCRv4_rec_infer-onnx.zip
wget https://github.com/litongjava/tools-ocr/releases/download/model-ppocr-v4/ch_PP-OCRv4_det_infer-onnx.zip

Unzip the models

mkdir models/ch_PP-OCRv4_rec_infer
mkdir models/ch_PP-OCRv4_det_infer
unzip /Users/mac/Downloads/ch_PP-OCRv4_rec_infer-onnx.zip -d models/ch_PP-OCRv4_rec_infer
unzip /Users/mac/Downloads/ch_PP-OCRv4_det_infer-onnx.zip -d models/ch_PP-OCRv4_det_infer

Build the Program

You can download the code and build it locally. The build commands are as follows: windows

mkdir target\jfx\app
cp -r models target\jfx\app
mvn jfx:native -DskipTests -f pom.xml

macos

rm -rf target/jfx/app
mkdir -p target/jfx/app
cp -r models target/jfx/app
mvn jfx:native -DskipTests -f pom.xml

View System Operating Log

cd treehole.app/Contents/java/logs

Notices

MAC Permission Settings

Since screenshot shortcuts are monitored, MAC needs appropriate permissions settings, as shown below:

  • Settings --> Security and Privacy --> Accessibility

  • Settings --> Security and Privacy --> Screen Recording

Common Directories

  • Log directory /Applications/treehole.app/Contents/Java/logs
  • Temporary image saving directory /Applications/treehole.app/Contents/Java

TODO

  • PDF Recognition
  • Image Text Recognition
    • Recognition result text alignment (multi-column yet to be implemented)
    • Full screen mode screenshot
    • Adding recognition animation
    • Multi-screen support
  • Text Translation
  • Formula Recognition
  • Table Recognition
  • Software Settings

GitHub Issues· 21 开放

在 GitHub 查看全部
  • #81

    还更新嘛,下载地址全部失效不可用!

    更新于 2024年11月1日
  • #80

    M3 Mac 15.0.1,“treehole”已损坏,无法打开。 你应该将它移到废纸篓。

    更新于 2024年10月21日
  • #79

    io.github.mymonstercat.Model.ONNX_PPOCR_V4_SERVER 已经被注释,新加载的项目会报错。

    更新于 2024年9月21日
  • #78

    如果用户名是中文,咋办,不想更改中路路径

    更新于 2024年8月9日
  • #71

    linux编译运行jar包崩溃

    更新于 2024年5月6日
  • #48

    问题

    更新于 2024年4月28日
  • #70

    推荐个基于paddleocr的第三方包,不需要djl

    更新于 2024年4月28日
  • #24

    增加朝鲜语,繁体中文识别功能

    todo更新于 2023年11月24日
  • #32

    建议添加新功能

    更新于 2023年11月24日
  • #58

    大分辨率200%缩放屏幕对齐有问题

    更新于 2023年11月24日

核心特点

  • •Cross-platform compatibility: Developed with Java 1.8 and JavaFX, it supports operation on different operating systems, including Mac OS X 12.6 and above.
  • •Powerful functionality: In addition to basic text recognition, it also includes PDF recognition, image text recognition, shortcut key screenshot recognition, and more.
  • •Paddle OCR
  • •Mac OS X 12.6 due to dependency on DJL 0.25.0
  • •Method one: Click the screenshot button on the main interface of the program;
  • •Method two: Press the screenshot shortcut key F4.
  • •Use arrow keys to adjust the right and top borders of the selected area;
  • •Use Shift + arrow keys to adjust the left and bottom borders of the selected area;
  • •Use Ctrl + A to select the entire screen.
  • •Settings --> Security and Privacy --> Accessibility

> 标签

Javacross-platformjavafxmacocr

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库