🚀 YOLOv8手寫文本檢測
本項目基於YOLOv8算法,專注於手寫文本檢測。YOLOv8以其出色的速度和準確性,成為即時應用的理想選擇。此模型在多樣化的手寫文本數據集上進行了微調,使其在檢測手寫內容方面表現卓越,能有效區分手寫與打印文本。
🚀 快速開始
安裝依賴
pip install ultralytics
使用示例
from ultralytics import YOLO
from huggingface_hub import hf_hub_download
from matplotlib import pyplot as plt
model_path = hf_hub_download(local_dir=".",
repo_id="armvectores/yolov8n_handwritten_text_detection",
filename="best.pt")
model = YOLO(model_path)
test_blank_path = hf_hub_download(local_dir=".",
repo_id="armvectores/yolov8n_handwritten_text_detection",
filename="test_blank.png")
res = model.predict(source=test_blank_path, project='.',name='detected', exist_ok=True, save=True, show=False, show_labels=False, show_conf=False, conf=0.5, )
plt.figure(figsize=(15,10))
plt.imshow(plt.imread('detected/test_blank.png'))
plt.show()
📦 安裝指南
使用以下命令安裝ultralytics
庫:
pip install ultralytics
💻 使用示例
基礎用法
from ultralytics import YOLO
from huggingface_hub import hf_hub_download
from matplotlib import pyplot as plt
model_path = hf_hub_download(local_dir=".",
repo_id="armvectores/yolov8n_handwritten_text_detection",
filename="best.pt")
model = YOLO(model_path)
test_blank_path = hf_hub_download(local_dir=".",
repo_id="armvectores/yolov8n_handwritten_text_detection",
filename="test_blank.png")
res = model.predict(source=test_blank_path, project='.',name='detected', exist_ok=True, save=True, show=False, show_labels=False, show_conf=False, conf=0.5, )
plt.figure(figsize=(15,10))
plt.imshow(plt.imread('detected/test_blank.png'))
plt.show()
📚 詳細文檔
測試結果展示
指標
最終交併比(IoU)達到0.98。
訓練期間的IoU變化:
屬性 |
詳情 |
模型類型 |
YOLOv8手寫文本檢測模型 |
訓練數據 |
armvectores/handwritten_text_detection |