Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
The dataset viewer is not available for this split.
Server error while post-processing the rows. This occured on row 3. Please report the issue.
Error code:   RowsPostProcessingError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

KolektorSDD2-corrected

DOI

⚠️ NON-COMMERCIAL — SHARE-ALIKE — 仅限非商业 · 相同方式共享

The upstream KolektorSDD2 is licensed CC BY-NC-SA 4.0. This release inherits that licence: no commercial use, credit the authors, share derivatives under the same licence. For commercial use contact the original author (Danijel Skočaj, Vicos).

Surface-defect detection/segmentation — cleaned, split and standardized version of KolektorSDD2. 表面缺陷检测/分割 —— KolektorSDD2 的清理、划分与规整版。

English · 中文


English

What is this?

A cleaned, split and standardized version of KolektorSDD2 (Kolektor Surface-Defect Dataset 2) — surface defects (scratches, minor spots, surface imperfections) on Kolektor commutators, captured as ~230×630 px images. Upstream: Vicos, University of Ljubljana — https://www.vicos.si/resources/kolektorsdd2/.

Reference: Božic, J., Tabernik, D. & Skočaj, D. "Mixed supervision for surface-defect detection: from weakly to fully supervised learning." Computers in Industry, 2021.

This release ships the dataset in three aligned views:

  • image classification — defect / normal (in labels.csv),
  • pixel segmentation — the ground-truth masks (masks/<split>/),
  • object detection — a single-class defect bounding box derived from each mask (Pascal VOC Annotations/ + YOLO labels/<split>/).

⚠️ Note: the boxes are derived from the masks (axis-aligned extent of the defect region), provided for convenience / detection pipelines. The masks remain the authoritative annotation. No pixel, mask or box coordinate was manually re-annotated.

Corrections vs. the official release

# Correction Detail
1 Removed 1 duplicate sample 10301 (copy).png + 10301_GT (copy).png were byte-identical copies of 10301.png / 10301_GT.png; removed.
2 Benchmark-preserving split Kept the official train/test split and carved a validation set (15% of train, stratified by defect/normal) from train: train 1,981 / val 350 / test 1,004. The official test set is untouched.
3 Three aligned views Added a classification table (labels.csv), kept the pixel masks (masks/), and added derived single-class detection boxes (VOC + YOLO).
4 Dropped unreproducible splits The upstream split_weakly_*.pyb pickle files are not reproducible and were excluded.
5 Packaging classes.txt (defect), data.yaml, per-split CSVs; normalised filenames.

Image pixels and masks are never modified.

Structural checks performed on the released set:

Check Method Result
Image ↔ mask pairing bidirectional 0 mismatches / orphans
Mask size vs. image pixel dimensions 0 mismatches
Degenerate boxes derived from masks mask extent 0
Out-of-range boxes coordinate scan 0
Cross-split duplicate images byte-identical md5 0
Exact / near duplicates md5 + (dHash ≤ 2 & MSE ≤ 1) 0 after removing the (copy) pair

Dataset at a glance

Property Value
Images 3,335 (~230×630 px, RGB .png)
Labels defect 356 · normal 2,979
Masks pixel-precise binary ground truth (per image)
Derived boxes 356 single-class defect boxes
Split train 1,981 (defect 209 / normal 1,772) · val 350 (37 / 313) · test 1,004 (110 / 894)

Class imbalance: only ~10.7% of images contain a defect (356 / 3,335); defect pixels are ~0.3% of all pixels on average. Use stratified sampling / class weighting.

Structure

KolektorSDD2-corrected/
├── images/{train,val,test}/      # RGB .png (original)
├── masks/{train,val,test}/       # binary ground-truth masks (same filenames)
├── labels/{train,val,test}/      # YOLO (1 class = defect; empty file for normal)
├── Annotations/                  # Pascal VOC XML (0 objects for normal images)
├── JPEGImages/                   # copy of the images (VOC layout)
├── csv/{train,val,test}_labels.csv   # defect boxes only
├── labels.csv                    # ALL images: filename,split,label,defect,mask,bbox,W,H
├── classes.txt                   # "defect"
├── data.yaml                     # Ultralytics detection config (nc=1)
├── LICENSE                       # CC BY-NC-SA 4.0 + notice of changes
└── README.md

Quick start

# detection (derived boxes)
yolo detect train data=data.yaml model=yolov8n.pt epochs=100 imgsz=640
# classification / segmentation from the tables
import csv, pandas as pd
df = pd.read_csv("labels.csv")          # filename, split, label, defect, mask, bbox_xyxy, ...

Citation

1. The original dataset / paper — please always cite.

@article{bozic2021mixed,
  title   = {Mixed supervision for surface-defect detection: from weakly to fully
             supervised learning},
  author  = {Bo{\v{z}}i{\v{c}}, Jakob and Tabernik, Domen and Sko{\v{c}}aj, Danijel},
  journal = {Computers in Industry},
  year    = {2021}
}

2. This corrected release — please cite it as well.

@misc{kolektorsdd2_corrected,
  author    = {KeenForgeAI},
  title     = {KolektorSDD2-corrected: a cleaned, split and standardized release of KolektorSDD2},
  year      = {2026},
  version   = {1.0},
  publisher = {KeenForgeAI},
  url       = {https://huggingface.co/datasets/KeenForgeAI/KolektorSDD2-corrected},
  note      = {Curated by Lu Gan and Sam Li. Derived from KolektorSDD2 (Bo\v{z}i\v{c}
               et al., Computers in Industry 2021). CC BY-NC-SA 4.0.}
}

3. The annotation tool (optional).

@software{keenforge,
  author    = {KeenForgeAI},
  title     = {KeenForge: a local-first, offline image annotation and model-training desktop tool},
  year      = {2026},
  publisher = {KeenForgeAI},
  url       = {https://github.com/KeenForgeAI/KeenForge},
  note      = {MIT licensed. Developed by Lu Gan and Sam Li.}
}

License & attribution

CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International). The upstream KolektorSDD2 is licensed under CC BY-NC-SA 4.0; this corrected release is distributed under the same licence. Non-commercial use only; credit the authors, indicate changes, and license derivatives under CC BY-NC-SA 4.0. See LICENSE.

Provenance

  • Source: KolektorSDD2, Vicos / University of Ljubljana — https://www.vicos.si/resources/kolektorsdd2/
  • Upstream: 3,337 images (train 246 pos / 2,085 neg, test 110 pos / 894 neg) + masks; no val; split_weakly_*.pyb.
  • Verified: 3,335 images (356 defect); 1 duplicate pair removed; train 1,981 / val 350 / test 1,004; 0 invalid boxes, 0 mask mismatch, 0 cross-split leakage.

中文

这是什么?

KolektorSDD2(Kolektor 表面缺陷数据集 2)的清理、划分与标准化版——Kolektor 换向器上的 划痕、细小斑点、表面瑕疵等缺陷,图像约 230×630 px。上游:卢布尔雅那大学 Vicos 实验室 —— https://www.vicos.si/resources/kolektorsdd2/。

论文:Božic, J., Tabernik, D. & Skočaj, D.《Mixed supervision for surface-defect detection: from weakly to fully supervised learning》,Computers in Industry,2021。

本版以三种对齐视图提供:

  • 图像分类 —— defect / normal(见 labels.csv);
  • 像素分割 —— 真值掩码(masks/<split>/);
  • 目标检测 —— 由每个掩码派生的单类 defect 边界框(Pascal VOC Annotations/ + YOLO labels/<split>/)。

⚠️ 说明: 边界框是由掩码派生(缺陷区域的轴对齐外接框),仅为方便检测流程; 掩码仍是权威标注。未对任何像素、掩码或框坐标进行人工重标。

相对官方版的修正

# 修正 说明
1 删除 1 个重复样本 10301 (copy).png + 10301_GT (copy).png 与 10301.png / 10301_GT.png 逐字节相同,已删除。
2 保基准的划分 保留官方 train/test 划分,并从 train 中按缺陷/正常分层切出 15% 验证集:train 1,981 / val 350 / test 1,004。官方 test 完全不动。
3 三种对齐视图 新增分类表(labels.csv)、保留像素掩码(masks/)、新增派生的单类检测框(VOC + YOLO)。
4 剔除不可复现划分 上游 split_weakly_*.pyb pickle 不可复现,已排除。
5 规范化打包 classes.txt(defect)、data.yaml、按划分 CSV;文件名规范化。

图像像素与掩码从不修改。

已执行的结构化检查:图↔掩码配对 0 错配 / 掩码尺寸 0 不符 / 派生框 0 退化 / 越界框 0 / 跨划分重复 0 / 去重后完全与近重复 0。

数据集概览

属性 值
图片 3,335(约 230×630 px,RGB .png)
标签 defect 356 · normal 2,979
掩码 逐像素二值真值(每图一张)
派生框 356 个单类 defect 框
划分 train 1,981(缺陷 209 / 正常 1,772)· val 350(37 / 313)· test 1,004(110 / 894)

类别不平衡: 仅约 10.7% 的图为缺陷(356 / 3,335);缺陷像素平均仅占全部像素约 0.3%。 建议使用分层采样 / 类别加权。

目录结构

KolektorSDD2-corrected/
├── images/{train,val,test}/      # RGB .png(原始)
├── masks/{train,val,test}/       # 二值真值掩码(同名)
├── labels/{train,val,test}/      # YOLO(1 类 = defect;正常图为空文件)
├── Annotations/                  # Pascal VOC XML(正常图 0 个 object)
├── JPEGImages/                   # 图片副本(VOC 布局)
├── csv/{train,val,test}_labels.csv   # 仅缺陷框
├── labels.csv                    # 全部图片:filename,split,label,defect,mask,bbox,W,H
├── classes.txt                   # "defect"
├── data.yaml                     # Ultralytics 检测配置(nc=1)
├── LICENSE                       # CC BY-NC-SA 4.0 + 修改说明
└── README.md

快速开始

# 检测(派生框)
yolo detect train data=data.yaml model=yolov8n.pt epochs=100 imgsz=640
# 分类 / 分割:读取标签表
import pandas as pd
df = pd.read_csv("labels.csv")      # filename, split, label, defect, mask, bbox_xyxy, ...

引用

请同时引用原始论文与本修正版:1. 原始论文见上方英文 bozic2021mixed; 2. 本修正版见上方英文 kolektorsdd2_corrected;3. 标注工具(可选)见 keenforge。

许可证与署名

CC BY-NC-SA 4.0(署名—非商业—相同方式共享 4.0 国际)。 上游 KolektorSDD2 采用 CC BY-NC-SA 4.0,本修正版以同一许可发布。仅限非商业用途;须署名原作者、注明修改, 并以 CC BY-NC-SA 4.0 发布衍生作品。详见 LICENSE。

来源

  • 来源:KolektorSDD2,Vicos / 卢布尔雅那大学 —— https://www.vicos.si/resources/kolektorsdd2/
  • 上游:3,337 图(train 246 正 / 2085 负,test 110 正 / 894 负)+ 掩码;无 val;split_weakly_*.pyb
  • 已校验:3,335 图(缺陷 356);删除 1 个重复样本;train 1,981 / val 350 / test 1,004;0 非法框、0 掩码不符、0 跨划分泄漏
Downloads last month
179