ResNet-34 Scene Tagging (640 crop, 4x) on BDD100K (SysCV model zoo)
A mirror of an image tagging model from the SysCV BDD100K model zoo (ETH Zurich). It gives each image one scene tag: tunnel, residential, parking lot, undefined, city street, gas stations, highway. Their host dl.cv.ethz.ch is offline, so the weights were recovered from the Wayback Machine (capture of 2025-01-29); config and results come from SysCV's GitHub. This repo adds a pinned environment and an inference script.
Quick start
hf download dronefreak/bdd100k-syscv-resnet34-4x-scene --local-dir resnet34-4x-scene --exclude "original/*"
cd resnet34-4x-scene
uv venv --python 3.10 .venv && source .venv/bin/activate
uv pip install -r env/requirements-cu118.txt # NVIDIA GPU; or env/requirements-cpu.txt
python infer.py image.jpg --out runs/ # image or folder of images
python infer.py drive.mov --out runs/ # video file
python infer.py 0 --show # webcam 0 (q quits)
Options: --json out.json (tag and all class scores per image or frame), --max-frames N. The environment pins torch 2.0.1, mmcv-full 1.7.2, mmcls 0.25.0 on Python 3.10; use a fresh venv. Weights load with torch.load(weights_only=True).
Results (reported by SysCV)
Scene tagging on BDD100K, from SysCV's score files. Accuracy in %; precision, recall and F1 are macro averages over the 7 classes (including undefined):
| Top-1 accuracy | Precision | Recall | F1 | |
|---|---|---|---|---|
| val | 77.47 | 58.76 | 49.16 | 49.13 |
| test | 77.40 | 56.52 | 45.23 | 46.29 |
Verification
- Exact reproduction: on all 10,000 val images this copy gives the same tag as SysCV's published val predictions for every image, and every class score agrees to within 3e-06 (GPU, CUDA 11.8 environment, an RTX 4070 SUPER;
infer.pyturns TF32 off). Top-1 accuracy from this copy's tags: 77.47%. - CPU: on 20 val images the CPU environment gives the same tags as SysCV's published val predictions (largest class-score difference 5e-07).
- Weights: MD5
9aec0093816f654fd79d344c187ff4c2matches SysCV's MD5 file; all keys load into SysCV's config, and the class list stored in the checkpoint matchesinfer.py. Runs in the CPU and CUDA 11.8 environments.
Model
| Method | ResNet-34 classifier (ResNet: Deep Residual Learning for Image Recognition (CVPR 2016)), LinearClsHead |
| Training | BDD100K train (70k images), 48 epochs (4x), SGD lr 0.1, momentum 0.9, weight decay 0.0001, steps at epochs 24 and 36, batch 48 (4 GPUs x 12 images), random 640 x 640 crops and horizontal flips |
| Backbone init | no pretrained weights are set in the config |
| Input | centre 640 x 640 crop of the full-resolution image (no resize); RGB, ImageNet mean and std |
| Speed | 0.008 s/image on an RTX 4070 SUPER (including JPEG decoding), 0.15 s/image on 8 CPU threads |
| Config | SysCV config (merged into original_config.py; config.py inherits it unchanged) |
original/ holds SysCV's MD5, val predictions and scores as archived; model.safetensors has the same tensors as the .pth; config.json summarises the model.
Licence and citation
Weights are trained on BDD100K and fall under the BDD100K licence (LICENSE.txt): educational, research and not-for-profit use. SysCV's config is Apache-2.0. Please cite BDD100K and the backbone's paper.
@inproceedings{bdd100k,
author = {Yu, Fisher and Chen, Haofeng and Wang, Xin and Xian, Wenqi and Chen, Yingying and Liu, Fangchen and Madhavan, Vashisht and Darrell, Trevor},
title = {BDD100K: A Diverse Driving Dataset for Heterogeneous Multitask Learning},
booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2020}
}
- Downloads last month
- 1
Dataset used to train dronefreak/bdd100k-syscv-resnet34-4x-scene
Paper for dronefreak/bdd100k-syscv-resnet34-4x-scene
Evaluation results
- Top-1 accuracy (scene, val, reported by SysCV) on BDD100Kvalidation set self-reported77.470