Passiflora edulis Sims (purple passion fruit) is a fruit that offers numerous health benefits and possesses high economic value. However, the manual assessment of ripeness by traders tends to be subjective and inconsistent, leading to post-harvest losses of up to 50%. This study developed a classification model for determining the ripeness level of purple passion fruit using a Convolutional Neural Network (CNN) and implemented it in a web-based application. The CNN model was designed to classify four ripeness stages (unripe, half-ripe, ripe, and rotten) with the addition of a non-passion-fruit class to enhance the system’s robustness. The dataset consisted of 2,000 images divided into five classes: four ripeness levels of purple passion fruit (unripe, half-ripe, ripe, and rotten) and one non-passion-fruit class as a comparator. All images were in JPG and PNG formats. The CNN architecture comprised four convolutional layers with 16, 32, 64, and 128 filters, respectively. Evaluation of various data-splitting ratios (80:20, 70:30, 60:40) and learning rates (0.001, 0.0001, 0.01) showed that the optimal configuration was achieved at a ratio of 80:20 with a learning rate of 0.001, resulting in a training accuracy of 96.72% and a testing accuracy of 95.76%, with a loss value of 0.1811. Validation using 5-Fold Cross Validation produced an average accuracy of 95.40%. The model was integrated into a web application developed using Flask and JavaScript, deployed on the PythonAnywhere cloud platform, enabling users to upload images and automatically obtain ripeness predictions to assist traders in sorting fruits more quickly and accurately.
Copyrights © 2026