Quaternion Convolutional Neural Networks for Multi-Class Classification of Cocoa Beans in Non-Standard Imaging Conditions

by Ismael Boumsoumouna Kaoke¹*, Ousman Boukar¹², Esther Ngah³,Robert Germain Beka⁴, David Libouga Li Gwet¹⁵, Laurent Bitjoka¹².

1 Laboratory of Energy, Signal, Imaging and Automation, University of Ngaoundéré, P.O. Box 455, Ngaoundéré, Cameroon
2 Department of Electrical, Energy, and Automation Engineering, National School of Agro-Industrial Sciences, University of Ngaoundéré, P.O. Box 455, Ngaoundéré, Cameroon
3 Laboratory of Biochemistry and Food Technology, University of Ngaoundéré, P.O. Box 454, Ngaoundéré, Cameroon
4 Department of Food Science and Nutrition, National School of Agro-Industrial Sciences, University of Ngaoundéré, P.O. Box 455, Ngaoundéré, Cameroon
5 School of Chemical Engineering and Mineral Industries (EGCIM), P.O. Box 454, University of Ngaoundéré, Cameroon

*Corresponding author:[email protected]

Received: 23.09.2025         Accepted: 13.10.2025         Published online: 05.11.2025

Visual inspection of cocoa beans is vital for quality control in the agri-food industry, yet traditional methods such as the cut test remain subjective and labor-intensive. Conventional Machine Learning (ML) and Deep Learning (DL) models show good performance in binary classification but often struggle with multi-class tasks and non-standard image conditions.This study introduces a Quaternion Convolutional Neural Network (QCNN) designed to capture inter-channel correlations in color images within both RGB and CIE XYZ spaces. The model was trained and validated on 1,788 cocoa bean images divided into six quality classes, collected under uncontrolled real-world conditions. Data were split into 80% for training and 20% for testing while maintaining class balance. Experimental results show that the QCNN outperforms MobileNetV2 and ResNet50, achieving accuracies of 91% in RGB and 93% in CIE XYZ spaces. Compact and efficient, the QCNN (2.7 MB) processes each image in 12 ms, demonstrating robustness and practicality for automated cocoa bean classification under variable imaging conditions.

Share Article