Potholes
Pothole RF-DETR Nano
An object detection model that finds potholes. It is designed for images of the road ahead taken by a phone mounted in a car.
Tested on evaluation images
Results from the published ONNX model, run as-is on the test images. Numbers are scores (confidence, 0 to 1).
- Model output
- Ground truth (annotation)
The lower part of each image is cropped to 4:3 with boxes drawn on. Threshold 0.45.
Source: RDD2022 (Arya et al., CC BY 4.0)
How one image is processed
- 1
Stretch to a square
The image is resized to a 384 × 384 square without keeping the aspect ratio, the same as in training.
- 2
Get candidates
The model returns 300 candidates per image, with positions and scores. No duplicate suppression (NMS) is needed.
- 3
Filter by threshold
Candidates scoring 0.45 or higher count as detections. Raise it for fewer false positives, lower it for fewer misses.
Input and output
- Detects
- Potholes (1 class)
- Base model
- RF-DETR Nano, fine-tuned from public weights pretrained on COCO.
- Input
- A 384 × 384 pixel color image (RGB).
- Output
- Candidate positions and scores (confidence, 0 to 1), up to 300 per image.
- Formats
- PyTorch, ONNX, CoreML (iOS 17 or later)
- Threshold
- 0.45
- License
- Apache-2.0
Evaluation
| Metric | Validation (29 images, 42 potholes) | Test (29 images, 44 potholes) |
|---|---|---|
| AP50 (overall detection accuracy) | 0.731 | 0.702 |
| Precision (share of detections that were correct) | 0.87 | 0.74 |
| Recall (share of objects found) | 0.62 | 0.66 |
Updated on October 31, 2026 to v4, which adds pothole-free images to training as "not a pothole" examples. In real driving, the previous version (v3) mistook dashboard reflections, road markings and patched pavement for potholes. On 300 pothole-free RDD2022 Japan images not used in training, the share of images with a false detection dropped from 31% to 2%, while test recall fell from 0.73 to 0.66. Precision and recall are at a threshold of 0.45. The evaluation sets have only 29 images each, so the figures vary widely. The threshold was chosen while looking at the test results, so test figures may be optimistic. Performance in real driving has not yet been fully measured.
Notes on use
- It detects potholes only, not cracks or other damage.
- Performance at night, in rain or against the light has not been tested.
- False detections in cars with differently shaped or colored dashboards have not been checked yet.
- Do not base inspection or safety decisions on this model's output alone.
Start by describing your situation
Whether it is a MICHIKARTE trial or an AI app, your plans do not need to be final. Describe the photos or video you have and what you are struggling with, and you will get an email reply on what can and cannot be done. The contact form is in Japanese, but you are welcome to write in English.
