引言

看起来不错的 OCR 服务

效果展示

过程

1
2
3
4
5
6
7
8
9
10
11
12
13
## Clone this repository and navigate to the GOT folder
git clone https://github.com/Ucas-HaoranWei/GOT-OCR2.0.git
# cd 'the GOT folder'
cd GOT-OCR2.0/GOT-OCR-2.0-master/

## Install Package
conda create -n got python=3.10 -y
conda activate got
pip install -e .

## Install Flash-Attention
pip install ninja
pip install flash-attn --no-build-isolation
1
2
3
4
## test demo
# python3 GOT/demo/run_ocr_2.0.py --model-name /GOT_weights/ --image-file /an/image/file.png --type ocr
python3 GOT/demo/run_ocr_2.0.py --model-name /home/tenney/github/GOT-OCR2.0/GOT-OCR-2.0-master/GOT_weights/GOT_weights --image-file /home/tenney/github/GOT-OCR2.0/GOT-OCR-2.0-master/an/2024-09-16-16-28-28.png --type ocr
python3 GOT/demo/run_ocr_2.0_crop.py --model-name ./GOT_weights/GOT_weights/ --image-file /home/tenney/github/GOT-OCR2.0/GOT-OCR-2.0-master/an/病历示例 --multi-page

结论

引用

  1. GitHub - Ucas-HaoranWei/GOT-OCR2.0: Official code implementation of General OCR Theory: Towards OCR-2.0 via a Unified End-to-end Model
  2. ucaslcl/GOT-OCR2_0 · Hugging Face
  3. GOT-OCR2.0 - Google ドライブ
  4. GOT Online - a Hugging Face Space by stepfun-ai