MBZUAI · CV703 Final Project · 2026

Cross-Domain Robustness of CNN vs Transformer Detectors for Underwater Object Detection

Buthaina Almulla Abdulla Alshehhi Shamma Yaqoob

Mohamed bin Zayed University of Artificial Intelligence, Abu Dhabi, UAE

0.640YOLOv8 in-domain mAP on DUO (DETR: 0.426)
66.2%DETR mAP retained DUO→RUOD (YOLO: 56.4%)
−88%DETR mAP under severe haze, the worst corruption
853real objects missing from RUOD labels, found in audit

Abstract

Underwater object detection is limited by two compounding problems: strong domain shift across datasets caused by variable water conditions (attenuation, haze, turbidity, and blur), and label noise arising from missed annotations in low-visibility images. We systematically compare a CNN detector (YOLOv8) and a Transformer detector (DETR) under cross-dataset transfer, physically motivated underwater corruptions, and noisy supervision, and propose a training strategy that improves cross-domain robustness without re-annotation. Our method combines (i) a raw↔enhanced feature-consistency loss using a cheap CLAHE-based underwater enhancer as an auxiliary view, and (ii) a noise-aware supervision reweighting that down-weights samples whose raw and enhanced features strongly disagree. Experiments on DUO and RUOD show three main findings. First, YOLO achieves higher absolute performance than DETR in-domain and cross-domain, but relative robustness is direction-dependent: DETR retains more in-domain mAP under DUO→RUOD shift (66.2% vs. 56.4%), whereas YOLO retains more under RUOD→DUO (40.3% vs. 29.9%). Second, haze and turbidity are the most destructive corruptions, while blur is the least harmful. Third, the proposed method is beneficial but detector- and direction-dependent: for DETR, the full method improves DUO→RUOD cross-domain mAP from 0.285 to 0.294 and AP50 from 0.608 to 0.614, whereas for YOLO the best variant is weight only on DUO→RUOD and full on RUOD→DUO.

See what the detectors see

Pick a corruption and drag the severity. The image is corrupted live in your browser with the paper’s formulas; the numbers are the measured DUO test-set mAP@[.5:.95].

Clean
0
YOLOv8 mAP
0.640
clean
DETR mAP
0.426
clean

mAP vs. corruption severity (DUO test set)

Severity 0 is the clean test set. Click a panel to load it in the explorer above.

YOLOv8 (CNN)DETR (Transformer)

Method: dual-view training without re-annotation

Each image is seen twice: raw and through a cheap CLAHE enhancer. The enhancer isn’t treated as ground truth, only as a different view. Feature disagreement between the two views drives both a consistency loss and a per-batch trust weight on the labels.

Second view

CLAHE enhancer

Convert to LAB, apply CLAHE (clip 2.0, 8×8 tiles) to luminance only, convert back. Deterministic, no trainable parameters.

Consistency

Feature-invariance loss

MSE between raw and enhanced features: YOLO backbone (layers 0–9) or DETR encoder last hidden state. Uses no labels.

Noise-aware

Disagreement reweighting

Normalize per-image disagreement within the batch, map to a weight (α = 2), and scale the detection loss by the batch mean.

Implementation diagram of the dual-view training framework for YOLOv8 and DETR
Implementation details for both detectors. Solid arrows carry gradients; dashed arrows are no-grad. YOLO runs separate backbone passes for the consistency and uncertainty terms; DETR reuses the encoder state from the supervised forward.
RQ1

Which detector family transfers better?

Cross-domain mAP retention

Cross-domain mAP ÷ matched in-domain mAP, evaluated on the 4 shared classes.

YOLOv8DETR
Train → TestModelAP50mAPRetention
In-domain
DUO → DUODETR0.6940.426–
YOLOv80.7970.640–
RUOD → RUODDETR0.6550.351–
YOLOv80.8620.575–
Cross-domain (4 shared classes)
DUO → RUODDETR0.6080.28266.2%
YOLOv80.6290.36156.4%
RUOD → DUODETR0.2450.10529.9%
YOLOv80.3670.23240.3%

RUOD is pHash-deduplicated against DUO (Hamming ≤ 4 over 18,648 images) before any cross-domain evaluation to avoid train–test leakage.

Why is DUO → RUOD easier than RUOD → DUO?

Annotation density: DUO averages 9.5 boxes/image vs. RUOD’s 4.7, so DUO forces finer discrimination. Label space: RUOD-trained models spread confidence over 10 classes, diluting the 4 shared ones. Visual nesting: DUO’s narrow green palette sits inside RUOD’s broader distribution, so DUO features cover more of RUOD than the reverse.

Answer. YOLO wins in absolute terms in both directions, but relative robustness depends on direction: DETR retains more under DUO→RUOD, YOLO under RUOD→DUO. The reverse transfer is harder for both, especially DETR.
RQ2

How do detectors degrade under underwater corruptions?

CorruptionWhat it simulatesYOLOv8 s=5DropDETR s=5Drop
Attenuationred-first light absorption0.45129.5%0.27236.2%
Hazebackscatter veil0.11382.3%0.05387.6%
Turbiditysuspended-particle noise0.03295.0%0.10874.6%
Bluroptical softening0.52318.3%0.35217.4%

Clean mAP: YOLOv8 0.640, DETR 0.426. Drop is the relative reduction from clean to severity 5.

Answer. Haze is the most catastrophic and blur the most benign; attenuation is moderate. Turbidity shows a severity-dependent inversion: DETR loses more at mild noise, but YOLO collapses more at the extreme. Mild blur even nudges YOLO up, acting as an implicit denoiser.
RQ3

Does dual-view training help without re-annotation?

DETR · 30 epLconswAP50mAP
DUO → RUOD
Baseline––0.6080.285
Cons. only✓–0.6080.285
Weight only–✓0.5720.278
Full✓✓0.6140.294+0.009
RUOD → DUO
Baseline––0.2450.105
Cons. only✓–0.2390.086
Weight only–✓0.2420.098
Full✓✓0.2360.084
YOLOv8 · 50 epLconswAP50mAP
DUO → RUOD
Baseline––0.6290.361
Cons. only✓–0.6280.363
Weight only–✓0.6470.372+0.011
Full✓✓0.6080.352
RUOD → DUO
Baseline––0.3670.232
Cons. only✓–0.3600.230
Weight only–✓0.3580.229
Full✓✓0.3740.238+0.006

Cross-domain evaluation on the 4 shared classes. Bold marks the best variant per block; deltas are mAP over baseline.

Why the combination matters

Consistency alone barely moves DETR: raw and enhanced features start nearly identical, so the loss gives almost no gradient. Weighting alone has no meaningful uncertainty signal, and at DETR’s batch size of 2 the within-batch normalization collapses w toward 1. Only together does the model get a disagreement signal and use it to trust noisy labels less.

Answer. Yes, but it depends on the detector and the direction. The full method is best for DETR on DUO→RUOD and for YOLO on RUOD→DUO; noise-aware weighting alone is best for YOLO on DUO→RUOD.

The benchmark is part of the problem

Cross-domain models often find real objects the human annotators missed, and COCO evaluation counts every one of them as a false positive.

Qualitative detection results: in-domain, severe haze, cross-domain with unlabelled objects, and a ground-truth mislabel
Row 1: DETR in-domain localizes dense echinus clusters. Row 2: under severity-5 haze it nearly fails (mAP 0.053). Row 3: YOLO DUO→RUOD; yellow ★ boxes are real objects with no ground-truth label. Row 4: holothurians labelled as starfish; the model is right but doubly penalized.
120RUOD test images manually audited
1,212high-confidence unmatched predictions reviewed
881correctly localized but penalized (853 unlabelled + 28 class confusions)
+0.086mAP on the 21 worst images after fixing 157 missing labels
Zoomed view of cross-domain predictions with yellow stars marking unlabelled real objects
Zoomed: YOLO weight only on RUOD image 005935. Every yellow ★ is a real object counted as a false positive.
ClassFull GTMiss %Subset GTMiss %
Holothurian15,4800.4326825.0
Echinus63,5840.701,00944.1
Scallop14,7041.6354044.3
Starfish19,4000.5333930.1

Missing-label rates are low overall (0.4–1.6%) but jump to 25–44% in the audited subset. The noise is concentrated in specific images, and it is a cross-domain problem: the same correction moves in-domain mAP by < 0.001.

Limitations & future work

Code

Reproducible

bubulean/CV703-Underwater-Research-Project

Trained weights for every DETR and YOLO variant, pHash dedup pipeline for DUO/RUOD, the corruption suite, and eight notebooks covering dataset stats, baselines, cross-domain evaluation, corruption curves, both ablation studies, result visualizations, and the label-noise audit.

Citation

@techreport{almulla2026underwater,
  title       = {Cross-Domain Robustness of CNN vs Transformer Detectors
                 for Underwater Object Detection},
  author      = {Almulla, Buthaina and Alshehhi, Abdulla and Yaqoob, Shamma},
  institution = {Mohamed bin Zayed University of Artificial Intelligence},
  address     = {Abu Dhabi, United Arab Emirates},
  year        = {2026}
}