Coral reef image classification using deep CNNs, transformer features, and YOLOv8
摘要
Monitoring the health of coral reefs is essential for marine conservation, yet manual assessment is time consuming and error prone. This work investigates automated coral reef classification, with a particular focus on distinguishing between healthy and bleached corals. A deep learning framework is proposed that integrates modern transformer architectures with convolutional neural networks (CNNs) to improve classification accuracy and robustness. A publicly available Kaggle dataset was used, and images were preprocessed through resizing, normalization, and augmentation to enhance generalization. In particular, the Solid and Dyed Corals dataset from Kaggle was used, consisting of over 900 balanced images of healthy and bleached coral. This approach differs from previous hybrid CNN-Transformer studies by introducing a domain-adapted fusion method specialized to underwater images with the consideration of illumination distortion and fine-grained texture variability typical of coral reef ecosystems (https://www.kaggle.com/datasets/vencerlanz09/healthy-and-bleached-corals-image-classification). High-level features were extracted using vision transformers [ViT (Nie et al. in Pattern Recognit 153:110470, 2024), Swin Transformer, DeiT, EfficientFormer] and evaluated across multiple CNN backbones (Zhao et al. in Artif Intell Rev 57(4):99, 2024; Maxwell et al. in Remote Sensing, 13(13):2450, 2021), including ResNet, DenseNet, VGG, MobileNetV3, EfficientNet, ConvNeXt, and RegNet. Furthermore, a YOLOv8-based model was developed for real-time classification, as a demonstration of possible deployment. Real-time inference had an average latency of 21 ms per image with the model deployed on an NVIDIA RTX 3060 GPU, translating to a throughput of ~ 47 FPS and thus, reaffirming its functionality for physics-based onboard or edge-based monitoring systems. The performance of the models was assessed with accuracy, precision, recall, F1-score, and confusion matrices. Results reveal that feature extraction with a transformer in conjunction with optimized CNN classifiers greatly surpass performance over standalone CNN models. Along with technical performance improvement, the framework has potential as a tangible tool for large scale ecological monitoring and coral reef conservation. All data utilized in this work is open-source, perpetuating reproducibility, and ethical research practices. Benchmarking accuracy rates of 97.74% advances the approach into the new state-of-the art baseline for assessing reef health, evidencing improved domain adaptability and significant gains in performance against existing coral reef monitoring frameworks, benchmarking coral reef monitoring, as well to deep learning systems. The study acknowledged challenges with underwater light variability, minor class imbalance, and potential overfitting from limited training samples, however, existing research on coral reef classification primarily utilize either single CNNs or basic hybrid approaches that individually do not account for summarizing fine-grained local textures and global spatial dependencies simultaneously.