Impact of Activation Function on the Performance of Convolutional Neural Network in Identifying Oil Palm Fruit Ripeness
Activation functions play a crucial role in Convolutional Neural Networks (CNN), particularly in enabling the model to recognize and represent complex patterns in digital images. In image classification tasks, the choice of activation function can significantly impact the accuracy and overall performance of the model. The Rectified Linear Unit (ReLU) is the most commonly used activation function due to its simplicity; however, it has a limitation in discarding information from negative input values. To address this issue, alternative functions such as Leaky ReLU and Gaussian Error Linear Unit (GELU) have been developed, designed to retain information from negative inputs. This study presents a comparative analysis of three activation functions ReLU, Leaky ReLU, and GELU on a CNN model for classifying oil palm fruit ripeness levels. The results show that although all three activation functions achieved high training accuracy ReLU at 100%, Leaky ReLU at 99.93%, and GELU at 99.49%—the performance on testing data varied significantly. Leaky ReLU outperformed the others, achieving the highest test accuracy of 95.35%, an F1-score of 95.39%, and a Matthews Correlation Coefficient (MCC) of 93.28%. It also exhibited the smallest gap between training and testing accuracy (4.58%), indicating better generalization capability and a lower risk of overfitting compared to ReLU and GELU. Moreover, the model using Leaky ReLU was able to classify all three classes more evenly, particularly excelling in identifying the 'ripe' class, which tends to be more challenging. These findings highlight that Leaky ReLU is a more optimal activation function for oil palm fruit image classification, as it maintains high accuracy while effectively reducing overfitting. This study contributes to the selection of appropriate activation functions for CNN-based classification systems and opens opportunities for exploring more adaptive activation functions in future research.
Authors
- Adi Wibowo (ORCID: https://orcid.org/0000-0002-7966-1017)
- Naufal Budiman
- Kusworo Adi (ORCID: https://orcid.org/0000-0002-7702-6554)
Institutions
- Diponegoro University (ID)
Publication Details
- Journal
- INTERNATIONAL JOURNAL OF MATHEMATICS AND COMPUTER RESEARCH
- Published
- 2025-04-24
- DOI
- https://doi.org/10.47191/ijmcr/v13i4.13
- Primary Topic
- Spectroscopy and Chemometric Analyses
- Type
- article
- Field-Weighted Citation Impact
- 0.00