Weakly Supervised Contrastive Learning With Quantity Prompts for Moving Infrared Small Target Detection

Weiwei Duan, Luping Ji, Shengjia Chen, Sicheng Zhu, Jianghong Huang, Mao Ye

Introduction

Moving Infrared Small Target Detection (MISTD) is a critical yet challenging task in computer vision, often described as finding a "needle in a haystack." Infrared targets, such as distant drones or vehicles, typically occupy only a few pixels and are characterized by low signal-to-noise ratios, lack of distinct texture, and immersion in cluttered backgrounds.

While deep learning has significantly advanced MISTD, it imposes a heavy "data tax." State-of-the-art models generally require fully supervised training, necessitating grueling frame-by-frame manual annotation of tiny targets across thousands of video frames. This process is not only expensive and time-consuming but also prone to human error. Existing weakly-supervised approaches, which rely on cheaper image-level tags, often struggle in the infrared domain because targets lack the rich visual features (like shape or texture) that these methods typically exploit. To bridge this gap, we introduce WeCoL (Weakly-supervised Contrastive Learning), a framework that utilizes simple "quantity prompts"—a count of targets per frame—to achieve performance comparable to fully supervised methods.

The WeCoL Framework

WeCoL eliminates the need for pixel-perfect labels by leveraging three core innovations designed to extract maximal information from minimal supervision.

1. Potential Target Mining (PTM)

To initiate training without ground-truth bounding boxes, the system must generate reliable pseudo-labels. The PTM module combines spatial and temporal cues to identify regions of interest. It utilizes a pretrained infrared foundation model (InfMAE) for spatial analysis and energy accumulation over multiple frames for temporal consistency. These interest points are then fed into the Segment Anything Model (SAM). Despite SAM being trained on natural images, it effectively generates initial bounding boxes when prompted with these motion- and energy-derived points.

2. Pseudo-label Contrastive Learning (PCL)

Not all pseudo-labels generated by PTM are accurate. To mitigate the impact of noise, WeCoL employs a Multiple Instance Learning (MIL) classifier to score the quality of labels. A contrastive loss is then applied, forcing the model to learn feature representations that cluster "positive" samples (likely targets) together while pushing them away from "negative" samples (background noise). This iterative refinement allows the model to self-correct during the training process.

3. Long-short Term Motion-aware (LTM) Learning

In infrared imagery, motion is often a more reliable indicator than visual appearance. The LTM module analyzes movement across two scales:

  • Long-term: Fuses features across a sequence of frames to map global trajectories and ensure temporal persistence.
  • Short-term: Employs the Discrete Cosine Transform (DCT) to analyze motion in the frequency domain. This allows the model to distinguish the specific local movement patterns of a target from the flickering or drifting noise of a complex background.

Experimental Results

WeCoL was evaluated on two major public MISTD benchmarks: DAUB (13,778 frames of drone targets) and ITSDT-15K (15,000 frames of vehicle targets). During training, the model only had access to the target count per frame, ignoring all provided bounding boxes.

Performance and Efficiency

On the DAUB dataset, WeCoL achieved an mAP50 of 89.41% and an F1 score of 95.09%. This represents approximately 94% of the performance of top-tier fully-supervised models like SSTNet. Furthermore, WeCoL significantly outperformed previous weakly-supervised methods (such as ESFL and PLE), which frequently failed to produce meaningful detections on these challenging infrared datasets.

In terms of operational efficiency, the model maintains an inference speed of 16.92 FPS. While slightly lower than some specialized real-time architectures, it remains viable for near-real-time applications in various surveillance contexts.

Key Insights

  • Quantity as a Soft Constraint: The use of target counts acts as a powerful anchor. By knowing the exact number of targets, the contrastive learning process is prevented from collapsing into false positives or missing targets entirely.
  • Motion-Centric Detection: By treating detection as a signal processing task through DCT-based frequency analysis, WeCoL proves that motion cues can effectively compensate for the lack of visual detail in infrared small targets.
  • Foundation Model Adaptability: The successful integration of SAM and InfMAE demonstrates that large-scale foundation models can be effectively repurposed for specialized domains like infrared sensing when provided with appropriate prompts.

Conclusion and Future Work

WeCoL demonstrates that high-performance infrared target detection is possible without the prohibitive cost of full supervision. By shifting the focus from pixel-level labeling to quantity-based contrastive learning and motion analysis, the framework provides a scalable path for deploying MISTD systems.

Future research will focus on two areas: reducing the computational complexity of the architecture to enable deployment on edge devices (such as the drones themselves) and further refining the Potential Target Mining stage to reduce the model's sensitivity to initial pseudo-label quality.

Summary updated

BibTeX
@article{duan2025weakly,
  author = {Weiwei Duan and Luping Ji and Shengjia Chen and Sicheng Zhu and Jianghong Huang and Mao Ye},
  title = {{Weakly Supervised Contrastive Learning With Quantity Prompts for Moving Infrared Small Target Detection}},
  journal = {IEEE Trans. Geosci. Remote. Sens.},
  year = {2025},
}
Figure