mirror of
https://github.com/sml2h3/ocr_api_server.git
synced 2025-05-02 23:43:48 +08:00
整体项目重构
This commit is contained in:
parent
abbd580b7a
commit
901103a7e3
16
README.md
16
README.md
@ -106,13 +106,15 @@
|
||||
|
||||
🔗 **端点**:`POST /slide_match`
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `target_file` | File | 目标图片文件(可选) |
|
||||
| `background_file` | File | 背景图片文件(可选) |
|
||||
| `target` | String | Base64 编码的目标图片字符串(可选) |
|
||||
| `background` | String | Base64 编码的背景图片字符串(可选) |
|
||||
| `simple_target` | Boolean | 是否使用简单目标(默认:false) |
|
||||
| 参数 | 类型 | 描述 |
|
||||
|-------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|
|
||||
| `target_file` | File | 目标图片文件(可选)需要与target字段同时使用 |
|
||||
| `target` | String | Base64 编码的目标图片字符串(可选) 需要与target_file字段同时使用 |
|
||||
| `background_file` | File | 背景图片文件(可选) 需要与background字段同时使用 |
|
||||
| `background` | String | Base64 编码的背景图片字符串(可选) 需要与background_file字段同时使用 |
|
||||
| `simple_target` | Boolean | 是否使用简单目标(默认:false) |
|
||||
|| | `target_file`和`target` 为一组字段,`background_file`和`background` 为一组字段, 两组字段不可同时使用,同时使用则仅一组会生效 |
|
||||
|
||||
|
||||
### 3. 目标检测
|
||||
|
||||
|
@ -2,8 +2,8 @@ import uvicorn
|
||||
from fastapi import FastAPI, File, UploadFile, HTTPException, Form
|
||||
from typing import Optional, Union
|
||||
import base64
|
||||
from app.models import OCRRequest, SlideMatchRequest, DetectionRequest, APIResponse
|
||||
from app.services import ocr_service
|
||||
from models import OCRRequest, SlideMatchRequest, DetectionRequest, APIResponse
|
||||
from services import ocr_service
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user