scizzum commited on
Commit
775f8e7
·
verified ·
1 Parent(s): a1d8fa9

Upload folder using huggingface_hub

Browse files
Files changed (5) hide show
  1. README.md +64 -0
  2. config.json +23 -0
  3. model_card.json +7 -0
  4. preprocessor_config.json +21 -0
  5. pytorch_model.bin +3 -0
README.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - image-classification
5
+ - timm
6
+ - eva
7
+ - roadwork-detection
8
+ ---
9
+
10
+ # EVA-02 Giant Roadwork Detector
11
+
12
+ Fine-tuned EVA-02 Giant (eva_giant_patch14_224.clip_ft_in1k) model for roadwork detection
13
+
14
+ ## Model Details
15
+ - **Architecture**: EVA-02-Giant (eva_giant_patch14_224.clip_ft_in1k)
16
+ - **Task**: Binary image classification (Roadwork detection)
17
+ - **Training Accuracy**: 99.20%
18
+ - **Framework**: timm (PyTorch)
19
+ - **Input Size**: 224x224
20
+ - **Number of Parameters**: ~1B
21
+
22
+ ## Usage
23
+
24
+ ```python
25
+ import timm
26
+ import torch
27
+ from PIL import Image
28
+ from torchvision import transforms
29
+
30
+ # Load model
31
+ model = timm.create_model('eva_giant_patch14_224.clip_ft_in1k', pretrained=False, num_classes=2)
32
+ model.load_state_dict(torch.load('pytorch_model.bin'))
33
+ model.eval()
34
+
35
+ # Prepare image
36
+ transform = transforms.Compose([
37
+ transforms.Resize(224),
38
+ transforms.CenterCrop(224),
39
+ transforms.ToTensor(),
40
+ transforms.Normalize(mean=[0.48145466, 0.4578275, 0.40821073],
41
+ std=[0.26862954, 0.26130258, 0.27577711])
42
+ ])
43
+
44
+ image = Image.open('your_image.jpg')
45
+ input_tensor = transform(image).unsqueeze(0)
46
+
47
+ # Inference
48
+ with torch.no_grad():
49
+ output = model(input_tensor)
50
+ prediction = torch.nn.functional.softmax(output, dim=1)
51
+
52
+ print(f"No Roadwork: {prediction[0][0]:.2%}")
53
+ print(f"Roadwork: {prediction[0][1]:.2%}")
54
+ ```
55
+
56
+ ## Classes
57
+ - 0: No Roadwork
58
+ - 1: Roadwork
59
+
60
+ ## Submitted By
61
+ 5Cq7fjH5kobu65GJ8gvK9hh7TY6d3M4hi7gjvcv4sk
62
+
63
+ ## Submission Time
64
+ 2025-10-23 14:11:51
config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "eva_giant_patch14_224.clip_ft_in1k",
3
+ "architectures": [
4
+ "TimmBackbone"
5
+ ],
6
+ "model_type": "timm_backbone",
7
+ "timm_model_name": "eva_giant_patch14_224.clip_ft_in1k",
8
+ "num_classes": 2,
9
+ "num_labels": 2,
10
+ "id2label": {
11
+ "0": "No Roadwork",
12
+ "1": "Roadwork"
13
+ },
14
+ "label2id": {
15
+ "No Roadwork": 0,
16
+ "Roadwork": 1
17
+ },
18
+ "image_size": 224,
19
+ "patch_size": 14,
20
+ "hidden_size": 1408,
21
+ "num_hidden_layers": 40,
22
+ "num_attention_heads": 16
23
+ }
model_card.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_name": "EVA-02 Giant Roadwork Detector",
3
+ "description": "Fine-tuned EVA-02 Giant (eva_giant_patch14_224.clip_ft_in1k) model for roadwork detection",
4
+ "version": "1.0.0",
5
+ "submitted_by": "5Cq7fjH5kobu65GJ8gvK9hh7TY6d3M4hi7gjvcv4sk",
6
+ "submission_time": 1761246711
7
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_resize": true,
4
+ "do_rescale": true,
5
+ "image_mean": [
6
+ 0.48145466,
7
+ 0.4578275,
8
+ 0.40821073
9
+ ],
10
+ "image_std": [
11
+ 0.26862954,
12
+ 0.26130258,
13
+ 0.27577711
14
+ ],
15
+ "resample": 3,
16
+ "size": {
17
+ "shortest_edge": 224,
18
+ "height": 224,
19
+ "width": 224
20
+ }
21
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0fb67ad2d6c3780e57d990939dbe9b398fe1669540aea053461dde4c79483972
3
+ size 4044786698