Abstract
Standard object detection metrics like Intersection over Union (IoU) fail when objects are only a few pixels wide because even a tiny shift in position causes the metric to plummet. This paper introduces Normalized Wasserstein Distance (NWD), a new metric that models bounding boxes as 2D Gaussian distributions and measures their similarity using optimal transport theory. By replacing IoU with NWD in label assignment, NMS, and loss functions, the authors achieved a massive 6.7 AP boost on tiny object benchmarks.
The Problem: IoU Sensitivity in Tiny Object Detection
Detecting "tiny" objects—those smaller than 16×16 pixels—is a notorious challenge in computer vision. While modern detectors excel at finding cars or pedestrians in high-resolution photos, they struggle with tiny targets like distant drones or small boats in satellite imagery.
The fundamental flaw lies in the hyper-sensitivity of IoU-based metrics to location deviation for small objects. As shown in the comparison below, a diagonal shift of just one pixel for a 6×6 pixel object causes the IoU to drop from 0.53 to 0.06. In contrast, for a normal-sized 36×36 object, the same one-pixel shift results in a much smaller drop (0.90 to 0.65).
This sensitivity creates two major problems during training:
- Label Assignment Failure: It becomes nearly impossible for the system to find "positive" anchors (training samples) that overlap enough with the ground truth.
- NMS Inaccuracy: During Non-Maximum Suppression (NMS), slight misalignments cause the detector to think two boxes for the same tiny object are actually different objects, leading to false positives.
Proposed Method: Normalized Wasserstein Distance (NWD)
The core innovation is treating a bounding box not as a rigid rectangle, but as a 2D Gaussian distribution.
- Gaussian Modeling: The center of the box $(cx, cy)$ becomes the mean of the distribution, and the width and height determine the covariance. This effectively places the highest "weight" at the center of the object and tapers off toward the edges, which better reflects how pixels are distributed in real-world objects.
- Wasserstein Distance: Instead of calculating overlapping areas (IoU), the authors use the 2nd-order Wasserstein distance to measure the distance between two Gaussian distributions. Unlike IoU, this distance can be calculated even if the boxes have zero overlap.
- Normalization: Since Wasserstein distance is a distance (0 to infinity) and detectors expect a similarity score (0 to 1), they apply an exponential normalization to create the Normalized Wasserstein Distance (NWD).
NWD is a "plug-and-play" replacement for IoU, integrated into three critical parts of the Faster R-CNN architecture: Label Assignment, NMS, and the Loss Function.
Key Insights: Smoothness and Scale Invariance
A critical advantage of NWD is its mathematical behavior compared to IoU. As illustrated in the deviation curves, the IoU curve is jagged and drops off sharply, whereas the NWD curve is smooth. This smoothness provides much more stable gradients for the neural network to learn from. Furthermore, NWD is naturally more robust to changes in scale; the NWD curves for objects of different sizes (4px to 48px) almost perfectly overlap, whereas IoU curves vary wildly.
Experimental Results
The researchers evaluated their method on specialized datasets including AI-TOD (Aerial Imagery for Tiny Object Detection), where the mean object size is a tiny 12.8 pixels, and VisDrone2019.
On the AI-TOD dataset, switching to NWD-based label assignment in Faster R-CNN resulted in a jump from 11.1% AP to 17.8% AP (+6.7 points). When applied to the DetectoRS model, they achieved 20.8% AP, outperforming all existing competitors. The most dramatic improvements were seen in "Very Tiny" objects (2-8 pixels), where accuracy often jumped from near-zero to usable performance levels.
Limitations and Future Work
While effective, NWD-based training may require more epochs (e.g., 24 instead of 12) to fully converge. Additionally, the normalization constant $C$ may require empirical tuning for datasets with vastly different average object sizes. Although calculating Wasserstein distance is more complex than IoU, the authors noted that the impact on training speed is negligible.
Summary updated