norwegian-grocery
收藏资源简介:
NorgesGruppen Grocery Detection Dataset 是一个用于挪威杂货店货架图像的目标检测数据集,源自NorgesGruppen Data竞赛。数据集包含248张货架图像,22,731个COCO格式的边界框标注,涵盖356个产品类别(包括未知产品类别)。此外,数据集还提供了327种产品的多角度参考照片,共计1,582张图像。数据集支持COCO和YOLO两种格式,其中YOLO格式在加载时自动转换。数据集分为训练集和验证集,比例为85:15。适用于目标检测和图像分类任务,特别是零售和货架检测场景。数据集还包含产品元数据,如条形码、产品名称和图像类型。
NorgesGruppen Grocery Detection Dataset is an object detection dataset for Norwegian grocery store shelf images, sourced from the NorgesGruppen Data Competition. The dataset contains 248 shelf images with 22,731 COCO-formatted bounding box annotations, covering 356 product categories including the unknown product category. Additionally, the dataset provides multi-angle reference photos of 327 products, totaling 1,582 images. The dataset supports both COCO and YOLO formats, where the YOLO format is automatically converted during loading. The dataset is split into training and validation sets at a ratio of 85:15. It is applicable to object detection and image classification tasks, especially for retail and shelf detection scenarios. The dataset also includes product metadata such as barcodes, product names and image types.
数据集概述
基本信息
- 数据集名称: NorgesGruppen Grocery Detection Dataset
- 托管地址: https://huggingface.co/datasets/valiantlynxz/norwegian-grocery
- 许可证: cc-by-nc-4.0
- 任务类别: 目标检测、图像分类
- 语言: 挪威语 (no)
- 标签: grocery, retail, shelf-detection, coco, yolo, norgesgruppen
- 规模类别: n<1K
数据集内容
- 货架图像: 248张来自挪威杂货店的货架图像(Egg, Frokost, Knekkebrod, Varmedrikker类别)。
- 边界框标注: 22,731个COCO格式的边界框标注。
- 产品类别: 356个产品类别(ID 0-355,其中355为
unknown_product)。 - 产品参考图像: 327个产品的多角度参考照片,总计1,582张图像。
- 训练/验证集划分: 211张训练图像,37张验证图像(85/15比例,随机种子为42)。
数据配置
数据集提供三种配置,可通过Hugging Face datasets库加载。
| 配置名称 | 默认 | 描述 | 数据划分 |
|---|---|---|---|
coco |
是 | 原始的COCO格式标注,包含完整元数据 | train, validation |
yolo |
否 | 自动转换为YOLO归一化格式[cx, cy, w, h] |
train, validation |
products |
否 | 产品参考图像及其元数据 | train |
COCO 配置
每个样本包含货架图像及其COCO格式标注。
image: PIL Image对象。image_id: 整数。width: 图像宽度(像素)。height: 图像高度(像素)。annotations: COCO标注列表的JSON字符串。每个标注包含id、category_id、bbox(格式为[x, y, w, h],单位为像素)、area、product_code等字段。
YOLO 配置
使用相同的图像,但边界框自动转换为YOLO归一化中心格式。
image: PIL Image对象。image_id: 整数。labels: 整数列表,表示类别ID。bboxes: 列表的列表,格式为[[cx, cy, w, h], ...],坐标已归一化到[0, 1]范围。
Products 配置
按产品代码组织的327个产品的参考图像。
image: PIL Image对象(一个角度)。product_code: 条形码字符串。product_name: 产品名称字符串。image_type: 图像角度类型,如"main"、"front"、"back"、"left"、"right"、"top"、"bottom"。annotation_count: 该产品在货架图像中出现的次数。
数据结构
norwegian_grocery.py # 自定义加载脚本(由HF自动发现) train/ annotations.json # COCO格式的标注文件 images/ # 248张货架图像(.jpg/.jpeg格式) NM_NGD_product_images/ metadata.json # 产品名称、条形码、标注次数的元数据 {barcode}/ # 按条形码组织的产品参考图像 scripts/ coco_to_yolo.py # 将COCO格式转换为YOLO格式的脚本(包含训练/验证集划分)
关键统计
- 图像尺寸范围: 宽度481-5712像素,高度399-4624像素。
- 平均标注数: 每张图像约92个标注。
- 最常见类别:
unknown_product(ID 355),共422个标注。 - 产品参考图像总数: 1,582张,涵盖327个产品。
使用说明
- 可通过提供的Python脚本
scripts/coco_to_yolo.py在本地生成适用于YOLO训练的文件结构。 - 数据集与https://github.com/kuben-labs/nmai中的检测项目兼容。




