Localisation Loss and On-Device Cost for Small Objects in UAV Imagery
Research question
Without changing the network structure, can weighting the localisation loss improve detection of objects under 32 px? Does the improvement still hold on the device?
Why it matters
Many targets in aerial imagery are under 32×32 pixels, where a few pixels of box offset drop the IoU sharply, yet the localisation loss treats them the same as large objects. The usual fixes add a P2 head or multi-scale branches, which change the inference graph, require re-adapting the device pipeline and raise latency. This work changes only the training side and leaves the inference graph as it is.
Approach
- Quality-aware localisation weighting: w = min(exp(1 − CIoU), λ) multiplies the localisation loss, with no gradient through the weight. Worse boxes get larger weights, and λ caps them so wildly wrong boxes cannot dominate training
- Ultralytics' loss is swapped at run time and the network stays YOLO26n: 2.6110 M parameters and 6.5 GFLOPs, identical to the baseline
- One training contract on VisDrone: 80 epochs, 640 input, batch 12, SGD, mosaic off for the last 10 epochs; λ scanned from 1.5 to 4.0, with the main result over 3 seeds
- A self-written evaluation for objects under 32 px, with post-processing calibrated over a grid of confidence threshold {0.001 … 0.05} × NMS IoU {0.5, 0.6, 0.7}
- A UAVDT transfer experiment with λ carried over from VisDrone, not re-tuned; a side-by-side comparison with YOLO11n
- Latency, P95 and FPS/W measured in three power modes on a Jetson Orin Nano Super, with end-to-end time split into preprocessing, inference, NMS and Python wrapping
Findings
- The small-object gain is concentrated in the smallest classes such as pedestrians and people; a few classes barely change and are recorded as "no improvement", not as gains
- For λ ≥ 3 the results are identical digit for digit: the weight never reaches the cap, so the truncation stops acting
- Dropping the confidence threshold to 0.001 recalls a few more small objects, but about 92 of every 100 small-object predictions are wrong, so the final setting is conf 0.01 and NMS IoU 0.5
- Of the 22 ms end-to-end time, TensorRT inference takes only about 5 ms; preprocessing and Python overhead are the main bottleneck
- The two models share the same structure, so small latency differences should be read as a tie
- P95 tail latency gets clearly worse in the low-power modes; a real-time system should be designed to P95
What did not work
- On UAVDT the results are mixed: recall and the strict-IoU metric rise while precision and the loose-IoU metric fall, and the bus class gets clearly worse. With a single seed, this is not presented as a generalisation gain
Limits and notes
- Only the main VisDrone experiment has 3 seeds; UAVDT has neither multiple seeds nor a re-tuned λ
- The post-processing grid was scanned only on the improved model, not on the baseline
- Crowded, occluded and blurred scenes have only qualitative observations, no bucketed statistics