On-device roadworks detection
Read more Read less about On-device roadworks detection
Problem
Running a large vision-language model on every frame is costly, slow and subject to rate limits. Field workers needed results within seconds.
Approach
The work is split by cost. A small on-device detector identifies which equipment is present and where, such as cones, barriers and temporary signage, and gives immediate feedback. Only frames that need further reasoning are sent to the server-side model, which reduces backend requests. I was responsible for the data, model selection, pseudo-label distillation, validation and on-device implementation.
Model selection
I compared the transformer-based RF-DETR with YOLO. RF-DETR Nano was the most accurate model trained, at 0.5997 mAP50-95, but at 30.16M parameters it was roughly twelve times the size of the deployable model. YOLO26n fitted the device budget at lower accuracy.
RF-DETR was therefore used as a teacher. It generated pseudo-labels on unlabelled footage, which were used to train the YOLO26n student. RF-DETR remains an option for higher-end devices. Licensing was also a factor in the choice.
Results and validation
The model was signed off on 2 September 2026.
- Pseudo-label distillation improved YOLO26n by +0.0366 mAP50-95, with no added inference cost.
- The gain held in all 5 cross-validation folds, at 2.15× the paired noise floor.
- A budget-matched control, with the same compute and no additional data, changed by −0.002. This rules out longer training as the cause.
- The signed-off model reached 0.5578 mAP50-95, with presence F1 of 0.82–0.94 across the five classes.
Thermal constraints
On a phone, sustained operation is limited by heat as well as accuracy. Thermal profiling showed that a PyTorch benchmark had overstated RF-DETR latency by 6.2× relative to ONNX Runtime, which changed the basis of the architecture decision.
Running on two CPU threads sustained 4.04 fps over a 30-minute soak test and lowered peak skin temperature by 3.2 °C compared with four threads. The handset still reached 57.1 °C and throttled, so overheating was reduced but not resolved.
Data
I built a model-in-the-loop labelling pipeline. A vision-language model generated initial labels, SAM refined them, and iterative self-training improved them further. After human review, the approved dataset contained 1,400 images and 3,530 boxes from 633 source videos, including 264 true negatives. I also identified a dependency licensing issue before deployment.
Stack
YOLO26n · RF-DETR · SAM · pseudo-label distillation · k-fold cross-validation · on-device Android inference