MG-ResViT: Dynamic Residual Learning with Contrastive Feature Optimization and PCA-Optimized Cross-Block Feature Fusion for Fine-Grained Mangrove Species Classification
Mangrove conservation and monitoring are critically important for biodiversity. However, accurate classification remains challenging due to the morphological similarities among species. This paper proposes MG-ResViT, a novel deep learning framework that enhances mangrove species feature extraction for classification using a dynamic residual connection with spatially adaptive attention gates that capture discriminative local features, a hybrid loss that combines supervised contrastive learning and cross-entropy for optimizing feature space geometry, and PCA-optimized cross-block feature fusion for efficient multi-scale feature integration. The proposed model was evaluated using a ground-truth dataset of 3 mangrove species, composed of 1,000 images per species, which underwent preprocessing and data augmentation. Results revealed that the proposed MG-ResViT achieved an overall accuracy of 92.8% with only 6.2M parameters compared to other state-of-the-art models. Based on the results from the ablation studies conducted, the full MG-ResViT model provided excellent feature learning capability compared to the other model variants, with a high reduction in inter-class similarity (0.210) and improved in intra-class similarity (0.893). The silhouette scores also indicated that the full model has a well-defined and compact cluster (0.68) compared to other model variants such as the baseline EfficientNet-B0 + CE with 0.44, + SupCon only with 0.58, and + Dynamic Residuals only with 0.65. Moreover, the comparative analysis showed MG-ResViT (92.8%) outperformed ViT-Small (91.2%), ResNet-50 (89.3%), DenseNet-121 (90.0%), and EfficientNet-B0 (88.0%) in both accuracy and computational efficiency. Thus, the proposed MG-ResViT model has the potential for a more accurate fine-grained mangrove species classification, which is important for conservation and monitoring.
@article{treceñe2025,
author = {Jasten Keneth D. Treceñe and Arnel C. Fajardo},
title = {{MG-ResViT: Dynamic Residual Learning with Contrastive Feature Optimization and PCA-Optimized Cross-Block Feature Fusion for Fine-Grained Mangrove Species Classification}},
journal = {Journal of Innovative Image Processing},
volume = {7},
number = {2},
pages = {420-446},
year = {2025},
publisher = {IRO Journals},
doi = {10.36548/jiip.2025.2.008},
url = {https://doi.org/10.36548/jiip.2025.2.008}
}
Copy Citation