﻿<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.0 20120330//EN" "http://jats.nlm.nih.gov/publishing/1.0/JATS-journalpublishing1.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-id journal-id-type="nlm-ta">Intell. Robot.</journal-id>
      <journal-id journal-id-type="publisher-id">IR</journal-id>
      <journal-title-group>
        <journal-title>Intelligence &amp; Robotics</journal-title>
      </journal-title-group>
      <issn pub-type="epub">2770-3541</issn>
      <publisher>
        <publisher-name>OAE Publishing Inc.</publisher-name>
      </publisher>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.20517/ir.2026.36</article-id>
      <article-categories>
        <subj-group>
          <subject>Research Article</subject>
        </subj-group>
      </article-categories>
      <title-group>
        <article-title>Container-surface-guided dual-task learning for defect detection in complex port scenes</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <name>
            <surname>Zhen</surname>
            <given-names>Mingkai</given-names>
          </name>
          <xref ref-type="aff" rid="I1">
            <sup>1</sup>
          </xref>
          <contrib-id contrib-id-type="orcid">https://orcid.org/0009-0002-2192-3421</contrib-id>
        </contrib>
        <contrib contrib-type="author">
          <name>
            <surname>Zhao</surname>
            <given-names>Weidong</given-names>
          </name>
          <xref ref-type="aff" rid="I2">
            <sup>2</sup>
          </xref>
        </contrib>
        <contrib contrib-type="author" corresp="yes">
          <name>
            <surname>Zhao</surname>
            <given-names>Jian</given-names>
          </name>
          <xref ref-type="aff" rid="I2">
            <sup>2</sup>
          </xref>
          <xref ref-type="corresp" rid="cor1" />
          <contrib-id contrib-id-type="orcid">https://orcid.org/0000-0001-5792-9556</contrib-id>
        </contrib>
        <contrib contrib-type="author">
          <name>
            <surname>Jia</surname>
            <given-names>Ning</given-names>
          </name>
          <xref ref-type="aff" rid="I2">
            <sup>2</sup>
          </xref>
        </contrib>
      </contrib-group>
      <aff id="I1">
        <sup>1</sup>School of Computer Science and Technology, Tongji University, Shanghai 201804, China.</aff>
      <aff id="I2">
        <sup>2</sup>College of Electronics and Information Engineering, Tongji University, Shanghai 201804, China.</aff>
      <author-notes>
        <corresp id="cor1">Correspondence to: Jian Zhao, College of Electronics and Information Engineering, Tongji University, Shanghai 201804, China. E-mail: <email>1910678@tongji.edu.cn</email></corresp>
        <fn fn-type="other">
          <p>
            <bold>Received:</bold> 7 Sep 2026 |  <bold>First Decision:</bold> 29 Sep 2026 |  <bold>Revised:</bold> 11 Oct 2026 |  <bold>Accepted:</bold> 20 Oct 2026 |  <bold>Published:</bold> 28 Oct 2026</p>
        </fn>
        <fn fn-type="other">
          <p>
            <bold>Academic Editor:</bold> Rong Xiong |  <bold>Copy Editor:</bold> Pei-Yun Wang |  <bold>Production Editor:</bold> Pei-Yun Wang</p>
        </fn>
      </author-notes>
      <pub-date pub-type="ppub">
        <year>2026</year>
      </pub-date>
      <pub-date pub-type="epub">
        <day>28</day>
        <month>10</month>
        <year>2026</year>
      </pub-date>
      <volume>6</volume>
	  <issue>4</issue>
      <fpage>811</fpage>
	  <lpage>42</lpage>
      <permissions>
        <copyright-statement>© The Author(s) 2026.</copyright-statement>
        <license xlink:href="https://creativecommons.org/licenses/by/4.0/">
          <license-p>© The Author(s) 2026. <bold>Open Access</bold> This article is licensed under a Creative Commons Attribution 4.0 International License (<uri xlink:href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</uri>), which permits unrestricted use, sharing, adaptation, distribution and reproduction in any medium or format, for any purpose, even commercially, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.</license-p>
        </license>
      </permissions>
      <abstract>
        <p>Automatic container defect inspection in complex port environments is hindered by substantial scale variation and defect-like interference from non-container regions. This article presents CSG-YOLO, a container-surface-guided dual-task framework that jointly learns five-class defect detection and container-surface segmentation. Its scale-tuned feature fusion module adapts multi-level neck features to defects of different spatial extents, while mask-guided cross-task interaction bidirectionally exchanges the learned surface prior and defect cues between the task heads. Center-to-container consistency and edge-aware mask refinement losses respectively encourage defect-center coverage and surface-boundary consistency. On a single-terminal dataset of 4,000 distinct port images containing 4,480 defect instances, CSG-YOLO-N achieves mean scores of 58.1 average precision (AP), 93.0 AP<sub>50</sub>, and 65.0 AP<sub>75</sub> across three independent training runs, with 16.3 GFLOPs. Compared with YOLOv12-N, it improves these metrics by 2.4, 3.2, and 4.1 points, respectively, while reducing mean overall missed detection rate from 6.4% to 5.7%, false positives per image from 0.19 to 0.11, and outside-region-of-interest (ROI) detection ratio from 1.8% to 0.2%. It also obtains a mean Surface intersection over union of 76.7%. These results support the effectiveness of explicit container-surface modeling for defect detection and suppression of spatially invalid detections on the evaluated dataset. Generalization to other port environments remains to be established.</p>
      </abstract>
      <kwd-group>
        <kwd>Container defect detection</kwd>
        <kwd>container-surface segmentation</kwd>
        <kwd>multi-task learning</kwd>
        <kwd>surface-guided detection</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec1">
      <title>1. INTRODUCTION</title>
      <sec id="sec1-1">
        <title>1.1. Background and related works</title>
        <p>Containers are essential carriers in global logistics and are routinely handled during terminal loading and unloading, yard stacking, gate transfer, and sea–land intermodal transportation. Frequent turnover and complex port operations expose container bodies to collisions, compression, friction, and environmental contamination, resulting in defects such as deformation, holes, post damage, repair patches, and surface contamination. These defects can compromise structural integrity and sealing performance, increasing the risk of cargo loss, contamination, and transportation accidents.</p>
        <p>Container defect inspection in ports still relies heavily on manual visual examination, which is labor-intensive, subjective, and difficult to sustain under long-duration, high-throughput operation. Reliable automatic detection is therefore important for improving the efficiency and consistency of intelligent container inspection.</p>
        <p>The development of automated terminals has made computer vision an important component of intelligent port perception. Deep learning detectors have been studied for container-terminal perception tasks<sup>[<xref ref-type="bibr" rid="B1">1</xref>]</sup>, including lightweight container detection using YOLOv5s<sup>[<xref ref-type="bibr" rid="B2">2</xref>]</sup>. Earlier work used template matching to identify markings and other objects on side-view container images as a step toward damage inspection<sup>[<xref ref-type="bibr" rid="B3">3</xref>]</sup>. Deep learning studies have formulated damage assessment as damaged-versus-undamaged image classification<sup>[<xref ref-type="bibr" rid="B4">4</xref>]</sup>, investigated Vision Transformer-based container inspection<sup>[<xref ref-type="bibr" rid="B5">5</xref>]</sup>, and developed a convolutional neural network (CNN)–Transformer hybrid for appearance-defect classification<sup>[<xref ref-type="bibr" rid="B6">6</xref>]</sup>. Image-level classification does not provide defect bounding boxes, motivating explicit localization for automated inspection.</p>
        <p>Container-damage detection studies have explored several detector designs. Huang <italic>et al.</italic> proposed an attention-enhanced YOLO framework for port environments<sup>[<xref ref-type="bibr" rid="B7">7</xref>]</sup>, Zhao incorporated C2PSA into YOLOv11<sup>[<xref ref-type="bibr" rid="B8">8</xref>]</sup>, and Zheng <italic>et al.</italic> combined gated feature interaction, a high-resolution detection layer, and attention in an improved YOLOv8 detector<sup>[<xref ref-type="bibr" rid="B9">9</xref>]</sup>. Bahrami <italic>et al.</italic> investigated anchor-box optimization for container corrosion inspection<sup>[<xref ref-type="bibr" rid="B10">10</xref>]</sup>, while YOLO-NAS has been applied to container-damage detection<sup>[<xref ref-type="bibr" rid="B11">11</xref>]</sup>. Zhang investigated self-contrastive learning with deep CNNs for container-damage detection<sup>[<xref ref-type="bibr" rid="B12">12</xref>]</sup>. Vasileiadis <italic>et al.</italic> combined container tracking and damage detection during crane unloading<sup>[<xref ref-type="bibr" rid="B13">13</xref>]</sup>, whereas Rahman <italic>et al.</italic> applied RF-DETR to container-damage detection in ports<sup>[<xref ref-type="bibr" rid="B14">14</xref>]</sup>. In the present inspection setting, defect-like textures on ground areas, spreaders, shadows, and other non-container structures motivate explicitly modeling the valid supporting surface.</p>
        <p>Compared with bounding-box detection, segmentation provides pixel-level region representations and has also been explored for container inspection. Li <italic>et al.</italic> developed an fully convolutional network (FCN)-based damage-identification network with pyramid pooling and fusion upsampling<sup>[<xref ref-type="bibr" rid="B15">15</xref>]</sup>. Wang <italic>et al.</italic> developed a lightweight SOLO-based design combining GC-ShuffleNetV2, an improved path aggregation feature pyramid network (PAFPN), and a decoupled SOLO head<sup>[<xref ref-type="bibr" rid="B16">16</xref>]</sup>. Su and Yu proposed a YOLO11-based end-to-end detection and segmentation model for container-surface damage<sup>[<xref ref-type="bibr" rid="B17">17</xref>]</sup>. Ornelas <InlineParagraph><italic>et al.</italic></InlineParagraph> used DeepLabv3+ for pixel-wise container-corrosion segmentation and examined SAM-based container-background removal<sup>[<xref ref-type="bibr" rid="B18">18</xref>]</sup>. Their use of a container mask for preprocessing establishes relevant prior work; CSG-YOLO instead studies learned bidirectional feature interaction between surface segmentation and defect detection.</p>
        <p>Related scale-adaptive designs have also been studied in other dense-prediction tasks. SANet combines scale-adaptive feature extraction and multi-scale aggregation for lightweight salient object detection<sup>[<xref ref-type="bibr" rid="B19">19</xref>]</sup>. This work provides context for scale adaptation rather than container-defect benchmark results.</p>
        <p>Industrial surface inspection has also used segmentation to support defect decisions. Božič <italic>et al.</italic> combine pixel-level defect segmentation with image-level classification to learn from mixed weak and full supervision<sup>[<xref ref-type="bibr" rid="B20">20</xref>]</sup>. Their segmentation target is the anomalous region, and the decision concerns whether an image contains a defect. CSG-YOLO instead learns the supporting container surface, including normal and damaged portions, as a common spatial prior for multi-class bounding-box detection. This difference concerns the supervised representation and its use in localization, rather than the general idea of coupling segmentation with another inspection task.</p>
        <p>Joint prediction and cross-task information transfer are established ideas. Mask R-CNN<sup>[<xref ref-type="bibr" rid="B21">21</xref>]</sup> predicts object-instance masks alongside bounding boxes, while PAD-Net<sup>[<xref ref-type="bibr" rid="B22">22</xref>]</sup> uses intermediate auxiliary predictions and multi-modal distillation for depth estimation and scene parsing. These precedents motivate a more specific distinction in container inspection: the segmentation target and its role in detection. In the standard Mask R-CNN formulation, masks and boxes describe the same object instances; using a supporting container surface to guide a different set of defect instances requires a distinct auxiliary target and a corresponding transfer mechanism. Here, the segmentation target is the valid container surface, including both defective and non-defective portions, rather than the pixels of individual defect categories. Its predicted representation supplies a shared spatial prior for all five defect classes. The methodological focus is how this inspection-domain prior conditions dense detection features, receives complementary defect cues, and is supervised for spatial consistency.</p>
        <p>Accordingly, three challenges remain in real-world container defect detection.</p>
        <p>• Images captured at quay cranes, gates, and yards contain vehicles, ground areas, spreaders, locking devices, shadows, reflections, and buildings. These non-container regions may resemble true defects and induce background false positives.</p>
        <p>• Defect instances vary substantially in area, morphology, and appearance. Small instances may lose fine spatial cues during deep feature extraction, whereas spatially extended instances require broader context and stable boundary representation. This variation occurs both within and across semantic categories.</p>
        <p>• Existing methods primarily model the defects themselves and rarely use the valid container surface as an explicit prior, leaving the spatial consistency of predicted defects insufficiently constrained.</p>
      </sec>
      <sec id="sec1-2">
        <title>1.2. Main contributions</title>
        <p>CSG-YOLO is a container-surface-guided multi-task framework for practical port inspection, with defect detection as its primary task and surface segmentation as auxiliary spatial guidance. Its methodological contribution is the explicit coupling of the supervised surface representation with detection: the learned prior modulates multi-scale detection features, and detached defect responses refine the surface-mask prototype through a complementary path. Center-to-container consistency (CTC) and edge-aware mask refinement (EAMR) objectives supervise the prior at annotated defect centers and surface boundaries, linking defects to their supporting surface.</p>
        <p>The framework adopts the YOLO detection architecture and uses established convolution, attention, and residual-gating operations. Joint training, bidirectional information exchange, and these individual operators are not claimed as new principles. The proposed design specifies the surface-prior representation, its transfer within the dual-task head, and the associated consistency supervision. Scale-tuned feature fusion (STFF) provides complementary scale-level feature modulation upstream of this interaction; its feature-derived gates do not receive segmentation predictions.</p>
        <p>The main contributions of this article are summarized as follows.</p>
        <p>• We formulate container-surface segmentation as learning a common inspection-domain prior for five-class defect detection. Mask-guided cross-task interaction (MG-CTI) transfers this prior to detection features through residual spatial gates and returns detached defect responses to refine the surface-mask prototype within a one-stage architecture.</p>
        <p>• We design STFF to combine explicit fusion-level embeddings, local and dilated spatial cues, and residual shared-feature modulation for defects of different spatial extents. Complementary center-to-container and edge-aware objectives supervise the learned surface prior without adding inference-time loss computation.</p>
        <p>• We evaluate the design through comparative, scale-wise, and qualitative studies and three-run component ablations. Detection-only STFF, segmentation without explicit interaction, directional MG-CTI, and training-loss comparisons distinguish the observed contributions of feature modulation, auxiliary supervision, and surface-prior transfer on the evaluated port dataset.</p>
        <p>The remainder of this article is organized as follows. Section 2 presents the proposed framework and its main components. Section 3 describes the experimental protocol and results. Section 4 concludes the article and outlines future work.</p>
      </sec>
    </sec>
    <sec id="sec2">
      <title>2. METHODS</title>
      <sec id="sec2-1">
        <title>2.1. Overall architecture and multi-task learning framework</title>
        <p>The analysis in Section 1 indicates that container defect detection should not be formulated as an unconstrained whole-image search problem. Since real defects are expected to occur on the container surface, explicitly modeling the valid container-surface region can provide an effective spatial prior for defect localization. Based on this observation, the proposed method formulates container defect detection and container-surface segmentation as a unified multi-task learning problem, in which the segmentation branch provides surface-aware guidance for detection and the detection branch provides defect-related cues for segmentation refinement.</p>
        <p>As shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>, the proposed framework is built upon a YOLOv12-style one-stage architecture<sup>[<xref ref-type="bibr" rid="B23">23</xref>]</sup> and consists of four main components: a shared backbone, a feature pyramid network (FPN)/path aggregation network (PAN) neck enhanced by the proposed STFF module, a dual-task prediction head, and a MG-CTI module. For clarity, the complete framework is referred to as CSG-YOLO, short for Container-Surface-Guided YOLO, in the experimental tables, with the suffixes indicating different model scales. Let <inline-formula><tex-math id="M1">$$ \mathcal{B}  $$</tex-math></inline-formula>(·) denote the backbone, <inline-formula><tex-math id="M1">$$ \mathcal{N} $$</tex-math></inline-formula><sub>STFF</sub>(·) denote the STFF-enhanced neck, and <inline-formula><tex-math id="M1">$$ \mathcal{H} $$</tex-math></inline-formula><sub>det</sub>(·) and <inline-formula><tex-math id="M1">$$ \mathcal{H} $$</tex-math></inline-formula><sub>seg</sub>(·) denote the detection and segmentation heads, respectively. Given an input image <bold>I</bold> ∈ ℝ<italic><sup>B</sup></italic><sup>×3×</sup><italic><sup>H</sup></italic><sup>×</sup><italic><sup>W</sup></italic>, the multi-scale features generated by the shared backbone and neck are computed as</p>
        <fig id="fig1" position="float">
          <label>Figure 1</label>
          <caption>
            <p>Overall architecture of the proposed container-surface-prior-guided dual-task network. The shared backbone and neck extract multi-scale features, while the detection and segmentation branches are connected through MG-CTI for lightweight bidirectional task interaction. The photographs in the upper-left input and lower-right detection-output panels were acquired at Qianwan Terminal, Port of Qingdao, China. All port photographs shown throughout this article share this source and are reproduced with written permission for journal publication. Detection overlays, annotations, and heatmaps were generated in this study. MG-CTI: Mask-guided cross-task interaction; STFF: scale-tuned feature fusion; Conv: convolution; BBox: bounding box; BN: batch normalization; Cls: classification; SiLU: sigmoid linear unit.</p>
          </caption>
          <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="ir6036.fig.1.jpg" />
        </fig>
        <p><disp-formula> <label>(1)</label> <tex-math id="E1"> $$  \mathcal{F}
=
\{\mathbf{F}_i\}_{i=3}^{5}
=
\mathcal{N}_{\mathrm{STFF}}
\left(
\mathcal{B}(\mathbf{I})
\right),
\quad
\mathbf{F}_i
\in
\mathbb{R}^{B\times C_i\times H_i\times W_i}, $$ </tex-math></disp-formula></p>
        <p>where <bold>F</bold><sub>3</sub>, <bold>F</bold><sub>4</sub>, and <bold>F</bold><sub>5</sub> denote feature maps with different spatial resolutions and semantic levels, thereby providing a unified multi-scale representation for defect localization and container-surface modeling.</p>
        <p>On top of the shared features, the dual-task head decouples defect detection and container-surface segmentation. The detection branch predicts five-category defect bounding boxes and class scores from the multi-scale features. In parallel, the segmentation branch estimates the valid container-surface mask by generating mask prototypes from the high-resolution feature and combining them with mask coefficients predicted from the multi-scale features. This design enables the two tasks to share common visual representations while maintaining task-specific prediction parameters.</p>
        <p>However, the two branches are not treated as independent parallel outputs. In the dual-task head, the segmentation-derived container-surface prior guides the detection features, while the detection branch returns defect-related responses to refine the segmentation prototype. STFF operates upstream in the neck and does not receive the segmentation prediction, mask prototype, or the prior generated by MG-CTI. Accordingly, the dual-task prediction process can be compactly formulated as</p>
        <p><disp-formula> <label>(2)</label> <tex-math id="E1"> $$  \begin{aligned}
\hat{\mathcal{Y}}_{\mathrm{det}}
&amp;=
\mathcal{H}_{\mathrm{det}}
\left(
\Phi_{\mathrm{s2d}}(\mathcal{F},\mathbf{P})
\right), \\
\hat{\mathbf{M}}
&amp;=
\mathcal{H}_{\mathrm{seg}}
\left(
\mathcal{F},
\Phi_{\mathrm{d2s}}(\mathbf{P},\mathcal{R}_{\mathrm{det}})
\right),
\end{aligned} $$ </tex-math></disp-formula></p>
        <p>where <bold>P</bold> denotes the mask prototype generated by the segmentation branch, and <inline-formula><tex-math id="M1">$$ \mathcal{R} $$</tex-math></inline-formula><sub>det</sub> denotes the intermediate defect responses produced by the detection branch. As shown in Equation (2), Φ<sub>s2d</sub>(·) represents the segmentation-to-detection guidance that injects the container-surface prior into the detection features, whereas Φ<sub>d2s</sub>(·) represents the detection-to-segmentation refinement that updates the mask prototype using defect-related responses. Moreover, <inline-formula><tex-math id="M1">$$ \hat{\mathcal{Y}} $$</tex-math></inline-formula><sub>det</sub> denotes the detection predictions, including bounding boxes and class scores, and <inline-formula><tex-math id="M1">$$ \hat{\mathbf{M}} $$</tex-math></inline-formula> denotes the predicted container-surface mask.</p>
        <p>The two outputs describe different entities: detection predicts defect instances, while segmentation estimates their valid supporting surface. Relative to a shared-feature multi-task baseline with parallel heads, MG-CTI introduces explicit transfer of this surface representation into the detection features and complementary refinement of the mask prototype using defect responses. The prior is applied before the final detections are produced, using soft residual feature modulation rather than a binary mask applied to completed detections. At inference, the prior is predicted from image features; ground-truth surface annotations are used only for training and evaluation. The following subsections detail STFF and MG-CTI.</p>
      </sec>
      <sec id="sec2-2">
        <title>2.2. STFF module</title>
        <p>Container defects vary substantially in area, morphology, and appearance, and each semantic category may contain small, medium, and large instances under the Common Objects in Context (COCO) area bins. Compact instances depend strongly on fine spatial cues, whereas spatially extended instances require broader context and stable region-level representations. STFF therefore retains local evidence while aggregating wider contextual cues. Its scale embedding identifies the fusion level, and its attention and shared-feature gates modulate the fused representation before the task-specific heads. STFF does not use a task identity or task-conditioned inputs; instead, it produces a shared feature optimized by the joint detection–segmentation objective. As illustrated in <xref ref-type="fig" rid="fig2">Figures 2</xref> and <xref ref-type="fig" rid="fig3">3</xref>, STFF is inserted after feature concatenation in the FPN/PAN neck.</p>
        <fig id="fig2" position="float">
          <label>Figure 2</label>
          <caption>
            <p>Data flow of the proposed STFF module, where scale embedding, channel attention, multi-receptive-field spatial attention, shared-feature gating, and feature-derived coarse spatial modulation are integrated in a residual manner. STFF: Scale-tuned feature fusion; CA: channel attention; MLP: multilayer perceptron; MSA: multi-receptive-field spatial attention; CPM: coarse spatial modulation.</p>
          </caption>
          <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="ir6036.fig.2.jpg" />
        </fig>
        <fig id="fig3" position="float">
          <label>Figure 3</label>
          <caption>
            <p>Main functional components of STFF, including channel attention, feature-derived coarse spatial modulation, and multi-receptive-field spatial attention. STFF: Scale-tuned feature fusion; GAP: global average pooling; GMP: global maximum pooling; MLP: multilayer perceptron; CA: channel attention; CPM: coarse spatial modulation; MSA: multi-receptive-field spatial attention; Conv: convolution.</p>
          </caption>
          <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="ir6036.fig.3.jpg" />
        </fig>
        <p>The convolutional block attention module (CBAM)<sup>[<xref ref-type="bibr" rid="B24">24</xref>]</sup> sequentially derives channel and spatial attention from an intermediate feature map. STFF retains this established feature-reweighting idea but organizes it for the concatenation stages of the FPN/PAN neck: a learnable embedding identifies the fusion level, standard and dilated 3 × 3 branches provide local and wider spatial cues, and shared-feature and coarse spatial gates modulate a residual path with zero-initialized channel-wise coefficients. Compared with the backbone, pyramid, and head configuration of Fast-Solo<sup>[<xref ref-type="bibr" rid="B16">16</xref>]</sup>, STFF is a module applied after neck concatenation rather than a replacement instance-segmentation architecture. Its scale indicator denotes the feature-fusion level, not a physical defect-size class. The output is a shared feature; no segmentation prediction enters these gates. The distinction therefore lies in the fusion-level organization and residual modulation, while the supervised surface prior and its transfer are handled separately by MG-CTI.</p>
        <p>Let <bold>X</bold><italic><sub>l</sub></italic> denote the concatenated feature at the <italic>l</italic>-th fusion level. The channel-aligned and scale-embedded features are computed as</p>
        <p><disp-formula> <label>(3)</label> <tex-math id="E1"> $$  \bar{\mathbf{X}}_l
=
\phi_p(\mathbf{X}_l),
\quad
\mathbf{X}'_l
=
\bar{\mathbf{X}}_l+\mathbf{e}_l , $$ </tex-math></disp-formula></p>
        <p>where <italic>ϕ<sub>p</sub></italic>(·) denotes a 1 × 1 projection or an identity mapping, and <bold>e</bold><italic><sub>l</sub></italic> is a learnable embedding broadcast to the spatial size of <inline-formula><tex-math id="M1">$$ \bar{\mathbf{X}} $$</tex-math></inline-formula><italic><sub>l</sub></italic>. This operation provides an explicit level indicator for different fusion stages, enabling the module to distinguish features with different spatial resolutions and semantic levels.</p>
        <p>Based solely on the scale-embedded feature <bold>X</bold>′<italic><sub>l</sub></italic>, the channel, spatial, shared-feature, and coarse spatial modulation weights are computed as</p>
        <p><disp-formula> <label>(4)</label> <tex-math id="E1"> $$  \begin{aligned}
\mathbf{A}^{c}_l
&amp;=\sigma\!\left(f_c\!\left([\mathrm{GAP}(\mathbf{X}'_l),
\mathrm{GMP}(\mathbf{X}'_l)]\right)\right),\\
\mathbf{A}^{s}_l
&amp;=\sigma\!\left(f_s\!\left([\phi_{3}(\mathbf{X}'_l),
\phi_{d}(\mathbf{X}'_l),\mathrm{Avg}_{c}(\mathbf{X}'_l),
\mathrm{Max}_{c}(\mathbf{X}'_l)]\right)\right),\\
\mathbf{A}^{g}_l
&amp;=\sigma\left(f_g(\mathbf{X}'_l)\right),\qquad
\mathbf{A}^{p}_l=\sigma\left(f_p(\mathbf{X}'_l)\right),
\end{aligned} $$ </tex-math></disp-formula></p>
        <p>where GAP and GMP denote global average and maximum pooling, respectively, whereas Avg<italic><sub>c</sub></italic> and Max<italic><sub>c</sub></italic> compute channel-wise spatial statistics. The channel mapping <italic>f<sub>c</sub></italic>(·) uses a lightweight bottleneck transformation. The spatial mapping <italic>f<sub>s</sub></italic>(·) combines a standard 3 × 3 convolution <italic>ϕ</italic><sub>3</sub>(·), a dilated 3 × 3 convolution <italic>ϕ<sub>d</sub></italic>(·) with dilation 2, and channel-pooled cues to provide complementary local and contextual evidence for instances with different spatial extents. The mapping <italic>f<sub>g</sub></italic>(·) provides a learned gate for the shared feature supplied to the subsequent dual-task head. It receives only <bold>X</bold>′<italic><sub>l</sub></italic> and is jointly optimized by the detection and segmentation objectives; it does not use a task identifier, a task embedding, or separate task-conditioned inputs. The 1 × 1 mapping <italic>f<sub>p</sub></italic>(·) produces a coarse spatial modulation map directly from <bold>X</bold>′<italic><sub>l</sub></italic>. Importantly, <bold>A</bold><italic><sub>l</sub></italic><italic><sup>p</sup></italic> is an internally learned feature gate rather than a segmentation mask or an MG-CTI-derived container-surface prior; it receives no output from the segmentation head.</p>
        <p>Finally, the residual output of STFF is computed as</p>
        <p><disp-formula> <label>(5)</label> <tex-math id="E1"> $$  \begin{aligned}
\mathbf{Z}_l
&amp;=
\mathbf{X}'_l
\odot\mathbf{A}^{c}_l
\odot\mathbf{A}^{s}_l,\\
\mathbf{Y}_l
&amp;=
\mathbf{X}'_l
+
\boldsymbol{\gamma}_l\odot
\left[
\alpha_l\mathbf{Z}_l
\odot\mathbf{A}^{g}_l
\odot\left(1+\gamma_p\mathbf{A}^{p}_l\right)
\right],
\end{aligned} $$ </tex-math></disp-formula></p>
        <p>where <inline-formula><tex-math id="M1">$$ \odot $$</tex-math></inline-formula> denotes element-wise multiplication, <italic>α<sub>l</sub></italic> is a learnable scale-level coefficient, <bold><italic>γ</italic></bold><italic><sub>l</sub></italic> is a learnable channel-wise residual coefficient, and <italic>γ<sub>p</sub></italic> is a learnable scalar controlling the strength of the internal coarse spatial modulation. The initialization is <italic>α<sub>l</sub></italic> = 1, <bold><italic>γ</italic></bold><italic><sub>l</sub> </italic>= <bold>0</bold>, <italic>γ<sub>p</sub></italic> = 0, and <bold>e</bold><italic><sub>l</sub> </italic>= <bold>0</bold>. Thus, the residual modulation initially contributes zero and <bold>Y</bold><italic><sub>l</sub> </italic>= <italic>ϕ<sub>p</sub></italic>(<bold>X</bold><italic><sub>l</sub></italic>); this equals the original input when the channel-alignment projection <italic>ϕ<sub>p</sub></italic> is an identity mapping. The module subsequently learns the required modulation. As shown in Equation (5), the refinement follows the order of channel and multi-receptive-field spatial weighting, shared-feature gating, feature-derived coarse spatial modulation, and residual fusion. The output remains a shared feature, and task-specific representations are produced only by the subsequent detection and segmentation heads. No segmentation-derived signal enters this computation.</p>
      </sec>
      <sec id="sec2-3">
        <title>2.3. MG-CTI module</title>
        <p>Although STFF improves sensitivity to multi-scale cues in the neck, the spatial prior for defect localization originates from the container-surface segmentation branch. MG-CTI is therefore introduced into the dual-task head to establish lightweight bidirectional interaction. Its segmentation-to-detection path uses the learned surface prior to modulate detection features and reduce responses from non-container regions, while its detection-to-segmentation path feeds defect-related cues back to the segmentation branch to refine prototypes. This interaction improves background suppression and cross-task spatial consistency without changing the one-stage inference structure.</p>
        <p>For the segmentation-to-detection path, MG-CTI first predicts a container-surface prior logit from the raw mask prototype and then maps it to each detection scale to generate spatial gates. The gated detection feature is computed as</p>
        <p><disp-formula> <label>(6)</label> <tex-math id="E1"> $$  \mathbf{Q}=\psi_q(\mathbf{P}),\\
\mathbf{G}_i=
\sigma\!\left(
\phi_i\!\left(
\mathrm{Resize}(\mathbf{Q},H_i,W_i)
\right)
\right),\\
\mathbf{F}^{d}_i=
\mathbf{F}_i\odot
\left(
1+\beta_i(2\mathbf{G}_i-1)
\right),
\quad i\in\mathcal{S}, $$ </tex-math></disp-formula></p>
        <p>where <bold>P</bold> denotes the raw mask prototype, <italic>ψ<sub>q</sub></italic>(·) denotes the container-surface-prior prediction head, <bold>Q</bold> ∈ <inline-formula><tex-math id="M1">$$ \mathbb{R}^{B\times 1\times H_p \times W_p} $$</tex-math></inline-formula> is the container-surface prior logit, and <bold>G</bold><italic><sub>i</sub></italic> is the spatial gate for the <italic>i</italic>-th detection scale. <inline-formula><tex-math id="M1">$$ \mathcal{S} $$</tex-math></inline-formula> = {3, 4, 5} denotes the detection scale set, <italic>ϕ<sub>i</sub></italic>(·) is a scale-specific transformation, and <italic>β<sub>i</sub></italic> is a learnable scalar controlling the interaction strength. In implementation, <italic>β<sub>i</sub></italic> is initialized to zero, so the interaction path starts as an identity mapping. This residual gating does not directly remove background regions; instead, it adaptively reweights detection features according to the container-surface prior.</p>
        <p>For the detection-to-segmentation path, MG-CTI aggregates the multi-scale class responses from the detection branch into a defect-aware heat map. The response aggregation and prototype refinement are computed as</p>
        <p><disp-formula> <label>(7)</label> <tex-math id="E1"> $$  \mathbf{D}_i=
\max_{c} \sigma(\mathrm{sg}(\mathbf{C}_i)),\\
\mathbf{H}=
\frac{1}{|\mathcal{S}|}
\sum_{i\in\mathcal{S}}
\mathrm{Resize}
\left(\mathbf{D}_i,H_p,W_p\right),\\
\tilde{\mathbf{P}}=
\mathbf{P}
+
\lambda_r
\psi_r
\left(
[\mathbf{P},\mathbf{H}]
\right), $$ </tex-math></disp-formula></p>
        <p>where <bold>C</bold><italic><sub>i</sub></italic> is the class-logit map of the <italic>i</italic>-th detection scale, <bold>D</bold><italic><sub>i</sub></italic> denotes the corresponding defect-response map, and sg(·) denotes the stop-gradient operation. The stop-gradient operation prevents the prototype refinement path from interfering with the optimization of the detection classifier. <italic>ψ<sub>r</sub></italic>(·) denotes the prototype refinement mapping, and <italic>λ<sub>r</sub></italic> is a learnable residual coefficient initialized to zero to preserve the original prototype representation at the early training stage.</p>
        <p>The two paths in Equations (6) and (7) assign a specific meaning to the exchanged signals. The S → D gates are derived from a supervised container-surface representation and shared across defect categories; the D → S input is a class-aggregated, stop-gradient defect-response map that refines the mask prototype. These are complementary paths within the head, without iterative alternation between complete detection and segmentation passes. The interaction does not feed segmentation predictions back into STFF, and it preserves task-specific outputs and the one-stage inference pipeline. Relative to defect-segmentation–classification coupling<sup>[<xref ref-type="bibr" rid="B20">20</xref>]</sup>, MG-CTI exchanges a supporting-surface representation and dense defect-localization cues rather than using a defect mask for an image-level decision. Its S → D path modulates multi-scale detection features before box prediction, and its D → S path supplies detached detector class responses to prototype refinement. Gradient stopping is an established training operation; the specific design here is its placement on the returned defect-response signal, together with the distinct role of the supervised surface prior.</p>
      </sec>
      <sec id="sec2-4">
        <title>2.4. Loss function</title>
        <p>The proposed network is trained with a multi-task objective that jointly optimizes defect detection, container-surface segmentation, and surface-prior regularization. Since the detection branch follows the standard one-stage YOLO-style optimization, its loss is denoted by <inline-formula><tex-math id="M1">$$ \mathcal{L} $$</tex-math></inline-formula><italic><sub>det</sub></italic> and includes bounding-box regression, classification, and distributional localization terms. In this work, the main focus of the loss design lies in supervising the container-surface prior and enforcing its consistency with defect localization. The overall objective is defined as</p>
        <p><disp-formula> <label>(8)</label> <tex-math id="E1"> $$  \mathcal{L}
=
\mathcal{L}_{det}
+
\lambda_{seg}\mathcal{L}_{seg}
+
\lambda_{ctc}\mathcal{L}_{ctc}
+
\lambda_{eamr}\mathcal{L}_{eamr}, $$ </tex-math></disp-formula></p>
        <p>where <italic>λ<sub>seg</sub></italic>, <italic>λ<sub>ctc</sub></italic>, and <italic>λ<sub>eamr</sub></italic> control the contributions of the segmentation loss, the CTC loss, and the edge-aware mask refinement (EAMR) loss, respectively. In the final N, S, and X models, these weights are fixed to <italic>λ<sub>seg</sub></italic> = 0.25, <italic>λ<sub>ctc</sub></italic> = 0.5, and <italic>λ<sub>eamr</sub></italic> = 0.1, respectively. Uncertainty-based loss weighting is disabled, so these coefficients are not learned during training.</p>
        <p>For the segmentation branch, the objective is to learn a reliable representation of the valid container-surface region, which serves as the container-surface prior for subsequent defect localization. The segmentation loss is defined as</p>
        <p><disp-formula> <label>(9)</label> <tex-math id="E1"> $$  \mathcal{L}_{seg}
=
\lambda_{mask}\mathcal{L}_{mask}
+
\mathcal{L}_{aux}^{seg}, $$ </tex-math></disp-formula></p>
        <p>where <inline-formula><tex-math id="M1">$$ \mathcal{L} $$</tex-math></inline-formula><italic><sub>mask</sub></italic> directly supervises the reconstructed container-surface mask, while <inline-formula><tex-math id="M1">$$ \mathcal{L} $$</tex-math></inline-formula><italic><sub>aux</sub></italic><italic><sup>seg</sup></italic> denotes the auxiliary box, classification, and distributional localization terms used in the segmentation branch. The mask reconstruction term uses binary cross-entropy with <italic>λ<sub>mask</sub></italic> = 7.5. The complete intersection over union (CIoU) box-regression, binary cross-entropy (BCE) classification, and distribution focal loss (DFL) gains are 7.5, 0.5, and 1.5, respectively, in both <inline-formula><tex-math id="M1">$$ \mathcal{L} $$</tex-math></inline-formula><italic><sub>det</sub></italic> and the auxiliary terms <inline-formula><tex-math id="M1">$$ \mathcal{L} $$</tex-math></inline-formula><italic><sub>aux</sub></italic><italic><sup>seg</sup></italic>; the segmentation objective is additionally scaled by the outer weight <italic>λ<sub>seg</sub></italic>. The mask reconstruction term encourages the prototype-based mask prediction to match the ground-truth surface region. This supervision is essential because the learned mask prototype and the derived container-surface prior are later used by MG-CTI to guide detection features. Therefore, the segmentation loss is not merely an additional output constraint but also provides the basis for constructing a reliable container-surface prior.</p>
        <p>To reinforce the spatial agreement between annotated defect centers and the learned surface prior, a CTC loss is introduced. The underlying assumption is that real container defects should be located within the valid container-surface region. Thus, the container-surface prior generated by MG-CTI is expected to produce high responses at the centers of ground-truth defect boxes. Let <bold>Q</bold> denote the container-surface prior logit and let <bold>c</bold><italic><sub>j</sub> </italic>= (<italic>c<sub>j</sub><sup>x</sup></italic>, <italic>c<sub>j</sub><sup>y</sup></italic>) be the center of the <italic>j</italic>-th ground-truth defect box. The CTC loss is defined as</p>
        <p><disp-formula> <label>(10)</label> <tex-math id="E1"> $$  \mathcal{L}_{ctc}
=
-\frac{1}{N_d}
\sum_{j=1}^{N_d}
\log\left(
p_j+\epsilon
\right),\\
p_j=
\sigma\!\left(
\mathbf{Q}^{(b_j)}
\left(
\Pi(\mathbf{c}_j)
\right)
\right), $$ </tex-math></disp-formula></p>
        <p>where <italic>N<sub>d</sub></italic> is the number of ground-truth defect boxes, <italic>b<sub>j</sub></italic> is the image index of the <italic>j</italic>-th box, Π(·) maps the box center to the coordinate system of the container-surface prior map, <italic>p<sub>j</sub></italic> is the sampled prior response, and <italic>ϵ</italic> is a small constant for numerical stability. This term directly constrains the container-surface prior <bold>Q</bold> at defect-related positions and provides a more spatially consistent prior for subsequent detection guidance. Its effect on detection is indirect: the refined prior is transferred through MG-CTI to modulate detection features. CTC neither consumes detection predictions nor directly penalizes detector confidence outside the container surface.</p>
        <p>Although CTC constrains the container-surface prior at defect-related positions, it does not explicitly impose edge-level consistency along the annotated surface boundary. To provide complementary edge-aware supervision, the EAMR loss is defined as</p>
        <p><disp-formula> <label>(11)</label> <tex-math id="E1"> $$  \mathcal{L}_{eamr}
=
\mathrm{BCE}
\left(
\mathcal{E}(\sigma(\mathbf{Q})),
\mathbf{E}_{gt}
\right),\\
\mathbf{E}_{gt}
=
\mathbb{I}
[
\mathcal{E}(\mathbf{M})>\tau_{\mathrm{edge}}
], $$ </tex-math></disp-formula></p>
        <p>where <bold>M</bold> denotes the ground-truth container-surface mask resized to the resolution of <bold>Q</bold>, <inline-formula><tex-math id="M1">$$ \mathcal{E} $$</tex-math></inline-formula>(·) is the max-normalized Sobel edge operator applied to both the predicted surface probability map and the ground-truth mask, <inline-formula><tex-math id="M1">$$ \mathbb{I} $$</tex-math></inline-formula>[·] is the indicator function, and <bold>E</bold><italic><sub>gt</sub></italic> is the binary ground-truth edge map. The edge target threshold is fixed to <italic>τ</italic><sub>edge</sub> = 0.2, distinct from the detection confidence threshold used for evaluation. By penalizing disagreement between the predicted and annotated edge maps, <inline-formula><tex-math id="M1">$$ \mathcal{L} $$</tex-math></inline-formula><italic><sub>eamr</sub></italic> encourages surface-boundary consistency in the learned prior and thereby supports more spatially reliable mask-guided interaction.</p>
        <p>Together, these objectives optimize detection accuracy and the reliability of the learned container-surface prior. The segmentation loss provides region-level supervision, CTC encourages the prior to cover annotated defect centers, and EAMR promotes boundary consistency with the ground-truth surface mask. CTC affects detection indirectly through the prior and subsequent MG-CTI feature modulation. Both CTC and EAMR are training-time regularizers and introduce no additional loss computation during inference. The distinction of these regularizers lies in their supervised target: CTC encourages positive responses of the surface prior at annotated defect centers, while EAMR aligns edges of that prior with annotated surface boundaries. They do not introduce a new box-regression objective, Sobel operator, or binary cross-entropy formulation.</p>
      </sec>
    </sec>
    <sec id="sec3">
      <title>3. RESULTS</title>
      <p>The experiments evaluate three aspects of the proposed framework. First, comparisons with representative detectors assess detection accuracy and inference efficiency. Second, full-test-set false-positive and ROI-based analyses examine the suppression of invalid detections from non-container regions. Third, category-wise, scale-wise, and ablation studies analyze the contributions of STFF, MG-CTI, and the training objectives.</p>
      <sec id="sec3-1">
        <title>3.1. Dataset</title>
        <p>The experiments use a private container defect dataset comprising 4,000 distinct still images acquired by quay-crane cameras at Qianwan Terminal, Port of Qingdao, China. The images were obtained from the cooperating port with permission for research use and are subject to the applicable data-use and port-related confidentiality agreements. The authors selected and annotated these images from approximately 200,000 usable container-defect images acquired by this system over a two-year period. The data do not contain frames extracted from continuous videos or burst sequences and therefore include neither temporally adjacent frame pairs nor repeated video frames. The original 1,920 × 1,080 images cover diverse operating conditions, including complex backgrounds, occlusions, shadows, reflections, container textures, characters, and non-container structures. Defect instances are annotated with bounding boxes, and container-surface masks are available for all 4,000 images. During training and inference, each image is letterbox-resized to 640 × 640 with its aspect ratio preserved, and the bounding-box and mask annotations are transformed accordingly.</p>
        <p>Both defect bounding boxes and container-surface masks were manually annotated using Labelme by three research assistants. Image screening and defect identification followed the operational container-damage assessment criteria provided by the Business Department of the Port of Qingdao, with guidance from experienced tallying personnel. Annotation quality was reviewed daily: the team leader examined every image annotated that day, checked the defect-box and surface-mask annotations, and provided feedback for correction. The annotators revised the annotations in response to this feedback. This workflow combined business-defined damage criteria, expert guidance, and daily image-by-image review to support annotation consistency.</p>
        <p>The acquisition procedure did not repeatedly capture the same physical container or near-identical views of the same inspection event. Together with manual screening and annotation, this procedure ensured that the curated dataset contained no repeated observations of the same physical container. The curated images were then randomly divided into training and test sets at an 8:2 ratio, yielding 3,200 training images and 800 test images. Consequently, no physical container is represented in both subsets, and the training and test sets are independent at the container level. This fixed split is used in all comparative and ablation experiments. Both subsets originate from the same terminal; container-level independence therefore does not imply evaluation on an unseen port or entirely different inspection environments.</p>
        <p>During manual selection from the larger collection, particular attention was paid to retaining examples of less frequent defect categories to improve their representation in the annotated dataset. This selection-stage effort aimed to reduce underrepresentation but did not produce a balanced class distribution. The remaining imbalance is explicitly documented by the category counts below, and its implications are examined using the category-wise average precision (AP) results reported below.</p>
        <p>No explicit class-imbalance compensation was used during training: there was no minority-class oversampling, class-balanced sampling, or additional class-weighted loss. The effort to retain less frequent categories was confined to dataset selection.</p>
        <p>The original engineering labels are reorganized into five defect categories for detection evaluation: Deformation, Hole, Post Damage, Repair Patch, and Contamination. The corresponding instance counts are 2,364, 1,236, 483, 211, and 186, respectively, for a total of 4,480 annotated defect instances. Since an image may contain more than one defect, the total number of annotated instances can exceed the number of images. To reflect the spatial characteristics of container defects, these categories are further described using region-aware subtypes. Specifically, Deformation includes Door Deformation and Side Deformation; Hole includes Door Hole, Side Hole, and Roof Hole; Post Damage corresponds to Corner Post Damage; Repair Patch consists of Side Repair Patch and Roof Repair Patch; and Contamination includes Door Contamination and Side Contamination. This five-category protocol is used consistently in all detection-related experiments. These labels encode semantic defect types rather than object scales and are independent of the COCO area bins for small, medium, and large instances; instances from any semantic category may fall into any of the three area ranges.</p>
        <p>
          <xref ref-type="fig" rid="fig4">Figure 4</xref> presents ten manually selected images to illustrate variation in defect appearance, scale, and acquisition conditions, together with the corresponding ground-truth annotations. The repair patches in the first, third, and fourth images of the top row range from small localized patches to an elongated repaired region, illustrating intra-class scale and shape variation. The second top-row image and the bottom row show holes with different sizes and contours; the first bottom-row image contains holes of several sizes within one view. Deformation and contamination annotations provide additional examples of semantic defect categories. The scenes also include backgrounds with colors similar to the container, nearby light sources, the ground, quay-crane supports, and container trucks. Machinery close to or partly obscuring the container boundary, particularly in the top-right image, illustrates the visibility challenges encountered during handling.</p>
        <fig id="fig4" position="float">
          <label>Figure 4</label>
          <caption>
            <p>Ten illustrative images from the private container defect dataset with ground-truth annotations, arranged in two rows of five. Cyan contours indicate container-surface mask boundaries; colored rectangles indicate defect annotations (orange: Deformation; green: Hole; magenta: Repair Patch; red: Contamination). The examples show variation in defect scale and shape, illumination, viewpoint, and background clutter. They are selected illustrations rather than a statistically representative sample.</p>
          </caption>
          <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="ir6036.fig.4.jpg" />
        </fig>
        <p>The cyan contours in <xref ref-type="fig" rid="fig4">Figure 4</xref> trace the ground-truth container-surface mask boundaries, while the colored rectangles mark annotated defect instances. These overlays show how the surface annotation distinguishes the container region from surrounding equipment and background structures. The images were selected to illustrate these conditions rather than sampled to estimate their prevalence; they do not constitute a statistically representative subset or establish detection performance. The full category distribution is reported separately in <xref ref-type="fig" rid="fig5">Figure 5</xref>.</p>
        <fig id="fig5" position="float">
          <label>Figure 5</label>
          <caption>
            <p>Region-aware defect label distribution of the container defect dataset.</p>
          </caption>
          <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="ir6036.fig.5.jpg" />
        </fig>
        <p>As shown in <xref ref-type="fig" rid="fig5">Figure 5</xref>, the region-aware label distribution reports the number of instances for each subtype, with consistent colors and patterns indicating the corresponding five major defect categories.</p>
      </sec>
      <sec id="sec3-2">
        <title>3.2. Evaluation metrics</title>
        <p>Defect detection is evaluated using the official COCO evaluation protocol<sup>[<xref ref-type="bibr" rid="B25">25</xref>]</sup>. AP denotes mean average precision over ten intersection over union (IoU) thresholds from 0.50 to 0.95 in increments of 0.05, while AP<sub>50</sub> and AP<sub>75</sub> are computed at fixed IoU thresholds of 0.50 and 0.75. Scale-wise AP<italic><sub>s</sub></italic>, AP<italic><sub>m</sub></italic>, and AP<italic><sub>l</sub></italic> use the original-image bounding-box area <italic>A</italic> and the standard pycocotools areaRng bins: small over [0, 32<sup>2</sup>], medium over [32<sup>2</sup>, 96<sup>2</sup>], and large from 96<sup>2</sup> upward. Endpoint handling follows the implementation, which includes the shared boundary values in adjacent ranges. The corresponding scale-wise average recall (AR) values, AR<italic><sub>s</sub></italic>, AR<italic><sub>m</sub></italic>, and AR<italic><sub>l</sub></italic>, are also reported. The 640 × 640 letterbox transformation is used only for model input and geometric mapping and does not redefine the area bins, which remain independent of the five semantic defect categories.</p>
        <p>The dataset exhibits both inter-class and intra-class scale variation: defects from different semantic categories, as well as instances within the same category, can occupy substantially different image areas. Such variation reflects differences in actual defect extent, imaging distance, viewpoint, and position on the container surface. Accordingly, the COCO area bins provide standardized image-space evaluation intervals for cross-scale detection capability, rather than engineering categories with fixed physical dimensions. Even at the original 1,920 × 1,080 resolution, the pixel-area thresholds do not imply a one-to-one correspondence with physical defect sizes in container inspection.</p>
        <p>Port inspection requires locating physical defects and limiting background alarms. Class-agnostic overall missed detection rate (OMD) and false positives per image (FPPI) assess these operational requirements, complemented by outside-ROI detection ratio (ODR) for spatial consistency and class-aware AP for detection quality. The OMD is defined as the following instance-level, class-agnostic metric:</p>
        <p><disp-formula> <label>(12)</label> <tex-math id="E1"> $$  \mathrm{OMD}
=
\frac{N_{\mathrm{miss}}^{def}}{N_{\mathrm{all}}^{def}}, $$ </tex-math></disp-formula></p>
        <p>where <italic>N</italic><sub>all</sub><italic><sup>def</sup></italic> is the total number of ground-truth defect instances and <italic>N</italic><sub>miss</sub><italic><sup>def</sup></italic> is the number that remain unmatched. Confidence-ranked predictions are greedily matched to ground-truth boxes one-to-one at IoU ≥ 0.50, with each prediction and instance matched at most once. Matching is class-agnostic because the engineering objective is to determine whether a physical defect region is localized. OMD is computed from final post-non-maximum suppression (NMS) detections at the fixed confidence threshold <italic>τ</italic> = 0.25 and should not be interpreted as an image-level complete-miss rate.</p>
        <p>Model complexity and inference efficiency are also important for quay-crane-side inspection. Parameter count, floating-point operations (FLOPs), and per-image latency are therefore reported with the COCO metrics to assess storage cost, computational demand, and runtime efficiency.</p>
        <p>Container-surface segmentation is an auxiliary task that supplies spatial guidance for defect detection. Surface IoU is therefore reported to quantify the overlap of the predicted surface mask with its annotation and is computed as</p>
        <p><disp-formula> <label>(13)</label> <tex-math id="E1"> $$  \mathrm{IoU}_{surface}
=
\frac{1}{K}
\sum_{k=1}^{K}
\frac{
|\hat{\mathbf{M}}_k\cap\mathbf{M}_k|
}{
|\hat{\mathbf{M}}_k\cup\mathbf{M}_k|
}, $$ </tex-math></disp-formula></p>
        <p>where <inline-formula><tex-math id="M1">$$ \hat{\mathbf{M}} $$</tex-math></inline-formula><italic><sub>k</sub></italic> and <bold>M</bold><italic><sub>k</sub></italic> denote the predicted and ground-truth container-surface masks of the <italic>k</italic>-th image, respectively. Here, <italic>K</italic> = 800 because every test image has a valid surface annotation. Predicted masks are binarized at 0.50 and mapped through the same letterbox geometry as the ground truth. The reported value is the mean per-image foreground IoU for a binary surface mask, rather than a class-wise mean IoU over multiple semantic categories. Because Surface IoU measures region overlap rather than boundary alignment, it is not interpreted as a direct boundary-accuracy metric. Surface IoU is available only for segmentation-enabled models; pure detectors are marked as “-”.</p>
        <p>For the ablation study only, Boundary IoU<sup>[<xref ref-type="bibr" rid="B26">26</xref>]</sup> complements Surface IoU by evaluating boundary alignment. For a binary mask <italic>M</italic>, let <italic>B<sub>d</sub></italic>(<italic>M</italic>) be its inner boundary band obtained by subtracting its erosion of width <italic>d</italic>. Boundary IoU is the intersection-over-union of <italic>B<sub>d</sub></italic>(<inline-formula><tex-math id="M1">$$ \hat{M} $$</tex-math></inline-formula>) and <italic>B<sub>d</sub></italic>(<italic>M</italic>). Prediction and ground truth are compared at the original image resolution using the same 0.50 mask threshold and inverse-letterbox mapping as Surface IoU, with <italic>d</italic> = max(1, round(0.02<inline-formula><tex-math id="M1">$$ \sqrt{H^2+W^2}  $$</tex-math></inline-formula>)) pixels for image height <italic>H</italic> and width <italic>W</italic>. The per-image scores are averaged over the 800 test images and reported as percentages, with mean and standard deviation across the three training runs. This auxiliary metric is restricted to the segmentation-enabled ablations reported below; detection remains the primary evaluation task.</p>
        <p>Both mask metrics evaluate the reconstructed surface prediction <inline-formula><tex-math id="M1">$$ \hat{\mathbf{M}} $$</tex-math></inline-formula>, rather than directly measuring the intermediate prior logit <bold>Q</bold> or its detection-guidance effect. The latter is assessed through detection and false-alarm metrics in the controlled ablations. Accordingly, mask overlap and boundary results are interpreted as auxiliary evidence within the framework, without claiming superiority over dedicated surface-segmentation methods.</p>
        <p>To evaluate false-positive suppression without constructing an additional hard-negative subset, FPPI is defined over the complete test set as</p>
        <p><disp-formula> <label>(14)</label> <tex-math id="E1"> $$  \mathrm{FPPI}
=
\frac{N_{\mathrm{unmatched}}^{pred}}{N_{\mathrm{test}}^{img}}, $$ </tex-math></disp-formula></p>
        <p>where <italic>N</italic><sub>test</sub><italic><sup>img</sup></italic> is the total number of test images and <italic>N</italic><sub>unmatched</sub><italic><sup>pred</sup></italic> is the number of post-NMS predictions that remain unmatched after the same class-agnostic one-to-one matching used for OMD. Thus, OMD counts unmatched ground-truth defects, whereas FPPI counts unmatched predictions and normalizes them by the number of evaluated images. A lower FPPI indicates fewer unmatched predictions per inspection image under this class-agnostic protocol.</p>
        <p>Because OMD and FPPI use class-agnostic matching, a prediction with an incorrect defect label can still be matched if its box satisfies the localization criterion. These metrics assess defect-region localization and unmatched predictions, and their improvement does not by itself establish better defect classification. Category-aware detection performance is evaluated using COCO AP, AP<sub>50</sub>, AP<sub>75</sub>, and the category-wise AP reported below, for which matching requires category consistency. These AP measures reflect both classification and localization quality rather than standalone classification accuracy.</p>
        <p>To quantify the spatial validity of final detections without relying on architecture-specific internal feature points, the ODR is defined from post-NMS prediction boxes as</p>
        <p><disp-formula> <label>(15)</label> <tex-math id="E1"> $$  \mathrm{ODR}
=
\frac{N_{\mathrm{pred}}^{out}}{N_{\mathrm{pred}}^{all}}, $$ </tex-math></disp-formula></p>
        <p>where <italic>N</italic><sub>pred</sub><italic><sup>all</sup></italic> is the total number of post-NMS predictions with confidence not lower than <italic>τ</italic> on test images with valid container-surface annotations, and <italic>N</italic><sub>pred</sub><italic><sup>out</sup></italic> counts predictions whose bounding-box centers lie outside the ground-truth container-surface mask. The ground-truth mask is used only as an offline evaluation ROI and never guides model inference. Consequently, ODR can be computed identically for YOLO-, DETR-, and segmentation-enabled models. A lower ODR indicates a smaller proportion of final predictions whose box centers lie outside the annotated container surface. OMD, FPPI, and ODR respectively characterize instance-level misses, the average number of false detections per test image, and the spatial distribution of final detections; all three use <italic>τ</italic> = 0.25 and NMS IoU 0.7, whereas COCO AP and scale-wise average recall (AR) use the complete confidence ranking. In the tables, OMD, Surface IoU, and ODR are reported as percentages, while FPPI is reported in boxes per image.</p>
        <p>The center-based criterion provides a simple, architecture-independent measure of prediction-location consistency. In oblique views, an axis-aligned box around a valid defect near the surface boundary may include background, so a fixed surface-coverage threshold could penalize otherwise valid localization. However, a box centered inside the surface may still extend substantially outside it, and predictions near the boundary are sensitive to mask annotation accuracy. ODR is therefore an auxiliary measure of box-center spatial consistency, not a comprehensive measure of all spatially invalid detections. The fraction of predicted box area inside the surface mask could provide a complementary assessment in future work.</p>
      </sec>
      <sec id="sec3-3">
        <title>3.3. Implementation details</title>
        <p>The proposed method is implemented in PyTorch 2.5.0 with CUDA 12.4. All experiments are conducted on a server equipped with two NVIDIA GeForce RTX 4090 D GPUs, each with 24 GB of memory. All baseline models are trained by the authors on the study dataset; the comparison does not use performance values copied from previous studies. All methods use the same 3,200/800 training/test split, input resolution of 640 × 640, and evaluation protocol.</p>
        <p>CSG-YOLO and the YOLO-series baselines are trained from scratch with randomly initialized weights, without loading pretrained weights. These models use a common training protocol: 600 epochs, a global batch size of 16, and automatic mixed-precision (AMP) training. The initial learning rate is 0.01 with a 3-epoch warmup. Under the adopted Ultralytics automatic configuration, AdamW is selected as the optimizer. The mosaic and copy-paste probabilities are 1.0 and 0.1, respectively, and the random scaling factor is 0.5. Mosaic augmentation is disabled during the final 10 epochs. These shared settings support the direct comparison of CSG-YOLO with the underlying YOLOv12 architecture and the other YOLO-series baselines.</p>
        <p>The detection transformer (DETR)-based baselines, including RT-DETR, RT-DETRv2, D-FINE, DEIM, RF-DETR, and MI-DETR, are trained on the same study dataset using the pretrained initialization specified by their respective official implementations. Their optimizer, learning-rate schedule, training duration, batch size, and data-augmentation strategy follow the corresponding official training configurations rather than the shared YOLO protocol. Retaining these architecture-specific initialization and optimization strategies is intended to accommodate the different convergence requirements of the models within the available data and computational budget. The experimental protocol therefore ensures consistent data partitioning, input resolution, and evaluation conditions while preserving architecture-specific training strategies. Cross-family comparisons should be interpreted as comparisons under the respective training recipes, rather than as experiments controlling all initialization and optimization variables.</p>
        <p>For the custom modules, the following settings are shared by the final N, S, and X models. STFF is inserted at four fusion stages: FPN-P4, FPN-P3, PAN-P4, and PAN-P5. For an aligned feature with <italic>C</italic> channels, the channel bottleneck uses reduction ratio <italic>r</italic> = 8 and max(8, <italic>C</italic>/8) hidden channels. Its standard and dilated 3 × 3 spatial branches each use max(<italic>C</italic>/4,8) channels, with dilation 2 in the latter. Each fusion stage has a learnable scale embedding initialized to zero. The scale-level coefficient <italic>α<sub>l</sub></italic> is initialized to 1, whereas the channel-wise residual coefficient <bold><italic>γ</italic></bold><italic><sub>l</sub></italic> and coarse spatial modulation coefficient <italic>γ<sub>p</sub></italic> are initialized to zero, as specified in Equation (5).</p>
        <p>The segmentation head uses 32 mask-prototype channels and 256 hidden channels in the prototype generator. The surface-prior head <italic>ψ<sub>q</sub></italic> consists of a 3 × 3 convolution from 32 to 64 channels with batch normalization and sigmoid linear unit (SiLU) activation, followed by a 1 × 1 convolution from 64 to 1 channel. At each detection level P3-P5, the prior is refined before gate generation by a residual block comprising a 3 × 3 convolution from 1 to 8 channels, SiLU, and a 1 × 1 convolution from 8 to 1 channel. The segmentation-to-detection gate uses a 3 × 3 convolution followed by a sigmoid. The learnable gate coefficients <italic>β<sub>i</sub></italic> and prototype-refinement coefficient <italic>λ<sub>r</sub></italic> are initialized to zero. The detection-to-segmentation heat map uses the maximum sigmoid class response at each level, resized to the prototype resolution and averaged across levels, with the stop-gradient operation shown in Equation (7). CTC and EAMR operate on the base surface-prior map at one-quarter of the input spatial resolution.</p>
        <p>The detection and segmentation auxiliary heads use task-aligned learning (TAL)-based label assignment with top-<italic>k</italic> = 10 and alignment exponents <italic>α</italic><sub>TAL</sub> = 0.5 and <italic>β</italic><sub>TAL</sub> = 6.0. The distributional regression setting is reg_max = 16. These label-assignment exponents are separate from the learnable STFF and MG-CTI interaction coefficients. The fixed loss weights and EAMR edge threshold are specified alongside Equations (8), (9) and (11), respectively.</p>
        <p>To assess variation across training runs, the YOLOv12-N/S/X and CSG-YOLO-N/S/X configurations, the main component ablations, the internal STFF ablations, and the auxiliary-loss weight settings are evaluated over three independent training runs using randomly generated seeds. The dataset split and training and evaluation settings are kept fixed for each configuration across runs. The auxiliary-loss sensitivity check reuses the same set of three seeds across weight settings. For these repeated configurations, the overall comparison and ablation analyses report means and standard deviations where indicated. The YOLOv12-N/S/X and CSG-YOLO-N/S/X entries in the engineering-oriented, category-wise, and scale-wise comparisons report the corresponding three-run means, with standard deviations omitted for conciseness. Other detector baselines retain the single-run results obtained by the authors. The YOLOv12-N and CSG-YOLO-N entries in the engineering-oriented comparison correspond to A0 and A10 in the subsequent ablation study, where their standard deviations are provided.</p>
        <p>During inference, the IoU threshold of NMS is set to 0.7. The engineering-oriented OMD, FPPI, and ODR metrics use a fixed confidence threshold of 0.25 for every model, while COCO AP and AR retain confidence-ranked predictions. Inference latency is measured on a single RTX 4090 D GPU at an input resolution of 640 × 640 using 16-bit floating-point precision (FP16) and a batch size of 1 after warm-up, and is reported as the average time per image. The same inference configuration is used for all compared models unless otherwise specified.</p>
        <p>Throughout the tables, boldface identifies the best reported central value within the comparison scope stated in each table note, including ties at the displayed precision. It does not indicate statistical significance or rank the reported standard deviations.</p>
      </sec>
      <sec id="sec3-4">
        <title>3.4. Overall comparison with representative detectors</title>
        <p>
          <xref ref-type="table" rid="t1">Table 1</xref> compares CSG-YOLO with representative detectors in model complexity, latency, and COCO accuracy. The YOLO-family baselines include YOLOv10<sup>[<xref ref-type="bibr" rid="B27">27</xref>]</sup>, YOLO11<sup>[<xref ref-type="bibr" rid="B28">28</xref>]</sup>, YOLOv12<sup>[<xref ref-type="bibr" rid="B23">23</xref>]</sup>, YOLOv13<sup>[<xref ref-type="bibr" rid="B29">29</xref>]</sup>, and YOLO26<sup>[<xref ref-type="bibr" rid="B30">30</xref>]</sup>; the transformer-based baselines include RT-DETR<sup>[<xref ref-type="bibr" rid="B31">31</xref>]</sup>, RT-DETRv2<sup>[<xref ref-type="bibr" rid="B32">32</xref>]</sup>, D-FINE<sup>[<xref ref-type="bibr" rid="B33">33</xref>]</sup>, DEIM<sup>[<xref ref-type="bibr" rid="B34">34</xref>]</sup>, RF-DETR<sup>[<xref ref-type="bibr" rid="B35">35</xref>]</sup>, and MI-DETR<sup>[<xref ref-type="bibr" rid="B36">36</xref>]</sup>. Method suffixes denote model scale or backbone, including “-N” (nano), “-S” (small), “-X” (extra-large), “-R18” (ResNet-18), and “-R50” (ResNet-50). The single internal rule after CSG-YOLO-S separates the deployment-oriented group below 50 GFLOPs from models requiring at least 50 GFLOPs. This partition organizes the comparison by computational demand, while measured latency provides the direct runtime assessment. The engineering-oriented results are reported separately in <xref ref-type="table" rid="t2">Table 2</xref>.</p>
        <table-wrap id="t1">
          <label>Table 1</label>
          <caption>
            <p>Overall comparison with representative detectors</p>
          </caption>
          <table frame="hsides" rules="groups">
            <thead>
              <tr>
                <td style="border-bottom:1;">
                  <bold>Method</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>Params (M)</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>FLOPs (G)</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>Latency (ms) ↓</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>AP</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>AP<sub>50</sub></bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>AP<sub>75</sub></bold>
                </td>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>YOLOv10-N</td>
                <td>
                  <bold>2.3</bold>
                </td>
                <td>6.7</td>
                <td>21.08</td>
                <td>53.9</td>
                <td>88.5</td>
                <td>56.1</td>
              </tr>
              <tr>
                <td>YOLOv10-S</td>
                <td>7.2</td>
                <td>21.6</td>
                <td>21.37</td>
                <td>56.4</td>
                <td>88.6</td>
                <td>63.1</td>
              </tr>
              <tr>
                <td>YOLO11-N</td>
                <td>2.6</td>
                <td>6.5</td>
                <td>
                  <bold>18.92</bold>
                </td>
                <td>57.4</td>
                <td>91.1</td>
                <td>63.7</td>
              </tr>
              <tr>
                <td>YOLO11-S</td>
                <td>9.4</td>
                <td>21.5</td>
                <td>19.12</td>
                <td>57.6</td>
                <td>91.9</td>
                <td>
                  <bold>66.7</bold>
                </td>
              </tr>
              <tr>
                <td>YOLOv12-N</td>
                <td>2.6</td>
                <td>6.5</td>
                <td>23.97</td>
                <td>55.7 ± 0.2</td>
                <td>89.8 ± 0.2</td>
                <td>60.9 ± 0.3</td>
              </tr>
              <tr>
                <td>YOLOv12-S</td>
                <td>9.3</td>
                <td>21.4</td>
                <td>24.26</td>
                <td>57.4 ± 0.3</td>
                <td>93.1 ± 0.2</td>
                <td>64.5 ± 0.2</td>
              </tr>
              <tr>
                <td>YOLOv13-N</td>
                <td>2.5</td>
                <td>6.4</td>
                <td>32.56</td>
                <td>54.9</td>
                <td>89.6</td>
                <td>58.4</td>
              </tr>
              <tr>
                <td>YOLOv13-S</td>
                <td>9.0</td>
                <td>20.8</td>
                <td>32.81</td>
                <td>58.2</td>
                <td>92.4</td>
                <td>61.9</td>
              </tr>
              <tr>
                <td>YOLO26-N</td>
                <td>2.4</td>
                <td>
                  <bold>5.4</bold>
                </td>
                <td>30.32</td>
                <td>57.6</td>
                <td>92.9</td>
                <td>63.5</td>
              </tr>
              <tr>
                <td>YOLO26-S</td>
                <td>9.5</td>
                <td>20.7</td>
                <td>31.58</td>
                <td>58.4</td>
                <td>92.7</td>
                <td>63.2</td>
              </tr>
              <tr>
                <td>D-FINE-N</td>
                <td>3.8</td>
                <td>7.2</td>
                <td>29.47</td>
                <td>56.9</td>
                <td>92.4</td>
                <td>60.4</td>
              </tr>
              <tr>
                <td>D-FINE-S</td>
                <td>10.2</td>
                <td>25.2</td>
                <td>39.73</td>
                <td>58.1</td>
                <td>91.2</td>
                <td>61.8</td>
              </tr>
              <tr>
                <td>DEIM-N</td>
                <td>3.7</td>
                <td>7.1</td>
                <td>29.54</td>
                <td>57.4</td>
                <td>92.2</td>
                <td>63.5</td>
              </tr>
              <tr>
                <td>DEIM-S</td>
                <td>9.5</td>
                <td>24.7</td>
                <td>40.46</td>
                <td>58.3</td>
                <td>91.6</td>
                <td>64.0</td>
              </tr>
              <tr>
                <td>CSG-YOLO-N</td>
                <td>6.2</td>
                <td>16.3</td>
                <td>26.68</td>
                <td>58.1 ± 0.2</td>
                <td>93.0 ± 0.2</td>
                <td>65.0 ± 0.3</td>
              </tr>
              <tr>
                <td>CSG-YOLO-S</td>
                <td>19.5</td>
                <td>40.7</td>
                <td>37.14</td>
                <td>58.6 ± 0.2</td>
                <td>93.7 ± 0.3</td>
                <td>64.6 ± 0.3</td>
              </tr>
              <tr>
                <td>RT-DETR-R18</td>
                <td>
                  <bold>20.0</bold>
                </td>
                <td>
                  <bold>60.2</bold>
                </td>
                <td>39.46</td>
                <td>57.7</td>
                <td>91.8</td>
                <td>62.2</td>
              </tr>
              <tr>
                <td>RT-DETRv2-R18</td>
                <td>40.0</td>
                <td>
                  <bold>60.2</bold>
                </td>
                <td>
                  <bold>20.42</bold>
                </td>
                <td>55.0</td>
                <td>88.1</td>
                <td>58.7</td>
              </tr>
              <tr>
                <td>RF-DETR-N</td>
                <td>29.1</td>
                <td>76.8</td>
                <td>23.82</td>
                <td>57.8</td>
                <td>92.7</td>
                <td>62.6</td>
              </tr>
              <tr>
                <td>RF-DETR-S</td>
                <td>32.1</td>
                <td>78.0</td>
                <td>26.01</td>
                <td>58.3</td>
                <td>93.6</td>
                <td>65.3</td>
              </tr>
              <tr>
                <td>RF-DETR-XL</td>
                <td>33.9</td>
                <td>94.9</td>
                <td>27.76</td>
                <td>59.6</td>
                <td>93.3</td>
                <td>
                  <bold>66.9</bold>
                </td>
              </tr>
              <tr>
                <td>YOLOv10-X</td>
                <td>29.5</td>
                <td>160.4</td>
                <td>42.25</td>
                <td>57.9</td>
                <td>92.6</td>
                <td>65.4</td>
              </tr>
              <tr>
                <td>YOLO11-X</td>
                <td>56.9</td>
                <td>194.9</td>
                <td>49.76</td>
                <td>59.8</td>
                <td>93.8</td>
                <td>63.9</td>
              </tr>
              <tr>
                <td>YOLOv12-X</td>
                <td>59.1</td>
                <td>199.0</td>
                <td>57.61</td>
                <td>59.8 ± 0.1</td>
                <td>93.4 ± 0.3</td>
                <td>65.5 ± 0.3</td>
              </tr>
              <tr>
                <td>YOLOv13-X</td>
                <td>64.0</td>
                <td>199.2</td>
                <td>66.68</td>
                <td>58.8</td>
                <td>93.7</td>
                <td>63.0</td>
              </tr>
              <tr>
                <td>YOLO26-X</td>
                <td>55.7</td>
                <td>193.9</td>
                <td>45.21</td>
                <td>59.2</td>
                <td>92.9</td>
                <td>63.5</td>
              </tr>
              <tr>
                <td>MI-DETR-R50</td>
                <td>76.2</td>
                <td>299.2</td>
                <td>66.71</td>
                <td>56.7</td>
                <td>92.8</td>
                <td>61.7</td>
              </tr>
              <tr>
                <td>D-FINE-X</td>
                <td>61.6</td>
                <td>202.5</td>
                <td>60.58</td>
                <td>59.3</td>
                <td>92.6</td>
                <td>65.3</td>
              </tr>
              <tr>
                <td>DEIM-X</td>
                <td>60.6</td>
                <td>201.7</td>
                <td>61.61</td>
                <td>59.7</td>
                <td>92.8</td>
                <td>66.1</td>
              </tr>
              <tr>
                <td>CSG-YOLO-X</td>
                <td>106.9</td>
                <td>280.8</td>
                <td>53.28</td>
                <td>
                  <bold>60.0</bold> ± 0.4</td>
                <td>
                  <bold>94.1</bold> ± 0.1</td>
                <td>63.9 ± 0.5</td>
              </tr>
            </tbody>
          </table>
          <table-wrap-foot>
            <fn>
              <p>All comparative results reported here were obtained in this study on the private dataset; the cited baseline publications identify the model architectures rather than the source of these measured values. Accuracy entries with ± report the mean and standard deviation over three independent training runs using randomly generated seeds; accuracy entries without ± retain the original single-run results. Bold values mark minimum Params, FLOPs, and latency and maximum AP metrics within each computational-demand group. AP<sub>50</sub> and AP<sub>75</sub> use IoU thresholds of 0.50 and 0.75. The internal rule separates models below 50 GFLOPs from those requiring at least 50 GFLOPs. Params: Parameters; M: million; FLOPs: floating-point operations; G: billion; AP: average precision; ↓: lower is better; IoU: intersection over union.</p>
            </fn>
          </table-wrap-foot>
        </table-wrap>
        <table-wrap id="t2">
          <label>Table 2</label>
          <caption>
            <p>Engineering-oriented missed-detection, surface-mask, and false-alarm metrics</p>
          </caption>
          <table frame="hsides" rules="groups">
            <thead>
              <tr>
                <td style="border-bottom:1;">
                  <bold>Method</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>OMD (%) ↓</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>Surface IoU (%) ↑</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>FPPI ↓</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>ODR (%) ↓</bold>
                </td>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>YOLOv10-N</td>
                <td>8.7</td>
                <td>-</td>
                <td>0.18</td>
                <td>0.9</td>
              </tr>
              <tr>
                <td>YOLOv10-S</td>
                <td>11.9</td>
                <td>-</td>
                <td>0.13</td>
                <td>0.5</td>
              </tr>
              <tr>
                <td>YOLO11-N</td>
                <td>5.4</td>
                <td>-</td>
                <td>0.17</td>
                <td>1.6</td>
              </tr>
              <tr>
                <td>YOLO11-S</td>
                <td>6.1</td>
                <td>-</td>
                <td>0.18</td>
                <td>0.8</td>
              </tr>
              <tr>
                <td>YOLOv12-N</td>
                <td>6.4</td>
                <td>-</td>
                <td>0.19</td>
                <td>1.8</td>
              </tr>
              <tr>
                <td>YOLOv12-S</td>
                <td>6.6</td>
                <td>-</td>
                <td>0.18</td>
                <td>1.3</td>
              </tr>
              <tr>
                <td>YOLOv13-N</td>
                <td>7.7</td>
                <td>-</td>
                <td>0.22</td>
                <td>1.3</td>
              </tr>
              <tr>
                <td>YOLOv13-S</td>
                <td>6.2</td>
                <td>-</td>
                <td>0.14</td>
                <td>1.7</td>
              </tr>
              <tr>
                <td>YOLO26-N</td>
                <td>5.2</td>
                <td>-</td>
                <td>0.15</td>
                <td>0.5</td>
              </tr>
              <tr>
                <td>YOLO26-S</td>
                <td>7.0</td>
                <td>-</td>
                <td>
                  <bold>0.07</bold>
                </td>
                <td>1.5</td>
              </tr>
              <tr>
                <td>D-FINE-N</td>
                <td>3.8</td>
                <td>-</td>
                <td>0.40</td>
                <td>2.4</td>
              </tr>
              <tr>
                <td>D-FINE-S</td>
                <td>4.7</td>
                <td>-</td>
                <td>0.42</td>
                <td>2.2</td>
              </tr>
              <tr>
                <td>DEIM-N</td>
                <td>
                  <bold>2.9</bold>
                </td>
                <td>-</td>
                <td>0.18</td>
                <td>0.7</td>
              </tr>
              <tr>
                <td>DEIM-S</td>
                <td>3.5</td>
                <td>-</td>
                <td>0.22</td>
                <td>0.8</td>
              </tr>
              <tr>
                <td>CSG-YOLO-N</td>
                <td>5.7</td>
                <td>76.7</td>
                <td>0.11</td>
                <td>
                  <bold>0.2</bold>
                </td>
              </tr>
              <tr>
                <td>CSG-YOLO-S</td>
                <td>6.0</td>
                <td>
                  <bold>77.9</bold>
                </td>
                <td>0.17</td>
                <td>0.4</td>
              </tr>
              <tr>
                <td>RT-DETR-R18</td>
                <td>11.5</td>
                <td>-</td>
                <td>0.33</td>
                <td>1.8</td>
              </tr>
              <tr>
                <td>RT-DETRv2-R18</td>
                <td>10.2</td>
                <td>-</td>
                <td>0.29</td>
                <td>1.9</td>
              </tr>
              <tr>
                <td>RF-DETR-N</td>
                <td>
                  <bold>3.7</bold>
                </td>
                <td>-</td>
                <td>0.10</td>
                <td>1.5</td>
              </tr>
              <tr>
                <td>RF-DETR-S</td>
                <td>4.3</td>
                <td>-</td>
                <td>0.08</td>
                <td>1.1</td>
              </tr>
              <tr>
                <td>RF-DETR-XL</td>
                <td>7.3</td>
                <td>-</td>
                <td>0.08</td>
                <td>1.3</td>
              </tr>
              <tr>
                <td>YOLOv10-X</td>
                <td>9.3</td>
                <td>-</td>
                <td>0.09</td>
                <td>1.8</td>
              </tr>
              <tr>
                <td>YOLO11-X</td>
                <td>5.4</td>
                <td>-</td>
                <td>0.20</td>
                <td>1.8</td>
              </tr>
              <tr>
                <td>YOLOv12-X</td>
                <td>5.6</td>
                <td>-</td>
                <td>0.16</td>
                <td>1.6</td>
              </tr>
              <tr>
                <td>YOLOv13-X</td>
                <td>6.2</td>
                <td>-</td>
                <td>0.11</td>
                <td>1.8</td>
              </tr>
              <tr>
                <td>YOLO26-X</td>
                <td>7.1</td>
                <td>-</td>
                <td>
                  <bold>0.07</bold>
                </td>
                <td>1.7</td>
              </tr>
              <tr>
                <td>MI-DETR-R50</td>
                <td>5.5</td>
                <td>-</td>
                <td>0.14</td>
                <td>1.9</td>
              </tr>
              <tr>
                <td>D-FINE-X</td>
                <td>5.2</td>
                <td>-</td>
                <td>0.17</td>
                <td>0.9</td>
              </tr>
              <tr>
                <td>DEIM-X</td>
                <td>4.9</td>
                <td>-</td>
                <td>0.16</td>
                <td>
                  <bold>0.3</bold>
                </td>
              </tr>
              <tr>
                <td>CSG-YOLO-X</td>
                <td>6.7</td>
                <td>
                  <bold>81.1</bold>
                </td>
                <td>0.14</td>
                <td>
                  <bold>0.3</bold>
                </td>
              </tr>
            </tbody>
          </table>
          <table-wrap-foot>
            <fn>
              <p>YOLOv12-N/S/X and CSG-YOLO-N/S/X entries report means over three independent training runs using randomly generated seeds; standard deviations are omitted for conciseness. Other detector entries retain the original single-run reference results. Bold values mark minimum OMD, FPPI, and ODR and maximum Surface IoU within each computational-demand group. The internal rule separates the two computational-demand groups. OMD: Overall missed detection rate; ↓: lower is better; IoU: intersection over union; ↑: higher is better; FPPI: false positives per image; ODR: outside-ROI detection ratio; ROI: region of interest; -: unavailable for pure detectors.</p>
            </fn>
          </table-wrap-foot>
        </table-wrap>
        <p>The joint detection–segmentation controls are reported in the subsequent ablation study: A2 combines defect detection and container-surface segmentation, while A3 additionally includes STFF. Both share the supervision and training protocol of the corresponding MG-CTI variants, separating joint-task supervision from explicit surface-prior transfer.</p>
        <p>Within the deployment-oriented group, CSG-YOLO-N achieves 58.1 ± 0.2 AP with 16.3 GFLOPs, exceeding YOLOv12-N by 2.4 AP, 3.2 AP<sub>50</sub> and 4.1 AP<sub>75</sub> in the three-run means at an additional cost of 9.8 GFLOPs. CSG-YOLO-S attains the highest reported AP and AP<sub>50</sub> central values in this group, whereas YOLO11-S retains the highest AP<sub>75</sub>. Relative to the corresponding YOLOv12 baselines, the mean AP gains of the N, S, and X variants are 2.4, 1.2, and 0.2 points, respectively, and their AP<sub>75</sub> changes are +4.1, +0.1, and -1.6 points. Thus, the strict-IoU localization gain is concentrated in the deployment-targeted N model rather than shared uniformly across scales. In the higher-compute group, CSG-YOLO-X has the highest reported AP and AP<sub>50</sub> central values, while RF-DETR-XL leads AP<sub>75</sub>. The 0.2-point mean AP gain of CSG-YOLO-X should be interpreted alongside its 0.4-point standard deviation; similarly, the 0.1-point AP<sub>75</sub> gain of the S variant is small relative to the reported variability. These descriptive comparisons do not establish statistical significance. Comparisons with other detector families retain the authors’ single-run results under the respective architecture-specific training recipes and should also be interpreted jointly with measured latency and model complexity.</p>
      </sec>
      <sec id="sec3-5">
        <title>3.5. False-positive suppression</title>
        <p>
          <xref ref-type="table" rid="t2">Table 2</xref> complements the COCO results with engineering-oriented measures of missed detections, false alarms, and spatial validity. It follows the method order and 50-GFLOP partition of <xref ref-type="table" rid="t1">Table 1</xref>. OMD measures class-agnostic missed defect instances, Surface IoU evaluates the predicted container-surface mask, FPPI counts unmatched detections per image, and ODR measures the proportion of final detections centered outside the ground-truth surface ROI. OMD, FPPI, and ODR use the same full-test-set post-processing protocol for every detector. Surface IoU is unavailable for pure detectors and is therefore marked as “-”.</p>
        <p>Relative to YOLOv12-N, CSG-YOLO-N reduces mean OMD from 6.4% to 5.7%, FPPI from 0.19 to 0.11 boxes per image, and ODR from 1.8% to 0.2%, while obtaining 76.7% mean Surface IoU. The corresponding three-run standard deviations are reported for A0 and A10 in the subsequent ablation study. Because OMD and FPPI use the same one-to-one matching results and the ground-truth surface mask is used only for offline ODR evaluation, these mean changes indicate better missed-detection control, fewer false alarms, and greater spatial validity of the final predictions.</p>
        <p>The changes are not uniform across model scales. Relative to YOLOv12-S, CSG-YOLO-S reduces mean OMD from 6.6% to 6.0%, FPPI from 0.18 to 0.17, and ODR from 1.3% to 0.4%. For the X variants, FPPI decreases from 0.16 to 0.14 and ODR from 1.6% to 0.3%, but OMD increases from 5.6% to 6.7%. Thus, the reduction in outside-surface predictions across the three scales does not imply a uniform reduction in missed defects, and the strongest combined improvement over the corresponding YOLOv12 baseline is observed for the N variant.</p>
        <p>CSG-YOLO does not attain the lowest OMD or FPPI among all compared detectors. In the below-50-GFLOP group, DEIM-N has the lowest reported OMD of 2.9%, while YOLO26-S has the lowest FPPI of 0.07. D-FINE-N illustrates a different operating balance, with a lower OMD than CSG-YOLO-N (3.8% <italic>vs.</italic> 5.7%) but higher FPPI (0.40 <italic>vs.</italic> 0.11). Conversely, YOLO26-S produces fewer unmatched predictions than CSG-YOLO-N but has higher OMD (7.0% <italic>vs.</italic> 5.7%). These descriptive comparisons show different miss and false-alarm balances at the chosen threshold; they do not establish a universally superior operating point. Since model confidence calibration can differ, using the same threshold of 0.25 does not provide a matched-FPPI comparison or a complete miss–false-alarm curve. The operating-point metrics should therefore be read alongside confidence-ranked AP and the training-protocol differences described in Section 3.3.</p>
      </sec>
      <sec id="sec3-6">
        <title>3.6. Category-wise and scale-wise analysis</title>
        <p>
          <xref ref-type="table" rid="t3">Table 3</xref> reports category-wise COCO AP results without repeating the overall detection metrics in <xref ref-type="table" rid="t1">Table 1</xref>. Its five columns correspond to semantic defect types and include all evaluated instances of each type regardless of bounding-box area. <xref ref-type="table" rid="t4">Table 4</xref>, in contrast, groups instances solely by the small, medium, and large COCO area ranges defined in Section 3.2, irrespective of semantic category. Thus, the category and size analyses are complementary but not interchangeable: a Hole or Repair Patch instance is not necessarily small, and a Deformation or Post Damage instance is not necessarily large. The compared methods remain consistent with the overall comparison, and the single internal horizontal rule after CSG-YOLO-S retains the same below-50 <italic>vs.</italic> at-least-50-GFLOP partition in both tables.</p>
        <table-wrap id="t3">
          <label>Table 3</label>
          <caption>
            <p>Category-wise AP comparison</p>
          </caption>
          <table frame="hsides" rules="groups">
            <thead>
              <tr>
                <td style="border-bottom:1;">
                  <bold>Method</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>Deformation</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>Hole</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>Post damage</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>Repair patch</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>Contamination</bold>
                </td>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>YOLOv10-N</td>
                <td>56.2</td>
                <td>50.2</td>
                <td>42.2</td>
                <td>47.6</td>
                <td>
                  <bold>73.4</bold>
                </td>
              </tr>
              <tr>
                <td>YOLOv10-S</td>
                <td>56.3</td>
                <td>50.7</td>
                <td>45.4</td>
                <td>57.1</td>
                <td>72.3</td>
              </tr>
              <tr>
                <td>YOLO11-N</td>
                <td>
                  <bold>59.7</bold>
                </td>
                <td>
                  <bold>56.1</bold>
                </td>
                <td>
                  <bold>50.4</bold>
                </td>
                <td>58.9</td>
                <td>61.9</td>
              </tr>
              <tr>
                <td>YOLO11-S</td>
                <td>57.5</td>
                <td>54.0</td>
                <td>47.5</td>
                <td>61.8</td>
                <td>67.1</td>
              </tr>
              <tr>
                <td>YOLOv12-N</td>
                <td>55.3</td>
                <td>51.5</td>
                <td>39.8</td>
                <td>62.2</td>
                <td>69.7</td>
              </tr>
              <tr>
                <td>YOLOv12-S</td>
                <td>56.9</td>
                <td>51.9</td>
                <td>45.0</td>
                <td>62.9</td>
                <td>70.3</td>
              </tr>
              <tr>
                <td>YOLOv13-N</td>
                <td>55.9</td>
                <td>49.6</td>
                <td>45.4</td>
                <td>52.1</td>
                <td>71.4</td>
              </tr>
              <tr>
                <td>YOLOv13-S</td>
                <td>56.5</td>
                <td>54.7</td>
                <td>48.3</td>
                <td>60.3</td>
                <td>71.0</td>
              </tr>
              <tr>
                <td>YOLO26-N</td>
                <td>55.6</td>
                <td>54.5</td>
                <td>43.8</td>
                <td>61.9</td>
                <td>72.1</td>
              </tr>
              <tr>
                <td>YOLO26-S</td>
                <td>56.2</td>
                <td>55.0</td>
                <td>46.8</td>
                <td>62.3</td>
                <td>71.8</td>
              </tr>
              <tr>
                <td>D-FINE-N</td>
                <td>57.9</td>
                <td>52.8</td>
                <td>37.2</td>
                <td>68.2</td>
                <td>68.5</td>
              </tr>
              <tr>
                <td>D-FINE-S</td>
                <td>59.3</td>
                <td>55.8</td>
                <td>39.1</td>
                <td>70.1</td>
                <td>66.0</td>
              </tr>
              <tr>
                <td>DEIM-N</td>
                <td>58.3</td>
                <td>53.3</td>
                <td>40.3</td>
                <td>68.9</td>
                <td>66.4</td>
              </tr>
              <tr>
                <td>DEIM-S</td>
                <td>59.1</td>
                <td>54.7</td>
                <td>39.1</td>
                <td>
                  <bold>72.9</bold>
                </td>
                <td>65.9</td>
              </tr>
              <tr>
                <td>CSG-YOLO-N</td>
                <td>57.3</td>
                <td>54.1</td>
                <td>47.1</td>
                <td>61.9</td>
                <td>70.4</td>
              </tr>
              <tr>
                <td>CSG-YOLO-S</td>
                <td>57.5</td>
                <td>52.2</td>
                <td>
                  <bold>50.4</bold>
                </td>
                <td>61.0</td>
                <td>71.6</td>
              </tr>
              <tr>
                <td>RT-DETR-R18</td>
                <td>56.7</td>
                <td>51.8</td>
                <td>43.0</td>
                <td>68.4</td>
                <td>68.8</td>
              </tr>
              <tr>
                <td>RT-DETRv2-R18</td>
                <td>51.9</td>
                <td>49.9</td>
                <td>37.2</td>
                <td>66.1</td>
                <td>69.7</td>
              </tr>
              <tr>
                <td>RF-DETR-N</td>
                <td>55.2</td>
                <td>55.0</td>
                <td>40.7</td>
                <td>
                  <bold>74.2</bold>
                </td>
                <td>63.9</td>
              </tr>
              <tr>
                <td>RF-DETR-S</td>
                <td>55.3</td>
                <td>55.5</td>
                <td>41.5</td>
                <td>71.1</td>
                <td>68.2</td>
              </tr>
              <tr>
                <td>RF-DETR-XL</td>
                <td>57.9</td>
                <td>56.6</td>
                <td>41.0</td>
                <td>72.3</td>
                <td>70.2</td>
              </tr>
              <tr>
                <td>YOLOv10-X</td>
                <td>55.8</td>
                <td>53.9</td>
                <td>48.2</td>
                <td>64.0</td>
                <td>67.8</td>
              </tr>
              <tr>
                <td>YOLO11-X</td>
                <td>
                  <bold>58.3</bold>
                </td>
                <td>
                  <bold>57.2</bold>
                </td>
                <td>48.9</td>
                <td>67.8</td>
                <td>66.8</td>
              </tr>
              <tr>
                <td>YOLOv12-X</td>
                <td>55.8</td>
                <td>55.3</td>
                <td>
                  <bold>50.8</bold>
                </td>
                <td>66.8</td>
                <td>70.3</td>
              </tr>
              <tr>
                <td>YOLOv13-X</td>
                <td>54.6</td>
                <td>56.4</td>
                <td>47.5</td>
                <td>67.4</td>
                <td>68.2</td>
              </tr>
              <tr>
                <td>YOLO26-X</td>
                <td>54.1</td>
                <td>55.3</td>
                <td>45.7</td>
                <td>69.2</td>
                <td>
                  <bold>71.6</bold>
                </td>
              </tr>
              <tr>
                <td>MI-DETR-R50</td>
                <td>54.5</td>
                <td>53.7</td>
                <td>40.5</td>
                <td>70.3</td>
                <td>64.7</td>
              </tr>
              <tr>
                <td>D-FINE-X</td>
                <td>57.7</td>
                <td>55.2</td>
                <td>42.8</td>
                <td>70.4</td>
                <td>70.4</td>
              </tr>
              <tr>
                <td>DEIM-X</td>
                <td>58.1</td>
                <td>55.5</td>
                <td>43.7</td>
                <td>73.0</td>
                <td>68.4</td>
              </tr>
              <tr>
                <td>CSG-YOLO-X</td>
                <td>56.5</td>
                <td>55.9</td>
                <td>48.2</td>
                <td>67.8</td>
                <td>
                  <bold>71.6</bold>
                </td>
              </tr>
            </tbody>
          </table>
          <table-wrap-foot>
            <fn>
              <p>YOLOv12-N/S/X and CSG-YOLO-N/S/X entries report means over three independent training runs using randomly generated seeds; standard deviations are omitted for conciseness. Other detector entries retain the original single-run reference results. Bold values mark the highest AP for each defect category within each computational-demand group. Columns denote semantic categories, independently of defect size. The internal rule separates the two computational-demand groups. AP: Average precision.</p>
            </fn>
          </table-wrap-foot>
        </table-wrap>
        <table-wrap id="t4">
          <label>Table 4</label>
          <caption>
            <p>Scale-wise AP and AR comparison</p>
          </caption>
          <table frame="hsides" rules="groups">
            <thead>
              <tr>
                <td style="border-bottom:1;">
                  <bold>Method</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>AP<italic><sub>s</sub></italic></bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>AP<italic><sub>m</sub></italic></bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>AP<italic><sub>l</sub></italic></bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>AR<italic><sub>s</sub></italic></bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>AR<italic><sub>m</sub></italic></bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>AR<italic><sub>l</sub></italic></bold>
                </td>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>YOLOv10-N</td>
                <td>26.8</td>
                <td>53.3</td>
                <td>55.3</td>
                <td>37.3</td>
                <td>63.1</td>
                <td>66.8</td>
              </tr>
              <tr>
                <td>YOLOv10-S</td>
                <td>25.6</td>
                <td>50.9</td>
                <td>59.1</td>
                <td>41.8</td>
                <td>59.4</td>
                <td>69.1</td>
              </tr>
              <tr>
                <td>YOLO11-N</td>
                <td>22.5</td>
                <td>56.2</td>
                <td>59.6</td>
                <td>34.5</td>
                <td>62.4</td>
                <td>68.6</td>
              </tr>
              <tr>
                <td>YOLO11-S</td>
                <td>25.4</td>
                <td>53.0</td>
                <td>58.8</td>
                <td>37.3</td>
                <td>58.2</td>
                <td>68.3</td>
              </tr>
              <tr>
                <td>YOLOv12-N</td>
                <td>30.6</td>
                <td>55.3</td>
                <td>57.5</td>
                <td>40.9</td>
                <td>60.8</td>
                <td>66.0</td>
              </tr>
              <tr>
                <td>YOLOv12-S</td>
                <td>25.1</td>
                <td>57.5</td>
                <td>58.6</td>
                <td>38.2</td>
                <td>61.6</td>
                <td>68.1</td>
              </tr>
              <tr>
                <td>YOLOv13-N</td>
                <td>31.3</td>
                <td>54.1</td>
                <td>55.9</td>
                <td>38.2</td>
                <td>63.2</td>
                <td>66.9</td>
              </tr>
              <tr>
                <td>YOLOv13-S</td>
                <td>33.5</td>
                <td>53.0</td>
                <td>
                  <bold>61.1</bold>
                </td>
                <td>41.8</td>
                <td>65.2</td>
                <td>70.3</td>
              </tr>
              <tr>
                <td>YOLO26-N</td>
                <td>21.1</td>
                <td>52.7</td>
                <td>60.2</td>
                <td>40.0</td>
                <td>60.5</td>
                <td>71.3</td>
              </tr>
              <tr>
                <td>YOLO26-S</td>
                <td>
                  <bold>33.6</bold>
                </td>
                <td>55.2</td>
                <td>60.5</td>
                <td>46.4</td>
                <td>65.6</td>
                <td>73.6</td>
              </tr>
              <tr>
                <td>D-FINE-N</td>
                <td>22.8</td>
                <td>47.3</td>
                <td>59.9</td>
                <td>38.2</td>
                <td>
                  <bold>69.8</bold>
                </td>
                <td>
                  <bold>80.3</bold>
                </td>
              </tr>
              <tr>
                <td>D-FINE-S</td>
                <td>23.5</td>
                <td>53.2</td>
                <td>60.0</td>
                <td>
                  <bold>53.8</bold>
                </td>
                <td>68.3</td>
                <td>78.5</td>
              </tr>
              <tr>
                <td>DEIM-N</td>
                <td>29.7</td>
                <td>52.6</td>
                <td>59.9</td>
                <td>37.3</td>
                <td>64.4</td>
                <td>75.6</td>
              </tr>
              <tr>
                <td>DEIM-S</td>
                <td>23.9</td>
                <td>55.4</td>
                <td>60.2</td>
                <td>52.7</td>
                <td>68.2</td>
                <td>78.0</td>
              </tr>
              <tr>
                <td>CSG-YOLO-N</td>
                <td>32.9</td>
                <td>54.3</td>
                <td>60.5</td>
                <td>43.6</td>
                <td>62.7</td>
                <td>67.7</td>
              </tr>
              <tr>
                <td>CSG-YOLO-S</td>
                <td>30.2</td>
                <td>
                  <bold>58.7</bold>
                </td>
                <td>59.4</td>
                <td>33.3</td>
                <td>63.9</td>
                <td>67.2</td>
              </tr>
              <tr>
                <td>RT-DETR-R18</td>
                <td>24.1</td>
                <td>56.2</td>
                <td>60.0</td>
                <td>43.6</td>
                <td>71.6</td>
                <td>78.9</td>
              </tr>
              <tr>
                <td>RT-DETRv2-R18</td>
                <td>19.8</td>
                <td>50.7</td>
                <td>57.3</td>
                <td>31.8</td>
                <td>66.1</td>
                <td>76.9</td>
              </tr>
              <tr>
                <td>RF-DETR-N</td>
                <td>24.8</td>
                <td>56.6</td>
                <td>60.1</td>
                <td>31.8</td>
                <td>62.6</td>
                <td>70.9</td>
              </tr>
              <tr>
                <td>RF-DETR-S</td>
                <td>18.8</td>
                <td>57.3</td>
                <td>59.9</td>
                <td>30.9</td>
                <td>67.8</td>
                <td>71.8</td>
              </tr>
              <tr>
                <td>RF-DETR-XL</td>
                <td>20.9</td>
                <td>
                  <bold>59.8</bold>
                </td>
                <td>61.4</td>
                <td>31.8</td>
                <td>67.8</td>
                <td>72.6</td>
              </tr>
              <tr>
                <td>YOLOv10-X</td>
                <td>
                  <bold>38.6</bold>
                </td>
                <td>55.3</td>
                <td>60.3</td>
                <td>
                  <bold>55.5</bold>
                </td>
                <td>63.9</td>
                <td>72.2</td>
              </tr>
              <tr>
                <td>YOLO11-X</td>
                <td>37.6</td>
                <td>54.5</td>
                <td>
                  <bold>62.2</bold>
                </td>
                <td>46.4</td>
                <td>63.7</td>
                <td>71.6</td>
              </tr>
              <tr>
                <td>YOLOv12-X</td>
                <td>32.4</td>
                <td>57.6</td>
                <td>61.8</td>
                <td>41.8</td>
                <td>64.8</td>
                <td>71.4</td>
              </tr>
              <tr>
                <td>YOLOv13-X</td>
                <td>28.9</td>
                <td>58.7</td>
                <td>60.9</td>
                <td>40.1</td>
                <td>68.6</td>
                <td>70.4</td>
              </tr>
              <tr>
                <td>YOLO26-X</td>
                <td>30.7</td>
                <td>55.5</td>
                <td>61.2</td>
                <td>45.4</td>
                <td>64.7</td>
                <td>74.6</td>
              </tr>
              <tr>
                <td>MI-DETR-R50</td>
                <td>22.5</td>
                <td>52.6</td>
                <td>58.9</td>
                <td>40.9</td>
                <td>65.8</td>
                <td>72.1</td>
              </tr>
              <tr>
                <td>D-FINE-X</td>
                <td>21.2</td>
                <td>57.3</td>
                <td>61.1</td>
                <td>49.7</td>
                <td>71.2</td>
                <td>81.2</td>
              </tr>
              <tr>
                <td>DEIM-X</td>
                <td>21.6</td>
                <td>58.0</td>
                <td>61.0</td>
                <td>46.4</td>
                <td>
                  <bold>74.1</bold>
                </td>
                <td>
                  <bold>82.4</bold>
                </td>
              </tr>
              <tr>
                <td>CSG-YOLO-X</td>
                <td>31.8</td>
                <td>58.1</td>
                <td>61.9</td>
                <td>45.5</td>
                <td>64.1</td>
                <td>68.5</td>
              </tr>
            </tbody>
          </table>
          <table-wrap-foot>
            <fn>
              <p>YOLOv12-N/S/X and CSG-YOLO-N/S/X entries report means over three independent training runs using randomly generated seeds; standard deviations are omitted for conciseness. Other detector entries retain the original single-run reference results. Bold values mark the highest AP or AR for each size category within each computational-demand group. Subscripts <italic>s</italic>, <italic>m</italic>, and <italic>l</italic> denote small, medium, and large instances under the COCO area bins, respectively. The internal rule separates the two computational-demand groups. AP: Average precision; AR: average recall; COCO: Common Objects in Context.</p>
            </fn>
          </table-wrap-foot>
        </table-wrap>
        <p>As shown in <xref ref-type="table" rid="t3">Table 3</xref>, YOLO11-N leads Deformation and Hole in the below-50-GFLOP group with 59.7 and 56.1 AP, respectively, and ties CSG-YOLO-S at 50.4 AP for Post Damage. DEIM-S and YOLOv10-N lead Repair Patch and Contamination with 72.9 and 73.4 AP. Relative to YOLOv12-N, CSG-YOLO-N changes the five category-wise AP values by +2.0, +2.6, +7.3, -0.3, and +0.7 points in table order, with the largest gain on Post Damage. In the higher-compute group, CSG-YOLO-X ties YOLO26-X for the highest Contamination AP of 71.6 but does not lead the other categories.</p>
        <p>The two least frequent categories, Repair Patch and Contamination, contain 211 and 186 annotated instances, respectively. For these categories, CSG-YOLO-N obtains 61.9 and 70.4 AP, compared with 62.2 and 69.7 AP for YOLOv12-N. Thus, the overall detection improvement does not correspond to uniform gains for the minority categories: Repair Patch AP decreases by 0.3 points, whereas Contamination AP increases by 0.7 points. Under the category-wise COCO evaluation protocol, overall AP averages across the evaluated categories rather than weighting them by their instance counts. Nevertheless, class imbalance can affect training and the reliability of category-specific performance estimates, so the overall AP should be interpreted together with the class-wise results.</p>
        <p>
          <xref ref-type="table" rid="t4">Table 4</xref> shows complementary rather than uniform scale-wise gains. Compared with YOLOv12-N, CSG-YOLO-N changes AP<italic><sub>s</sub></italic>, AP<italic><sub>m</sub></italic>, and AP<italic><sub>l</sub></italic> by +2.3, -1.0, and +3.0 points and improves AR<italic><sub>s</sub></italic>, AR<italic><sub>m</sub></italic>, and AR<italic><sub>l</sub></italic> by 2.7, 1.9, and 1.7 points. AP therefore improves for small and large instances, while recall increases across all three size ranges. The 2.3-point AP<italic><sub>s</sub></italic> and 2.7-point AR<italic><sub>s</sub></italic> gains are particularly relevant to industrial inspection, where small-defect misses are critical. Together, the separated AP gains and consistent recall improvements support the intended multi-scale sensitivity of STFF, although the AP<italic><sub>m</sub></italic> decrease shows that the benefit is not uniform. CSG-YOLO-S obtains the highest AP<italic><sub>m</sub></italic> of 58.7 in the below-50-GFLOP group, and CSG-YOLO-X ranks second in AP<italic><sub>l</sub></italic> with 61.9 in the higher-compute group.</p>
      </sec>
      <sec id="sec3-7">
        <title>3.7. Ablation study</title>
        <p>
          <xref ref-type="table" rid="t5">Table 5</xref> evaluates the main architectural components and training objectives using a common set of detection, mask, and false-alarm metrics. Each column presents one configuration (A0-A10), with its active components, inference cost, and performance metrics aligned in a single table. The variants isolate the segmentation branch, STFF, MG-CTI, CTC, and EAMR. To test the necessity of bidirectional interaction, the segmentation-to-detection (S → D) and detection-to-segmentation (D → S) paths are also evaluated separately under the same Seg+STFF configuration. The configurations are ordered as the baseline and STFF/task-supervision comparisons (A0-A3), the cross-task interaction comparisons (A4-A7), and the loss-function comparisons culminating in the complete model (A8-A10).</p>
        <table-wrap id="t5">
          <label>Table 5</label>
          <caption>
            <p>Unified ablation study of model configurations, performance, and inference cost</p>
          </caption>
          <table frame="hsides" rules="groups">
            <thead>
              <tr>
                <td style="border-bottom:1;">
                  <bold>Configuration</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>A0</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>A1</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>A2</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>A3</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>A4</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>A5</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>A6</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>A7</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>A8</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>A9</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>A10</bold>
                </td>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>Seg</td>
                <td>-</td>
                <td>-</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
              </tr>
              <tr>
                <td>STFF</td>
                <td>-</td>
                <td>√</td>
                <td>-</td>
                <td>√</td>
                <td>-</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
              </tr>
              <tr>
                <td>S → D</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>√</td>
                <td>√</td>
                <td>-</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
              </tr>
              <tr>
                <td>D → S</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>√</td>
                <td>-</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
                <td>√</td>
              </tr>
              <tr>
                <td>CTC</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>√</td>
                <td>√</td>
              </tr>
              <tr>
                <td>EAMR</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>-</td>
                <td>√</td>
                <td>-</td>
                <td>√</td>
              </tr>
              <tr>
                <td>Params (M)</td>
                <td>2.6</td>
                <td>4.57</td>
                <td>4.17</td>
                <td>6.14</td>
                <td>4.20</td>
                <td>6.16</td>
                <td>6.15</td>
                <td>6.20</td>
                <td>6.20</td>
                <td>6.20</td>
                <td>6.20</td>
              </tr>
              <tr>
                <td>FLOPs (G)</td>
                <td>6.5</td>
                <td>7.72</td>
                <td>14.46</td>
                <td>15.68</td>
                <td>14.78</td>
                <td>15.85</td>
                <td>15.83</td>
                <td>16.30</td>
                <td>16.30</td>
                <td>16.30</td>
                <td>16.30</td>
              </tr>
              <tr>
                <td>Latency (ms) ↓</td>
                <td>23.97</td>
                <td>25.51</td>
                <td>25.46</td>
                <td>27.00</td>
                <td>25.30</td>
                <td>26.91</td>
                <td>26.93</td>
                <td>26.68</td>
                <td>26.68</td>
                <td>26.68</td>
                <td>26.68</td>
              </tr>
              <tr>
                <td>AP ↑</td>
                <td>55.7 ± 0.2</td>
                <td>56.1 ± 0.2</td>
                <td>55.8 ± 0.3</td>
                <td>56.6 ± 0.1</td>
                <td>56.7 ± 0.2</td>
                <td>57.1 ± 0.3</td>
                <td>56.4 ± 0.1</td>
                <td>57.3 ± 0.2</td>
                <td>57.9 ± 0.3</td>
                <td>57.5 ± 0.1</td>
                <td>
                  <bold>58.1</bold> ± 0.2</td>
              </tr>
              <tr>
                <td>AP<sub>50</sub> ↑</td>
                <td>89.8 ± 0.2</td>
                <td>90.5 ± 0.2</td>
                <td>90.4 ± 0.1</td>
                <td>90.9 ± 0.3</td>
                <td>91.4 ± 0.2</td>
                <td>91.4 ± 0.1</td>
                <td>91.3 ± 0.3</td>
                <td>91.7 ± 0.2</td>
                <td>92.6 ± 0.1</td>
                <td>92.2 ± 0.3</td>
                <td>
                  <bold>93.0</bold> ± 0.2</td>
              </tr>
              <tr>
                <td>AP<sub>75</sub> ↑</td>
                <td>60.9 ± 0.3</td>
                <td>61.5 ± 0.3</td>
                <td>61.2 ± 0.4</td>
                <td>62.3 ± 0.2</td>
                <td>62.6 ± 0.5</td>
                <td>62.8 ± 0.3</td>
                <td>63.0 ± 0.4</td>
                <td>63.4 ± 0.3</td>
                <td>64.2 ± 0.4</td>
                <td>64.1 ± 0.2</td>
                <td>
                  <bold>65.0</bold> ± 0.3</td>
              </tr>
              <tr>
                <td>OMD (%) ↓</td>
                <td>6.4 ± 0.2</td>
                <td>6.1 ± 0.2</td>
                <td>7.0 ± 0.3</td>
                <td>6.7 ± 0.1</td>
                <td>6.4 ± 0.2</td>
                <td>6.5 ± 0.3</td>
                <td>6.2 ± 0.1</td>
                <td>5.9 ± 0.2</td>
                <td>6.1 ± 0.3</td>
                <td>6.0 ± 0.1</td>
                <td>
                  <bold>5.7</bold> ± 0.2</td>
              </tr>
              <tr>
                <td>Surface IoU (%) ↑</td>
                <td>-</td>
                <td>-</td>
                <td>74.8 ± 0.4</td>
                <td>75.6 ± 0.2</td>
                <td>75.4 ± 0.4</td>
                <td>76.0 ± 0.2</td>
                <td>76.2 ± 0.3</td>
                <td>76.1 ± 0.4</td>
                <td>76.6 ± 0.2</td>
                <td>75.9 ± 0.3</td>
                <td>
                  <bold>76.7</bold> ± 0.4</td>
              </tr>
              <tr>
                <td>Boundary IoU (%) ↑</td>
                <td>-</td>
                <td>-</td>
                <td>59.8 ± 0.6</td>
                <td>61.1 ± 0.5</td>
                <td>60.7 ± 0.6</td>
                <td>61.7 ± 0.5</td>
                <td>62.0 ± 0.4</td>
                <td>62.2 ± 0.5</td>
                <td>63.5 ± 0.4</td>
                <td>61.8 ± 0.6</td>
                <td>
                  <bold>63.9</bold> ± 0.4</td>
              </tr>
              <tr>
                <td>FPPI ↓</td>
                <td>0.19 ± 0.02</td>
                <td>0.16 ± 0.02</td>
                <td>0.27 ± 0.03</td>
                <td>0.25 ± 0.02</td>
                <td>0.16 ± 0.03</td>
                <td>0.14 ± 0.01</td>
                <td>0.22 ± 0.02</td>
                <td>0.17 ± 0.02</td>
                <td>0.13 ± 0.01</td>
                <td>0.12 ± 0.02</td>
                <td>
                  <bold>0.11</bold> ± 0.01</td>
              </tr>
              <tr>
                <td>ODR (%) ↓</td>
                <td>1.8 ± 0.2</td>
                <td>1.3 ± 0.2</td>
                <td>1.3 ± 0.1</td>
                <td>1.7 ± 0.3</td>
                <td>0.8 ± 0.2</td>
                <td>1.0 ± 0.1</td>
                <td>1.5 ± 0.2</td>
                <td>0.5 ± 0.1</td>
                <td>0.4 ± 0.1</td>
                <td>0.7 ± 0.2</td>
                <td>
                  <bold>0.2</bold> ± 0.1</td>
              </tr>
            </tbody>
          </table>
          <table-wrap-foot>
            <fn>
              <p>Each column defines one ablation configuration; horizontal rules separate active components, inference cost, and performance metrics. A7-A10 share the A10 inference-cost profile because they differ only in training losses. A0 and A10 correspond to the model costs in <xref ref-type="table" rid="t1">Table 1</xref>; latency follows the measurement conditions in Section 3.3. The available performance metrics for A0-A10 are reported as mean ± standard deviation over three independent training runs using randomly generated seeds. A0 and A10 correspond to the same reported results as YOLOv12-N and CSG-YOLO-N in the comparison tables. Bold performance values mark the best mean in each metric across A0-A10: maximum AP and IoU metrics and minimum OMD, FPPI, and ODR. A0 is YOLOv12-N and A10 is the complete CSG-YOLO-N; A2-A9 are intermediate configurations of this N-scale model, defined by the component rows. A1 is the detection-only YOLOv12-N + STFF configuration, with no segmentation branch or cross-task interaction. A checkmark indicates an active component; - indicates an inactive component in the configuration rows or unavailable mask metrics for detection-only configurations. Arrows indicate the preferred direction. Seg: Container-surface segmentation; STFF: scale-tuned feature fusion; S → D: segmentation-to-detection guidance; D → S: detection-to-segmentation refinement; CTC: center-to-container consistency; EAMR: edge-aware mask refinement; Params: parameters; M: million; FLOPs: floating-point operations; G: billion; AP: average precision; OMD: overall missed detection rate; IoU: intersection over union; Boundary IoU: inner-boundary-band intersection over union; FPPI: false positives per image; ODR: outside-ROI detection ratio; ROI: region of interest.</p>
            </fn>
          </table-wrap-foot>
        </table-wrap>
        <p>A2 serves as the task-matched joint detection–segmentation baseline and internal surface-segmentation reference: it retains the shared backbone and the detection and segmentation heads, but excludes STFF, MG-CTI, CTC, and EAMR. A3 provides a second joint baseline with STFF; neither configuration includes explicit surface-to-detection or detection-to-surface transfer. Thus, A4-A2 and A7-A3 compare MG-CTI with joint supervision under matched feature-fusion settings, without CTC or EAMR in either pair. The mean Surface IoU and Boundary IoU of A2 are 74.8% ± 0.4% and 59.8% ± 0.6%, compared with 76.7% ± 0.4% and 63.9% ± 0.4% for A10. The 1.9- and 4.1-percentage-point changes describe the combined configuration change, not the isolated effect of a single component. The A9-A10 and A7-A8 comparisons below further assess EAMR with the inference architecture fixed. These internal references evaluate auxiliary mask behavior alongside its contribution to defect detection; they are not a benchmark against independently trained segmentation architectures.</p>
        <p>To distinguish the STFF contribution from the multi-task setting, A1 augments the baseline detector A0 with STFF under detection-only supervision. It uses the YOLOv12-N backbone and detection head of A0 and the same four STFF insertion positions, module settings, and initialization as A3. The segmentation head, MG-CTI, CTC, and EAMR are absent, and training uses only <inline-formula><tex-math id="M1">$$ \mathcal{L} $$</tex-math></inline-formula><italic><sub>det</sub></italic>. The four relevant configurations form a two-factor comparison: A0 (detection only, no STFF), A1 (detection only, with STFF), A2 (detection plus segmentation, no STFF), and A3 (detection plus segmentation, with STFF). Neither A2 nor A3 includes MG-CTI or the additional CTC/EAMR losses. The A1-A0 comparison isolates the incremental STFF effect under detection-only supervision, while A3-A2 measures its effect under joint detection–segmentation supervision. A3-A1 provides the complementary comparison of adding the segmentation task in the presence of STFF.</p>
        <p>A1 has 4.57 M parameters, 7.72 G FLOPs, and a measured latency of 25.51 ms. Relative to A0, STFF under detection-only supervision adds 1.97 M parameters, 1.22 G FLOPs, and 1.54 ms latency. The same increments are observed for A3 <italic>vs.</italic> A2 under multi-task supervision. Relative to A1, the segmentation-enabled STFF configuration A3 adds 1.57 M parameters, 7.96 G FLOPs, and 1.49 ms latency. These comparisons separate the reported computational increments of STFF and the segmentation branch.</p>
        <p>Under detection-only supervision, adding STFF increases mean AP from 55.7 ± 0.2 (A0) to 56.1 ± 0.2 (A1), a 0.4-point gain. Mean AP<sub>50</sub> and AP<sub>75</sub> increase by 0.7 and 0.6 points, respectively, while OMD decreases from 6.4% to 6.1%, FPPI from 0.19 to 0.16, and ODR from 1.8% to 1.3%. Under joint detection–segmentation supervision, the corresponding STFF comparison (A3 <italic>vs.</italic> A2) gives a 0.8-point mean AP gain, from 55.8 ± 0.3 to 56.6 ± 0.1. Thus, the observed mean AP benefit of STFF is present without segmentation supervision and is larger in the multi-task setting. This comparison distinguishes the STFF effect from the mere presence of the segmentation task, while the limited number of runs and reported variability warrant caution about statistical significance. A3 also has a 0.5-point higher mean AP than A1, but its higher OMD, FPPI, and ODR show that adding the segmentation task in the presence of STFF does not uniformly improve all engineering metrics.</p>
        <p>Starting from YOLOv12-N, the segmentation branch (A2 <italic>vs.</italic> A0) increases mean AP, AP<sub>50</sub>, and AP<sub>75</sub> by 0.1, 0.6, and 0.3 points and reduces mean ODR from 1.8% to 1.3%. Its higher OMD and FPPI, however, show that segmentation supervision alone does not guarantee better missed-detection or false-alarm control. The 0.1-point AP increase is small relative to the observed standard deviations of 0.2 and 0.3 points for A0 and A2. Adding STFF (A3 <italic>vs.</italic> A2) increases mean AP by a further 0.8 points and Surface IoU by 0.8 points while reducing OMD and FPPI to 6.7% and 0.25. The accompanying ODR increase from 1.3% to 1.7% is consistent with shared-feature modulation that imposes no explicit ROI constraint. Relative to the shared-feature dual-task baseline, MG-CTI (A4 <italic>vs.</italic> A2) provides a 0.9-point mean AP gain and reduces OMD, FPPI, and ODR to 6.4%, 0.16, and 0.8%, respectively.</p>
        <p>The directional ablations clarify the roles of the two MG-CTI paths. Relative to Seg+STFF without interaction (A3), S → D (A5) raises mean AP from 56.6 to 57.1 and reduces FPPI from 0.25 to 0.14 and ODR from 1.7% to 1.0%, consistent with direct surface-prior guidance of detection. D → S (A6) raises mean Surface IoU from 75.6% to 76.2% and AP<sub>75</sub> from 62.3 to 63.0 while reducing OMD from 6.7% to 6.2%; its mean AP nevertheless decreases from 56.6 to 56.4. Activating both paths (A7) yields mean scores of 57.3 AP, 91.7 AP<sub>50</sub>, 63.4 AP<sub>75</sub>, 5.9% OMD, and 0.5% ODR. Among the interaction variants A5-A7, the bidirectional variant has the highest mean AP and the lowest mean OMD and ODR, whereas S → D alone has the lowest FPPI and D → S alone has a slightly higher Surface IoU. The two directions therefore exhibit complementary effects rather than uniform improvements in every metric; small differences should be interpreted alongside the reported standard deviations.</p>
        <p>With the architecture fixed, comparison with CSG-YOLO-N w/o CTC (A8) shows that CTC increases mean AP, AP<sub>50</sub>, and AP<sub>75</sub> by 0.2, 0.4, and 0.8 points, respectively, while reducing OMD by 0.4 percentage points, FPPI by 0.02 boxes per image, and ODR by 0.2 percentage points. The mean AP increase from 57.9 ± 0.3 to 58.1 ± 0.2 is modest relative to the observed variability. Because CTC directly supervises only the prior at ground-truth defect centers, its detection effects are propagated indirectly through MG-CTI and joint optimization. Comparison with CSG-YOLO-N w/o EAMR (A9) shows mean gains of 0.6, 0.8, and 0.9 points in the three AP metrics and 0.8 points in Surface IoU, together with reductions of 0.3 percentage points in OMD, 0.01 boxes per image in FPPI, and 0.5 percentage points in ODR. These detection and Surface IoU results associate EAMR with improved overall mask overlap and outside-ROI suppression; Surface IoU itself does not measure boundary accuracy. Boundary IoU provides complementary boundary-sensitive evidence: with CTC enabled, adding EAMR increases mean Boundary IoU from 61.8% ± 0.6% (A9) to 63.9% ± 0.4% (A10), a 2.1-percentage-point gain. Without CTC, EAMR increases Boundary IoU from 62.2% ± 0.5% (A7) to 63.5% ± 0.4% (A8), a 1.3-percentage-point gain. The positive mean changes in both comparisons are consistent with the edge-aware motivation of EAMR. CTC itself does not yield a uniform boundary improvement: A9 is 0.4 points below A7, whereas A10 is 0.4 points above A8. The complete CSG-YOLO-N (A10) reaches mean scores of 58.1 AP, 93.0 AP<sub>50</sub>, 65.0 AP<sub>75</sub>, 5.7% OMD, 0.11 FPPI, 0.2% ODR, 76.7% Surface IoU, and 63.9% Boundary IoU. Its comparatively large AP<sub>75</sub> gain applies to the deployment-targeted N model and is not generalized to the S and X variants. The three-run summaries quantify observed variation but do not by themselves establish statistical significance for the individual component gains.</p>
        <p>The inference-cost rows in <xref ref-type="table" rid="t5">Table 5</xref> complement the performance results with computational-cost measurements. Adding the segmentation branch (A2 <italic>vs.</italic> A0) increases parameter count by 1.57 M, FLOPs by 7.96 G, and latency by 1.49 ms, with a 0.1-point increase in mean AP. Adding STFF to the segmentation-enabled model (A3 <italic>vs.</italic> A2) introduces 1.97 M parameters and 1.22 G FLOPs, with a 1.54 ms latency increase and a 0.8-point mean AP gain. Adding MG-CTI to the shared-feature dual-task baseline (A4 <italic>vs.</italic> A2) introduces 0.03 M parameters and 0.32 G FLOPs, with a 0.9-point mean AP gain; its measured latency is 25.30 ms compared with 25.46 ms for A2. Under Seg+STFF, bidirectional MG-CTI (A7 <italic>vs.</italic> A3) adds 0.06 M parameters and 0.62 G FLOPs with a 0.7-point mean AP gain; its reported latency is 26.68 ms compared with 27.00 ms for A3. These measurements show that latency is not monotonic in FLOPs and should be assessed directly under the stated measurement conditions. Relative to A0, the complete model A10 increases parameter count from 2.6 M to 6.20 M and FLOPs from 6.5 G to 16.30 G; measured latency increases from 23.97 to 26.68 ms, alongside a 2.4-point increase in mean AP.</p>
        <p>CTC and EAMR are training-time objectives and are not evaluated during inference. A7-A10 share the same inference architecture, so their common inference cost is represented by the A10 profile: 6.20 M parameters, 16.30 G FLOPs, and 26.68 ms latency. These values do not quantify the additional training computation of the losses.</p>
        <p>Together, these ablations distinguish surface-prior transfer from simply adding a segmentation task. The shared-feature dual-task baseline A2 has only a 0.1-point higher mean AP than A0 and higher FPPI (0.27 <italic>vs.</italic> 0.19). Adding MG-CTI without STFF or the additional consistency losses (A4 <italic>vs.</italic> A2) raises mean AP by 0.9 points and reduces FPPI from 0.27 to 0.16 and ODR from 1.3% to 0.8%. The detection-only STFF and directional comparisons separately assess feature modulation and the two interaction paths. This evidence supports the proposed coupling within the tested architecture and dataset; it does not establish superiority over every multi-task design.</p>
        <p>
          <xref ref-type="table" rid="t6">Table 6</xref> evaluates STFF component removals from A3 with the dual-task setup and training protocol fixed, without MG-CTI, CTC, or EAMR. Full STFF (B1) improves mean AP over B0 by 0.8 points, AP<italic><sub>s</sub></italic> by 1.3, and AP<italic><sub>l</sub></italic> by 1.5, and reduces FPPI from 0.27 to 0.25; AP<italic><sub>m</sub></italic> decreases by 0.3 points. Removing multi-receptive-field spatial attention (B4) yields the largest observed AP drop of 0.6 points, with AP<italic><sub>s</sub></italic> and AP<italic><sub>l</sub></italic> decreasing by 1.1 and 0.8 points. Other removals reduce mean AP by 0.2-0.4 points. These results support the internal design particularly for small and large instances, with non-uniform gains across scales. The effects of individual removals are not additive, and smaller differences should be read alongside the reported standard deviations.</p>
        <table-wrap id="t6">
          <label>Table 6</label>
          <caption>
            <p>Internal component ablation of STFF under joint detection–segmentation supervision</p>
          </caption>
          <table frame="hsides" rules="groups">
            <thead>
              <tr>
                <td style="border-bottom:1;">
                  <bold>ID</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>STFF configuration</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>AP</bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>AP<italic><sub>s</sub></italic></bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>AP<italic><sub>m</sub></italic></bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>AP<italic><sub>l</sub></italic></bold>
                </td>
                <td style="border-bottom:1;">
                  <bold>FPPI ↓</bold>
                </td>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>B0</td>
                <td>Without STFF (A2)</td>
                <td>55.8 ± 0.3</td>
                <td>30.8</td>
                <td>
                  <bold>55.1</bold>
                </td>
                <td>57.8</td>
                <td>0.27 ± 0.03</td>
              </tr>
              <tr>
                <td>B1</td>
                <td>Full STFF (A3)</td>
                <td>
                  <bold>56.6</bold> ± 0.1</td>
                <td>
                  <bold>32.1</bold>
                </td>
                <td>54.8</td>
                <td>
                  <bold>59.3</bold>
                </td>
                <td>
                  <bold>0.25</bold> ± 0.02</td>
              </tr>
              <tr>
                <td>B2</td>
                <td>w/o scale embedding</td>
                <td>56.3 ± 0.2</td>
                <td>31.7</td>
                <td>54.9</td>
                <td>59.0</td>
                <td>0.26 ± 0.02</td>
              </tr>
              <tr>
                <td>B3</td>
                <td>w/o channel attention</td>
                <td>56.2 ± 0.2</td>
                <td>31.5</td>
                <td>54.8</td>
                <td>58.9</td>
                <td>0.26 ± 0.02</td>
              </tr>
              <tr>
                <td>B4</td>
                <td>w/o multi-receptive-field spatial attention</td>
                <td>56.0 ± 0.2</td>
                <td>31.0</td>
                <td>54.9</td>
                <td>58.5</td>
                <td>0.27 ± 0.02</td>
              </tr>
              <tr>
                <td>B5</td>
                <td>w/o shared-feature gating</td>
                <td>56.3 ± 0.2</td>
                <td>31.8</td>
                <td>54.9</td>
                <td>59.0</td>
                <td>0.26 ± 0.02</td>
              </tr>
              <tr>
                <td>B6</td>
                <td>w/o coarse spatial modulation</td>
                <td>56.4 ± 0.1</td>
                <td>31.9</td>
                <td>55.0</td>
                <td>59.1</td>
                <td>0.26 ± 0.02</td>
              </tr>
            </tbody>
          </table>
          <table-wrap-foot>
            <fn>
              <p>B0 and B1 reuse A2 and A3 from <xref ref-type="table" rid="t5">Table 5</xref>. B2-B6 each remove one component from B1 at all STFF insertion positions: <bold>e</bold><italic><sub>l</sub></italic> ≡ <bold>0</bold> (B2), <bold>A</bold><italic><sub>l</sub></italic><italic><sup>c</sup></italic> ≡ <bold>1</bold> (B3), <bold>A</bold><italic><sub>l</sub></italic><italic><sup>s</sup></italic> ≡ <bold>1</bold> (B4), <bold>A</bold><italic><sub>l</sub></italic><italic><sup>g</sup></italic> ≡ <bold>1</bold> (B5), and <italic>γ<sub>p</sub></italic> ≡ <bold>0</bold> (B6). These settings remain fixed throughout training. AP and FPPI report mean ± standard deviation over three independent training runs using randomly generated seeds; scale-wise AP reports the corresponding means, with standard deviations omitted for conciseness. Bold values mark maximum AP metrics and minimum FPPI across B0-B6. w/o: without; scale subscripts follow the COCO area bins. STFF: Scale-tuned feature fusion; AP: average precision; FPPI: false positives per image; COCO: Common Objects in Context.</p>
            </fn>
          </table-wrap-foot>
        </table-wrap>
        <sec id="sec3-7-1">
          <title>3.7.1. Sensitivity to auxiliary loss weights</title>
          <p>To examine the balance between defect detection and auxiliary supervision, <xref ref-type="table" rid="t7">Table 7</xref> compares three auxiliary-loss weight settings for the complete CSG-YOLO-N configuration (A10). A common multiplier k ∈ {0.5, 1,2} sets (<italic>λ<sub>seg</sub></italic>, <italic>λ<sub>ctc</sub></italic>, <italic>λ<sub>eamr</sub></italic>) = <italic>k</italic>(0.25, 0.5, 0.1), preserving the relative proportions of the three auxiliary terms and leaving the detection-loss weight unchanged. Each setting is evaluated over three training runs using the same three randomly generated seeds as A10, with the dataset split, 600-epoch schedule, global batch size of 16, and all other training and evaluation settings unchanged. The <italic>k</italic> = 1 reference reuses the completed A10 runs. The MG-CTI coefficients <italic>β<sub>i</sub></italic> and <italic>λ<sub>r</sub></italic> remain learnable and zero-initialized in every setting; they are distinct from the fixed loss weights varied here.</p>
          <table-wrap id="t7">
            <label>Table 7</label>
            <caption>
              <p>Auxiliary-loss weight sensitivity of CSG-YOLO-N</p>
            </caption>
            <table frame="hsides" rules="groups">
              <thead>
                <tr>
                  <td style="border-bottom:1;">
                    <bold>
                      <italic>k</italic>
                    </bold>
                  </td>
                  <td style="border-bottom:1;">
                    <bold>
                      <italic>λ<sub>seg</sub></italic>
                    </bold>
                  </td>
                  <td style="border-bottom:1;">
                    <bold>
                      <italic>λ<sub>ctc</sub></italic>
                    </bold>
                  </td>
                  <td style="border-bottom:1;">
                    <bold>
                      <italic>λ<sub>eamr</sub></italic>
                    </bold>
                  </td>
                  <td style="border-bottom:1;">
                    <bold>AP</bold>
                  </td>
                  <td style="border-bottom:1;">
                    <bold>FPPI ↓</bold>
                  </td>
                  <td style="border-bottom:1;">
                    <bold>Boundary IoU (%) ↑</bold>
                  </td>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>0.5</td>
                  <td>0.125</td>
                  <td>0.25</td>
                  <td>0.05</td>
                  <td>57.4 ± 0.2</td>
                  <td>0.14 ± 0.01</td>
                  <td>62.2 ± 0.4</td>
                </tr>
                <tr>
                  <td>1.0</td>
                  <td>0.250</td>
                  <td>0.50</td>
                  <td>0.10</td>
                  <td>
                    <bold>58.1</bold> ± 0.2</td>
                  <td>
                    <bold>0.11</bold> ± 0.01</td>
                  <td>
                    <bold>63.9</bold> ± 0.4</td>
                </tr>
                <tr>
                  <td>2.0</td>
                  <td>0.500</td>
                  <td>1.00</td>
                  <td>0.20</td>
                  <td>57.6 ± 0.2</td>
                  <td>0.13 ± 0.01</td>
                  <td>62.9 ± 0.4</td>
                </tr>
              </tbody>
            </table>
            <table-wrap-foot>
              <fn>
                <p>AP, FPPI, and Boundary IoU report mean ± standard deviation over three independent training runs. The three settings use the same three random seeds as the completed A10 runs; the <italic>k</italic> = 1 row is therefore identical to A10 in <xref ref-type="table" rid="t5">Table 5</xref>. Bold values mark maximum mean AP and Boundary IoU and minimum mean FPPI among the three weight settings. AP: Average precision; FPPI: false positives per image; Boundary IoU: inner-boundary-band intersection over union.</p>
              </fn>
            </table-wrap-foot>
          </table-wrap>
          <p>The default setting (<italic>k</italic> = 1) yields the highest mean AP and Boundary IoU and the lowest mean FPPI among the tested settings. Halving the auxiliary weights reduces mean AP by 0.7 points and Boundary IoU by 1.7 percentage points, while increasing FPPI by 0.03. Doubling them reduces mean AP by 0.5 points and Boundary IoU by 1.0 percentage point, while increasing FPPI by 0.02. Thus, increasing auxiliary supervision does not produce a monotonic improvement. Across the tested range, mean AP varies from 57.4 to 58.1, FPPI from 0.11 to 0.14, and Boundary IoU from 62.2% to 63.9%. These results favor the default balance within this range. The check varies the overall auxiliary-loss strength at a fixed weight ratio; it does not establish an independent optimum for each weight or statistical significance from the three-run summaries alone. seg: Segmentation; ctc: center-to-container consistency; eamr: edge-aware mask refinement.</p>
        </sec>
        <sec id="sec3-7-2">
          <title>3.7.2. Response heatmap analysis</title>
          <p>
            <xref ref-type="fig" rid="fig6">Figure 6</xref> complements the quantitative ablations with detection-response heatmaps for A2, A3, A7, and A10 on the same five illustrative test images. A2 uses detection and container-surface segmentation without STFF, MG-CTI, CTC, or EAMR. A3 adds STFF, A7 further adds bidirectional MG-CTI, and A10 includes both CTC and EAMR. Accordingly, A2-A3 examines STFF within the multi-task setting, A3-A7 examines bidirectional cross-task interaction, and A7-A10 examines the combined training constraints. The last comparison is complemented by the separate loss ablations in <xref ref-type="table" rid="t5">Table 5</xref>.</p>
          <fig id="fig6" position="float">
            <label>Figure 6</label>
            <caption>
              <p>Detection-response heatmaps of the ablation configurations on five illustrative test images. Columns A and B show the input images and ground-truth annotations. Columns C-F show responses for A2 (detection and segmentation), A3 (A2 with STFF), A7 (A3 with bidirectional MG-CTI), and A10 (A7 with CTC and EAMR), respectively. Column G shows the final predictions of the complete CSG-YOLO model (A10). The cases illustrate individual response patterns rather than a statistically representative sample of the test set. STFF: Scale-tuned feature fusion; MG-CTI: mask-guided cross-task interaction; CTC: center-to-container consistency; EAMR: edge-aware mask refinement.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="ir6036.fig.6.jpg" />
          </fig>
          <p>The five cases were selected to show a routine handling scene, road cracks and stains in an overhead view, a nearby light source, hole-like truck-frame structures, and a cluttered frontal view, respectively. In Case 1, all four configurations retain a main response around the damaged container region, while the spread of surrounding responses differs. In Case 2, responses to road and container-surface patterns vary across configurations, and some non-defect hotspots remain in A10. In Case 3, the nearby light source is prominent in the A2 and A3 maps but less prominent in the A7 and A10 maps, while the response on the deformed container surface is retained. Case 4 shows residual responses around truck-frame structures even in the complete model, illustrating that spatial guidance is a soft feature modulation rather than a hard exclusion of background. In Case 5, the main response lies on the deformed container, with additional responses around the truck and surrounding structures varying across the four maps.</p>
          <p>These comparisons visualize how the response distribution changes with feature fusion, task interaction, and the additional training constraints. The A7-A10 comparison reflects the combined effect of CTC and EAMR; their individual contributions are evaluated by the A7-A8 and A9-A10 comparisons for EAMR and the A7-A9 and A8-A10 comparisons for CTC in <xref ref-type="table" rid="t5">Table 5</xref>. Heatmap colors are interpreted qualitatively rather than as calibrated cross-model scores or final detections. Overall detection and false-alarm performance is assessed on the complete 800-image test set using the AP, OMD, FPPI, and ODR results, while Boundary IoU supplies the boundary-sensitive evaluation of EAMR.</p>
        </sec>
      </sec>
      <sec id="sec3-8">
        <title>3.8. Qualitative comparison</title>
        <p>As a visual complement to the quantitative results, <xref ref-type="fig" rid="fig7">Figure 7</xref> compares CSG-YOLO with D-FINE, YOLO26, and RF-DETR on five illustrative test images. The selection is intended to show detection behavior in a routine scene and under four visually identifiable conditions: complex surface textures, mild non-defective contamination, a small hole, and image blur. These cases support inspection of specific detection outcomes and do not constitute a statistically representative sample of the test-set distribution. These competitors cover recent YOLO-series and transformer-based detection paradigms and are all included in the quantitative comparisons of <xref ref-type="table" rid="t1">Tables 1</xref> and <xref ref-type="table" rid="t2">2</xref>. The displayed predictions follow the common evaluation settings described in Section 3.3, including the 640 × 640 input resolution and confidence threshold of 0.25. Green polygonal contours delineate container-surface regions; the contour in the ground-truth column is the reference annotation, whereas that in the CSG-YOLO column is the predicted surface boundary.</p>
        <fig id="fig7" position="float">
          <label>Figure 7</label>
          <caption>
            <p>Qualitative comparison on illustrative inspection cases. Columns A-F show the input image, ground truth, D-FINE<sup>[<xref ref-type="bibr" rid="B33">33</xref>]</sup>, YOLO26<sup>[<xref ref-type="bibr" rid="B30">30</xref>]</sup>, RF-DETR<sup>[<xref ref-type="bibr" rid="B35">35</xref>]</sup>, and CSG-YOLO, respectively. All displayed predictions were generated in this study. The references identify the compared detector architectures, rather than the sources of the images or prediction results. The displayed cases illustrate specific detection behaviors and do not establish performance across the test-set distribution.</p>
          </caption>
          <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="ir6036.fig.7.jpg" />
        </fig>
        <p>In the routine scene of the first row, all four detectors correctly localize the defect. The second row contains complex container-surface textures: D-FINE and YOLO26 produce texture-induced false detections, whereas RF-DETR and CSG-YOLO avoid these distractors. In the third row, the container surface contains only a small area of mild, non-defective contamination. Among the competing detectors, D-FINE and RF-DETR confuse this ordinary stain with a hole, while YOLO26 and CSG-YOLO avoid this category confusion. The fourth row presents a genuinely damaged small hole; all three competing methods miss this compact target, whereas CSG-YOLO detects it correctly. In the blurred scene of the fifth row, D-FINE and YOLO26 miss the layered repair-patch instances, while RF-DETR and CSG-YOLO retain the corresponding detections. In these particular images, CSG-YOLO avoids the illustrated texture- and stain-induced false detections and retains the displayed small-hole and blurred repair-patch detections, while also estimating the container-surface boundary. These observations are limited to the displayed cases and do not establish robustness under every instance of these conditions, their occurrence rates, or average superiority over the competing methods. Overall performance is assessed using AP, OMD, FPPI, and ODR on the complete 800-image test set under the common evaluation protocol, as reported in <xref ref-type="table" rid="t1">Tables 1</xref> and <xref ref-type="table" rid="t2">2</xref>; the qualitative examples serve only to illustrate individual model behaviors.</p>
        <sec id="sec3-8-1">
          <title>3.8.1. Failure cases</title>
          <p>
            <xref ref-type="fig" rid="fig8">Figure 8</xref> presents four illustrative failure cases of CSG-YOLO in a 2 × 2 layout, with each case showing ground-truth annotations, model predictions, and an enlarged region. In the upper-left case, the missed hole beside the container identification number occupies approximately 11 × 13 pixels at the 640 × 640 input resolution; its fine spatial cues may be weakened by subsequent feature downsampling. In the lower-left case, the hole partially occluded by a lashing strap is detected with confidence 0.28, slightly above the evaluation threshold of 0.25, while strongly reflective folds produce an additional false hole prediction with confidence 0.71. Thus, this case combines a low-confidence true detection with a reflection-induced false positive. In the overhead roof view of the upper-right case, worn and deformed locking hardware is mistaken for a defect hole, and the predicted surface mask extends into the background. In the lower-right case, a hole spans the junction between the container panel and lower beam, but the predicted box covers only its lower part, giving an IoU of 0.26 and failing the IoU ≥ 0.50 localization criterion.</p>
          <fig id="fig8" position="float">
            <label>Figure 8</label>
            <caption>
              <p>Four illustrative failure cases of CSG-YOLO in a 2 × 2 layout. Within each half of the figure, columns A-C (left) and D-F (right) show ground-truth annotations, model predictions, and enlarged regions, respectively. Surface contours in columns A and D denote ground-truth container-surface boundaries, whereas those in columns B and E denote predicted boundaries. The upper-left case shows a missed tiny hole; the lower-left case shows a reflection-induced false positive alongside an occluded true hole; the upper-right case shows confusion with locking hardware and mask spillover; and the lower-right case shows incomplete localization near the panel–beam boundary.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="ir6036.fig.8.jpg" />
          </fig>
          <p>These examples illustrate limitations associated with tiny-defect resolution, defect-like reflective or structural patterns, and unreliable surface priors in unusual views or near container boundaries.</p>
        </sec>
      </sec>
      <sec id="sec3-9">
        <title>3.9. Limitations and cross-port generalization</title>
        <p>The present evaluation is restricted to a single dataset acquired using quay-crane cameras at Qianwan Terminal, Port of Qingdao, and a fixed training/test split. Although the subsets are independent at the physical-container level, both originate from the same terminal and acquisition setting. The reported results therefore characterize performance on held-out containers within this source environment, rather than establish generalization to unseen ports. Repeating training with different random seeds measures training variability under this split and does not provide evidence of robustness to domain shift.</p>
        <p>Changes in port infrastructure and background clutter, container types and surface appearance, camera sensors and optics, illumination and weather, and inspection geometry, viewing distance, and camera angle may alter both defect appearance and the distribution of valid container surfaces. Such shifts may affect defect localization and classification as well as surface-mask estimation. Since detection uses the learned surface prior through MG-CTI, degradation of that prior in an unfamiliar acquisition setting may also weaken its guidance. These effects have not been quantified by the current experiments, and the observed gains should not be assumed to transfer unchanged across environments.</p>
        <p>No compatible external container-defect dataset with both defect bounding boxes and container-surface masks under a matching annotation protocol was available to the authors for this study. Consequently, no external cross-port evaluation is reported. Future work will collect and consistently annotate data from additional ports and camera systems, evaluate independent target environments under varied container, illumination, weather, and viewing conditions, and assess any adaptation or recalibration required before deployment.</p>
        <p>The learned surface representation is an auxiliary cue rather than a guaranteed valid detection domain. As the failure cases illustrate, unusual views and boundary regions can produce mask spillover or incomplete defect localization. The directional ablations show that improvements in auxiliary mask metrics do not uniformly translate into gains in all detection metrics.</p>
        <p>The engineering metrics also have a limited interpretation: OMD and FPPI are class-agnostic and evaluated at one confidence threshold, while ODR checks box centers rather than full-box coverage. Three training runs quantify observed variability under the fixed split but do not establish statistical significance for small gains. Confidentiality restrictions on data and implementation limit independent reproduction.</p>
        <p>Runtime measurements are limited to the experimental RTX 4090 D platform and do not establish performance on low-power edge devices. Evaluation on such devices remains future work, including latency, memory use, power consumption, and detection accuracy after model conversion.</p>
      </sec>
    </sec>
    <sec id="sec4">
      <title>4. CONCLUSIONS</title>
      <p>This article presented a container-surface-guided dual-task framework for defect detection in complex port scenes. CSG-YOLO jointly models defect detection and surface segmentation, uses STFF to enhance multi-scale shared features, and employs MG-CTI to exchange complementary cues between the task heads. Directional ablations associate S → D with improved false-positive and outside-ROI suppression and D → S with improved surface-mask overlap and strict-IoU localization; the bidirectional configuration has the highest mean AP and lowest mean OMD and ODR among the interaction variants. Across three independent training runs using randomly generated seeds, CSG-YOLO-N improves mean AP, AP<sub>50</sub>, and AP<sub>75</sub> over YOLOv12-N by 2.4, 3.2, and 4.1 points, respectively, while reducing mean OMD, FPPI, and ODR. The current evidence is confined to a single-terminal dataset, and cross-port or cross-camera generalization has not been demonstrated. Future work will prioritize external validation under domain shift, alongside further optimization for real-time deployment on edge inspection devices.</p>
    </sec>
  </body>
  <back>
    <sec>
      <title>DECLARATIONS</title>
      <sec>
        <title>Authors’ contributions</title>
        <p>Made substantial contributions to conception and design of the study, performed data analysis and interpretation, and wrote the manuscript: Zhen, M.</p>
        <p>Provided technical guidance and reviewed the manuscript: Zhao, J.; Jia, N.; Zhao, W.</p>
        <p>Reviewed the manuscript: Zhen, M.</p>
      </sec>
      <sec>
        <title>Availability of data and materials</title>
        <p>This study uses a private dataset of 4,000 still images acquired by quay-crane cameras at Qianwan Terminal, Port of Qingdao, China. The authors obtained permission to use the images for research and prepared the defect bounding-box annotations and container-surface masks, as described in Section 3.1. The images and annotations are not publicly available because of confidentiality obligations under the applicable data-use and port-related agreements. The associated model source code, configuration files, trained weights, and evaluation scripts are also not publicly released under these restrictions. The manuscript describes the model architecture, key hyperparameters, training protocol, and evaluation procedures to support methodological transparency.</p>
      </sec>
      <sec>
        <title>AI and AI-assisted tools statement</title>
        <p>During the preparation of this manuscript, ChatGPT powered by GPT-5.6 Sol (OpenAI, released 2026-07-09) was used solely for language editing. The tool did not influence the study design, data collection, analysis, interpretation, or the scientific content of the work. All authors take full responsibility for the accuracy, integrity, and final content of the manuscript.</p>
      </sec>
      <sec>
        <title>Financial support and sponsorship</title>
        <p>This work was supported in part by the National Natural Science Foundation of China (Grant 62403361).</p>
      </sec>
      <sec>
        <title>Conflicts of interest</title>
        <p>All authors declared that there are no conflicts of interest.</p>
      </sec>
      <sec>
        <title>Ethical approval and consent to participate</title>
        <p>Not applicable.</p>
      </sec>
      <sec>
        <title>Consent for publication</title>
        <p>Not applicable.</p>
      </sec>
      <sec>
        <title>Copyright</title>
        <p>© The Author(s) 2026.</p>
      </sec>
    </sec>
    <ref-list>
      <ref id="B1">
        <label>1</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Lusiani</surname>
              <given-names>M</given-names>
            </name>
            <name>
              <surname>Zulkarnain</surname>
              <given-names />
            </name>
            <name>
              <surname>Komarudin</surname>
              <given-names />
            </name>
          </person-group>
          <comment>Object detection in container terminals based on deep learning approach: a systematic literature review. In <italic>2024 IEEE International Conference on Industrial Engineering and Engineering Management (IEEM)</italic>, Bangkok, Thailand. Dec 15-18, 2024. IEEE; 2024. pp. 0560-5.</comment>
          <pub-id pub-id-type="doi">10.1109/IEEM62345.2024.10857037</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B2">
        <label>2</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Liu</surname>
              <given-names>Y</given-names>
            </name>
            <name>
              <surname>Chen</surname>
              <given-names>H</given-names>
            </name>
          </person-group>
          <comment>A lightweight container detection network model based on YOLOv5s. In <italic>2023 42nd Chinese Control Conference (CCC)</italic>, Tianjin, China. Jul 24-26, 2023. IEEE; 2023. pp. 4267-72.</comment>
          <pub-id pub-id-type="doi">10.23919/CCC58697.2023.10239754</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B3">
        <label>3</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Pambudi</surname>
              <given-names>DS</given-names>
            </name>
            <name>
              <surname>Handayani</surname>
              <given-names>R</given-names>
            </name>
            <name>
              <surname>Hidayah</surname>
              <given-names>L</given-names>
            </name>
          </person-group>
          <comment>Template matching algorithm for noise detection in cargo container. In <italic>2018 Third International Conference on Informatics and Computing (ICIC)</italic>, Palembang, Indonesia. Oct 17-18, 2018. IEEE; 2018. p. 1-9.</comment>
          <pub-id pub-id-type="doi">10.1109/IAC.2018.8780543</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B4">
        <label>4</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>İmamoğlu</surname>
              <given-names>ZE</given-names>
            </name>
            <name>
              <surname>Tuğlular</surname>
              <given-names>T</given-names>
            </name>
            <name>
              <surname>Baştanlar</surname>
              <given-names>Y</given-names>
            </name>
          </person-group>
          <comment>Container damage detection and classification using container images. In <italic>2020 28th Signal Processing and Communications Applications Conference (SIU)</italic>, Gaziantep, Turkey. Oct 05-07, 2020. IEEE; 2020. p. 1-4.</comment>
          <pub-id pub-id-type="doi">10.1109/SIU49456.2020.9302442</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B5">
        <label>5</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Huang</surname>
              <given-names>XR</given-names>
            </name>
            <name>
              <surname>Huang</surname>
              <given-names>GZ</given-names>
            </name>
            <name>
              <surname>Kuo</surname>
              <given-names>SY</given-names>
            </name>
            <name>
              <surname>Chen</surname>
              <given-names>LB</given-names>
            </name>
          </person-group>
          <comment>A vision transformer model-based shipping container damage inspection scheme. In <italic>2024 International Conference on Consumer Electronics - Taiwan (ICCE-Taiwan)</italic>, Taichung, Taiwan. Jul 09-11, 2024. IEEE; 2024. pp. 817-18.</comment>
          <pub-id pub-id-type="doi">10.1109/ICCE-Taiwan62264.2024.10674300</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B6">
        <label>6</label>
        <nlm-citation publication-type="journal">
          <person-group person-group-type="author">
            <name>
              <surname>Kuo</surname>
              <given-names>SY</given-names>
            </name>
            <name>
              <surname>Lin</surname>
              <given-names>PC</given-names>
            </name>
            <name>
              <surname>Huang</surname>
              <given-names>XR</given-names>
            </name>
            <name>
              <surname>Huang</surname>
              <given-names>GZ</given-names>
            </name>
            <name>
              <surname>Chen</surname>
              <given-names>LB</given-names>
            </name>
          </person-group>
          <article-title>Cad-Transformer: a CNN–transformer hybrid framework for automatic appearance defect classification of shipping containers</article-title>
          <source>IEEE Trans Instrum Meas</source>
          <year>2025</year>
          <volume>74</volume>
          <fpage>1</fpage>
          <lpage>21</lpage>
          <pub-id pub-id-type="doi">10.1109/TIM.2025.3548214</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B7">
        <label>7</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Huang</surname>
              <given-names>Y</given-names>
            </name>
            <name>
              <surname>Chen</surname>
              <given-names>H</given-names>
            </name>
            <name>
              <surname>Zheng</surname>
              <given-names>Z</given-names>
            </name>
            <name>
              <surname>Jia</surname>
              <given-names>Y</given-names>
            </name>
            <name>
              <surname>Chen</surname>
              <given-names>G</given-names>
            </name>
          </person-group>
          <comment>Attention-enhanced YOLO-based framework for container damage detection in port environments. In <italic>2026 5th International Symposium on Computer Applications and Information Technology (ISCAIT)</italic>, Dongguan, China. Jan 23-25, 2026. IEEE; 2026. pp. 493-7.</comment>
          <pub-id pub-id-type="doi">10.1109/ISCAIT69154.2026.11477293</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B8">
        <label>8</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Zhao</surname>
              <given-names>Z</given-names>
            </name>
          </person-group>
          <comment>Research on port container damage detection algorithm based on C2PSA-improved YOLOv11. In <italic>2026 5th International Symposium on Computer Applications and Information Technology (ISCAIT)</italic>, Dongguan, China. Jan 23-25, 2026. IEEE; 2026; pp. 79-83.</comment>
          <pub-id pub-id-type="doi">10.1109/ISCAIT69154.2026.11477308</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B9">
        <label>9</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Zheng</surname>
              <given-names>Y</given-names>
            </name>
            <name>
              <surname>Shi</surname>
              <given-names>X</given-names>
            </name>
            <name>
              <surname>Zhou</surname>
              <given-names>Y</given-names>
            </name>
            <name>
              <surname>Hu</surname>
              <given-names>K</given-names>
            </name>
            <name>
              <surname>Li</surname>
              <given-names>W</given-names>
            </name>
          </person-group>
          <comment>Container damage detection method based on improved YOLOv8. In <italic>2025 6th International Conference on Big Data, Artificial Intelligence and Internet of Things Engineering (ICBAIE)</italic>, Shanghai, China. Oct 17-19, 2025. IEEE; 2025. pp. 220-3.</comment>
          <pub-id pub-id-type="doi">10.1109/ICBAIE66852.2025.11326554</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B10">
        <label>10</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Bahrami</surname>
              <given-names>Z</given-names>
            </name>
            <name>
              <surname>Zhang</surname>
              <given-names>R</given-names>
            </name>
            <name>
              <surname>Rayhana</surname>
              <given-names>R</given-names>
            </name>
            <name>
              <surname>Wang</surname>
              <given-names>T</given-names>
            </name>
            <name>
              <surname>Liu</surname>
              <given-names>Z</given-names>
            </name>
          </person-group>
          <comment>Optimized deep neural network architectures with anchor box optimization for shipping container corrosion inspection. In <italic>2020 IEEE Symposium Series on Computational Intelligence (SSCI)</italic>, Canberra, Australia. Dec 01-04, 2020. IEEE; 2020. pp. 1328-33.</comment>
          <pub-id pub-id-type="doi">10.1109/SSCI47803.2020.9308472</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B11">
        <label>11</label>
        <nlm-citation publication-type="journal">
          <article-title>Nguyen Thi Phuong, T.; Cho, G. S.; Chatterjee, I. Automating container damage detection with the YOLO-NAS deep learning model</article-title>
          <source>Sci Prog</source>
          <year>2025</year>
          <volume>108</volume>
          <fpage>00368504251314084</fpage>
          <pub-id pub-id-type="doi">10.1177/00368504251314084</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B12">
        <label>12</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Zhang</surname>
              <given-names>L</given-names>
            </name>
          </person-group>
          <comment>Container damage detection based on self contrastive learning and deep convolutional neural networks. In <italic>2025 5th International Conference on Electronic Communication, Computer Science and Technology (ECCST)</italic>, Qinhuangdao, China. Dec 26-28, 2025. IEEE; 2025. pp. 221-5.</comment>
          <pub-id pub-id-type="doi">10.1109/ECCST68196.2025.11441171</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B13">
        <label>13</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Vasileiadis</surname>
              <given-names>S</given-names>
            </name>
            <name>
              <surname>Aslam</surname>
              <given-names>S</given-names>
            </name>
            <name>
              <surname>Orphanides</surname>
              <given-names>K</given-names>
            </name>
            <etal />
          </person-group>
          <comment>Real-time container tracking and damage detection at seaports using deep learning. In <italic>20th Conference on Computer Science and Intelligence Systems (FedCSIS)</italic>, Kraków, Poland. Sep 14-17, 2025. IEEE; 2025. pp. 277-85.</comment>
          <pub-id pub-id-type="doi">10.15439/2025F5518</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B14">
        <label>14</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Rahman</surname>
              <given-names>A</given-names>
            </name>
            <name>
              <surname>Khan</surname>
              <given-names>MSH</given-names>
            </name>
            <name>
              <surname>Tazwar</surname>
              <given-names>M</given-names>
            </name>
            <name>
              <surname>Rahat</surname>
              <given-names>MT</given-names>
            </name>
            <name>
              <surname>Nur</surname>
              <given-names>K</given-names>
            </name>
          </person-group>
          <comment>AutoContDamage: automated container damage detection in ports using RF-DETR model for enhanced operational efficiency. In <italic>2025 28th International Conference on Computer and Information Technology (ICCIT)</italic>, Cox’s Bazar, Bangladesh. Dec 19-21, 2025. IEEE; 2025. pp. 2986-91.</comment>
          <pub-id pub-id-type="doi">10.1109/ICCIT68739.2025.11491111</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B15">
        <label>15</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Li</surname>
              <given-names>X</given-names>
            </name>
            <name>
              <surname>Huang</surname>
              <given-names>X</given-names>
            </name>
            <name>
              <surname>Liu</surname>
              <given-names>Q</given-names>
            </name>
          </person-group>
          <comment>Container damage identification based on RP-FCN. In <italic>2020 39th Chinese Control Conference (CCC)</italic>, Shenyang, China. Jul 27-29, 2020. IEEE; 2020. pp. 7031-4.</comment>
          <pub-id pub-id-type="doi">10.23919/CCC50068.2020.9189392</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B16">
        <label>16</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Wang</surname>
              <given-names>H</given-names>
            </name>
            <name>
              <surname>Liu</surname>
              <given-names>Q</given-names>
            </name>
            <name>
              <surname>Zhang</surname>
              <given-names>G</given-names>
            </name>
          </person-group>
          <comment>Container damage detection algorithm based on fast-solo. In <italic>Proceedings of 2022 Chinese Intelligent Systems Conference</italic>. Jia, Y.; Zhang, W.; Fu, Y.; Zhao, S.; Eds; Singapore: Springer Nature Singapore; 2022. pp. 119-31.</comment>
          <pub-id pub-id-type="doi">10.1007/978-981-19-6226-4_13</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B17">
        <label>17</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Su</surname>
              <given-names>W</given-names>
            </name>
            <name>
              <surname>Yu</surname>
              <given-names>N</given-names>
            </name>
          </person-group>
          <comment>An end-to-end detection and segmentation model for container surface damage based on YOLOv11. In <italic>2025 5th International Conference on Electronic Information Engineering and Computer Communication (EIECC)</italic>, Wuhan, China. Dec 26-28, 2025. IEEE; 2025. pp. 928-32.</comment>
          <pub-id pub-id-type="doi">10.1109/EIECC67963.2025.11409689</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B18">
        <label>18</label>
        <nlm-citation publication-type="journal">
          <person-group person-group-type="author">
            <name>
              <surname>Ornelas</surname>
              <given-names>D</given-names>
            </name>
            <name>
              <surname>Canedo</surname>
              <given-names>D</given-names>
            </name>
            <name>
              <surname>Neves</surname>
              <given-names>AJR</given-names>
            </name>
          </person-group>
          <article-title>Semantic segmentation of corrosion in cargo containers using deep learning</article-title>
          <source>Sustainability</source>
          <year>2025</year>
          <volume>17</volume>
          <fpage>6480</fpage>
          <pub-id pub-id-type="doi">10.3390/su17146480</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B19">
        <label>19</label>
        <nlm-citation publication-type="journal">
          <person-group person-group-type="author">
            <name>
              <surname>Liu</surname>
              <given-names>Z</given-names>
            </name>
            <name>
              <surname>Zhao</surname>
              <given-names>W</given-names>
            </name>
            <name>
              <surname>Jia</surname>
              <given-names>N</given-names>
            </name>
            <name>
              <surname>Liu</surname>
              <given-names>X</given-names>
            </name>
            <name>
              <surname>Yang</surname>
              <given-names>J</given-names>
            </name>
          </person-group>
          <article-title>SANet: scale-adaptive network for lightweight salient object detection</article-title>
          <source>Intell Robot</source>
          <year>2024</year>
          <volume>4</volume>
          <fpage>503</fpage>
          <lpage>23</lpage>
          <pub-id pub-id-type="doi">10.20517/ir.2024.29</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B20">
        <label>20</label>
        <nlm-citation publication-type="journal">
          <person-group person-group-type="author">
            <name>
              <surname>Božič</surname>
              <given-names>J</given-names>
            </name>
            <name>
              <surname>Tabernik</surname>
              <given-names>D</given-names>
            </name>
            <name>
              <surname>Skočaj</surname>
              <given-names>D</given-names>
            </name>
          </person-group>
          <article-title>Mixed supervision for surface-defect detection: from weakly to fully supervised learning</article-title>
          <source>Comput Ind</source>
          <year>2021</year>
          <volume>129</volume>
          <fpage>103459</fpage>
          <pub-id pub-id-type="doi">10.1016/j.compind.2021.103459</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B21">
        <label>21</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>He</surname>
              <given-names>K</given-names>
            </name>
            <name>
              <surname>Gkioxari</surname>
              <given-names>G</given-names>
            </name>
            <name>
              <surname>Dollár</surname>
              <given-names>P</given-names>
            </name>
            <name>
              <surname>Girshick</surname>
              <given-names>R</given-names>
            </name>
          </person-group>
          <comment>Mask R-CNN. In <italic>2017 IEEE International Conference on Computer Vision (ICCV)</italic>. Venice, Italy. Oct 22-29, 2017. IEEE; 2017. pp. 2980-8.</comment>
          <pub-id pub-id-type="doi">10.1109/ICCV.2017.322</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B22">
        <label>22</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Xu</surname>
              <given-names>D</given-names>
            </name>
            <name>
              <surname>Ouyang</surname>
              <given-names>W</given-names>
            </name>
            <name>
              <surname>Wang</surname>
              <given-names>X</given-names>
            </name>
            <name>
              <surname>Sebe</surname>
              <given-names>N</given-names>
            </name>
          </person-group>
          <comment>PAD-Net: multi-tasks guided prediction-and-distillation network for simultaneous depth estimation and scene parsing. In 2<italic>018 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)</italic>, Salt Lake City, USA. Jun 18-23, 2018. IEEE; 2018. pp. 675-84.</comment>
          <pub-id pub-id-type="doi">10.1109/CVPR.2018.00077</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B23">
        <label>23</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Tian</surname>
              <given-names>Y</given-names>
            </name>
            <name>
              <surname>Ye</surname>
              <given-names>Q</given-names>
            </name>
            <name>
              <surname>Doermann</surname>
              <given-names>D</given-names>
            </name>
          </person-group>
          <comment>YOLOv12: attention-centric real-time object detectors. In <italic>Proceedings of the 39th International Conference on Neural Information Processing Systems</italic>, San Diego, USA and Mexico City, Mexico. Curran Associates Inc.; 2025. pp. 78433-57.</comment>
          <pub-id pub-id-type="doi">10.52202/085713-2627</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B24">
        <label>24</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Woo</surname>
              <given-names>S</given-names>
            </name>
            <name>
              <surname>Park</surname>
              <given-names>J</given-names>
            </name>
            <name>
              <surname>Lee</surname>
              <given-names>JY</given-names>
            </name>
            <name>
              <surname>Kweon</surname>
              <given-names>IS</given-names>
            </name>
          </person-group>
          <comment>CBAM: convolutional block attention module. In <italic>Computer Vision - ECCV 2018</italic>. Cham: Springer International Publishing; Ferrari, V.; Hebert, M.; Sminchisescu, C.; Weiss, Y.; Eds; Springer, Cham; 2018. pp. 3-19.</comment>
          <pub-id pub-id-type="doi">10.1007/978-3-030-01234-2_1</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B25">
        <label>25</label>
        <nlm-citation publication-type="web">
          <comment>COCO API: Python Detection Evaluation (cocoeval.py). <uri xlink:href="https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/pycocotools/cocoeval.py">https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/pycocotools/cocoeval.py</uri>. (accessed 2026-10-23)</comment>
        </nlm-citation>
      </ref>
      <ref id="B26">
        <label>26</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Cheng</surname>
              <given-names>B</given-names>
            </name>
            <name>
              <surname>Girshick</surname>
              <given-names>R</given-names>
            </name>
            <name>
              <surname>Dollár</surname>
              <given-names>P</given-names>
            </name>
            <name>
              <surname>Berg</surname>
              <given-names>AC</given-names>
            </name>
            <name>
              <surname>Kirillov</surname>
              <given-names>A</given-names>
            </name>
          </person-group>
          <comment>Boundary IoU: improving object-centric image segmentation evaluation. In <italic>2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)</italic>, Nashville, USA. Jun 20-25, 2021. IEEE; 2021; pp. 15329-37.</comment>
          <pub-id pub-id-type="doi">10.1109/CVPR46437.2021.01508</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B27">
        <label>27</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Wang</surname>
              <given-names>A</given-names>
            </name>
            <name>
              <surname>Chen</surname>
              <given-names>H</given-names>
            </name>
            <name>
              <surname>Liu</surname>
              <given-names>L</given-names>
            </name>
            <etal />
          </person-group>
          <comment>YOLOv10: real-time end-to-end object detection. In <italic>Proceedings of the 38th International Conference on Neural Information Processing Systems</italic>, Vancouver, Canada. Curran Associates Inc.; 2024. pp. 107984-8011.</comment>
          <pub-id pub-id-type="doi">10.5555/3737916.3741345</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B28">
        <label>28</label>
        <nlm-citation publication-type="web">
          <person-group person-group-type="author">
            <name>
              <surname>Jocher</surname>
              <given-names>G</given-names>
            </name>
            <name>
              <surname>Qiu</surname>
              <given-names>J</given-names>
            </name>
          </person-group>
          <comment>Ultralytics YOLO11. Version 11.0.0; 2024. <uri xlink:href="https://github.com/ultralytics/ultralytics">https://github.com/ultralytics/ultralytics</uri>. (accessed 2026-10-23)</comment>
        </nlm-citation>
      </ref>
      <ref id="B29">
        <label>29</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Lei</surname>
              <given-names>M</given-names>
            </name>
            <name>
              <surname>Li</surname>
              <given-names>S</given-names>
            </name>
            <name>
              <surname>Wu</surname>
              <given-names>Y</given-names>
            </name>
            <etal />
          </person-group>
          <comment>YOLOv13: real-time object detection with hypergraph-enhanced adaptive visual perception. <italic>arXiv</italic> <bold>2025</bold>, arXiv:2506.17733. Available online: <uri xlink:href="https://doi.org/10.48550/arXiv.2506.17733">https://doi.org/10.48550/arXiv.2506.17733</uri>. (accessed 2026-10-23)</comment>
        </nlm-citation>
      </ref>
      <ref id="B30">
        <label>30</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Jocher</surname>
              <given-names>G</given-names>
            </name>
            <name>
              <surname>Qiu</surname>
              <given-names>J</given-names>
            </name>
            <name>
              <surname>Liu</surname>
              <given-names>M</given-names>
            </name>
            <etal />
          </person-group>
          <comment>Ultralytics YOLO26: unified real-time end-to-end vision models. <italic>arXiv</italic> <bold>2026</bold>, arXiv:2606.03748. Available online: <uri xlink:href="https://doi.org/10.48550/arXiv.2606.03748">https://doi.org/10.48550/arXiv.2606.03748</uri>. (accessed 2026-10-23)</comment>
        </nlm-citation>
      </ref>
      <ref id="B31">
        <label>31</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Zhao</surname>
              <given-names>Y</given-names>
            </name>
            <name>
              <surname>Lv</surname>
              <given-names>W</given-names>
            </name>
            <name>
              <surname>Xu</surname>
              <given-names>S</given-names>
            </name>
            <etal />
          </person-group>
          <comment>DETRs beat YOLOs on real-time object detection. In <italic>2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)</italic>, Seattle, USA. Jun 16-22, 2024. IEEE; 2024; pp. 16965-74.</comment>
          <pub-id pub-id-type="doi">10.1109/CVPR52733.2024.01605</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B32">
        <label>32</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Lv</surname>
              <given-names>W</given-names>
            </name>
            <name>
              <surname>Zhao</surname>
              <given-names>Y</given-names>
            </name>
            <name>
              <surname>Chang</surname>
              <given-names>Q</given-names>
            </name>
            <name>
              <surname>Huang</surname>
              <given-names>K</given-names>
            </name>
            <name>
              <surname>Wang</surname>
              <given-names>G</given-names>
            </name>
            <name>
              <surname>Liu</surname>
              <given-names>Y</given-names>
            </name>
          </person-group>
          <comment>RT-DETRv2: improved baseline with bag-of-freebies for real-time detection transformer. <italic>arXiv</italic> <bold>2024</bold>, arXiv:2407.17140. Available online: <uri xlink:href="https://doi.org/10.48550/arXiv.2407.17140">https://doi.org/10.48550/arXiv.2407.17140</uri>. (accessed 2026-10-23)</comment>
        </nlm-citation>
      </ref>
      <ref id="B33">
        <label>33</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Peng</surname>
              <given-names>Y</given-names>
            </name>
            <name>
              <surname>Li</surname>
              <given-names>H</given-names>
            </name>
            <name>
              <surname>Wu</surname>
              <given-names>P</given-names>
            </name>
            <name>
              <surname>Zhang</surname>
              <given-names>Y</given-names>
            </name>
            <name>
              <surname>Sun</surname>
              <given-names>X</given-names>
            </name>
            <name>
              <surname>Wu</surname>
              <given-names>F</given-names>
            </name>
          </person-group>
          <comment>D-FINE: redefine regression task of DETRs as fine-grained distribution refinement. In <italic>International Conference on Learning Representations</italic>; 2025. pp. 44015-31. <uri xlink:href="https://proceedings.iclr.cc/paper_files/paper/2025/file/6cf58a87e3097e7d1f9be3e8693a93de-Paper-Conference.pdf">https://proceedings.iclr.cc/paper_files/paper/2025/file/6cf58a87e3097e7d1f9be3e8693a93de-Paper-Conference.pdf</uri>. (accessed 2026-10-23)</comment>
        </nlm-citation>
      </ref>
      <ref id="B34">
        <label>34</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Huang</surname>
              <given-names>S</given-names>
            </name>
            <name>
              <surname>Lu</surname>
              <given-names>Z</given-names>
            </name>
            <name>
              <surname>Cun</surname>
              <given-names>X</given-names>
            </name>
            <name>
              <surname>Yu</surname>
              <given-names>Y</given-names>
            </name>
            <name>
              <surname>Zhou</surname>
              <given-names>X</given-names>
            </name>
            <name>
              <surname>Shen</surname>
              <given-names>X</given-names>
            </name>
          </person-group>
          <comment>DEIM: DETR with improved matching for fast convergence. In <italic>2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)</italic>, Nashville, USA. Jun 10-17, 2025. IEEE; 2025. pp. 15162-71.</comment>
          <pub-id pub-id-type="doi">10.1109/CVPR52734.2025.01412</pub-id>
        </nlm-citation>
      </ref>
      <ref id="B35">
        <label>35</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Robinson</surname>
              <given-names>I</given-names>
            </name>
            <name>
              <surname>Robicheaux</surname>
              <given-names>P</given-names>
            </name>
            <name>
              <surname>Popov</surname>
              <given-names>M</given-names>
            </name>
            <name>
              <surname>Ramanan</surname>
              <given-names>D</given-names>
            </name>
            <name>
              <surname>Peri</surname>
              <given-names>N</given-names>
            </name>
          </person-group>
          <comment>RF-DETR: neural architecture search for real-time detection trans-formers. In <italic>International Conference on Learning Representations</italic>; 2026. <uri xlink:href="https://proceedings.iclr.cc/paper_files/paper/2026/file/5bed8703db85ab27dc32f6a42f8fbdb6-Paper-Conference.pdf">https://proceedings.iclr.cc/paper_files/paper/2026/file/5bed8703db85ab27dc32f6a42f8fbdb6-Paper-Conference.pdf</uri>. (accessed 2026-10-23)</comment>
        </nlm-citation>
      </ref>
      <ref id="B36">
        <label>36</label>
        <nlm-citation publication-type="book">
          <person-group person-group-type="author">
            <name>
              <surname>Nan</surname>
              <given-names>Z</given-names>
            </name>
            <name>
              <surname>Li</surname>
              <given-names>X</given-names>
            </name>
            <name>
              <surname>Dai</surname>
              <given-names>J</given-names>
            </name>
            <name>
              <surname>Xiang</surname>
              <given-names>T</given-names>
            </name>
          </person-group>
          <comment>MI-DETR: an object detection model with multi-time inquiries mechanism. In <italic>2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)</italic>, Nashville, USA. Jun 10-17, 2025. IEEE; 2025. pp. 4703-12.</comment>
          <pub-id pub-id-type="doi">10.1109/CVPR52734.2025.00443</pub-id>
        </nlm-citation>
      </ref>
    </ref-list>
  </back>
</article>