返回模型
说明文档
<p align="center"> <img src="https://github.com/felixdittrich92/OnnxTR/raw/main/docs/images/logo.jpg" width="40%"> </p>
由 Onnxruntime 驱动的光学字符识别,让任何人都能无缝使用
任务:检测
https://github.com/felixdittrich92/OnnxTR
使用示例:
>>> from onnxtr.io import DocumentFile
>>> from onnxtr.models import ocr_predictor, from_hub
>>> img = DocumentFile.from_images(['<image_path>'])
>>> # Load your model from the hub
>>> # 从 Hub 加载您的模型
>>> model = from_hub('onnxtr/my-model')
>>> # Pass it to the predictor
>>> # 将其传递给预测器
>>> # If your model is a recognition model:
>>> # 如果您的模型是识别模型:
>>> predictor = ocr_predictor(det_arch='db_mobilenet_v3_large',
>>> reco_arch=model)
>>> # If your model is a detection model:
>>> # 如果您的模型是检测模型:
>>> predictor = ocr_predictor(det_arch=model,
>>> reco_arch='crnn_mobilenet_v3_small')
>>> # Get your predictions
>>> # 获取您的预测结果
>>> res = predictor(img)
Felix92/onnxtr-fast-base
作者 Felix92
↓ 72
♥ 0
创建时间: 2024-08-16 06:36:30+00:00
更新时间: 2024-08-16 08:40:00+00:00
在 Hugging Face 上查看文件 (4)
.gitattributes
README.md
config.json
model.onnx
ONNX