ResNet-50 Weather Tagging (640 crop, 5x) 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 weather tag: rainy, snowy, clear, overcast, undefined, partly cloudy, foggy. 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-resnet50-5x-weather --local-dir resnet50-5x-weather --exclude "original/*"
cd resnet50-5x-weather
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)
Weather 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 | 81.94 | 67.74 | 63.92 | 65.47 |
| test | 81.56 | 69.68 | 63.61 | 65.62 |
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 1e-06 (GPU, CUDA 11.8 environment, an RTX 4070 SUPER;
infer.pyturns TF32 off). Top-1 accuracy from this copy's tags: 81.94%. - 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
5f89f615f37b20ace389fd369c07f538matches 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-50 classifier (ResNet: Deep Residual Learning for Image Recognition (CVPR 2016)), LinearClsHead |
| Training | BDD100K train (70k images), 60 epochs (5x), SGD lr 0.1, momentum 0.9, weight decay 0.0001, steps at epochs 30 and 45, 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.010 s/image on an RTX 4070 SUPER (including JPEG decoding), 0.21 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
- 25
Dataset used to train dronefreak/bdd100k-syscv-resnet50-5x-weather
Paper for dronefreak/bdd100k-syscv-resnet50-5x-weather
Evaluation results
- Top-1 accuracy (weather, val, reported by SysCV) on BDD100Kvalidation set self-reported81.940