Instructions to use Panoramax/classify_nl_subsigns with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use Panoramax/classify_nl_subsigns with ultralytics:
from huggingface_hub import hf_hub_download from ultralytics import YOLO # pick the weights file from this repo's "Files and versions" tab weights = hf_hub_download("Panoramax/classify_nl_subsigns", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
classify_nl_subsigns
YOLOv8 image classification model for identifying Dutch sub-sign types (onderbord, OB-series, RVV 1990). Trained on cropped sub-sign images from the Panoramax platform.
This model is the second stage in a two-step pipeline:
- Detection β
Panoramax/detect_nl_subsignslocalises the sub-sign crop - Classification β this model identifies the OB type from the crop
What is an onderbord?
An onderbord is a supplementary sign from the Dutch OB-series (RVV 1990) mounted directly below a main road sign. There are dozens of variants β some icon-based, others purely text-based.
Model details
| Property | Value |
|---|---|
| Architecture | YOLOv8m-cls (Ultralytics) |
| Base model | yolov8m-cls.pt (pretrained ImageNet) |
| Fine-tuning epochs | 250 |
| Input size | 224 Γ 224 px |
| Classes | 24 |
| Training images | 2,892 |
| Validation images | 725 |
Classes
| ID | Class | Description |
|---|---|---|
| 0 | OB02 |
Fiets |
| 1 | OB11 |
Vrachtauto |
| 2 | OB12 |
Bus |
| 3 | OB52 |
Uitgezonderd fiets |
| 4 | OB54 |
Uitgezonderd (brom)fiets |
| 5 | OB62 |
Uitgezonderd bus |
| 6 | OB64 |
Uitgezonderd tram |
| 7 | OB303 |
Wegsleepbord (*) |
| 8 | OB304 |
Wegsleepbord met tekst (*) |
| 9 | OB501l |
Pijl links |
| 10 | OB501r |
Pijl rechts |
| 11 | OB502 |
Pijlen links rechts |
| 12 | OB503 |
Pijlen rechts links |
| 13 | OB503OB02 |
Pijlen rechts links + fiets (*) |
| 14 | OB503OB04 |
Pijlen rechts links + (brom)fiets (*) |
| 15 | OB504 |
Pijlen diagonaal |
| 16 | OB504l |
Pijlen diagonaal links (*) |
| 17 | OB504r |
Pijlen diagonaal rechts (*) |
| 18 | OB505 |
Pijlen tegenliggers |
| 19 | OB711 |
Voorrangskruispunt |
| 20 | OB712 |
Voorrangssplitsing |
| 21 | OB713 |
Voorrangsweg zijstraat |
| 22 | tekstbord |
Vrije tekst (*) |
| 23 | AMSCAM |
Amsterdamse camerazone-bord (*) |
Note on sign codes: Finding the ground-truth code for a traffic sign is not always easy.
Not every sign appears in the official mapping, and some labels are combinations or variants
of existing codes (for example OB503OB02 or OB504l).
We treat the NDW George sub-sign documentation as the source of truth: https://docs.ndw.nu/handleidingen/George/onderborden/. Labels that don't appear there literally are marked with (*). Their descriptions are either derived from the codes they are built from or were provided separately.
Design choice: tekstbord class
Text-based sub-signs (e.g. OB20, OB104) are visually ambiguous at the low resolutions typical
of street-level imagery. The model merges all text signs into a single tekstbord class. An OCR
module (planned) handles exact type identification from the readable text. This two-stage approach
eliminates confusion between text-based variants and significantly improves overall accuracy.
Performance
Validation set (725 images, unseen during training)
| Metric | Value |
|---|---|
| Top-1 accuracy | 97.4% |
| Top-5 accuracy | 100% |
Threshold analysis (recommended: 0.90)
| Threshold | Precision | Recall | F1 | Coverage |
|---|---|---|---|---|
| 0.70 | 97.9% | 96.6% | 0.972 | 98.6% |
| 0.80 | 98.2% | 96.3% | 0.972 | 98.1% |
| 0.90 | 98.3% | 95.6% | 0.969 | 97.2% |
| 0.95 | 98.8% | 94.6% | 0.967 | 95.7% |
Coverage = fraction of the validation set scoring above the threshold.
Predictions below the threshold receive no classification (or are forwarded to OCR if tekstbord).
Usage
from ultralytics import YOLO
model = YOLO("Panoramax/classify_nl_subsigns")
results = model.predict("subsign_crop.jpg", conf=0.90)
for r in results:
print(r.probs.top1, model.names[r.probs.top1], float(r.probs.top1conf))
The model expects a cropped image of a sub-sign β not a full street photo.
Use Panoramax/detect_nl_subsigns to obtain the crop first.
Predictions returning tekstbord with confidence β₯ 0.90 should be forwarded to an OCR module for
exact type identification.
Training
| Parameter | Value |
|---|---|
| Epochs | 250 |
| Batch size | 16 |
| Image size | 224 Γ 224 |
| Optimizer | Auto (Ultralytics default) |
| Initial LR | 0.01 |
| Augmentation | RandAugment, fliplr disabled |
| Hardware | GPU (Kubernetes cluster, ~1 hour) |
Training data sourced from Panoramax via an iterative bootstrap process: initial crops were manually labelled, then the model was used to predict new crops, which were validated and added to the dataset over multiple rounds.
Dataset
See Panoramax/nl-subsigns-classification-dataset
for the training and validation images.
License
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
- Downloads last month
- 1