model_10_22_run / README.md
scizzum's picture
Upload folder using huggingface_hub
775f8e7 verified
---
license: mit
tags:
- image-classification
- timm
- eva
- roadwork-detection
---
# EVA-02 Giant Roadwork Detector
Fine-tuned EVA-02 Giant (eva_giant_patch14_224.clip_ft_in1k) model for roadwork detection
## Model Details
- **Architecture**: EVA-02-Giant (eva_giant_patch14_224.clip_ft_in1k)
- **Task**: Binary image classification (Roadwork detection)
- **Training Accuracy**: 99.20%
- **Framework**: timm (PyTorch)
- **Input Size**: 224x224
- **Number of Parameters**: ~1B
## Usage
```python
import timm
import torch
from PIL import Image
from torchvision import transforms
# Load model
model = timm.create_model('eva_giant_patch14_224.clip_ft_in1k', pretrained=False, num_classes=2)
model.load_state_dict(torch.load('pytorch_model.bin'))
model.eval()
# Prepare image
transform = transforms.Compose([
transforms.Resize(224),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normalize(mean=[0.48145466, 0.4578275, 0.40821073],
std=[0.26862954, 0.26130258, 0.27577711])
])
image = Image.open('your_image.jpg')
input_tensor = transform(image).unsqueeze(0)
# Inference
with torch.no_grad():
output = model(input_tensor)
prediction = torch.nn.functional.softmax(output, dim=1)
print(f"No Roadwork: {prediction[0][0]:.2%}")
print(f"Roadwork: {prediction[0][1]:.2%}")
```
## Classes
- 0: No Roadwork
- 1: Roadwork
## Submitted By
5Cq7fjH5kobu65GJ8gvK9hh7TY6d3M4hi7gjvcv4sk
## Submission Time
2025-10-23 14:11:51