IEEE Access (Jan 2024)
HAFREE: A Heatmap-Based Anchor-Free Detector for Apple Defect Detection
Abstract
Accurate inspection of subtle defects on apple surfaces is necessary in agricultural engineering. However, existing methods often rely on expensive equipment and encounter difficulty in detecting small defect areas effectively. To address this challenge, we introduce the Subtle Surface Defects in Apples (SSDA) dataset, a custom dataset specifically collected and annotated for two defect types: scratches and pest damage. For benchmarking, we propose a heatmap-based anchor-free (HAFREE) detector, a novel end-to-end object detection architecture designed to localize subtle defects on apple surfaces. Unlike prior methods that rely on anchor boxes, HAFREE employs a heatmap-based approach to represent defects as keypoints using two-dimensional Gaussian heatmaps. We introduce a multiscale feature fusion block, targeting small objects by incorporating local and global contextual information. To mitigate overfitting, we also implement a patch training strategy incorporating full images and cropped patches during training as a regularizer. The proposed method achieves a mAP50 of 50.05% on the SSDA dataset, outperforming one- and two-stage anchor-based detectors and previous anchor-free approaches. Code is available at: https://github.com/nbngochan/HAFREE.
Keywords