TEBP2-YOLOv8: A defect-sensitive convolutional neural network architecture featuring texture enrichment and P2 micro-scale detection for fine-grained eggplant quality assessment in precision agriculture

Citation

Abstract

Bangladesh’s economy is mostly dependent on agriculture. Ensuring quality control of fruits plays a crucial role in the agricultural industries of countries like Bangladesh. Eggplant is one of the most popular vegetables in Bangladesh. Detecting and classifying eggplant fruit surface defects are important for maintaining the quality of the eggplant. However, the eggplant quality assessment still relies on traditional methods, which are less accurate, time-consuming, and leads to human error. To overcome these challenges, we propose a deep learning based approach using Convolutional Neural Networks (CNNs) for the classification of eggplant fruit quality based on the condition of defects. A total of 7,686 images of different varieties of eggplants with defects from local markets and agricultural fields of Dhaka, Bogura and Satkhira districts of Bangladesh have been collected to make the dataset. This dataset has been used to train our CNN models to classify the eggplants into three categories - rotten, insect damage, and physical damage. We have initially used YOLOv8x, YOLOv8s, Faster R-CNN for training the dataset. Later, we have proposed a custom YOLOv8x model named TEBP2-YOLOv8x having an additional P2 head for improved smaller defect detection and Texture Enhanced Blocks (TEB) for texture enhancement of subtle defects. We have also used Weighted Boxes Fusion (WBF) for combining our proposed TEBP2-YOLOv8x and YOLOv8s for improved precision. Various data augmentation techniques are also used for better accuracy. After evaluating the trained models on test set images, the results demonstrate that our proposed TEBP2-YOLOv8x model has the best performance (mAP@0.5=0.924) among the other models. An ablation study on TEBP2-YOLOv8x model shows that it enhances the detection accuracy of insect class with tiny and subtle defects (mAP@0.5 increases from 0.836 to 0.904). We believe that this study can contribute to automate the eggplant defect classification with enhanced accuracy and it will reduce the economic losses in the agricultural sector by ensuring consistent eggplant fruit quality.

Description

This thesis is submitted in partial fulfillment of the requirements for the degree of Bachelor of Science in Computer Science, 2026.
Cataloged from PDF version of thesis.
Includes bibliographical references (page 77-79).

Publisher Link

Type

Thesis

Creative Commons license

Attribution-NonCommercial-NoDerivatives 4.0 International

Except where otherwise noted, this item's license is described as

Attribution-NonCommercial-NoDerivatives 4.0 International