Curve mirrors
Curve Mirror YOLOX-Tiny
An object detection model that finds roadside curve mirrors. It is designed for forward images from a phone in a vehicle.
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 higher of curve mirror and look-alike is taken.
- 3
Merge overlaps, then filter by threshold
Duplicates are merged (NMS), and those with a curve mirror score of 0.66 or higher count as detections.
Input and output
- Detects
- Curve mirrors (1 class). Mirrors on dedicated orange posts get a tall box covering mirror and post; other mirrors get a box around the mirror face only. Look-alikes such as round signs 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 curve mirror and look-alike. Duplicate suppression (NMS) is left to the caller.
- Formats
- PyTorch, ONNX, CoreML
- Threshold
- 0.66. Candidates with a curve mirror score at or above this count as detections. It was set on the validation images to keep false positives to 3 or fewer per 100 mirror-free images.
- License
- Apache-2.0
Evaluation
| Metric | Test (3,997 images, 465 mirrors) |
|---|---|
| AP50 (overall detection accuracy) | 0.618 |
| Precision (share of detections that were correct) | 0.661 |
| Recall (share of objects found) | 0.641 |
| Recall (mirrors boxed with their post) | 0.710 |
| Recall (mirrors boxed by face only) | 0.526 |
| False positives per 100 mirror-free images | 2.74 |
All figures except AP50 are at a threshold of 0.66. The test images come from regions not used in training and were used for this evaluation only once. The threshold was fixed before looking at them. Some counted false positives may be real mirrors that were missed during annotation; this is being checked.
Notes on use
- Mirrors that appear large and close are missed more often (recall for large mirrors: 0.463).
- Mirrors without a visible dedicated post, such as those on utility poles, are missed more often than mirrors seen with their post.
- The published ONNX and CoreML models are fixed at 1280 × 736. 4:3 images must be shrunk to fit, which lowered recall on the validation images (from 0.658 to 0.549). Landscape phone video (16:9) is not affected.
- Round signs, round streetlight shades and the backs of signs are sometimes mistaken for mirrors.
- 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.
