PiattiDetector โ Aerial Object Detection (SkyFusion)
Lightweight anchor-free object detector for aerial imagery. Detects aircraft, ships and vehicles using a CenterNet-inspired approach with heatmap + size + offset regression heads.
Developed as part of a Machine Learning course (Sapienza, January 2026).
Code: github.com/JavideuS/aerial-vision ยท regression/
Architecture
Custom ResNet backbone (3 residual blocks, 8ร downsampling) + three detection heads:
| Head | Output | Purpose |
|---|---|---|
| Heatmap | [B, C, H/8, W/8] |
Object center confidence per class |
| Size | [B, 2, H/8, W/8] |
Bounding box width and height |
| Offset | [B, 2, H/8, W/8] |
Sub-pixel center refinement |
~2.1M parameters. Input: 512ร512 px.
Dataset
SkyFusion / Tiny Object Detection โ 3000 aerial images, 640ร640 px, COCO format.
Classes: Aircraft, Ship, Vehicle.
Usage
from huggingface_hub import hf_hub_download
import torch
from modelv2 import PiattiObjectDetector # clone the repo first
ckpt_path = hf_hub_download(
repo_id="JavideuS/skyfusion-flood-reg",
filename="PiattiDetector-2111k.pth"
)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = PiattiObjectDetector(num_classes=3).to(device)
ckpt = torch.load(ckpt_path, map_location=device)
model.load_state_dict(ckpt['model_state_dict'])
model.eval()
For full inference with bounding box decoding and visualization see main.py.
Limitations
- Trained on a small dataset (3000 images); may not generalise to aerial imagery with significantly different sensors or altitudes
- No NMS post-processing in the provided inference script