A Modified CBAM with Identity Initialization and Multi-Scale Residual Gating for Lightweight Oil-Palm Fresh-Fruit-Bunch Ripeness Classification
Abstract
Accurate, automated grading of oil-palm Fresh-Fruit-Bunch (FFB) ripeness is a prerequisite for efficient harvesting, yet manual grading is slow and subjective. This paper proposes a modified attention module for five-class FFB classification (Abnormal, Flower, Ripe, Underripe, Unripe), evaluated against unmodified backbones under one shared training engine so that gains are attributable to the modification alone. We first show that a standard Convolutional Block Attention Module (CBAM), naïvely appended to a pretrained backbone, lowers accuracy (near 86% versus 91% unmodified): at initialization it scales the feature map by 0.29 and corrupts the transferred features. We therefore propose a modified CBAM identity-initialized, multi-scale, and wrapped in a zero-init residual gate that starts as a no-op and learns attention only where it reduces the loss. On a MobileNetV3-Small backbone and a leakage-free dataset of 16,070 images, it reaches 94.59% accuracy (macro-F1 0.946, Cohen’s κ = 0.932), surpassing the best unmodified backbone (MobileNetV3-Large, 93.63%), the unmodified MobileNetV3-Small (94.00%), and a three-model ensemble (94.22%), at only ~1.07 M parameters.