Mirror-Aware Self-Training for Detectors Moving onto Unfamiliar Water

Object detectors trained in one place tend to fail when moved somewhere new. The most effective fix used today is self-training: a slowly updated copy of the detector, called the teacher, labels the unlabeled images from the new location, and the working detector, called the student, learns from those labels. On water this fix has a specific weakness. Calm water acts as a mirror, so the reflection of a boat, a bridge pier or a riverside tree has the same edges, colors and shape as the real thing, only flipped upside down. A teacher that mistakes a reflection for an obstacle passes that mistake to the student as a confident label, and the student then learns to repeat it. We propose to break this loop with a reflection score that needs no labels from the new location. The score uses two pieces of physics. First, a reflection always sits below the object it mirrors and looks like that object flipped vertically. Second, its appearance breaks up from frame to frame as small waves move, while a solid object keeps its appearance. The score lowers the weight of suspected reflections in the self-training loss, so they are not learned as obstacles.

The setting matters because inland water is where maritime perception does worst. The LaRS benchmark reports sharp performance drops when models trained on open sea are used on rivers, where shorelines are close and reflections are large (LaRS). FloW reports that detectors routinely mistake sharp reflections for floating objects (FloW). Our claim is narrow and can be tested. When a detector is adapted from sea to inland water without target labels, most of the gap between current self-training and a detector trained on target labels comes from false positives on reflections. A label-free weighting based on mirror geometry and temporal stability removes most of that error without hurting recall on real small obstacles.

What Exists and What Is Missing

Three bodies of work each cover part of this problem. Research on adapting detectors to new domains has moved from adversarial feature matching to self-training. Domain Adaptive Faster R-CNN added a domain classifier at the image level and another at the object-proposal level, and trained the network to fool both. Align and Distill then showed that many reported gains disappear once the source-only baseline uses strong augmentation. Its ALDI++ method keeps a strong augmented warm-up and distills the teacher's continuous scores for class, box and objectness, rather than thresholded hard labels. ALDI++ is the method we build on and the strongest competitor. However, its soft targets pass along whatever the teacher believes, including confident beliefs about reflections. Cross-Domain Adaptive Teacher uses hard pseudo-labels and is exposed in the same way.

SEEN-DA is the closest attempt to separate signal from clutter during adaptation. It uses a frozen vision-language model, which scores image regions against text prompts for each object class, to find regions that clearly match a class and focus the adaptation on them. This works against the proposal on water. A sharp reflection of a boat matches the prompt "boat" well, so SEEN-DA would treat the reflection as foreground. We therefore treat SEEN-DA as evidence that semantic cues alone cannot reject reflections, and we rely on geometry and timing instead.

The maritime work supplies the physical priors but has not used them in detector adaptation. WaSR-SLR trains water/obstacle segmentation from weak labels using constraints such as "water cannot lie above the horizon," and it ignores glitter and reflections better than a fully supervised model. Its output is a segmentation mask, it is not adapted to new domains, and it has not been used to filter detector pseudo-labels. Neptune-X generates training images with physically plausible reflections offline. It needs captions, layouts and water masks, and it does not adapt a deployed detector. Song et al. adapt maritime classification across weather conditions but do not localize objects. The Fourier approach of FCVL assumes that domain shift lives in the amplitude spectrum and object structure lives in the phase. A reflection has the phase structure of a real object, so that split does not separate the two. Finally, BugNIST and SOAR show that detectors depend heavily on background. They motivate the work but do not provide a method.

Core Mechanism

The teacher produces candidate boxes $B$ on a target frame. For each one we compute a mirror score $m(B)$. We search for a horizontal axis $y=a$ above $B$, and for a region $B'$ above that axis, such that the vertically flipped features of $B'$ match the features of $B$. The match is computed on blurred backbone features so that rippling does not spoil it. The axis search is restricted to a band near the water edge. The edge is estimated without target labels, either from the lowest row of shore detections or from a horizon estimate, as in WaSR-SLR. Physics settles which member of a pair is real: for a camera above the surface, the reflection is always the lower member. So only the lower box is penalized, and a real buoy with its own reflection beneath it keeps its label.

We also compute a temporal score $s(B)$ from the 9 unlabeled frames that precede each LaRS keyframe. We track the box using the teacher's predictions on those frames and measure how consistent its appearance stays after a simple global motion correction. A reflection decorrelates under waves, while a hull does not. LaRS reports that video models fed raw temporal input gain nothing over single frames (LaRS). Our use of time is different: it judges which labels to trust and is not an input to the detector, so the student remains a single-frame, real-time model.

The two scores combine into a per-box weight $w(B)=(1-m(B))^{\alpha}\,s(B)^{\beta}$. Here $\alpha,\beta \ge 0$ are exponents that control how much each cue counts, $m(B)\in[0,1]$ is high for a likely reflection, and $s(B)\in[0,1]$ is high for a temporally stable box. The weight multiplies the ALDI++ distillation term:

$$\mathcal{L}_{\text{distill}}=\sum_{B} w(B)\,\ell_{\text{soft}}\big(f_{\text{student}}(B),\,f_{\text{teacher}}(B)\big).$$

In this loss, $\ell_{\text{soft}}$ is ALDI++'s soft multi-task distillation loss for one box, and $f_{\text{student}}, f_{\text{teacher}}$ are the two models' outputs. A down-weighted box is not turned into a background label. It simply carries less weight, which limits the damage when the score is wrong about a real object. A second variant also adds a weak background target for boxes with very high $m$, and we test both.

Research Program

The first step is to show the failure exists before fixing it. We run ALDI++ with no changes from sea to inland water. During training we track the rate of false positives that land on annotated reflection regions. If this rate does not rise during self-training, the premise of a confirmation loop is wrong, and the project shrinks to a benchmark study.

Detection labels come from LaRS instance masks converted to boxes. The source domain is the LaRS sea split, and MODS is optional extra source data (MODS). The targets are LaRS lakes and rivers, and FloW-Img evaluated as class-agnostic obstacle detection, since FloW contains floating waste only. Existing benchmarks do not label reflections, so we will hand-label reflection polygons on roughly 500 target images. Reflection false positives then become a measured quantity rather than a guess. Detector families are a Faster R-CNN, to match the ALDI setup, and a real-time transformer detector in the spirit of RTDETR-MARD, to check that the benefit carries over to a deployable architecture.

ALDI warns that checkpoints are often chosen using target labels (Align and Distill). Every method is therefore run for a fixed schedule with source-validated hyperparameters, and results chosen with target labels are reported separately as an upper bound.

Baselines

The naive reference point is a source-only detector trained with ALDI's strong augmentation and EMA warm-up, and applied to rivers and FloW without adaptation. ALDI showed that this baseline is much stronger than older versions, so any adaptation gain is measured against it.

The strongest existing method is ALDI++ with its published soft distillation, run on our data with the same backbone, schedule, augmentation and hyperparameter search budget as our method. Our method is a reweighting inside ALDI++, so the comparison changes exactly one thing. On terrestrial benchmarks ALDI++ reports +3.5 AP50 on Cityscapes→Foggy Cityscapes and +5.7 AP50 on Sim10k→Cityscapes, and comes within 1.0 AP of a target-supervised model (Align and Distill). There is no reported result on Lacuna for ALDI++ or any detector adaptation method on LaRS or FloW, so we establish that number ourselves. As in-domain upper references, RTDETR-MARD reports 86.6% mAP50 on FloW, and FCOS reports 0.969 F1 in the MODS danger zone. Both are trained with labels and are not adaptation results. We also train a target-label model of our own as the true upper bound.

A hard-threshold teacher in the style of Cross-Domain Adaptive Teacher shows whether soft or hard labels matter more on water. A segmentation-gated ALDI++ is the most dangerous competitor. It multiplies each pseudo-box by the fraction of its pixels that WaSR-SLR labels as obstacle. It is discussed in the next section.

Ablations isolate the two cues. We run the mirror score alone, the temporal score alone, and the mirror score with the "lower member only" rule replaced by symmetric down-weighting of both pair members. The last ablation tests whether the physical asymmetry is what keeps real objects.

Beating ALDI++ means a statistically reliable AP50 gain on the river and FloW targets across three seeds, together with a reduction of at least half in reflection false positives. Small-obstacle recall, the weakest category on LaRS by Recognition Quality, must not fall.

Why not just…?

Why not just raise the teacher's confidence threshold? Reflections are false positives precisely because they are confident. They copy the texture and edges of real objects (FloW), so a higher threshold should remove small real debris before it removes sharp reflections. We test this directly by sweeping the threshold and plotting reflection false positives against small-object recall. If some threshold matches our trade-off, the proposal fails.

Why not just gate pseudo-labels with a water segmenter such as WaSR-SLR? This is the real threat. WaSR-SLR already ignores reflections well (Learning with Weak Annotations), and the gate costs one extra network. Two things may limit it. The segmenter faces the same sea-to-river shift, and LaRS documents a performance cliff on rivers for segmentation models. Small floating objects also occupy few pixels in its mask. The segmentation-gated baseline is run head-to-head, with results broken down by object size and by the segmenter's own target accuracy. If it matches our method, the honest conclusion is that physically constrained segmentation is the right filter. Our label-free scores would then be reported as a fallback for settings with no trained segmenter, and the main claim would be withdrawn.

Why not just train on synthetic water with realistic reflections, as Neptune-X does? Neptune-X reports gains of +7.60% mAP for YOLOv11 (Neptune-X). It also acknowledges a remaining gap between generated and real textures, and it needs layouts and water masks that are unavailable for a new river. The two approaches are not exclusive. We will add a run that warms up on MGD synthetic data before self-training, to check whether synthetic exposure alone shuts down the reflection loop.

Why not just add radar? On FloW-RI, radar alone reaches only 0.405 AP50, against 0.640 for vision alone (FloW). Small non-metallic debris is poorly visible to radar, and many small vessels cannot carry the hardware. Radar fusion is complementary and is out of scope here.

Decisive Checks

Three results decide the outcome. The first is whether reflection false positives grow during ALDI++ self-training on inland targets, which is the confirmation loop. The second is whether the mirror-plus-temporal weighting reduces that growth and turns the reduction into AP50 gains over ALDI++ under label-free model selection. The third is whether it beats segmentation gating on small objects and on river scenes where the segmenter degrades. As a safeguard, we also run Cityscapes→Foggy Cityscapes, where there is no water and the weights should stay near 1, to confirm that the method matches ALDI++ there and does not harm terrestrial performance.