roadwork-v4
Fine-tuned ViT image classifier for the NATIX Street Vision Bittensor subnet (SN72). Predicts whether a street-level image contains roadwork.
- Base model:
natix-network-org/roadwork - Labels:
{0: "None", 1: "Roadwork"} - Training data: subset of
natix-network-org/roadwork(validator's own corpus) - Augmentation during training: True (validator's
apply_augmentation_by_level) - Train / Val: 4310 / 478
- Epochs: 5, LR: 2e-05
Evaluation
| Metric | Value |
|---|---|
| eval_loss | 0.2539 |
| eval_accuracy | 0.9059 |
| eval_mcc | 0.7614 |
| eval_mcc_clamped | 0.7614 |
| eval_f1 | 0.9358 |
| eval_precision | 0.9535 |
| eval_recall | 0.9188 |
| eval_sim_reward | 0.5793 |
| eval_runtime | 13.1531 |
| eval_samples_per_second | 36.3410 |
| eval_steps_per_second | 0.6080 |
| epoch | 5.0000 |
Usage in the SN72 miner
# Option A: pin via env (no config edit needed)
export MINER_LOCAL_MODEL_DIR=/path/to/local/clone
# Option B: point hf_repo at this repo
# Edit base_miner/detectors/configs/ViT_roadwork.yaml:
# hf_repo: 'vuongnguyen92/roadwork-v4'
Direct inference
from transformers import AutoImageProcessor, AutoModelForImageClassification
from PIL import Image
import torch
processor = AutoImageProcessor.from_pretrained("vuongnguyen92/roadwork-v4")
model = AutoModelForImageClassification.from_pretrained("vuongnguyen92/roadwork-v4").eval()
img = Image.open("street.jpg").convert("RGB")
inputs = processor(images=img, return_tensors="pt")
with torch.inference_mode():
logits = model(**inputs).logits
prob_roadwork = torch.softmax(logits, dim=-1)[0, 1].item()
print(f"P(roadwork) = {prob_roadwork:.3f}")
- Downloads last month
- 16
Model tree for vuongnguyen92/roadwork-v4
Base model
natix-network-org/roadwork