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 | AMSCAM |
Amsterdam/camera zone sign |
| 1 | OB02 |
Distance indication |
| 2 | OB11 |
Except cyclists |
| 3 | OB12 |
Except mopeds |
| 4 | OB303 |
Direction arrow left |
| 5 | OB304 |
Direction arrow right |
| 6 | OB501l |
Lane indication left |
| 7 | OB501r |
Lane indication right |
| 8 | OB502 |
Lane indication both |
| 9 | OB503 |
Lane indication ahead |
| 10 | OB503OB02 |
Combination OB503 + OB02 |
| 11 | OB503OB04 |
Combination OB503 + OB04 |
| 12 | OB504 |
Lane indication ahead + both |
| 13 | OB504l |
Lane indication ahead + left |
| 14 | OB504r |
Lane indication ahead + right |
| 15 | OB505 |
Lane indication all directions |
| 16 | OB52 |
Time restriction |
| 17 | OB54 |
Day restriction |
| 18 | OB62 |
Vehicle type exception |
| 19 | OB64 |
Vehicle type exception variant |
| 20 | OB711 |
Zone start |
| 21 | OB712 |
Zone repeat |
| 22 | OB713 |
Zone end |
| 23 | tekstbord |
Text-based sign (โ OCR for exact type) |
Design choice: tekstbord class
Text-based sub-signs (e.g. OB0, 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
- -