Spaces:
Running

File size: 10,311 Bytes
d193e00
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
{
 "k": "5",
 "n_synthetic": 100,
 "models": {
  "real_only": {
   "run_id": "leather-real-k5-cp0-syn0-s0",
   "seed": "0",
   "val_mask_map50": "0.76267",
   "test_mask_map50": "0.62173"
  },
  "genai": {
   "run_id": "leather-synthetic-k5-cp0-syn100-s0",
   "seed": "0",
   "val_mask_map50": "0.66089",
   "test_mask_map50": "0.83717"
  }
 },
 "detect": {
  "conf": 0.25,
  "iou": 0.5,
  "imgsz": 512
 },
 "links": {
  "github": "https://github.com/Adarshpandey108/defectgen",
  "lora": "https://huggingface.co/adarsh108/defectgen-leather-lora"
 },
 "classes": [
  "color",
  "cut",
  "fold",
  "glue",
  "poke"
 ],
 "headline": "With 5 real defect images per class, adding 100 GenAI synthetic defects per class raised mask mAP50 from 0.653 ± 0.066 to 0.786 ± 0.053 (mean ± std of 3 seeds, real-only test set), on par with copy-paste (0.765 ± 0.015) within seed noise. With 3 real images: 0.600 ± 0.025 → 0.623 ± 0.057, within seed noise; with all real images: 0.742 ± 0.051 → 0.809 ± 0.040, a gain beyond seed noise. Copy-paste stays ahead of GenAI with 3 real and all real images.",
 "tables": {
  "main": "<table><thead><tr><th>Real images per type (K)</th><th>Real only</th><th>+ Copy-paste</th><th>+ GenAI synthetic (best on val)</th><th>+ Both</th></tr></thead><tbody><tr><td>3</td><td>0.600 ± 0.025</td><td>0.743 ± 0.035</td><td>0.623 ± 0.057 (50/type)</td><td>0.743 ± 0.040 (50/type)</td></tr><tr><td>5</td><td>0.653 ± 0.066</td><td>0.765 ± 0.015</td><td>0.786 ± 0.053 (100/type)</td><td>not run</td></tr><tr><td>All (8–10)</td><td>0.742 ± 0.051</td><td>0.923 ± 0.018</td><td>0.809 ± 0.040 (100/type)</td><td>not run</td></tr></tbody></table>",
  "grid": "<table><thead><tr><th>K</th><th>0/type val · test</th><th>50/type val · test</th><th>100/type val · test</th><th>200/type val · test</th></tr></thead><tbody><tr><td>3</td><td>0.508 · 0.600 ± 0.025</td><td>0.583 · 0.623 ± 0.057</td><td>0.532 · 0.631 ± 0.063</td><td>0.471 · 0.700 ± 0.044</td></tr><tr><td>5</td><td>0.655 · 0.653 ± 0.066</td><td>0.571 · 0.718 ± 0.072</td><td>0.626 · 0.786 ± 0.053</td><td>0.615 · 0.668 ± 0.092</td></tr><tr><td>All (8–10)</td><td>0.711 · 0.742 ± 0.051</td><td>0.686 · 0.771 ± 0.044</td><td>0.729 · 0.809 ± 0.040</td><td>0.622 · 0.837 ± 0.061</td></tr></tbody></table>",
  "per_class": "<table><thead><tr><th>K</th><th>Method</th><th>color</th><th>cut</th><th>fold</th><th>glue</th><th>poke</th></tr></thead><tbody><tr><td>3</td><td>Real only</td><td>0.62</td><td>0.64</td><td>0.42</td><td>0.96</td><td>0.36</td></tr><tr><td>3</td><td>+ Copy-paste</td><td>0.84</td><td>0.97</td><td>0.32</td><td>0.98</td><td>0.61</td></tr><tr><td>3</td><td>+ GenAI</td><td>0.81</td><td>0.59</td><td>0.34</td><td>0.97</td><td>0.40</td></tr><tr><td>5</td><td>Real only</td><td>0.70</td><td>0.69</td><td>0.40</td><td>0.97</td><td>0.50</td></tr><tr><td>5</td><td>+ Copy-paste</td><td>0.93</td><td>0.75</td><td>0.75</td><td>1.00</td><td>0.39</td></tr><tr><td>5</td><td>+ GenAI</td><td>0.90</td><td>0.89</td><td>0.75</td><td>0.97</td><td>0.41</td></tr><tr><td>All (8–10)</td><td>Real only</td><td>0.87</td><td>0.65</td><td>0.70</td><td>1.00</td><td>0.49</td></tr><tr><td>All (8–10)</td><td>+ Copy-paste</td><td>0.98</td><td>1.00</td><td>0.96</td><td>1.00</td><td>0.68</td></tr><tr><td>All (8–10)</td><td>+ GenAI</td><td>0.98</td><td>0.86</td><td>0.74</td><td>1.00</td><td>0.46</td></tr></tbody></table>",
  "generation": "<table><thead><tr><th>K</th><th>Defect</th><th>Accepted / attempted</th><th>KID GenAI · copy-paste</th><th>Real-vs-fake acc. GenAI · copy-paste</th></tr></thead><tbody><tr><td>3</td><td>color</td><td>200 / 200 (100%)</td><td>0.075 · 0.024</td><td>0.98 · 0.86</td></tr><tr><td>3</td><td>cut</td><td>200 / 201 (100%)</td><td>0.059 · 0.037</td><td>0.84 · 0.79</td></tr><tr><td>3</td><td>fold</td><td>200 / 582 (34%)</td><td>0.086 · 0.047</td><td>0.93 · 0.90</td></tr><tr><td>3</td><td>glue</td><td>200 / 200 (100%)</td><td>0.050 · 0.031</td><td>0.94 · 0.80</td></tr><tr><td>3</td><td>poke</td><td>200 / 201 (100%)</td><td>0.069 · 0.049</td><td>0.96 · 0.91</td></tr><tr><td>5</td><td>color</td><td>200 / 214 (93%)</td><td>0.043 · 0.024</td><td>0.96 · 0.89</td></tr><tr><td>5</td><td>cut</td><td>200 / 201 (100%)</td><td>0.071 · 0.040</td><td>0.86 · 0.75</td></tr><tr><td>5</td><td>fold</td><td>200 / 371 (54%)</td><td>0.074 · 0.047</td><td>0.94 · 0.87</td></tr><tr><td>5</td><td>glue</td><td>200 / 200 (100%)</td><td>0.045 · 0.034</td><td>0.92 · 0.76</td></tr><tr><td>5</td><td>poke</td><td>200 / 200 (100%)</td><td>0.080 · 0.045</td><td>0.96 · 0.92</td></tr><tr><td>All (8–10)</td><td>color</td><td>200 / 200 (100%)</td><td>0.052 · 0.021</td><td>0.96 · 0.84</td></tr><tr><td>All (8–10)</td><td>cut</td><td>200 / 201 (100%)</td><td>0.052 · 0.031</td><td>0.79 · 0.69</td></tr><tr><td>All (8–10)</td><td>fold</td><td>200 / 214 (93%)</td><td>0.088 · 0.034</td><td>0.97 · 0.86</td></tr><tr><td>All (8–10)</td><td>glue</td><td>200 / 232 (86%)</td><td>0.044 · 0.019</td><td>0.84 · 0.70</td></tr><tr><td>All (8–10)</td><td>poke</td><td>200 / 216 (93%)</td><td>0.063 · 0.035</td><td>0.94 · 0.92</td></tr></tbody></table>"
 },
 "examples": [
  "examples/color_004.jpg",
  "examples/cut_004.jpg",
  "examples/fold_000.jpg",
  "examples/glue_011.jpg",
  "examples/poke_001.jpg",
  "examples/good_000.jpg"
 ],
 "gallery": [
  {
   "file": "gallery/k3_syn_color_0000.jpg",
   "caption": "color · trained on 3 real color defects",
   "defect": "color",
   "k": "3"
  },
  {
   "file": "gallery/k3_syn_color_0001.jpg",
   "caption": "color · trained on 3 real color defects",
   "defect": "color",
   "k": "3"
  },
  {
   "file": "gallery/k3_syn_color_0002.jpg",
   "caption": "color · trained on 3 real color defects",
   "defect": "color",
   "k": "3"
  },
  {
   "file": "gallery/k3_syn_cut_0000.jpg",
   "caption": "cut · trained on 3 real cut defects",
   "defect": "cut",
   "k": "3"
  },
  {
   "file": "gallery/k3_syn_cut_0001.jpg",
   "caption": "cut · trained on 3 real cut defects",
   "defect": "cut",
   "k": "3"
  },
  {
   "file": "gallery/k3_syn_cut_0002.jpg",
   "caption": "cut · trained on 3 real cut defects",
   "defect": "cut",
   "k": "3"
  },
  {
   "file": "gallery/k3_syn_fold_0000.jpg",
   "caption": "fold · trained on 3 real fold defects",
   "defect": "fold",
   "k": "3"
  },
  {
   "file": "gallery/k3_syn_fold_0001.jpg",
   "caption": "fold · trained on 3 real fold defects",
   "defect": "fold",
   "k": "3"
  },
  {
   "file": "gallery/k3_syn_fold_0002.jpg",
   "caption": "fold · trained on 3 real fold defects",
   "defect": "fold",
   "k": "3"
  },
  {
   "file": "gallery/k3_syn_glue_0000.jpg",
   "caption": "glue · trained on 3 real glue defects",
   "defect": "glue",
   "k": "3"
  },
  {
   "file": "gallery/k3_syn_glue_0001.jpg",
   "caption": "glue · trained on 3 real glue defects",
   "defect": "glue",
   "k": "3"
  },
  {
   "file": "gallery/k3_syn_glue_0002.jpg",
   "caption": "glue · trained on 3 real glue defects",
   "defect": "glue",
   "k": "3"
  },
  {
   "file": "gallery/k3_syn_poke_0000.jpg",
   "caption": "poke · trained on 3 real poke defects",
   "defect": "poke",
   "k": "3"
  },
  {
   "file": "gallery/k3_syn_poke_0001.jpg",
   "caption": "poke · trained on 3 real poke defects",
   "defect": "poke",
   "k": "3"
  },
  {
   "file": "gallery/k3_syn_poke_0002.jpg",
   "caption": "poke · trained on 3 real poke defects",
   "defect": "poke",
   "k": "3"
  },
  {
   "file": "gallery/kall_syn_color_0000.jpg",
   "caption": "color · trained on all real color defects",
   "defect": "color",
   "k": "all"
  },
  {
   "file": "gallery/kall_syn_color_0001.jpg",
   "caption": "color · trained on all real color defects",
   "defect": "color",
   "k": "all"
  },
  {
   "file": "gallery/kall_syn_color_0002.jpg",
   "caption": "color · trained on all real color defects",
   "defect": "color",
   "k": "all"
  },
  {
   "file": "gallery/kall_syn_cut_0000.jpg",
   "caption": "cut · trained on all real cut defects",
   "defect": "cut",
   "k": "all"
  },
  {
   "file": "gallery/kall_syn_cut_0001.jpg",
   "caption": "cut · trained on all real cut defects",
   "defect": "cut",
   "k": "all"
  },
  {
   "file": "gallery/kall_syn_cut_0002.jpg",
   "caption": "cut · trained on all real cut defects",
   "defect": "cut",
   "k": "all"
  },
  {
   "file": "gallery/kall_syn_fold_0000.jpg",
   "caption": "fold · trained on all real fold defects",
   "defect": "fold",
   "k": "all"
  },
  {
   "file": "gallery/kall_syn_fold_0001.jpg",
   "caption": "fold · trained on all real fold defects",
   "defect": "fold",
   "k": "all"
  },
  {
   "file": "gallery/kall_syn_fold_0002.jpg",
   "caption": "fold · trained on all real fold defects",
   "defect": "fold",
   "k": "all"
  },
  {
   "file": "gallery/kall_syn_glue_0000.jpg",
   "caption": "glue · trained on all real glue defects",
   "defect": "glue",
   "k": "all"
  },
  {
   "file": "gallery/kall_syn_glue_0001.jpg",
   "caption": "glue · trained on all real glue defects",
   "defect": "glue",
   "k": "all"
  },
  {
   "file": "gallery/kall_syn_glue_0002.jpg",
   "caption": "glue · trained on all real glue defects",
   "defect": "glue",
   "k": "all"
  },
  {
   "file": "gallery/kall_syn_poke_0000.jpg",
   "caption": "poke · trained on all real poke defects",
   "defect": "poke",
   "k": "all"
  },
  {
   "file": "gallery/kall_syn_poke_0001.jpg",
   "caption": "poke · trained on all real poke defects",
   "defect": "poke",
   "k": "all"
  },
  {
   "file": "gallery/kall_syn_poke_0002.jpg",
   "caption": "poke · trained on all real poke defects",
   "defect": "poke",
   "k": "all"
  }
 ],
 "plots": [
  "results/plots/map_vs_synthetic.png",
  "results/plots/per_class_ap.png"
 ],
 "grids": [
  "results/grids/k3_color.jpg",
  "results/grids/k3_cut.jpg",
  "results/grids/k3_fold.jpg",
  "results/grids/k3_glue.jpg",
  "results/grids/k3_poke.jpg",
  "results/grids/k5_color.jpg",
  "results/grids/k5_cut.jpg",
  "results/grids/k5_fold.jpg",
  "results/grids/k5_glue.jpg",
  "results/grids/k5_poke.jpg",
  "results/grids/kall_color.jpg",
  "results/grids/kall_cut.jpg",
  "results/grids/kall_fold.jpg",
  "results/grids/kall_glue.jpg",
  "results/grids/kall_poke.jpg"
 ]
}