A Multiclass Dataset for Real-Time Detection of Fresh and Defective Vegetables Using Deep Learning
- Tarek Rahman
- Rahadul Islam Jishan
- Robiul Islam
- Md Rakibul Islam
- Jannatul Tajrian
- Md Sakhawat Hossain
- Suman Ahmmed
- Ohidujjaman
2026-08-29
In real-world market environments, publicly available vegetable datasets rarely include both fresh and defective samples, as most existing collections are captured under controlled laboratory settings. This lack of naturally collected data limits model generalizability in practical scenarios. To address this gap, this study introduces a multiclass image dataset designed for real-time detection of fresh and defective vegetables under realistic conditions. Unlike prior laboratory-curated datasets, our proposed dataset consists of 2,032 raw images and 4,736 annotated instances gathered from local markets, capturing natural variations in lighting, color, texture, freshness, and physical defects. The dataset covers 14 classes representing fresh and defective categories of seven commonly consumed vegetables: tomato, potato, bitter gourd, pointed gourd, onion, brinjal, and capsicum. This enables effective training and evaluation of deep learning-based detection models. When benchmarked using YOLOv9 and YOLOv11 models, it achieved mAP@50 scores of 93.2% and 94.3%, indicating strong detection accuracy. These results position our dataset as a valuable benchmark for freshness grading, defect identification, and market-oriented visual analysis, advancing precision agriculture and sustainable food management.