shaanzeeeee commited on
Commit
6e6df1d
·
verified ·
1 Parent(s): b3f4093

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +65 -0
README.md CHANGED
@@ -1,3 +1,68 @@
1
  ---
 
2
  license: mit
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language: en
3
  license: mit
4
+ library_name: fastai
5
+ pipeline_tag: image-classification
6
+ tags:
7
+ - fastai
8
+ - timm
9
+ - vision-transformer
10
+ - image-classification
11
+ - pc-parts
12
+ widget:
13
+ - src: https://images.unsplash.com/photo-1587202372775-a457f4ad61b9
14
+ example_title: PC build example
15
  ---
16
+
17
+ # vit_base_patch16_pc_parts_classifier
18
+
19
+ Vision Transformer image classifier for 11 PC component and cable-management classes.
20
+
21
+ ## Model Details
22
+
23
+ - Architecture: ViT-Base Patch16 224 (`vit_base_patch16_224`)
24
+ - Framework: FastAI + timm + PyTorch
25
+ - Input size: 224x224 RGB
26
+ - Classes: 11
27
+ - Epochs: 15
28
+ - Batch size: 16
29
+ - Test accuracy: 0.7389
30
+ - Training date: 2026-04-17
31
+
32
+ ## Labels
33
+
34
+ 1. AIO_Liquid_Cooler
35
+ 2. Air_Cooler
36
+ 3. Bad_Cable_Management
37
+ 4. CPU
38
+ 5. Good_Cable_Management
39
+ 6. Graphics_Card
40
+ 7. M2_NVMe_Drive
41
+ 8. Motherboard
42
+ 9. PC_Case
43
+ 10. Power_Supply
44
+ 11. RAM_Stick
45
+
46
+ ## Files
47
+
48
+ - `best_model_export.pkl`: FastAI export for direct inference.
49
+ - `best_model_state_dict.pth`: PyTorch state dict.
50
+ - `best_model_metadata.json`: Training and class metadata.
51
+
52
+ ## Inference (FastAI)
53
+
54
+ ```python
55
+ from fastai.learner import load_learner
56
+ from pathlib import Path
57
+
58
+ learn = load_learner("best_model_export.pkl")
59
+ pred_class, pred_idx, probs = learn.predict(Path("sample.jpg"))
60
+ print(pred_class)
61
+ print({learn.dls.vocab[i]: float(probs[i]) for i in range(len(probs))})
62
+ ```
63
+
64
+ ## Live Demo
65
+
66
+ A live inference demo is available on Hugging Face Spaces:
67
+
68
+ - https://huggingface.co/spaces/shaanzeeeee/vit-base-pc-parts-inference