# ocr-auto-fill **Repository Path**: jaychuo/ocr-auto-fill ## Basic Information - **Project Name**: ocr-auto-fill - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 4 - **Created**: 2026-05-06 - **Last Updated**: 2026-05-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # OCR 智能表单自动填充 Demo ## 项目结构 ``` ocr-auto-fill/ ├── backend/ │ ├── ocr_api.py # FastAPI 主服务(支持图片 + PDF) │ ├── thread_single.py # 原始 PaddleOCR 线程管理器 │ └── requirements.txt ├── frontend/ │ ├── package.json │ ├── vite.config.js │ ├── index.html │ └── src/ │ ├── main.js │ └── OcrAutoFill.vue └── README.md ``` ## 启动步骤 ### 1. 后端 ```bash cd backend # 安装方法 请参考往期公众号 pip install -r requirements.txt python ocr_api.py ``` 服务启动在 `http://localhost:18888` ### 2. 前端 ```bash cd frontend npm install npm run dev ``` 打开 `http://localhost:5173` ## 功能说明 - 支持 **JPG / PNG / PDF** 上传 - PDF 自动转图片后逐页 OCR,合并提取字段 - 自动提取:合同编号、合同名称、甲方、乙方、金额、签订日期 - 输入框尾部显示 **识别置信度**(低于 80% 黄色警告) - 点击"查看原始识别文本"可调试 OCR 结果 ## 依赖说明 | 后端依赖 | 作用 | |---------|------| | fastapi / uvicorn | HTTP 服务 | | paddleocr / paddlepaddle | OCR 引擎 | | PyMuPDF | PDF 转图片 | | 前端依赖 | 作用 | |---------|------| | vue | 框架 | | element-plus | UI 组件 | | axios | HTTP 请求 |