Introduction

Quadrat surveys are widely used to quantify the status of coastal benthic ecosystems. In a typical survey, the seabed inside a quadrat is photographed, and benthic cover is estimated by point counting, in which the substrate type beneath randomly placed points is counted on each image. However, this procedure requires an expert to classify the points image-by-image; thus, it is labor-intensive, and the results vary with the experience and subjectivity of the interpreter (Kohler & Gill, 2006; Williams et al., 2019). These limitations have motivated the use of deep-learning-based segmentation to automate the interpretation of quadrat imagery.

Several semi-automated software packages have been developed to reduce the burden of interpretation. Coral Point Count with Excel extensions implements random point counting in a spreadsheet environment (Kohler & Gill, 2006), and photoQuad supports point counting of quadrat images and compares the errors of four photoquadrat methods (Trygonis & Sini, 2012). More recently, CoralNet, an automated annotation platform, has substantially reduced the interpretation burden of large benthic image collections (Williams et al., 2019). However, these tools still rely on point sampling or semi-automated annotation and do not provide full pixel-wise segmentation of the entire image.

However, segmentation studies based on convolutional neural networks (CNNs) have moved beyond point counting and achieved pixel-wise automation for benthic and underwater imagery. Representative examples include coral segmentation from sparse annotations (Alonso et al., 2019), benthic community segmentation from orthographic imagery (Pavoni et al., 2020), neural network recognition of marine benthos and corals (Raphael et al., 2020), and seagrass habitat segmentation using drone imagery (Jeon et al., 2021). The need for automated annotation was also emphasized in an early study that directly addressed the large variability among human experts (Beijbom et al., 2015). However, few studies have addressed the interpretation of extremely rare classes together with hierarchical cover classifications at the quadrat scale.

From a methodological perspective, the U-Net with encoder transfer learning is the standard approach for segmenting small image datasets (Kattenborn et al., 2021; Wagner et al., 2019). Several loss functions have been proposed to address class imbalance. For example, previous studies have reported that the learning failure of minority classes substantially degrades CNN performance (Buda et al., 2018), and focal loss (Lin et al., 2020) and its variants improve the imbalanced segmentation of medical images (Yeung et al., 2022). However, few studies have compared the performance before and after modifying the loss function for small quadrat-scale datasets.

Therefore, this study had the following three objectives. First, six-class semantic segmentation of the benthic cover and detection of the region of interest (ROI; two and three classes) were performed using independent U-Nets. Second, class-weighted cross-entropy combined with focal loss was applied to mitigate the learning failure of the extremely rare benthic fauna classes. Third, the model performance was verified statistically by five-fold cross-validation, in which images containing benthic fauna were evenly distributed across the folds. The underlying hypothesis was that redesigning the loss function can recover the minority benthic fauna class without substantially degrading the overall accuracy (OA).

Materials and Methods

A quadrat survey was conducted using an underwater imaging frame in a rocky subtidal zone off Hujeong Beach, Uljin-gun, Gyeongsangbuk-do, on the east coast of South Korea (Fig. 1A). In conventional quadrat surveys, divers place a square quadrat at randomly selected locations; therefore, the results are not easily generalized to the entire seabed. To overcome this limitation, the imaging frame was lowered from the survey vessel to the seabed at stations with 50-m intervals. The frame has a square-pyramidal shape and is equipped with an underwater camera (HERO10 Black, GoPro Inc., San Mateo, CA, USA); its base forms a 1 m×1 m square quadrat (Fig. 1B, C). During the survey on May 26, 2022, underwater images with a resolution of 3,840×2,160 pixels were acquired at 69 stations, excluding shallow stations that the vessel could not approach.

The ground-truth labels were constructed using visual interpretation. Based on this interpretation, three hierarchical label sets were produced: L1 (two classes), L2 (three classes), and L3 (six classes) (Fig. 2). The six classes consisted of background, frame, seagrass, rock, sand, and benthic fauna. The pixel distribution of the six classes was highly imbalanced: sand (30.9%) and background (29.7%) accounted for approximately 60% of all pixels, followed by rock (22.3%) and seagrass (11.3%), whereas frames accounted for only 5.5% (Table 1). In particular, benthic fauna accounts for only 0.4% of all pixels, approximately 80 times less than that of sand, which is the most abundant class, and is therefore the most difficult class to learn.

The three hierarchical tasks were designed to verify different objectives. The two-class task detects the quadrat frame and treats the remaining region as the ROI. The three-class task divides the image into the background outside the quadrat, frame, and ROI inside the quadrat (ROI-in). The six-class task classifies the benthic cover inside the quadrat, excluding the area outside it. Therefore, the three tasks represent a stepwise increase in difficulty from frame detection to area separation, and finally to cover classification. The overall workflow, from input imagery and hierarchical annotation to independent model training and a common evaluation protocol, is summarized in Fig. 3.

A U-Net with a ResNet34 encoder pretrained on ImageNet was adopted as the network (Fig. 4, Table 2). Exploiting pretrained weights through transfer learning is a standard procedure that improves training stability and accuracy in the segmentation of small image datasets (LeCun et al., 2015; Wagner et al., 2019). The three tasks were each trained as an independent U-Net; that is, the three task models were not combined sequentially. Instead, each model was evaluated for the entire image.

Training was performed on images resized to 768×1,280 pixels using horizontal and vertical flip augmentation (Nanni et al., 2021; Shorten & Khoshgoftaar, 2019). A five-fold cross-validation was used, with the folds partitioned such that the benthic fauna class was distributed evenly. The folds were split at the image level. Each of the 69 images was acquired at a different station; therefore, no station appeared more than once. Within each fold, 49 or 50 images were used for training, six for validation, and 13 or 14 for testing. Four models were trained: a two-class model for quadrat frame detection, a three-class model for ROI-in detection, a six-class baseline model using cross-entropy for benthic cover classification, and a six-class rare-class-enhanced model using class-weighted cross-entropy combined with focal loss. Among these, the six-class baseline and rare-class-enhanced models were compared with the loss function as the only controlled variable, thereby isolating the effect of the loss-function redesign.

The six-class baseline model was trained using standard cross-entropy loss LCE (Eq. 1):

(Eq. 1)
L C E = − 1 N p ∑ i l o g p t , i

where LCE denotes the cross-entropy loss of the baseline model, Np is the total number of pixels, and i is the pixel index. Additionally, pt,i denotes the probability that pixel i is predicted as its ground truth class.

For the rare-class-enhanced model, a composite loss LCWF, formed by summing class-weighted cross-entropy and weighted focal loss terms, was used (Eq. 2). The focal term reduces the contribution of easily predicted pixels by a factor of (1–pt,i)γ, thereby concentrating training on the rare classes (Buda et al., 2018; Lin et al., 2020; Yeung et al., 2022). Class weights are defined as the reciprocal of the pixel frequency of each class normalized by the mean of these reciprocals across all classes (Eq. 3). These weights are computed separately for each fold using only the training images of the fold. Validation and test images were excluded from the computations.

(Eq. 2)
L C W F = − 1 N p ∑ i w y i 1 + 1 − p t , i γ l o g p t , i
(Eq. 3)
w c = 1 n c 1 C ∑ k 1 n k

where LCWF denotes the loss of the rare-class-enhanced model, yi is the ground-truth class of pixel i, and wyi (=wc) is the weight assigned to the ground-truth class. Parameter γ is the focusing strength that reduces the contribution of easily classified pixels (γ=2). Terms nc and nk denote the numbers of pixels belonging to classes c and k, respectively, and C denotes the total number of classes. Optimization was performed with the Adam optimizer, using a learning rate of 2×10–5 and batch size of eight (Table 2).

The evaluation is based on pixel-wise confusion matrices. OA, the Kappa coefficient (McHugh, 2012), class-wise precision, recall, F1 score, and the intersection over union (IoU) were computed as the mean±standard deviation over the five folds (Taha & Hanbury, 2015). Additionally, an out-of-fold confusion matrix, obtained by aggregating the validation predictions of all five folds, is presented.

Results

High performance was obtained for both quadrat frame detection with two classes and ROI-in detection with three classes. An OA of 0.986 and Kappa coefficient of 0.862 were recorded for the two-class model, indicating stable detection of the quadrat frame (Table 3). Additionally, the areas inside and outside the quadrat were separated reasonably well by the three-class model, with an OA of 0.974 and Kappa coefficient of 0.947 (Table 3). The small errors observed in both tasks can be attributed to the distinct geometric structure of the frame, which is readily learned by the network.

Representative predictions of the six-class benthic cover classification were qualitatively compared for the four scenes (Figs. 5-Fig. 6Fig. 78). Each figure shows the input image, ground-truth label, baseline model prediction, and rare class-enhanced model prediction. In addition, class-wise coverage proportions (%) were annotated for the ground truth label and rare-class-enhanced model prediction.

In the sand-dominated scene, the ground-truth sand coverage of 64.9% was closely reproduced by both the baseline (65.1%) and rare-class-enhanced models (65.3%) (Fig. 5). In contrast, benthic fauna was extremely rare in the ground-truth label at 0.4%, and only 0.1% was detected by the baseline model; therefore, most were missed. In contrast, 0.4% was detected in the rare-class-enhanced model, and the starfish was thus located. However, the shape of the starfish was not fully reproduced by the rare-class-enhanced model, and part of the region outside the quadrat was misclassified as sand.

In the seagrass-dominated scene (Fig. 6), the quadrat frame was occluded by seagrass and was barely discernible, even in the original image, and the frame accounted for 1.7% of the ground-truth label. Owing to this occlusion, the left boundary was not segmented correctly in either the three- or six-class models, and the shape of the benthic cover classification area within the quadrat consequently collapsed. Nevertheless, the seagrass and rock coverage obtained from the rare-class-enhanced model were 57.1% and 15.2%, respectively, which were similar to the corresponding ground-truth values of 55.8% and 13.0%.

In the scene composed of rock and benthic fauna (Fig. 7; rock ground truth, 63.4%), misclassification was observed in which the rare-class-enhanced model generated seagrass (1.2%) and sand (0.2%) that were absent from the ground truth. Owing to the limitation in reproducing its shape, the benthic fauna increased from 1.2% in the baseline model to 3.7% in the rare-class-enhanced model and was overdetected relative to the ground truth (2.6%). However, the rare-class-enhanced model successfully identified ten of the 11 benthic fauna positions.

For the complex scene in which several benthic covers were intermixed, the constituent covers were classified successfully by both the baseline and rare-class-enhanced models. Sand was classified as 31.2% using the rare-class-enhanced model, a value close to the ground truth of 34.0% (Fig. 8). However, the rock was overestimated at 25.1% relative to a ground truth of 15.5%, whereas the seagrass was underestimated at 8.4% relative to a ground truth of 16.2%, indicating that the rock and seagrass were mutually confused. Additionally, part of the area outside the quadrat was classified as benthic cover.

In terms of the quantitative performance of the six-class benthic cover classification, the OA of the baseline and rare-class-enhanced models differed only marginally. An OA of 0.912 was obtained for the baseline model, and one of 0.891 was obtained for the rare-class-enhanced model, corresponding to a decrease of 0.021 (Table 3, Fig. 9). This indicates that redesigning the loss function slightly lowers OA. This decrease was consistent across all five folds. The rare-class-enhanced model showed a lower OA for every fold (Table 4). The per-fold decrease ranged from 0.003-0.039.

In contrast, at the cost of this modest reduction in OA, the performance of the extremely rare benthic fauna class was substantially recovered in the rare-class-enhanced model. The F1 score for benthic fauna increased from 0.26 in the baseline model to 0.45 in the rare-class-enhanced model, and the IoU increased from 0.14 to 0.30 (Figs. 9, 10, Table 5). The recall of benthic fauna was reported under two aggregation schemes. Out-of-fold recall rose from 0.13-0.63. A five-fold increase in the average recall rose from 0.15-0.69. Detection performance for the benthic fauna class in the rare-class-enhanced model was thus approximately 1.7 times higher in F1 (from 0.26-0.45) and approximately 2.1 times higher in IoU (from 0.14-0.30) than that in the baseline model. The five non-fauna classes showed small declines in F1 between 0.013 and 0.036 (Table 5).

Discussion

The three segmentation tasks empirically demonstrated the feasibility of automating quadrat-based benthic cover surveys. The detection of the quadrat frame (two classes) and ROI-in detection (three classes) stably separated the quadrat structure with OA of 0.986 and 0.974, respectively. Therefore, these two steps can replace preprocessing, in which the effective ROI is designated prior to visual interpretation. The six-class cover classification also distinguished the major cover types, including background, sand, rock, and seagrass, with high accuracy using a dataset of only 69 images. In particular, the extremely rare benthic fauna class was partially recovered by redesigning the loss function, confirming its potential for detecting scarce but ecologically important targets.

The combination of class-weighted cross-entropy and focal loss mitigated the training failure of the extremely rare benthic fauna class at the cost of a slight loss in the OA. These results are consistent with earlier reports indicating that minority classes are prone to training failure under imbalanced data (Buda et al., 2018), and focal-type losses alleviate this failure (Yeung et al., 2022). The present results also fall within the context of studies that address training improvements in benthic community segmentation models (Pavoni et al., 2020). The five non-fauna classes lost between 0.013 and 0.036 in the F1 score. Therefore, the cover estimates remained reliable. In contrast, the baseline model missed almost all the benthic fauna. A class that is never detected does not provide monitoring information. Because benthic cover surveys aim to detect rare but ecologically important organisms, accepting a slight decrease in OA to secure the recall of benthic fauna is a meaningful trade-off consistent with the survey objective.

However, although the benthic fauna class was recovered by focal loss, its F1 score remained at approximately 0.45, indicating that is difficult to overcome through a loss function design alone. The rare-class-enhanced model achieved a recall of 0.69 but had a precision of 0.38. Therefore, it detected, but overpredicted, most benthic fauna pixels. Benthic fauna occupied small areas with irregular outlines. Individuals were often partially occluded by seagrass or rocks. Under these conditions, the class boundary becomes ambiguous, and false positives increase. This limitation is primarily attributed to the absolute scarcity of samples of the extremely rare class, which accounted for less than 0.4% of all pixels in the dataset. Small sample sizes inflate the variance in validation performance, and such variability makes stable estimation difficult (Varoquaux, 2018). Therefore, redesigning the loss function serves only as a means of fully exploiting the available data and cannot substitute for the insufficiency of the samples themselves.

The data used in this study are limited in generalizability as they comprise only 69 images acquired on a single survey date (May 26, 2022) and within a single region. Therefore, the images represent a single season and set of water conditions. The model performance in other seasons, depths, or water clarities is not known. Additional surveys across seasons and regions are required before operational use. To reinforce statistical stability, a five-fold cross-validation was performed with the folds partitioned such that the benthic fauna class was evenly distributed. Nevertheless, the spatiotemporal representativeness remains limited when both the large validation error associated with small samples (Varoquaux, 2018) and the variability inherent in expert visual interpretation (Beijbom et al., 2015) are considered. All benthic animals were labeled as a single class. They were not separated into taxa, such as sea stars, urchins, or gastropods. Benthic fauna accounted for less than 0.4% of all the pixels. Splitting this class into taxa resulted in too few pixels for the training. Therefore, taxa-level labels have been left for future studies using a larger image set.

Consequently, portions of the region outside the quadrat were misclassified as benthic cover by the rare-class-enhanced model (Figs. 5, 8). However, the inside and outside of the quadrats were separated with high accuracy using the three-class model (OA=0.974). Using three-class prediction as a mask to remove regions outside the quadrat from the six-class output can effectively suppress such misclassification. This indicates a direction for subsequent refinement, in which ROI-in detection and benthic cover classifications are combined.

Future research should proceed in one of three directions. First, the dataset could be expanded to cover a wider range of imaging periods, regions, and water depths to increase both the representativeness and absolute volume of the samples. Second, the benthic cover classes can be further subdivided to construct a classification scheme suited to the objectives of a survey. Third, ROI-in detection and benthic cover classification can be developed into a single automated workflow that can be applied to operational benthic surveys (Jeon et al., 2021; Raphael et al., 2020). Through such extensions, quadrat benthic cover surveys can be automated and implemented in a practical monitoring framework.

Conclusion

Unlike conventional visual interpretation, U-Net semantic segmentation combined with a redesigned loss function enables the automated benthic cover classification of quadrat underwater images. Quadrat frame detection (two classes) and ROI-in detection (three classes) separated the quadrat structure stably with OA of 0.986 and 0.974, respectively. The rare-class-enhanced model, in which class-weighted cross-entropy and focal loss were applied, recovered the F1 score of the extremely rare benthic fauna class from 0.26-0.45. This indicates that redesigning the loss function mitigates the learning failure of the minority benthic fauna class without substantially compromising the OA. These findings contribute to the automation of quadrat benthic cover surveys and provide a basis for the development of operational coastal benthic monitoring through data expansion and finer class subdivisions.

Author Contributions

Conceptualization: EJ. Methodology: SHP. Software: SHP. Validation: NHK. Investigation: WKB. Formal analysis: SC. Funding acquisition: SC, EJ. Data curation: JSL. Writing – original draft: SHP. Writing – review & editing: NHK, WKB, SC, JSL, EJ.

Conflict of Interest

The authors declare that they have no competing interests.

References

1 

Alonso, I., Yuval, M., Eyal, G., Treibitz, T., and Murillo, A.C. (2019). CoralSeg: learning coral segmentation from sparse annotations. Journal of Field Robotics, 36, 1456-1477. https://doi.org/10.1002/rob.21915

Alonso, I., Yuval, M., Eyal, G., Treibitz, T., & Murillo, A.C. (2019) CoralSeg: learning coral segmentation from sparse annotations Journal of Field Robotics, 36, 1456-1477, https://doi.org/10.1002/rob.21915 .

2 

Beijbom, O., Edmunds, P.J., Roelfsema, C., Smith, J., Kline, D.I., Neal, B.P., et al. (2015). Towards automated annotation of benthic survey images: variability of human experts and operational modes of automation. PLoS One, 10, e0130312. https://doi.org/10.1371/journal.pone.0130312 Article Id (pmcid)

Beijbom, O., Edmunds, P.J., Roelfsema, C., Smith, J., Kline, D.I., Neal, B.P., et al. (2015) Towards automated annotation of benthic survey images: variability of human experts and operational modes of automation PLoS One, 10, e0130312, https://doi.org/10.1371/journal.pone.0130312 . Article Id (pmcid)

3 

Buda, M., Maki, A., and Mazurowski, M.A. (2018). A systematic study of the class imbalance problem in convolutional neural networks. Neural Networks, 106, 249-259. https://doi.org/10.1016/j.neunet.2018.07.011

Buda, M., Maki, A., & Mazurowski, M.A. (2018) A systematic study of the class imbalance problem in convolutional neural networks Neural Networks, 106, 249-259, https://doi.org/10.1016/j.neunet.2018.07.011 .

4 

Jeon, E., Kim, S., Park, S., Kwak, J., and Choi, I. (2021). Semantic segmentation of seagrass habitat from drone imagery based on deep learning: a comparative study. Ecological Informatics, 66, 101430. https://doi.org/10.1016/j.ecoinf.2021.101430

Jeon, E., Kim, S., Park, S., Kwak, J., & Choi, I. (2021) Semantic segmentation of seagrass habitat from drone imagery based on deep learning: a comparative study Ecological Informatics, 66, 101430, https://doi.org/10.1016/j.ecoinf.2021.101430 .

5 

Kattenborn, T., Leitloff, J., Schiefer, F., and Hinz, S. (2021). Review on Convolutional Neural Networks (CNN) in vegetation remote sensing. ISPRS Journal of Photogrammetry and Remote Sensing, 173, 24-49. https://doi.org/10.1016/j.isprsjprs.2020.12.010

Kattenborn, T., Leitloff, J., Schiefer, F., & Hinz, S. (2021) Review on Convolutional Neural Networks (CNN) in vegetation remote sensing ISPRS Journal of Photogrammetry and Remote Sensing, 173, 24-49, https://doi.org/10.1016/j.isprsjprs.2020.12.010 .

6 

Kohler, K.E., and Gill, S.M. (2006). Coral Point Count with Excel extensions (CPCe): a Visual Basic program for the determination of coral and substrate coverage using random point count methodology. Computers & Geosciences, 32, 1259-1269. https://doi.org/10.1016/j.cageo.2005.11.009

Kohler, K.E., & Gill, S.M. (2006) Coral Point Count with Excel extensions (CPCe): a Visual Basic program for the determination of coral and substrate coverage using random point count methodology Computers & Geosciences, 32, 1259-1269, https://doi.org/10.1016/j.cageo.2005.11.009 .

7 

LeCun, Y., Bengio, Y., and Hinton, G. (2015). Deep learning. Nature, 521, 436-444. https://doi.org/10.1038/nature14539

LeCun, Y., Bengio, Y., & Hinton, G. (2015) Deep learning Nature, 521, 436-444, https://doi.org/10.1038/nature14539 .

8 

Lin, T.Y., Goyal, P., Girshick, R., He, K., and Dollár, P. (2020). Focal loss for dense object detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 42, 318-327. https://doi.org/10.1109/TPAMI.2018.2858826

Lin, T.Y., Goyal, P., Girshick, R., He, K., & Dollár, P. (2020) Focal loss for dense object detection IEEE Transactions on Pattern Analysis and Machine Intelligence, 42, 318-327, https://doi.org/10.1109/TPAMI.2018.2858826 .

9 

McHugh, M.L. (2012). Interrater reliability: the kappa statistic. Biochemia Medica, 22, 276-282. https://doi.org/10.11613/bm.2012.031

McHugh, M.L. (2012) Interrater reliability: the kappa statistic Biochemia Medica, 22, 276-282, https://doi.org/10.11613/bm.2012.031 .

10 

Nanni, L., Paci, M., Brahnam, S., and Lumini, A. (2021). Comparison of different image data augmentation approaches. Journal of Imaging, 7, 254. https://doi.org/10.3390/jimaging7120254 Article Id (pmcid)

Nanni, L., Paci, M., Brahnam, S., & Lumini, A. (2021) Comparison of different image data augmentation approaches Journal of Imaging, 7, 254, https://doi.org/10.3390/jimaging7120254 . Article Id (pmcid)

11 

Pavoni, G., Corsini, M., Callieri, M., Fiameni, G., Edwards, C., and Cignoni, P. (2020). On improving the training of models for the semantic segmentation of benthic communities from orthographic imagery. Remote Sensing, 12, 3106. https://doi.org/10.3390/rs12183106

Pavoni, G., Corsini, M., Callieri, M., Fiameni, G., Edwards, C., & Cignoni, P. (2020) On improving the training of models for the semantic segmentation of benthic communities from orthographic imagery Remote Sensing, 12, 3106, https://doi.org/10.3390/rs12183106 .

12 

Raphael, A., Dubinsky, Z., Iluz, D., and Netanyahu, N.S. (2020). Neural network recognition of marine benthos and corals. Diversity, 12, 29. https://doi.org/10.3390/d12010029

Raphael, A., Dubinsky, Z., Iluz, D., & Netanyahu, N.S. (2020) Neural network recognition of marine benthos and corals Diversity, 12, 29, https://doi.org/10.3390/d12010029 .

13 

Shorten, C., and Khoshgoftaar, T.M. (2019). A survey on image data augmentation for deep learning. Journal of Big Data, 6, 60. https://doi.org/10.1186/s40537-019-0197-0

Shorten, C., & Khoshgoftaar, T.M. (2019) A survey on image data augmentation for deep learning Journal of Big Data, 6, 60, https://doi.org/10.1186/s40537-019-0197-0 .

14 

Taha, A.A., and Hanbury, A. (2015). Metrics for evaluating 3D medical image segmentation: analysis, selection, and tool. BMC Medical Imaging, 15, 29. https://doi.org/10.1186/s12880-015-0068-x Article Id (pmcid)

Taha, A.A., & Hanbury, A. (2015) Metrics for evaluating 3D medical image segmentation: analysis, selection, and tool BMC Medical Imaging, 15, 29, https://doi.org/10.1186/s12880-015-0068-x . Article Id (pmcid)

15 

Trygonis, V., and Sini, M. (2012). photoQuad: a dedicated seabed image processing software, and a comparative error analysis of four photoquadrat methods. Journal of Experimental Marine Biology and Ecology, 424-425, 99-108. https://doi.org/10.1016/j.jembe.2012.04.018

Trygonis, V., & Sini, M. (2012) photoQuad: a dedicated seabed image processing software, and a comparative error analysis of four photoquadrat methods Journal of Experimental Marine Biology and Ecology, 424-425, 99-108, https://doi.org/10.1016/j.jembe.2012.04.018 .

16 

Varoquaux, G. (2018). Cross-validation failure: small sample sizes lead to large error bars. NeuroImage, 180, 68-77. https://doi.org/10.1016/j.neuroimage.2017.06.061

Varoquaux, G. (2018) Cross-validation failure: small sample sizes lead to large error bars NeuroImage, 180, 68-77, https://doi.org/10.1016/j.neuroimage.2017.06.061 .

17 

Wagner, F.H., Sanchez, A., Tarabalka, Y., Lotte, R.G., Ferreira, M.P., Aidar, M.P.M., et al. (2019). Using the U-net convolutional network to map forest types and disturbance in the Atlantic rainforest with very high resolution images. Remote Sensing in Ecology and Conservation, 5, 360-375. https://doi.org/10.1002/rse2.111 Article Id (pmcid)

Wagner, F.H., Sanchez, A., Tarabalka, Y., Lotte, R.G., Ferreira, M.P., Aidar, M.P.M., et al. (2019) Using the U-net convolutional network to map forest types and disturbance in the Atlantic rainforest with very high resolution images Remote Sensing in Ecology and Conservation, 5, 360-375, https://doi.org/10.1002/rse2.111 . Article Id (pmcid)

18 

Williams, I.D., Couch, C.S., Beijbom, O., Oliver, T.A., Vargas-Angel, B., Schumacher, B.D., et al. (2019). Leveraging automated image analysis tools to transform our capacity to assess status and trends of coral reefs. Frontiers in Marine Science, 6, 222. https://doi.org/10.3389/fmars.2019.00222

Williams, I.D., Couch, C.S., Beijbom, O., Oliver, T.A., Vargas-Angel, B., Schumacher, B.D., et al. (2019) Leveraging automated image analysis tools to transform our capacity to assess status and trends of coral reefs Frontiers in Marine Science, 6, 222, https://doi.org/10.3389/fmars.2019.00222 .

19 

Yeung, M., Sala, E., Schönlieb, C.B., and Rundo, L. (2022). Unified Focal loss: generalising Dice and cross entropy-based losses to handle class imbalanced medical image segmentation. Computerized Medical Imaging and Graphics, 95, 102026. https://doi.org/10.1016/j.compmedimag.2021.102026 Article Id (pmcid)

Yeung, M., Sala, E., Schönlieb, C.B., & Rundo, L. (2022) Unified Focal loss: generalising Dice and cross entropy-based losses to handle class imbalanced medical image segmentation Computerized Medical Imaging and Graphics, 95, 102026, https://doi.org/10.1016/j.compmedimag.2021.102026 . Article Id (pmcid)

Figures and Tables
Fig. 1

Overview of the quadrat benthic survey. (A) Study area showing the survey points in a rocky subtidal zone off Hujeong Beach (Uljin, east coast of Korea). (B) Underwater camera mounted on the survey boat. (C) 1 m×1 m quadrat frame.

pnie-7-4-213-f1.jpg
Fig. 2

Hierarchical labeling scheme (L1: 2-class, L2: 3-class, L3: 6-class) of the quadrat underwater images. (A-C) RGB images of three example stations. (D-F) L1 labels showing the frame and the ROI. (G-I) L2 labels that add the background outside the quadrat. (J-L) L3 labels that divide the ROI-in into four cover classes. Each column shows the same image.

pnie-7-4-213-f2.jpg
Fig. 3

Overall workflow of this study, from input quadrat imagery and hierarchical annotation (L1-L3) to independent training of the four U-Net models and the common evaluation protocol (five-fold cross-validation; pixel-based confusion matrices; OA, Kappa, F1, and IoU). ROI, region of interest; ROI-in, ROI inside the quadrat; OA, overall accuracy; IoU, intersection over union.

pnie-7-4-213-f3.jpg
Fig. 4

Architecture of the U-Net used for benthic cover segmentation.

pnie-7-4-213-f4.jpg
Fig. 5

Qualitative comparison for a sand-dominated scene: (A) RGB input, (B) ground-truth six-class label, (C) two-class prediction, (D) three-class prediction, (E) six-class baseline (CE) prediction, and (F) six-class rare-class-enhanced (CW+Focal; class-weighted CE+Focal loss) prediction. Per-class coverage (%) is annotated in each panel. GT, ground truth; CE, cross-entropy; CW, class-weighted; ROI-in, region of interest inside the quadrat.

pnie-7-4-213-f5.jpg
Fig. 6

Qualitative comparison for a seagrass-dominated scene; panels as in Fig. 5. (A) RGB input, (B) ground-truth six-class label, (C) two-class prediction, (D) three-class prediction, (E) six-class baseline (CE) prediction, and (F) six-class rare-class-enhanced (CW+Focal) prediction. Per-class coverage (%) is annotated in each panel. GT, ground truth; CE, cross-entropy; CW, class-weighted; ROI-in, region of interest inside the quadrat.

pnie-7-4-213-f6.jpg
Fig. 7

Qualitative comparison for a rock-and-benthic-fauna scene; panels as in Fig. 5. (A) RGB input, (B) ground-truth six-class label, (C) two-class prediction, (D) three-class prediction, (E) six-class baseline (CE) prediction, and (F) six-class rare-class-enhanced (CW+Focal) prediction. Per-class coverage (%) is annotated in each panel. GT, ground truth; CE, cross-entropy; CW, class-weighted; ROI-in, region of interest inside the quadrat.

pnie-7-4-213-f7.jpg
Fig. 8

Qualitative comparison for a mixed-cover scene; panels as in Fig. 5. (A) RGB input, (B) ground-truth six-class label, (C) two-class prediction, (D) three-class prediction, (E) six-class baseline (CE) prediction, and (F) six-class rare-class-enhanced (CW+Focal) prediction. Per-class coverage (%) is annotated in each panel. GT, ground truth; CE, cross-entropy; CW, class-weighted; ROI-in, region of interest inside the quadrat.

pnie-7-4-213-f8.jpg
Fig. 9

Per-class (A) F1 scores and (B) IoU of the six-class baseline vs. rare-class-enhanced models. CE, cross-entropy; CW, class-weighted; IoU, intersection over union.

pnie-7-4-213-f9.jpg
Fig. 10

Out-of-fold confusion matrices of the six-class baseline model (A) and rare-class-enhanced model (B). CE, cross-entropy; CW, class-weighted.

pnie-7-4-213-f10.jpg
Table 1

Six-class pixel distribution of the dataset (768× 1,280 labels, 69 images)

Code

Class

Pixels

Proportion (%)

1

Background

20,123,666

29.7

2

Frame

3,713,507

5.5

3

Seagrass

7,682,488

11.3

4

Rock

15,132,790

22.3

5

Sand

20,926,519

30.9

6

Benthic fauna

250,790

0.4

Total

67,829,760

100.0

Table 2

Training configuration of the U-Net models

Item

Value

Input size (RGB)

768×1,280 whole image (normalized to [0, 1])

Optimizer

Adam

Learning rate

2×10–5

Batch size

8

Epochs

300

Augmentation

Random horizontal+vertical flip

Cross-validation

5-fold, stratified by benthic fauna presence

Loss – 2/3-class & 6-class base

Cross-entropy

Loss – 6-class rare-class-enhanced

Class-weighted Cross-entropy+Focal loss (γ=2)

Random seed

42 (data split, initialization, shuffling, augmentation)

Table 3

Overall segmentation performance per model (five-fold cross-validation, mean±SD)

Model

OA

Kappa

Macro-F1

Mean-IoU

2-class (L1 region)

0.986±0.002

0.862±0.019

0.931±0.009

0.877±0.015

3-class (L2 region)

0.974±0.006

0.947±0.013

0.938±0.009

0.889±0.016

6-class base (L3 cover)

0.912±0.022

0.881±0.028

0.796±0.068

0.684±0.047

6-class rare-class-enhanced (L3 cover)

0.891±0.012

0.854±0.016

0.788±0.033

0.682±0.032

[i]

SD, standard deviation; OA, overall accuracy; IoU, intersection over union.

Table 4

Per-fold OA of the two six-class models (five-fold cross-validation)

Fold

6-class base

6-class rare-class-enhanced

Difference

1

0.896

0.881

−0.015

2

0.901

0.898

−0.003

3

0.933

0.894

−0.039

4

0.887

0.875

−0.012

5

0.942

0.907

−0.035

Mean±SD

0.912±0.022

0.891±0.012

−0.021±0.015

[i]

SD, standard deviation; OA, overall accuracy.

Table 5

Six-class per-class F1 and IoU, baseline vs. rare-class-enhanced loss (five-fold cross-validation, mean±SD)

Class

F1

(base)

F1

(rare-class-enhanced)

IoU

(base)

IoU

(rare-class-enhanced)

Background

0.961±0.012

0.948±0.005

0.925±0.023

0.901±0.009

Frame

0.846±0.022

0.825±0.018

0.734±0.032

0.702±0.026

Seagrass

0.765±0.047

0.729±0.080

0.622±0.063

0.580±0.096

Rock

0.860±0.060

0.828±0.055

0.759±0.088

0.710±0.076

Sand

0.962±0.012

0.947±0.011

0.926±0.023

0.899±0.020

Benthic fauna

0.255±0.254

0.449±0.135

0.137±0.167

0.298±0.102

[i]

SD, standard deviation; IoU, intersection over union.