European Dashcam Vehicle Classifier
vehicle classification from dashcam footage
2 min readupdated
A model built on the ConvNeXt-Tiny architecture (an image recognition AI model) and fine-tuned on footage from European dashcams. It identifies vehicle makes and models across 117 different classes from cropped images. The backbone was pretrained on a massive dataset of 460,000 car images. This tool is useful for researchers, developers, and hobbyists working on traffic video analytics.
Key features
- 117 classes: covers popular vehicle makes and models with enough training examples.
- High accuracy: achieves 91.6% top-1 accuracy on the test split and 92.2% on human-audited data.
- Efficient backbone: powered by the lightweight, high-performing ConvNeXt-Tiny model at 224px resolution.
- Solid training pipeline: uses weighted class sampling and label smoothing to handle class imbalance.
What you can do
- Dashcam video analysis: automate vehicle make recognition in surveillance camera recordings.
- Traffic research: integrate the model into non-commercial academic traffic monitoring projects.
- Data filtering: annotate and sort large collections of road video footage.
Example
import torch
from huggingface_hub import hf_hub_download
from torchvision import models, transforms
from PIL import Image
ckpt = torch.load(hf_hub_download("rdo1/euro-dashcam-vehicle-classifier-117", "model.pt"),
map_location="cpu", weights_only=False)
classes = ckpt["classes"]
model = models.convnext_tiny(weights=None)
model.classifier[2] = torch.nn.Linear(model.classifier[2].in_features, len(classes))
model.load_state_dict(ckpt["state_dict"]); model.eval()
tf = transforms.Compose([
transforms.Resize(224, interpolation=transforms.InterpolationMode.BICUBIC),
transforms.CenterCrop(224), transforms.ToTensor(),
transforms.Normalize([0.485,0.456,0.406], [0.229,0.224,0.225]),
])
img = Image.open("crop.jpg").convert(
"RGB")
with torch.inference_mode():
p = model(tf(img).unsqueeze(0)).softmax(1)[0]
top = p.topk(5)
print([(classes[i], round(float(p[i]), 3)) for i in top.indices])
Read more
DetailsMetrics: 0.916 top-1 and 0.978 top-5 on a fixed split; 0.922 top-1 on manually verified frames.
Training: 30 epochs on 6,039 frames with CLIP-based label filtering.
Limitations: strictly for non-commercial research use under the CC-BY-NC-4.0 license.
Inputs: single-car images measuring around 100–400 pixels on the shorter side.










Comments