EAST:高效准确的场景文字检测器

FreeGuideOnline 最新 2026-06-25

bash git clone https://github.com/argman/EAST.git cd EAST

下载模型权重放到 checkpoints/ 目录下


### 单张图像检测示例

```python
import cv2
import numpy as np
from east.network import East
from east.postprocess import detect

# 加载模型
east_detector = East('path/to/checkpoint.pth')

# 读取图像
img = cv2.imread('example.jpg')
# 执行检测
result_img, boxes = east_detector.detect(img)

# 可视化
for box in boxes:
    cv2.polylines(img, [box.astype(np.int32)], True, (0, 255, 0), 2)
cv2.imshow('EAST Detection', img)
cv2.waitKey(0)