Road signs
Road Sign YOLOX-Tiny
An object detection model that finds Japanese road signs and sorts them into five classes by shape and color. It is designed for forward images from a phone in a vehicle or a dashcam.
Photos: 24kawa, pika_sky, Kamikou, y24, okadatsuneo / Mapillary (CC BY-SA 4.0)
How one image is processed
- 1
Shrink the long side to 1280
The image is shrunk to 1280 pixels on its long side, keeping the aspect ratio. A 16:9 image becomes 1280 × 720, and the missing 16 pixels at the bottom are filled with gray.
- 2
Get candidates
The model returns 200 candidates per image, with positions and scores. For each, the highest-scoring of the five classes and look-alike is taken, and look-alikes are dropped.
- 3
Merge overlaps, then filter by threshold
Duplicates are merged per class (NMS), and those scoring 0.5 or higher count as signs.
Input and output
- Detects
- Road signs, in five classes: guide, warning, regulatory, instruction and supplementary. It does not identify the specific sign (stop, speed limit and so on). Boxes cover the sign only, not the post; a main sign and a supplementary sign on one post get separate boxes. Look-alikes such as shop signs, traffic lights and sign backs are trained as a separate class so they can be told apart.
- Base model
- The YOLOX-Tiny architecture, trained from scratch with no pretrained weights.
- Input
- A 1280 × 736 pixel color image (RGB).
- Output
- 200 candidates per image, with positions (pixel coordinates) and scores (confidence, 0 to 1) for each of the five classes and look-alike. Duplicate suppression (NMS) is left to the caller.
- Formats
- PyTorch, ONNX
- Threshold
- 0.5. Candidates scoring at or above this count as signs. It was set on the validation images for the best balance of misses and false positives.
- License
- Apache-2.0
Evaluation
| Metric | Test (596 images, 988 signs) |
|---|---|
| AP50 (detection accuracy across all five classes) | 0.902 |
| Precision (share of detections that were correct) | 0.877 |
| Recall (share of objects found) | 0.857 |
| Classification accuracy (share of detected signs with the correct class) | 0.980 |
| Recall (regulatory) | 0.923 |
| Recall (instruction) | 0.875 |
| Recall (supplementary) | 0.698 |
| Recall (guide) | 0.661 |
| False positives per 100 sign-free images | 12.0 |
All figures except AP50 are at a threshold of 0.5. The test images come from seven regions not used in training and were used for this evaluation only once. The threshold was fixed before looking at them. Test annotations were made by AI and partly checked by the developer, not reviewed image by image. Warning signs are not reported, as the test set has only 9.
Notes on use
- Guide signs (including intersection and street name signs) and supplementary signs are missed more often than other classes (test recall: 0.661 and 0.698).
- Signs that appear large and close are missed more often. The model card explains how to filter boxes if you want to exclude large signs.
- The published ONNX model is fixed at 1280 × 736. 4:3 images must be shrunk to fit, which lowered recall on the validation images (from 0.869 to 0.740). Landscape phone video (16:9) is not affected.
- Shop signs, facility signboards and address plates are sometimes mistaken for road signs.
- 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.
