Instructions to use dronefreak/bdd100k-scenario-convnext_tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use dronefreak/bdd100k-scenario-convnext_tiny with timm:
import timm model = timm.create_model("hf_hub:dronefreak/bdd100k-scenario-convnext_tiny", pretrained=True) - Notebooks
- Google Colab
- Kaggle
ConvNeXt-Tiny Finetuned on BDD100K Scenario Classification
Fine-tuned ConvNeXt-Tiny image classifier on the BDD100K Scenario Classification dataset, trained and evaluated as part of BDD100K-Toolkit, a dependency-clean toolkit for preparing BDD100K, training models on it and evaluating them with the same metrics on the same splits.
7-class driving-scenario classification (city street / highway / residential / parking lot / gas stations / tunnel / unknown) derived from BDD100K's per-image attributes.scene field. Unofficial task; follows the Kaggle dataset of the same name.
Usage
import timm, torch
from huggingface_hub import hf_hub_download
from PIL import Image
from torchvision import transforms as T
ckpt = torch.load(
hf_hub_download("dronefreak/bdd100k-scenario-convnext_tiny", "best.pt"), map_location="cpu", weights_only=True
)
model = timm.create_model(
ckpt["model_name"], pretrained=False, num_classes=len(ckpt["class_names"])
)
model.load_state_dict(ckpt["state_dict"])
model.eval()
prep = T.Compose(
[T.Resize((ckpt["imgsz"],) * 2), T.ToTensor(), T.Normalize(ckpt["mean"], ckpt["std"])]
)
with torch.no_grad():
probs = model(prep(Image.open("street.jpg").convert("RGB"))[None]).softmax(1)[0]
print(ckpt["class_names"][probs.argmax()], f"{probs.max():.1%}")
Results
Evaluated on the test split (10000 images).
| Metric | Value |
|---|---|
| Macro F1 | 56.88% |
| Balanced accuracy | 59.82% |
| Macro precision | 54.60% |
| Macro recall | 59.82% |
| Top-1 accuracy | 76.69% |
| Top-5 accuracy | 99.93% |
Per class
| Class | Precision | Recall | F1 | Test images |
|---|---|---|---|---|
| city street | 85.73% | 78.26% | 81.82% | 6112 |
| gas stations | 28.57% | 28.57% | 28.57% | 7 (few) |
| highway | 71.95% | 76.79% | 74.29% | 2499 |
| parking lot | 53.85% | 57.14% | 55.45% | 49 (few) |
| residential | 56.41% | 71.99% | 63.25% | 1253 |
| tunnel | 64.71% | 81.48% | 72.13% | 27 (few) |
| unknown | 20.97% | 24.53% | 22.61% | 53 |
Model Zoo
All runs below were evaluated on the same test split, sorted by top-1 accuracy.
| Model | Top-1 | Macro F1 | Balanced acc | Macro precision |
|---|---|---|---|---|
| YOLO11n | 78.58% | 49.47% | 46.05% | 60.98% |
| MobileNetV4-Conv-Small | 78.20% | 52.89% | 48.69% | 61.41% |
| ConvNeXt-Atto | 77.44% | 61.06% | 60.34% | 67.92% |
| ResNet-18 | 77.14% | 47.29% | 44.83% | 54.25% |
| YOLO26n | 76.78% | 48.33% | 43.94% | 58.99% |
| ConvNeXt-Tiny | 76.69% | 56.88% | 59.82% | 54.60% |
| YOLOv8n | 76.13% | 46.40% | 43.26% | 54.14% |
| EfficientViT-B0 | 75.94% | 46.10% | 42.64% | 53.74% |
Training
| Setting | Value |
|---|---|
| Epochs (max) | 50 |
| Epochs (trained) | 25 |
Best epoch (best.pt) |
15 |
best.pt chosen by |
macro_f1 on the valid split |
| Early stopping patience | 10 |
| Batch size | 128 |
| Image size | 224 |
| Optimizer | auto, resolved to AdamW (peak lr 3e-04) |
| Weights | EMA |
| Class balancing | class-weighted loss (power 0.5) |
Dataset
dronefreak/BDD100K-Scenario-Classification holds the prepared splits these models were trained and evaluated on.
Limitations
- Unofficial task: labels are BDD100K's per-image attributes, not a benchmark with a public leaderboard, so scores are only comparable with other models evaluated on this split.
- Not the official test set:
testhere is BDD100K's official validation split (the official test labels are not released) andvalidis a seeded 15% slice of the official train split. - Heavily imbalanced: rare classes have very few test images, so their per-class scores are noisy. Prefer macro F1 over accuracy.
- Images are US dashcam frames; generalization to other regions or camera setups is untested.
- BDD100K is released for non-commercial research and education. Check its license before any use of these weights beyond research.
sceneis a coarse per-image label; frames showing several settings (e.g. a highway entering a tunnel) get a single class.
License
The weights are released under the license in the metadata above. They were trained on BDD100K, which is free for non-commercial research and education; commercial use needs separate permission (see https://www.bdd100k.com/). The prepared dataset on the Hub is tagged license: other, and the original BDD100K terms still apply.
Citation
Model
@article{liu2022convnet,
title={A ConvNet for the 2020s},
author={Liu, Zhuang and Mao, Hanzi and Wu, Chao-Yuan and Feichtenhofer, Christoph and Darrell, Trevor and Xie, Saining},
journal={arXiv preprint arXiv:2201.03545},
year={2022}
}
Dataset
@article{yu2018bdd100k,
title={BDD100K: A Diverse Driving Dataset for Heterogeneous Multitask Learning},
author={Yu, Fisher and Chen, Haofeng and Wang, Xin and Xian, Wenqi and Chen, Yingying and Liu, Fangchen and Madhavan, Vashisht and Darrell, Trevor},
journal={arXiv preprint arXiv:1805.04687},
year={2018}
}
Files
best.ptmetrics.jsonresults.csvassets/demo_banner.mp4assets/demo_banner_poster.jpgREADME.md
Reproduce
Trained and evaluated with BDD100K-Toolkit: bdd100k-evaluate --dataset bdd100k-scenario --checkpoint <weights> --data-dir <prepared dir> --split test.
- Downloads last month
- -
Model tree for dronefreak/bdd100k-scenario-convnext_tiny
Base model
timm/convnext_tiny.in12k_ft_in1kDataset used to train dronefreak/bdd100k-scenario-convnext_tiny
Collections including dronefreak/bdd100k-scenario-convnext_tiny
Papers for dronefreak/bdd100k-scenario-convnext_tiny
A ConvNet for the 2020s
BDD100K: A Diverse Driving Dataset for Heterogeneous Multitask Learning
Evaluation results
- Top-1 accuracy (test split) on BDD100K Scenario ClassificationBDD100K-Toolkit76.690
- Macro F1 (test split) on BDD100K Scenario ClassificationBDD100K-Toolkit56.880
- Macro precision (test split) on BDD100K Scenario ClassificationBDD100K-Toolkit54.600
- Macro recall (test split) on BDD100K Scenario ClassificationBDD100K-Toolkit59.820