🚀 YOLOS(小型)模型
本模型是基于 hustvl/yolos-small 在来自 Roboflow 的 licesne-plate-recognition 数据集上进行微调的版本。该数据集的训练集包含 5200 张图像,验证集包含 380 张图像。原始的 YOLOS 模型在 COCO 2017 目标检测数据集(118k 带注释图像)上进行了微调。
🚀 快速开始
你可以使用此原始模型进行目标检测。请查看 模型中心 以查找所有可用的 YOLOS 模型。
✨ 主要特性
- 标签:目标检测、车牌检测、车辆检测。
- 指标:平均精度、召回率、交并比(IOU)。
- 模型类型:YOLOS 是使用 DETR 损失训练的视觉变换器(ViT)。尽管其结构简单,但基础大小的 YOLOS 模型在 COCO 2017 验证集上能够达到 42 AP(与 DETR 和更复杂的框架如 Faster R - CNN 相当)。
属性 |
详情 |
模型类型 |
YOLOS 是使用 DETR 损失训练的视觉变换器(ViT) |
训练数据 |
该 YOLOS 模型在 ImageNet - 1k 上进行预训练,并在 COCO 2017 目标检测 数据集上进行微调,该数据集分别包含 118k/5k 张带注释的训练/验证图像 |
📦 安装指南
文档未提及具体安装步骤,故跳过此章节。
💻 使用示例
基础用法
from transformers import YolosFeatureExtractor, YolosForObjectDetection
from PIL import Image
import requests
url = 'https://drive.google.com/uc?id=1p9wJIqRz3W50e2f_A0D8ftla8hoXz4T5'
image = Image.open(requests.get(url, stream=True).raw)
feature_extractor = YolosFeatureExtractor.from_pretrained('nickmuchi/yolos-small-finetuned-license-plate-detection')
model = YolosForObjectDetection.from_pretrained('nickmuchi/yolos-small-finetuned-license-plate-detection')
inputs = feature_extractor(images=image, return_tensors="pt")
outputs = model(**inputs)
logits = outputs.logits
bboxes = outputs.pred_boxes
目前,特征提取器和模型都支持 PyTorch。
📚 详细文档
训练数据
该 YOLOS 模型在 ImageNet - 1k 上进行预训练,并在 COCO 2017 目标检测 数据集上进行微调,该数据集分别包含 118k/5k 张带注释的训练/验证图像。
训练
该模型在 licesne-plate-recognition 数据集上进行了 200 个周期的微调。
评估结果
该模型的平均精度(AP)达到了 49.0。
IoU 指标:边界框
指标 |
指标参数 |
位置 |
检测数 |
值 |
平均精度 |
(AP) @[ IoU=0.50:0.95 |
area= all |
maxDets=100 ] |
0.490 |
平均精度 |
(AP) @[ IoU=0.50 |
area= all |
maxDets=100 ] |
0.792 |
平均精度 |
(AP) @[ IoU=0.75 |
area= all |
maxDets=100 ] |
0.585 |
平均精度 |
(AP) @[ IoU=0.50:0.95 |
area= small |
maxDets=100 ] |
0.167 |
平均精度 |
(AP) @[ IoU=0.50:0.95 |
area= medium |
maxDets=100 ] |
0.460 |
平均精度 |
(AP) @[ IoU=0.50:0.95 |
area= large |
maxDets=100 ] |
0.824 |
平均召回率 |
(AR) @[ IoU=0.50:0.95 |
area= all |
maxDets= 1 ] |
0.447 |
平均召回率 |
(AR) @[ IoU=0.50:0.95 |
area= all |
maxDets= 10 ] |
0.671 |
平均召回率 |
(AR) @[ IoU=0.50:0.95 |
area= all |
maxDets=100 ] |
0.676 |
平均召回率 |
(AR) @[ IoU=0.50:0.95 |
area= small |
maxDets=100 ] |
0.278 |
平均召回率 |
(AR) @[ IoU=0.50:0.95 |
area= medium |
maxDets=100 ] |
0.641 |
平均召回率 |
(AR) @[ IoU=0.50:0.95 |
area= large |
maxDets=100 ] |
0.890 |
🔧 技术细节
文档未提供具体的技术实现细节,故跳过此章节。
📄 许可证
文档未提及许可证信息,故跳过此章节。