Accurate identification of herbal plant species is crucial for human health, but remains challenging, even for experts. This study addressed this need by developing a Convolutional Neural Network (CNN) model integrated with an attention mechanism for reliable herbal leaf classification. The research implemented the MobileNetV2 architecture, which was enhanced by incorporating the Squeeze-and-Excitation (SE) attention module. The dataset consisted of 1,500 images across 10 classes of herbal leaves, split into 80% for training, 10% for validation, and 10% for testing. Both the native CNN and the enhanced CNN (CNN-AM) models were trained using TensorFlow and evaluated using standard metrics like accuracy, precision, recall, and F1-score. The comparison results decisively demonstrated the effectiveness of the attention mechanism. Integrating Squeeze-and-Excitation significantly improved performance. The average accuracy of the model increased from 68% to 72%, while the average loss decreased from 1.03 to 1.02. The best-performing CNN-AM model achieved a strong 86% accuracy with a 0.53 loss. These findings confirm that the Squeeze-and-Excitation attention mechanism effectively enhances herbal leaf classification performance, offering a promising foundation for developing reliable and efficient identification systems.
Copyrights © 2025