Instructions to use infinite000/roadwork_detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use infinite000/roadwork_detection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="infinite000/roadwork_detection") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("infinite000/roadwork_detection") model = AutoModelForImageClassification.from_pretrained("infinite000/roadwork_detection") - Notebooks
- Google Colab
- Kaggle
File size: 1,269 Bytes
de78e43 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | ---
library_name: transformers
tags:
- image-classification
- vision
- roadwork-detection
- bittensor
- natix-subnet
---
# roadwork_v3_focal
Vision Transformer (ViT) model for binary roadwork detection, trained for Natix Subnet 72.
## Model Details
- **Base Model**: google/vit-base-patch16-224-in21k
- **Architecture**: ViT-Base (86M parameters)
- **Input Size**: 224×224
- **Output Classes**: 2 (None, Roadwork)
## Performance
| Metric | Value |
|---|---|
| Accuracy | 0.9839 |
| MCC | 0.9443 |
| F1 Score | 0.9903 |
| AUC | 0.9950 |
| Subnet Reward | 0.8962 |
## Training Details
- **Training Samples**: 34,968
- **Validation Samples**: 4,418
- **Validator Augmentations**: True
- **Label Smoothing**: 0.05
- **Confidence Margin**: 0.1
## Usage
```python
from transformers import AutoImageProcessor, AutoModelForImageClassification
from PIL import Image
processor = AutoImageProcessor.from_pretrained("infinite000/in-20001")
model = AutoModelForImageClassification.from_pretrained("infinite000/in-20001")
image = Image.open("your_image.jpg")
inputs = processor(image, return_tensors="pt")
outputs = model(**inputs)
probs = outputs.logits.softmax(dim=1)
roadwork_prob = probs[0][1].item()
```
## Model Card
See `model_card.json` for detailed metadata.
|