File size: 3,130 Bytes
af565cf
 
 
 
 
d2b397e
 
 
 
af565cf
 
 
 
 
 
 
 
 
 
 
 
d2b397e
af565cf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d2b397e
af565cf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
library_name: transformers
license: apache-2.0
base_model: google/vit-base-patch16-224
tags:
- image-classification
- vision
- defect-detection
- manufacturing-quality-control
- generated_from_trainer
datasets:
- imagefolder
metrics:
- accuracy
model-index:
- name: defect-classifier-vit-base
  results:
  - task:
      name: Image Classification
      type: image-classification
    dataset:
      name: MSherbinii/mvtec-ad-cable
      type: imagefolder
      config: default
      split: None
      args: default
    metrics:
    - name: Accuracy
      type: accuracy
      value: 0.9285714285714286
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# defect-classifier-vit-base

This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the MSherbinii/mvtec-ad-cable dataset.
It achieves the following results on the evaluation set:
- Loss: 0.3193
- Accuracy: 0.9286
- Defect Precision: 0.9216
- Defect Recall: 1.0
- Defect F1: 0.9592

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 10

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | Defect Precision | Defect Recall | Defect F1 |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:----------------:|:-------------:|:---------:|
| 0.4932        | 1.0   | 17   | 0.4328          | 0.8393   | 0.8393           | 1.0           | 0.9126    |
| 0.4970        | 2.0   | 34   | 0.4307          | 0.8393   | 0.8393           | 1.0           | 0.9126    |
| 0.3777        | 3.0   | 51   | 0.3795          | 0.8393   | 0.8393           | 1.0           | 0.9126    |
| 0.3863        | 4.0   | 68   | 0.3475          | 0.8393   | 0.8393           | 1.0           | 0.9126    |
| 0.3000        | 5.0   | 85   | 0.3285          | 0.8393   | 0.9318           | 0.8723        | 0.9011    |
| 0.3114        | 6.0   | 102  | 0.4423          | 0.8393   | 0.8393           | 1.0           | 0.9126    |
| 0.2635        | 7.0   | 119  | 0.3369          | 0.8571   | 0.9333           | 0.8936        | 0.9130    |
| 0.2046        | 8.0   | 136  | 0.4730          | 0.7679   | 0.925            | 0.7872        | 0.8506    |
| 0.2625        | 9.0   | 153  | 0.3185          | 0.8929   | 0.9362           | 0.9362        | 0.9362    |
| 0.2306        | 10.0  | 170  | 0.3193          | 0.9286   | 0.9216           | 1.0           | 0.9592    |


### Framework versions

- Transformers 5.12.1
- Pytorch 2.12.1+cu130
- Datasets 5.0.0
- Tokenizers 0.22.2