BDFD9: An annotated image dataset of nine fabric defect types collected in Bangladeshi textile and garment factories

Published: 29 October 2026| Version 3 | DOI: 10.17632/z49cc7zvfc.3
Contributors:
,
,
,
,
,

Description

BDFD9 is an image dataset of 1,088 knit and woven fabric photographs, captured on production lines at 4 garment factories in Bangladesh using a Google Pixel 6 and an Apple iPhone 14 Pro Max under ambient factory lighting. All images are original captures by the authors. They are not raw camera files: transferring them from the handsets before annotation re-encoded and in most cases downscaled them, so median resolution is about 1.6 MP. Per-image dimensions and format are listed in the metadata. Images are annotated in YOLOv8 format for 9 defect classes: DropStitch, Hole, Horizontal LineMark, Knot, Oil Spot, Setup, Slub, Vertical LineMark, and Yarn Dust. There are 1,388 annotated instances in total. Two parallel label sets are provided: labels/ holds one bounding box per instance, labels_seg/ holds one polygon per instance. Every file uses a single geometry type, so detection and segmentation loaders both work without conversion. Data is split into train (726), valid (220), and test (142) images in the standard flat YOLO layout. Each image is stored once; class membership is recorded in the metadata rather than by folder placement. The split is stratified by defect class and constrained so that near-duplicate and burst captures never cross a split boundary, so there is no train/validation/test leakage. dataset_metadata.csv lists each image's split, source factory, fabric construction, capture device and date, resolution, file format, defect classes, box and polygon counts, and near-duplicate group. Known limitations, documented in full in the included README: seven of the nine classes come from a single factory, and each factory was visited once with a single handset, so capture session is confounded with defect class. Inter-annotator agreement measured on a 100-image subset is high overall (Cohen's kappa 0.91), but the Hole class is not reliably separated from DropStitch.

Files

Institutions

Categories

Computer Vision, Deep Learning

Licence