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")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("infinite000/roadwork_detection") model = AutoModelForImageClassification.from_pretrained("infinite000/roadwork_detection", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload ResNet50 Fine-tuned with correct label mapping
Browse files- README.md +10 -4
- config.json +10 -2
README.md
CHANGED
|
@@ -8,13 +8,17 @@ base_model: microsoft/resnet-50
|
|
| 8 |
|
| 9 |
# ResNet50 Fine-tuned
|
| 10 |
|
| 11 |
-
|
| 12 |
|
| 13 |
## Model Details
|
| 14 |
- Base Model: microsoft/resnet-50
|
| 15 |
-
- Task: Binary image classification (roadwork
|
| 16 |
- Input Size: 224x224
|
| 17 |
-
- Training: Fine-tuned on custom roadwork dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
## Usage
|
| 20 |
|
|
@@ -30,9 +34,11 @@ inputs = processor(images=image, return_tensors="pt")
|
|
| 30 |
outputs = model(**inputs)
|
| 31 |
logits = outputs.logits
|
| 32 |
predicted_class = logits.argmax(-1).item()
|
|
|
|
|
|
|
| 33 |
```
|
| 34 |
|
| 35 |
## Training Details
|
| 36 |
-
- Fine-tuned with heavy augmentation (weather, quality degradation, geometric transforms)
|
| 37 |
- Balanced 50/50 dataset (roadwork/no-roadwork)
|
|
|
|
| 38 |
- Optimized for high recall on roadwork detection
|
|
|
|
| 8 |
|
| 9 |
# ResNet50 Fine-tuned
|
| 10 |
|
| 11 |
+
Fine-tuned model for roadwork detection in street images.
|
| 12 |
|
| 13 |
## Model Details
|
| 14 |
- Base Model: microsoft/resnet-50
|
| 15 |
+
- Task: Binary image classification (roadwork vs no-roadwork)
|
| 16 |
- Input Size: 224x224
|
| 17 |
+
- Training: Fine-tuned on custom roadwork dataset with heavy augmentation
|
| 18 |
+
|
| 19 |
+
## Labels
|
| 20 |
+
- Label 0: None (no roadwork)
|
| 21 |
+
- Label 1: Roadwork
|
| 22 |
|
| 23 |
## Usage
|
| 24 |
|
|
|
|
| 34 |
outputs = model(**inputs)
|
| 35 |
logits = outputs.logits
|
| 36 |
predicted_class = logits.argmax(-1).item()
|
| 37 |
+
|
| 38 |
+
# predicted_class: 0 = None, 1 = Roadwork
|
| 39 |
```
|
| 40 |
|
| 41 |
## Training Details
|
|
|
|
| 42 |
- Balanced 50/50 dataset (roadwork/no-roadwork)
|
| 43 |
+
- Heavy augmentation: weather effects, quality degradation, geometric transforms
|
| 44 |
- Optimized for high recall on roadwork detection
|
config.json
CHANGED
|
@@ -37,5 +37,13 @@
|
|
| 37 |
"stage4"
|
| 38 |
],
|
| 39 |
"transformers_version": "5.1.0",
|
| 40 |
-
"use_cache": false
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
"stage4"
|
| 38 |
],
|
| 39 |
"transformers_version": "5.1.0",
|
| 40 |
+
"use_cache": false,
|
| 41 |
+
"id2label": {
|
| 42 |
+
"0": "None",
|
| 43 |
+
"1": "Roadwork"
|
| 44 |
+
},
|
| 45 |
+
"label2id": {
|
| 46 |
+
"None": 0,
|
| 47 |
+
"Roadwork": 1
|
| 48 |
+
}
|
| 49 |
+
}
|