Aug 2026 · Personal Project
SAR Ship Detection: RetinaNet vs YOLO11s vs RF-DETR Benchmark
Benchmarked three object detection architectures — a from-scratch RetinaNet, a fine-tuned YOLO11s, and a fine-tuned RF-DETR-Small — on the HRSID SAR ship detection dataset (1,962 test images: 369 inshore / 1,593 offshore), scoring all three with the exact same hand-written mAP implementation, validated against pycocotools, so the ranking reflects the models rather than three different eyeballed metrics.
RF-DETR-Small won on every split, reaching mAP@0.5:0.95 of 0.644 on the full test set versus 0.592 for YOLO11s and 0.485 for RetinaNet, despite training for only 20 epochs at a lower 512² resolution and with fewer parameters than RetinaNet. Its NMS-free, bipartite-matching design also gave it by far the strongest inshore recall (0.672 vs. 0.411 for YOLO11s and 0.304 for RetinaNet) in the dense, occluded harbor scenes that punish every model.
To sanity-check generalization beyond curated 800×800 chips, all three were also run on a full-size, 6720×9323px Sentinel-1 SAR scene of the Helsinki coast — a different sensor and location than anything in training, processed from raw GRD data through orbit correction, thermal/border noise removal, calibration, speckle filtering, and terrain correction in ESA SNAP before inference.
Full writeup, architecture diagrams, and honest caveats — mismatched training budgets, different input resolutions, single-seed results — are in the linked repo, alongside the from-scratch RetinaNet build and both fine-tuning baselines.
Gallery
Highlights
- Wrote a from-scratch RetinaNet (ResNet-50 backbone with hand-written FPN, anchor heads, focal loss, and NMS) and trained it for 50 epochs at 896×896.
- Fine-tuned YOLO11s and RF-DETR-Small as library baselines, then scored all three with one shared, hand-written mAP implementation (greedy IoU matching, all-point AP interpolation) validated against pycocotools.
- Evaluated full-test, inshore, and offshore splits separately, isolating dense, occluded harbor scenes as the hardest case for every architecture.
- Processed a real Sentinel-1 GRD scene of the Helsinki coast through ESA SNAP (orbit correction, noise removal, calibration, speckle filtering, terrain correction) to test generalization beyond the training dataset.
- Found architecture and training recipe predicted performance far better than parameter count — RF-DETR-Small (31.8M params) and YOLO11s (9.4M params) both beat the larger, 36.3M-param RetinaNet.