MG-ResViT: Dynamic Residual Learning with Contrastive Feature Optimization and PCA-Optimized Cross-Block Feature Fusion for Fine-Grained Mangrove Species Classification
PDF
PDF

How to Cite

Treceñe, Jasten Keneth D., and Arnel C. Fajardo. 2025. “MG-ResViT: Dynamic Residual Learning With Contrastive Feature Optimization and PCA-Optimized Cross-Block Feature Fusion for Fine-Grained Mangrove Species Classification”. Journal of Innovative Image Processing 7 (2): 420-46. https://doi.org/10.36548/jiip.2025.2.008.

Keywords

  • Deep Learning
  • Dynamic Residual Networks
  • Ecological Conservation
  • Fine-Grained Visual Recognition
  • Mangrove Species Classification

Abstract

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.

References

Aljundi, Rahaf, Yash Patel, Milan Sulc, Nikolay Chumerin, and Daniel Olmeda Reino. "Contrastive classification and representation learning with probabilistic interpretation." In Proceedings of the AAAI Conference on Artificial Intelligence, vol. 37, no. 6, 2023, 6675-6683.

Alzubaidi, Laith, Jinglan Zhang, Amjad J. Humaidi, Ayad Al-Dujaili, Ye Duan, Omran Al-Shamma, José Santamaría, Mohammed A. Fadhel, Muthana Al-Amidie, and Laith Farhan. "Review of deep learning: concepts, CNN architectures, challenges, applications, future directions." Journal of big Data 8 (2021): 1-74.

Bauravindah, Achmad, and Dhomas Hatta Fudholi. "Lightweight models for real-time steganalysis: A Comparison of MobileNet, ShuffleNet, and EfficientNet." Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi) 8, no. 6 (2024): 737-747.

Binu Jose, A., and Pranesh Das. "A multi-objective approach for inter-cluster and intra-cluster distance analysis for numeric data." In Soft Computing: Theories and Applications: Proceedings of SoCTA 2021, Singapore: Springer Nature Singapore, 2022, 319-332.

Devarajan, Kasthuri, Suresh Ponnan, and Sundresan Perumal. "Hybrid CNN-transformer architecture for enhanced EEG-based emotion recognition: capturing local and global dependencies with self-attention mechanisms." Discover Computing 28, no. 1 (2025): 1-25.

Jian, Zhuokai, Bin Ai, Jiali Zeng, and Yuchao Sun. "A hybrid mangrove identification method by combining the time-frequency threshold of the Mangrove Index with a random forest binary classifier." IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing (2024).

Khosla, Prannay, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. "Supervised contrastive learning." Advances in neural information processing systems 33 (2020): 18661-18673.

Li, Cong, Gong Cheng, Guangxing Wang, Peicheng Zhou, and Junwei Han. "Instance-aware distillation for efficient object detection in remote sensing images." IEEE Transactions on Geoscience and Remote Sensing 61 (2023): 1-11.

Li, Yuyang, Bolin Fu, Xidong Sun, Donglin Fan, Yeqiao Wang, Hongchang He, Ertao Gao, Wen He, and Yuefeng Yao. "Comparison of different transfer learning methods for classification of mangrove communities using MCCUNet and UAV multispectral images." Remote Sensing 14, no. 21 (2022): 5533.

Liu, Tonglai, Xuanzhou Chen, Wanzhen Zhang, Xuekai Gao, Liqiong Lu, and Shuangyin Liu. "Early Plant Classification Model Based on Dual Attention Mechanism and Multi-Scale Module." AgriEngineering 7, no. 3 (2025): 66.

Lu, Yan-Feng, Qian Yu, Jing-Wen Gao, Yi Li, Jun-Cheng Zou, and Hong Qiao. "Cross stage partial connections based weighted bi-directional feature pyramid and enhanced spatial transformation network for robust object detection." Neurocomputing 513 (2022): 70-82.

Mittermeier, Russell A., Will R. Turner, Frank W. Larsen, Thomas M. Brooks, and Claude Gascon. "Global biodiversity conservation: the critical role of hotspots." Biodiversity hotspots: distribution and protection of conservation priority areas (2011): 3-22.

Nelson, James A., Justin Lesser, W. Ryan James, David P. Behringer, Victoria Furka, and Jennifer C. Doerr. "Food web response to foundation species change in a coastal ecosystem." Food Webs 21 (2019): e00125.

Primavera, Jurgenne H., Daniel A. Friess, Hanneke Van Lavieren, and Shing Yip Lee. "The mangrove ecosystem." World seas: an environmental evaluation (2019): 1-34.

Schlemper, Jo, Ozan Oktay, Michiel Schaap, Mattias Heinrich, Bernhard Kainz, Ben Glocker, and Daniel Rueckert. "Attention gated networks: Learning to leverage salient regions in medical images." Medical image analysis 53 (2019): 197-207.

Tan, Linlin, and Haishan Wu. "Artificial Intelligence Mangrove Monitoring System Based on Deep Learning and Sentinel-2 Satellite Data in the UAE (2017-2024)." arXiv preprint arXiv:2411.11918 (2024).

Venkataramanan, Aishwarya, Martin Laviale, Cécile Figus, Philippe Usseglio-Polatera, and Cédric Pradalier. "Tackling inter-class similarity and intra-class variance for microscopic image-based classification." In International conference on computer vision systems, Cham: Springer International Publishing, 2021, 93-103.

Wang, Dezhi, Bo Wan, Penghua Qiu, Yanjun Su, Qinghua Guo, and Xincai Wu. "Artificial mangrove species mapping using pléiades-1: An evaluation of pixel-based and object-based classifications with selected machine learning algorithms." Remote Sensing 10, no. 2 (2018): 294.

Wang, Zihu, Yu Wang, Zhuotong Chen, Hanbin Hu, and Peng Li. "Contrastive learning with consistent representations." arXiv preprint arXiv:2302.01541 (2023).

Wen, Lei, Zikai Xiao, Xiaoting Xu, and Bin Liu. "Disaster Recognition and Classification Based on Improved ResNet-50 Neural Network." Applied Sciences 15, no. 9 (2025): 5143.

Xu, Guoping, Xiaxia Wang, Xinglong Wu, Xuesong Leng, and Yongchao Xu. "Development of skip connection in deep neural networks for computer vision and medical image analysis: A survey." arXiv preprint arXiv:2405.01725 (2024).

Yang, Xiaoran, Shuhan Yu, and Wenxi Xu. "Enhanced Convolutional Neural Networks for Improved Image Classification." arXiv preprint arXiv:2502.00663 (2025).

Zhang, Hanwen, Shan Wei, Xindan Liang, Yiping Chen, and Hongsheng Zhang. "Scale effects in mangrove mapping from ultra-high-resolution remote sensing imagery." International Journal of Applied Earth Observation and Geoinformation 136 (2025): 104310.

Rotem, Oded, Tamar Schwartz, Ron Maor, Yishay Tauber, Maya Tsarfati Shapiro, Marcos Meseguer, Daniella Gilboa, Daniel S. Seidman, and Assaf Zaritsky. "Visual interpretability of image-based classification models by generative latent space disentanglement applied to in vitro fertilization." Nature communications 15, no. 1 (2024): 7390.

Gerona-Daga, Maria Elisa B., and Severino G. Salmo III. "A systematic review of mangrove restoration studies in Southeast Asia: Challenges and opportunities for the United Nation’s Decade on Ecosystem Restoration." Frontiers in Marine Science 9 (2022): 987737.

Camacho, Leni D., Dixon T. Gevaña, Lorena L. Sabino, Clarissa D. Ruzol, Josephine E. Garcia, April Charmaine D. Camacho, Thaung Naing Oo et al. "Sustainable mangrove rehabilitation: Lessons and insights from community-based management in the Philippines and Myanmar." APN Science Bulletin (2020).

Kandel, Ibrahem, and Mauro Castelli. "The effect of batch size on the generalizability of the convolutional neural networks on a histopathology dataset." ICT express 6, no. 4 (2020): 312-315.

Hou, Pengyue, and Xingyu Li. "Improving Contrastive Learning of Sentence Embeddings with Focal InfoNCE." In Findings of the Association for Computational Linguistics: EMNLP 2023, 2023, 4757-4762.

Milanés-Hermosilla, Daily, Rafael Trujillo-Codorniú, Saddid Lamar-Carbonell, Roberto Sagaró-Zamora, Jorge Jadid Tamayo-Pacheco, John Jairo Villarejo-Mayor, and Denis Delisle-Rodriguez. "Robust motor imagery tasks classification approach using bayesian neural network." Sensors 23, no. 2 (2023): 703.