Multihead Attention Based CNN BiLSTM for Aquatic Plant Classification

Aquatic plants constitute an ecologically vital component of freshwater ecosystems, serving as bioindicators of water quality, primary producers supporting aquatic food webs, and structural habitats for diverse biological communities. Despite their ecological significance, automated identification of aquatic plant species remains a challenging computer vision problem because of complex imaging conditions encountered in natural freshwater environments. In this paper, we propose a novel hybrid deep learning architecture that integrates a frozen ResNet50 convolutional backbone with a custom Multi-Head Attention (MHA) module and a Bidirectional Long Short-Term Memory (Bi-LSTM) network for fine-grained classification of 14 aquatic plant species. The ResNet50 pretrained on ImageNet extracts rich 7 × 7 × 2048 spatial feature representations, which are subsequently enriched through an 8-head attention layer that enables selective emphasis on discriminative spatial regions across multiple representation subspaces. The attention-enhanced representations are processed by a bidirectional LSTM with 128 hidden units per direction to capture higher-order sequential spatial dependencies before a softmax output layer assigns class probabilities. Evaluated on the AquPlantDS benchmark of 1,468 images spanning 14 categories, the proposed model attains 98.30% accuracy, with precision of 98.37% and recall of 98.30%. Visual interpretability via Gradient-weighted Class Activation Mapping (Grad-CAM) confirms that the model activates biologically meaningful leaf regions, supporting its practical applicability in ecological monitoring, biodiversity assessment, and environmental management.