通用古文字检测模型 / Ancient Chinese Character Detection

作者 / Author: 张重生 Chongsheng Zhang(河南大学)

模型描述 / Model Description

基于 YOLO26m 训练的古文字目标检测模型,支持甲骨文(商代)和简牍文字(汉代)的单字检测与定位。

A YOLO26m-based ancient Chinese character detection model trained for Oracle Bone Inscriptions (Shang Dynasty) and Bamboo Slip characters (Han Dynasty).

性能 / Performance

域 / Domain mAP50
甲骨文 Oracle Bone Inscriptions 89.92%
简牍 Bamboo Slips 94.22%

模型参数 / Model Specs

项目
架构 YOLO26m
参数量 20.4M
模型大小 126 MB
输入尺寸 640×640
检测类别 character(单类别)

训练数据 / Training Data

  • 甲骨文字检测数据集:8895 张(train)× 3 过采样 = 26,685 张
  • DeepJiandu 简牍数据集:6,673 张(train + val)
  • 合计:33,358 张混合训练图像

使用方法 / Usage

在线体验

访问 HuggingFace Space:Ancient Chinese Character Detection

本地推理

from ultralytics import YOLO
from huggingface_hub import hf_hub_download

# 下载模型
model_path = hf_hub_download(
    repo_id="cszhangai/ancient-chinese-character-detection",
    filename="General_Ancient_Character_Detection.pt"
)

# 加载模型
model = YOLO(model_path)

# 单张检测
results = model.predict(
    source="your_image.jpg",
    imgsz=640,
    conf=0.25,          # 甲骨文建议 0.20,简牍建议 0.25
    iou=0.45,
    device=0,           # GPU;改为 'cpu' 使用 CPU
    save=True,
)

# 获取检测框坐标
for result in results:
    for box in result.boxes:
        x1, y1, x2, y2 = box.xyxy[0].tolist()
        conf = box.conf[0].item()
        print(f"box: ({x1:.0f},{y1:.0f}) → ({x2:.0f},{y2:.0f})  conf={conf:.3f}")

注意事项 / Notes

  • 甲骨文建议置信度阈值:conf=0.20(字符变异大,阈值过高易漏检)
  • 简牍建议置信度阈值:conf=0.25
  • 不要使用翻转增强:汉字朝向固定,翻转会产生无效样本
  • 不建议在此模型基础上继续精调:当前已充分训练,继续精调易过拟合

版权 / Copyright

Copyright © Chongsheng Zhang(张重生,河南大学) https://cszhanglmu.github.io/

引用数据集 / Dataset Citation

Downloads last month
106
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Space using cszhangai/ancient-chinese-character-detection 1