JcProg commited on
Commit
0cfdfbf
·
verified ·
1 Parent(s): d689cae

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +117 -0
README.md ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - object-detection
5
+ - pcb
6
+ - yolo
7
+ - rf-detr
8
+ - computer-vision
9
+ - aoi
10
+ - pytorch
11
+ datasets:
12
+ - custom
13
+ ---
14
+
15
+ # PCBInspect-AI - Model Weights
16
+
17
+ Model weights for **PCBInspect-AI**, a deep learning platform for automated PCB (Printed Circuit Board) feature detection in Automated Optical Inspection (AOI) pipelines.
18
+
19
+ Source code and full documentation: [JC-prog/pcb-inspect-ai](https://github.com/JC-prog/pcb-inspect-ai)
20
+
21
+ ---
22
+
23
+ ## Models
24
+
25
+ ### 1. YOLOv12-Medium (Fine-Tuned) - Recommended
26
+
27
+ **File:** `YoloV12-Medium-160-FineTuned.pt`
28
+
29
+ Two-stage fine-tuned YOLOv12m for PCB feature detection. Trained over 160 epochs (100 pretraining + 60 fine-tuning).
30
+
31
+ | Metric | Score |
32
+ |---|---|
33
+ | mAP@0.5 | 0.839 |
34
+ | mAP@0.5:0.95 | 0.741 |
35
+ | Precision | 0.974 |
36
+ | Recall | 0.779 |
37
+ | Epochs | 160 (100 + 60) |
38
+
39
+ **Recommended for deployment** — highest recall minimises missed defects, critical for AOI.
40
+
41
+ ### 2. RF-DETR Medium (100 Epochs)
42
+
43
+ **File:** `RFDETR-Medium-100-Epoch.pth`
44
+
45
+ Roboflow RF-DETR with DINOv2 backbone trained for 100 epochs. Achieves the highest precision but lower recall than YOLOv12.
46
+
47
+ | Metric | Score |
48
+ |---|---|
49
+ | mAP@0.5 | 0.773 |
50
+ | mAP@0.5:0.95 | 0.655 |
51
+ | Precision | 0.991 |
52
+ | Recall | 0.700 |
53
+ | Epochs | 100 |
54
+
55
+ ---
56
+
57
+ ## Classes
58
+
59
+ | ID | Class |
60
+ |---|---|
61
+ | 0 | Background |
62
+ | 1 | MountingHole |
63
+ | 2 | ComponentBody |
64
+ | 3 | SolderJoint |
65
+ | 4 | Lead |
66
+
67
+ ---
68
+
69
+ ## Usage
70
+
71
+ ### Setup
72
+
73
+ ```bash
74
+ git clone https://github.com/JC-prog/pcb-inspect-ai.git
75
+ cd pcb-inspect-ai/demo
76
+ pip install -r requirements.txt
77
+ ```
78
+
79
+ ### Download weights
80
+
81
+ ```bash
82
+ huggingface-cli download JcProg/PCBInspect-AI --local-dir demo/checkpoint/
83
+ ```
84
+
85
+ ### Launch app
86
+
87
+ ```bash
88
+ python app.py
89
+ ```
90
+
91
+ Open [http://localhost:7860](http://localhost:7860), select a model in the **Model** tab, and run inference in the **Inference** tab.
92
+
93
+ ---
94
+
95
+ ## Training
96
+
97
+ ### YOLOv12 Two-Stage Regime
98
+
99
+ - **Stage 1 (100 epochs):** 640x640 resolution, heavy augmentation for fast convergence
100
+ - **Stage 2 (60 epochs):** 896x896 resolution, lighter augmentation for fine-tuning
101
+
102
+ ### RF-DETR
103
+
104
+ - **100 epochs** with DINOv2 backbone
105
+ - Bounding box annotations in COCO format
106
+
107
+ ---
108
+
109
+ ## Citation
110
+
111
+ If you use these weights, please reference the associated project:
112
+
113
+ ```
114
+ PCBInspect-AI - Automated Generation of PCB Inspection Recipes Using Deep Learning-Based Feature Detection
115
+ National University of Singapore (NUS)
116
+ https://github.com/JC-prog/pcb-inspect-ai
117
+ ```