Image Classification
Transformers
Safetensors
vit
vision
defect-detection
manufacturing-quality-control
Generated from Trainer
Eval Results (legacy)
Instructions to use Dongjin1203/defect-classifier-vit-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Dongjin1203/defect-classifier-vit-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Dongjin1203/defect-classifier-vit-base") 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("Dongjin1203/defect-classifier-vit-base") model = AutoModelForImageClassification.from_pretrained("Dongjin1203/defect-classifier-vit-base") - Notebooks
- Google Colab
- Kaggle
defect-classifier-vit-base
This model is a fine-tuned version of 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
- Downloads last month
- 115
Model tree for Dongjin1203/defect-classifier-vit-base
Base model
google/vit-base-patch16-224Evaluation results
- Accuracy on MSherbinii/mvtec-ad-cableself-reported0.929