Datasets:
File size: 133,379 Bytes
03185c4 | 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 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 | [
{
"type": "text",
"text": "DEFECT TRANSFER GAN: DIVERSE DEFECT SYNTHESIS FOR DATA AUGMENTATION ",
"text_level": 1,
"bbox": [
176,
98,
821,
146
],
"page_idx": 0
},
{
"type": "text",
"text": "Anonymous authors Paper under double-blind review ",
"bbox": [
183,
171,
398,
198
],
"page_idx": 0
},
{
"type": "text",
"text": "ABSTRACT ",
"text_level": 1,
"bbox": [
454,
236,
544,
251
],
"page_idx": 0
},
{
"type": "text",
"text": "Large amounts of data are a common requirement for many deep learning approaches. However, data is not always equally available at large scale for all classes. For example, on highly optimized production lines, defective samples are hardly acquired while non-defective samples come almost for free. The defects however often seem to resemble each other, e.g., scratches on different products may only differ in few characteristics. In this work, we propose to make use of the shared characteristics by transferring a stylized defect-specific content from one type of background product to another. Moreover, the stochastic variations of the shared characteristics are captured, which also allows generating novel defects from random noise. These synthetic defective samples enlarge the dataset and increase the diversity of defects on the target product. Experiments demonstrate that our model is able to disentangle the defect-specific content from the background of an image without pixel-level labels. We present convincing results on images from real industrial production lines. Also, we show consistent gains of using our method to enlarge training sets in classification tasks. ",
"bbox": [
233,
267,
764,
474
],
"page_idx": 0
},
{
"type": "text",
"text": "1 INTRODUCTION ",
"text_level": 1,
"bbox": [
176,
502,
336,
518
],
"page_idx": 0
},
{
"type": "text",
"text": "Automated Visual Inspection (AVI) is vital for quality control in modern production lines. Despite the fact that AVI has been studied for decades, it remains a challenging task with many open research questions await to be answered. One of the main challenges in data-driven AVI is the acquisition of suitable training data. This is for two reasons: First, collecting a vast amount of labelled data is usually labor-intensive and time-consuming. In many cases, even experts are required to identify where and what to look for. However, the acquired label information is task-specific and cannot be reused or transferred to a new task in most cases. Thus, the tedious labelling process must be repeated for each new product, even if its defect is similar to other products in people’s eyes. Second, in real-world scenarios such as highly optimized production lines, a more severe problem emerges: data imbalance. Only very few defective parts are produced by design. Moreover, the acquired anomaly images from a single product are lacking diversity and may not capture the full defect distribution. Training a robust deep neural network model in such conditions is very challenging. ",
"bbox": [
174,
535,
825,
700
],
"page_idx": 0
},
{
"type": "text",
"text": "Since collecting sufficient real-world defective samples is impractical, algorithms to synthesize required images became a focus in research. Image synthesis through Generative Adversarial Networks (GANs) (Goodfellow et al., 2014) has shown promising performance in recent years. But it also requires large amounts of balanced data which are not available in most industrial use cases, in particular for irregular defect patterns and large variation. Therefore, GANs tend to overfit to the training examples when trained with little data (Karras et al., 2020a). ",
"bbox": [
174,
708,
823,
791
],
"page_idx": 0
},
{
"type": "text",
"text": "In this work, we tackle these issues by exploiting cross-domain information: we first define two sets of domains—foreground domains and background domains. The foreground domain describes a set of images that contains a specific foreground content to be grouped into a distinctive category, and each content has a different style. The background domain instead is considered as a group of images that shares similar structural appearance over the whole image. For example, we can set foreground domains as defect types and background domains as product types while the styles of defects indicate their artistic looks such as light or heavy strokes. Building upon StarGAN v2 (Choi et al., 2020), the concept underlying this work is to transfer and generate foreground contents with a variety of styles across different background domains, as illustrated in Figure 1. ",
"bbox": [
174,
799,
825,
924
],
"page_idx": 0
},
{
"type": "image",
"img_path": "images/7375134a93e4d6c487812a69c420b54b7f33ccdc499b7470357d6f8e1d3d2531.jpg",
"image_caption": [
"Figure 1: The underlying concept of DT-GAN is to transfer and generate foreground contents with a variety of artistic styles (e.g., light / heavy strokes) across different background domains. "
],
"image_footnote": [],
"bbox": [
258,
103,
735,
237
],
"page_idx": 1
},
{
"type": "text",
"text": "The contributions of this work are three-fold: First, we introduce Defect Transfer GAN (DT-GAN), a model that learns transferring existing foreground content and generating novel contents onto different backgrounds at the same time. In the real-world scenario, it allows defect inspection networks to learn from a variety of synthetic defective images by composing the foreground defects together with various non-defective images from different products. Second, DT-GAN is able to disentangle the foreground defect-specific content and the defect-irrelevant background in a weakly-supervised manner. Third, extensive experiments show that our method can generate diverse and real-looking defective samples even for products with only 20 real defective images. These defective images generated by DT-GAN boost the performance in defect inspection networks significantly. ",
"bbox": [
174,
310,
825,
435
],
"page_idx": 1
},
{
"type": "text",
"text": "2 RELATED WORK ",
"text_level": 1,
"bbox": [
176,
459,
344,
476
],
"page_idx": 1
},
{
"type": "text",
"text": "GANs have shown their power in many computer vision tasks such as image synthesis (Luciˇ c et al., ´ 2019), style translation (Johnson et al., 2016), super-resolution (Ledig et al., 2017), image impainting (Pathak et al., 2016) and many other applications. To quantify the performance of GANs, visual quality and the diversity of generated images are considered as two of the most important criteria. Recent models address these requirements either by dedicated loss functions (Mao et al., 2019b; Yang et al., 2019) or architectural design (Brock et al., 2019). StyleGAN v2 (Karras et al., 2020b), the latest state-of-the-art model in image synthesis, introduces stochastic variation in image generating process by adding per-pixel noise after each convolution. However, it is non-trivial to adapt the model to transform given input images due to the design of the generator. ",
"bbox": [
173,
492,
825,
618
],
"page_idx": 1
},
{
"type": "text",
"text": "In contrast, image-to-image translation methods (Isola et al., 2017) provide a way to recover the connection between inputs and the generated images while encouraging diversity. For example, Zhu et al. (2017b) and Huang et al. (2018) impose consistent mappings in latent space to achieve the goal. Some approaches (Ma et al., 2019; Park et al., 2019) use reference images as guidance to generate diverse outputs. Mokady et al. (2020) further extends the translation task from styles to contents. It learns to identify a specific content in a given input (e.g., a specific pair of glasses) and transfer it to the target image. However, aforementioned methods only consider the translation between two domains and their extension to multiple domains is non-trivial. ",
"bbox": [
174,
625,
825,
736
],
"page_idx": 1
},
{
"type": "text",
"text": "Surface defect detection is one of the important tasks in real-world industrial manufacturing. It aims at identifying and classifying defects with the help of machine vision. Traditional methods (Ngan et al., 2011) build models upon hand-crafted feature extractors, which are unstable and outperformed by deep learning based models. However, the performance and generalization ability of deep learning approaches are restricted due to limited number of defective samples in real-world scenarios. Data augmentation aims to enrich the training dataset by introducing different kinds of invariance for the model to capture. Several recent works (Niu et al., 2020; Zhang et al., 2021) have proposed to adopt GANs as a data augmentation method to generate realistic defective samples. Among them, Defect-GAN (Zhang et al., 2021) tries to capture the stochastic variation within defects by mimicking the defacement and restoration processes. However, it still learns a deterministic mapping between inputs and outputs while DT-GAN achieves multi-modality by varying styles. Moreover, our method can generate realistic defects with sophisticated patterns copied from real-world defective samples. ",
"bbox": [
173,
743,
825,
924
],
"page_idx": 1
},
{
"type": "image",
"img_path": "images/83af523dcfeb8e486bbe482fe2fcb6e531192ec8f0ab542aeb5d211eff025025.jpg",
"image_caption": [
"Figure 2: Overview of all modules in DT-GAN. "
],
"image_footnote": [],
"bbox": [
173,
98,
821,
272
],
"page_idx": 2
},
{
"type": "text",
"text": "3 METHODOLOGY ",
"text_level": 1,
"bbox": [
174,
316,
341,
333
],
"page_idx": 2
},
{
"type": "text",
"text": "Our primary aim is to perform unpaired image-to-image translation across multiple foreground domains within a single model. In our use case, the foreground domains refer to the defect types, which means we want to achieve translations between different types of defects while the background remains unaffected. We assume that there is always an adequate amount of normal samples (e.g., non-defective) available, while anomaly samples are rare and hard to acquire. ",
"bbox": [
174,
351,
825,
421
],
"page_idx": 2
},
{
"type": "text",
"text": "3.1 PROPOSED FRAMEWORK ",
"text_level": 1,
"bbox": [
174,
444,
387,
458
],
"page_idx": 2
},
{
"type": "text",
"text": "Our framework builds on StarGAN v2, a multimodal image-to-image translation model. Given an input image $\\textbf { x } \\in { \\mathcal { X } }$ and an arbitrary domain $y \\in \\mathcal { V }$ , StarGAN v2 generates a domain specific style code in a learned style space and outputs an image that is stylized to fit the domain of $y$ . Its network architecture consists of four modules: a generator, a mapping network, a style encoder and a discriminator. We modify and extend all four modules (see Figure 2) and describe the key differences in details as below. ",
"bbox": [
174,
470,
825,
554
],
"page_idx": 2
},
{
"type": "text",
"text": "Style-Content Separation. Given a latent code $\\mathbf { z }$ and a domain $y$ , the mapping network $M$ (Figure 2(b)) generates a style code $\\mathbf { s } = M _ { y } ( \\mathbf { z } )$ and a domain specific content $\\mathbf { c } = M _ { y } ( \\mathbf { z } )$ in different branches. It is worth mentioning that $M _ { y }$ here denotes an output of $M$ corresponding to the domain $y$ . This feature allows our method to separately model the structural appearance (i.e. content) and its artistic looks (i.e. style), which is essential because applying different styles to the same content enriches the diversity of outputs. By randomly sampling $\\mathbf { z }$ from a standard normal distribution and $y$ from all available foreground domains, $M$ is able to produce diverse style codes and domain specific contents. ",
"bbox": [
173,
561,
825,
674
],
"page_idx": 2
},
{
"type": "text",
"text": "The encoder $E$ (Figure 2(c)) extracts the style code $\\mathbf { s } = E _ { y } ( \\mathbf { x } )$ and the domain specific content $\\mathbf { c } = E _ { y } ( \\mathbf { x } )$ from an given image $\\mathbf { x }$ , which reflect the characteristics of reference images instead of randomly sampled noise. ",
"bbox": [
178,
680,
821,
723
],
"page_idx": 2
},
{
"type": "text",
"text": "Foreground/Background (FG/BG) Disentanglement. The generator $G$ (Figure 2(a)) translates an input image x into an output image $G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } , \\widetilde { \\mathbf { c } } )$ according to given domain specific style code es and content ec, which are provided either by the mapping network $M$ when generating from random noise or by the style-content encoder $E$ when transferring an existing content from a reference image. To achieve a FG/BG disentanglement, we split the channels of the three-dimensional feature map (i.e., $H \\times W \\times C$ ) at the bottle neck of $G$ into two parts. The model is then forced to encode the background into the first channels and the domain specific content cˆ into the latter channels by classification losses as discussed in Section 3.2. cˆ can then be replaced with content ec from the target domain. The adaptive instance normalization (AdaIN) (Huang & Belongie, 2017) is then used to inject es into ec during the decoding process while the background $B G _ { G } ( \\mathbf { x } )$ is decoded separately. StarGAN v2 learns $\\mathbf { F G }$ and BG together which leads to a conditional relationship between both. Our disentanglement and separate encoding break this conditioning and therefore enable our method to freely combine FG and BG as well as learn the full variation of FG content. Finally, $B G _ { G } ( \\mathbf { x } )$ and ec are concatenated together and then fused before output. ",
"bbox": [
173,
729,
825,
924
],
"page_idx": 2
},
{
"type": "text",
"text": "Multi-task discriminator with auxiliary classifiers. The discriminator $D$ (Figure 2(d)) is a multitask discriminator with two auxiliary classifiers: a foreground domain classifier and a background domain classifier. This feature strengthens the disentanglement of FG and BG by first ensuring the input image $\\mathbf { x }$ contains a domain specific content that can be recognized by the foreground domain classifier independent of the background. Later, each branch $D _ { y }$ in the multi-task discriminator $D$ is trained to determine if an image $\\mathbf { x }$ is a real image of its foreground domain or a fake image $G ( \\mathbf { x } , \\mathbf { s } , \\mathbf { c } )$ generated by $G$ . Apart from that, one extra branch $B G _ { \\mathrm { c l s } }$ is attached to decide whether the background information of the input images is well preserved. ",
"bbox": [
173,
103,
825,
215
],
"page_idx": 3
},
{
"type": "text",
"text": "Content Transfer. Mokady et al. (2020) introduced a concept that a model should be able to identity the difference between two domains when one of the domains contains a feature that the other does not have. We refer to this concept as ‘anchor’ and extend to multiple domains $( > 2 )$ by the FG/BG disentanglement, the multi-task discriminator and the foreground content classifier in $D$ . We treat domain Normal as the anchor domain i.e. set the domain specific content to zero, because a normal image has no domain specific content in our definition. As a result, we can now transfer contents between all combination of FG and BG domains (see Figure 10). ",
"bbox": [
173,
222,
825,
320
],
"page_idx": 3
},
{
"type": "text",
"text": "Compared to StarGAN v2, our method not only models style codes and contents separately but also disentangles the foreground and background of an image in a weakly-supervised manner. These features allow explicit control over output images by combining desired style codes and contents from one of the subnetworks with the input images. Therefore, it leads to higher variance regarding the location, structural pattern and artistic style of defects in the synthetic images of DT-GAN. ",
"bbox": [
174,
325,
825,
396
],
"page_idx": 3
},
{
"type": "text",
"text": "3.2 TRAINING OBJECTIVES ",
"text_level": 1,
"bbox": [
176,
412,
379,
428
],
"page_idx": 3
},
{
"type": "text",
"text": "Given an image $\\mathbf { x } \\in \\mathcal { X }$ , its original foreground domain $y \\in \\mathcal { V }$ and its background domain $p \\in \\mathcal { P }$ , the following objectives are used to train our framework. ",
"bbox": [
173,
439,
823,
468
],
"page_idx": 3
},
{
"type": "text",
"text": "Adversarial loss. In the training phase, a noise vector $\\mathbf { z } \\in { \\mathcal { Z } }$ and a target foreground domain $\\widetilde y \\in \\mathcal { V }$ are sampled randomly. Both of them are fed to $M$ , producing a target style code $\\widetilde { \\mathbf { s } }$ and a target content ec as follows: $\\widetilde { \\mathbf { s } } , \\widetilde { \\mathbf { c } } = M _ { \\widetilde { y } } ( \\mathbf { z } )$ . Goal of the training is to ensure that $\\widetilde { \\mathbf { s } }$ and ec are sampled from the distribution over styles and contents of the target domain $\\widetilde { y }$ . The generator $G$ then combines an image $\\mathbf { x }$ with $\\widetilde { \\mathbf { s } }$ and $\\widetilde { \\mathbf c }$ and learns to generate an output image $G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } , \\widetilde { \\mathbf { c } } )$ that is indistinguishable from real images in the target domain $\\widetilde { y }$ . We encourage this behavior by using an adversarial loss same as in Choi et al. (2020) ",
"bbox": [
173,
474,
825,
571
],
"page_idx": 3
},
{
"type": "equation",
"img_path": "images/cd793fc06d67b12ed9b5a25f7cc4effb3e16a9336e8b3693d7bd6c236854a0d3.jpg",
"text": "$$\n\\mathcal { L } _ { \\mathrm { a d v } } = \\mathbb { E } _ { { \\mathbf { x } } , y } \\big [ \\log D _ { y } ( { \\mathbf { x } } ) \\big ] + \\mathbb { E } _ { { \\mathbf { x } } , \\widetilde { y } , { \\mathbf { z } } } [ \\log \\left( 1 - D _ { \\widetilde { y } } ( G ( { \\mathbf { x } } , \\widetilde { { \\mathbf { s } } } , \\widetilde { { \\mathbf { c } } } ) ) \\right) ] ,\n$$",
"text_format": "latex",
"bbox": [
290,
579,
705,
598
],
"page_idx": 3
},
{
"type": "text",
"text": "where $D _ { y }$ and $D _ { \\widetilde { y } }$ are the output branches of $D$ that correspond to the source domain $y$ and the target domain $\\widetilde { y }$ , respectively. ",
"bbox": [
173,
606,
823,
636
],
"page_idx": 3
},
{
"type": "text",
"text": "Style-content reconstruction loss. Similar to StarGAN v2, to enforce the generator $G$ takes the style code $\\widetilde { \\mathbf { s } }$ and the domain specific content ec into consideration during the generation process, we employ a style-content reconstruction loss ",
"bbox": [
173,
640,
825,
684
],
"page_idx": 3
},
{
"type": "equation",
"img_path": "images/ae70d605b176b542cef1b090f291d2c692ecbbaaceb1c0f0b119e790a5f72661.jpg",
"text": "$$\n\\begin{array} { r } { \\mathcal { L } _ { \\mathrm { s t y . c o n } } = \\mathbb { E } _ { \\mathbf { x } , \\widetilde { y } , \\mathbf { z } } \\big [ \\| \\widetilde { \\mathbf { s } } - S _ { E } ( G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } , \\widetilde { \\mathbf { c } } ) ) \\| _ { 1 } \\big ] + \\mathbb { E } _ { \\mathbf { x } , \\widetilde { y } , \\mathbf { z } } \\big [ \\| \\widetilde { \\mathbf { c } } - C _ { E } ( G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } , \\widetilde { \\mathbf { c } } ) ) \\| _ { 1 } \\big ] . } \\end{array}\n$$",
"text_format": "latex",
"bbox": [
241,
690,
756,
710
],
"page_idx": 3
},
{
"type": "text",
"text": "This objective urges the style-content encoder $E$ to recover $\\widetilde { \\mathbf { s } }$ and c from $G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } , \\widetilde { \\mathbf { c } } )$ . Here, the stylecontent encoder $E$ learns a mapping from an image to its style and content domains, which allows $G$ to synthesize an image with given s and c from reference images at test time. ",
"bbox": [
173,
717,
825,
761
],
"page_idx": 3
},
{
"type": "text",
"text": "Diversity loss. In order to further boost the diversity of output images from $G$ , we introduce a loss that encourages diversity as follows: for a pair of random latent codes $\\mathbf { z } _ { 1 }$ and $\\mathbf { z } _ { 2 }$ we compute $\\widetilde { \\mathbf { s } } _ { i } , \\widetilde { \\mathbf { c } } _ { i } = M _ { \\widetilde { y } } ( \\mathbf { z } _ { i } )$ for $i \\in \\{ 1 , 2 \\}$ and enforce a different outcome of the generator $G$ for differently mixed style and content input pairs: ",
"bbox": [
174,
766,
823,
823
],
"page_idx": 3
},
{
"type": "equation",
"img_path": "images/af2defdd3af95b358356d3f45b7f10b9e2ba3e2f9851f7366b219e39a10c234c.jpg",
"text": "$$\n\\begin{array} { r l } & { \\mathcal { L } _ { \\mathrm { d s } } = \\mathbb { E } _ { \\mathbf { x } , \\widetilde { y } , \\mathbf { z } _ { 1 } , \\mathbf { z } _ { 2 } } \\left[ \\| G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } _ { 1 } , \\widetilde { \\mathbf { c } } _ { 2 } ) - G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } _ { 2 } , \\widetilde { \\mathbf { c } } _ { 1 } ) \\| _ { 1 } \\right] } \\\\ & { \\quad \\quad + \\mathbb { E } _ { \\mathbf { x } , \\widetilde { y } , \\mathbf { z } _ { 1 } , \\mathbf { z } _ { 2 } } \\left[ \\| G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } _ { 1 } , \\widetilde { \\mathbf { c } } _ { 1 } ) - G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } _ { 2 } , \\widetilde { \\mathbf { c } } _ { 2 } ) \\| _ { 1 } \\right] } \\\\ & { \\quad \\quad + \\sum _ { m , n , o } \\left[ \\mathbb { E } _ { \\mathbf { x } , \\widetilde { y } , \\mathbf { z } _ { 1 } , \\mathbf { z } _ { 2 } } \\left[ \\| G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } _ { m } , \\widetilde { \\mathbf { c } } _ { n } ) - G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } _ { o } , \\widetilde { \\mathbf { c } } _ { o } ) \\| _ { 1 } \\right] \\right] , } \\end{array}\n$$",
"text_format": "latex",
"bbox": [
297,
828,
699,
891
],
"page_idx": 3
},
{
"type": "text",
"text": "where $m , n \\in \\{ 1 , 2 | m \\neq n \\}$ and $o \\in \\{ 1 , 2 \\}$ . Driven by this term, the generator $G$ is forced to discover meaningful style features and contents that eventually lead to diversity in generated images. ",
"bbox": [
176,
895,
821,
924
],
"page_idx": 3
},
{
"type": "text",
"text": "We ignore the denominator ${ \\left\\| { \\bf z } _ { 1 } - { \\bf z } _ { 2 } \\right\\| } _ { 1 }$ of the original diversity loss (Mao et al., 2019a) for stable training as in StarGAN v2. ",
"bbox": [
171,
103,
823,
132
],
"page_idx": 4
},
{
"type": "text",
"text": "Cycle consistency loss. To ensure that the generated image $G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } , \\widetilde { \\mathbf { c } } )$ preserves the domaininvariant properties of its input image $\\mathbf { x }$ , we impose the cycle consistency loss (Zhu et al., 2017a) ",
"bbox": [
171,
138,
821,
167
],
"page_idx": 4
},
{
"type": "equation",
"img_path": "images/8a28d37d9ae5394b57315d9c8d4765defe93168ce7c89ec9750064fee390377d.jpg",
"text": "$$\n\\mathcal { L } _ { \\mathrm { c y c } } = \\mathbb { E } _ { { \\mathbf { x } } , y , \\widetilde { y } , { \\mathbf { z } } } \\big [ | | { \\mathbf { x } } - G ( G ( { \\mathbf { x } } , \\widetilde { { \\mathbf { s } } } , \\widetilde { { \\mathbf { c } } } ) , \\widehat { { \\mathbf { s } } } , \\widehat { { \\mathbf { c } } } ) | | _ { 1 } \\big ] ,\n$$",
"text_format": "latex",
"bbox": [
346,
172,
648,
191
],
"page_idx": 4
},
{
"type": "text",
"text": "where $\\hat { \\bf s } , \\hat { \\bf c } = E _ { y } ( { \\bf x } )$ is the extracted style code and domain specific content of the input image $\\mathbf { x }$ , and $y$ is the original domain of $\\mathbf { x }$ . By learning to reconstruct the input image $\\mathbf { x }$ with given style code ˆs and content cˆ, the generator $G$ is then further encouraged to disentangle the background, the domain specific content and the style code. ",
"bbox": [
173,
196,
825,
253
],
"page_idx": 4
},
{
"type": "text",
"text": "Content consistency loss. Besides the cycle consistency loss, we apply another constraint to enforce that the detached domain specific content from $G$ is consistent with the one retrieved from $E$ according to ",
"bbox": [
173,
260,
825,
303
],
"page_idx": 4
},
{
"type": "equation",
"img_path": "images/16799b09efe3daa473a44c7377c649313946b26779783a12f869bc3fcbfa421e.jpg",
"text": "$$\n\\begin{array} { r } { \\mathcal { L } _ { \\mathrm { c o n . c y c } } = \\mathbb { E } _ { \\mathbf { x } , y , \\widetilde { y } , \\mathbf { z } } \\left[ \\left\\| F G _ { G } ( \\mathbf { x } ) - \\widehat { \\mathbf { c } } \\right\\| _ { 1 } \\right] + \\mathbb { E } _ { \\mathbf { x } , y , \\widetilde { y } , \\mathbf { z } } \\left[ \\left\\| F G _ { G } ( G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } , \\widetilde { \\mathbf { c } } ) ) - \\widetilde { \\mathbf { c } } \\right\\| _ { 1 } \\right] , } \\end{array}\n$$",
"text_format": "latex",
"bbox": [
243,
308,
753,
327
],
"page_idx": 4
},
{
"type": "text",
"text": "where $\\hat { \\mathbf { c } } = E _ { y } ( \\mathbf { x } ) , \\widetilde { \\mathbf { c } } = E _ { \\widetilde { y } } ( \\mathbf { x } ) , F G _ { G } ( \\mathbf { x } )$ and $F G _ { G } ( G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } , \\widetilde { \\mathbf { c } } ) )$ are the pop-out domain specific content from input image $\\mathbf { x }$ and generated image $G ( \\mathbf { x } , \\widetilde { \\mathbf { s } } , \\widetilde { \\mathbf { c } } )$ , respectively. ",
"bbox": [
176,
330,
823,
361
],
"page_idx": 4
},
{
"type": "text",
"text": "Classification losses. We employ two classification losses: the first one is the foreground content classification loss ",
"bbox": [
171,
367,
823,
395
],
"page_idx": 4
},
{
"type": "equation",
"img_path": "images/6712ae0ca7d1db4598667f0ee1d11db11e23257990d2e793428b4f8a10453059.jpg",
"text": "$$\n\\mathcal { L } _ { \\mathrm { F G . c l s } } = \\mathbb { E } _ { \\mathbf { x } _ { \\mathrm { r e a l } } , y } \\Big [ - \\log D _ { \\mathrm { F G . c l s } } \\big ( y | \\mathbf { x } _ { \\mathrm { r e a l } } \\big ) \\Big ] + \\mathbb { E } _ { \\mathbf { x } _ { \\mathrm { f a k e } } , \\widetilde { y } } \\Big [ - \\log D _ { \\mathrm { F G . c l s } } \\big ( \\widetilde { y } | \\mathbf { x } _ { \\mathrm { f a k e } } \\big ) \\Big ] \\ ,\n$$",
"text_format": "latex",
"bbox": [
248,
401,
746,
421
],
"page_idx": 4
},
{
"type": "text",
"text": "which aims to ensure that the domain specific content is properly encoded and carries enough information from the target domain. The second one is the background classification loss ",
"bbox": [
174,
425,
823,
454
],
"page_idx": 4
},
{
"type": "equation",
"img_path": "images/115c772df39b6fd258d86dbe2a48df8fb2caeffe1cc1c194cbf32120e55fcba7.jpg",
"text": "$$\n\\mathcal { L } _ { \\mathrm { B G } . \\mathrm { c l s } } = \\mathbb { E } _ { \\mathbf { x } _ { \\mathrm { r e a l } } , p } \\big [ - \\log D _ { \\mathrm { B G } . \\mathrm { c l s } } ( p | \\mathbf { x } _ { \\mathrm { r e a l } } ) \\big ] + \\mathbb { E } _ { \\mathbf { x } _ { \\mathrm { f a k e } } , p } \\big [ - \\log D _ { \\mathrm { B G } . \\mathrm { c l s } } ( p | \\mathbf { x } _ { \\mathrm { f a k e } } ) \\big ] \\ ,\n$$",
"text_format": "latex",
"bbox": [
246,
458,
748,
478
],
"page_idx": 4
},
{
"type": "text",
"text": "where $p$ is the corresponding background type of $\\mathbf { x } _ { \\mathrm { r e a l } }$ and $\\mathbf { x } _ { \\mathrm { f a k e } }$ . With the help of this objective, the generator $G$ learns to preserve the domain-invariant characteristics of its input image $\\mathbf { x }$ while dissociating the foreground domain specific part. ",
"bbox": [
174,
483,
825,
526
],
"page_idx": 4
},
{
"type": "text",
"text": "Full objective. Our full objective functions can be summarized as ",
"bbox": [
174,
532,
607,
547
],
"page_idx": 4
},
{
"type": "equation",
"img_path": "images/05fe2b4c8716195856bd4bb70ae9fafb48b7dd38578c2cce55917eb22af3c280.jpg",
"text": "$$\n\\begin{array} { r l } { \\underset { G , F , E } { \\operatorname* { m i n } } \\underset { D } { \\operatorname* { m a x } } } & { \\mathcal { L } _ { \\mathrm { a d v } } + \\lambda _ { \\mathrm { s t y } . \\mathrm { c o n } } \\mathcal { L } _ { \\mathrm { s t y } . \\mathrm { c o n } } - \\lambda _ { \\mathrm { d s } } \\mathcal { L } _ { \\mathrm { d s } } + \\lambda _ { \\mathrm { c y c } } \\mathcal { L } _ { \\mathrm { c y c } } + } \\\\ & { \\lambda _ { \\mathrm { c o n . c y c } } \\mathcal { L } _ { \\mathrm { c o n . c y c } } + \\lambda _ { \\mathrm { F G . c l s } } \\mathcal { L } _ { \\mathrm { F G . c l s } } + \\lambda _ { \\mathrm { B G . c l s } } \\mathcal { L } _ { \\mathrm { B G . c l s } } \\ , } \\end{array}\n$$",
"text_format": "latex",
"bbox": [
290,
551,
707,
595
],
"page_idx": 4
},
{
"type": "text",
"text": "where $\\lambda _ { \\mathrm { s t y } }$ , $\\lambda _ { \\mathrm { d s } }$ , $\\lambda _ { \\mathrm { c y c } }$ , $\\lambda _ { \\mathrm { c o n \\mathrm { { - } c y c } } }$ , $\\lambda _ { \\mathrm { F G \\mathrm { - } c l s } }$ and $\\lambda _ { \\mathrm { B G \\mathrm { { - } c l s } } }$ are the hyperparameters for each term. ",
"bbox": [
173,
598,
743,
616
],
"page_idx": 4
},
{
"type": "text",
"text": "4 EXPERIMENTS ",
"text_level": 1,
"bbox": [
174,
633,
326,
650
],
"page_idx": 4
},
{
"type": "text",
"text": "We evaluated the images generated by DT-GAN through a series of experiments both quantitatively and qualitatively. Finally, we demonstrate the benefits of our generated images when being used as data augmentation for a defect classification task on limited data. ",
"bbox": [
176,
665,
823,
707
],
"page_idx": 4
},
{
"type": "text",
"text": "Dataset. All experiments were performed on a real industrial dataset: a Surface Defect Inspection (SDI) dataset that contains three different kinds of products from production lines and samples from each product are classified into three mutually exclusive classes: Normal, Scratch and Spot. All of the images are grayscale. Detailed statistics of the dataset are summarized in Appendix A. Note that only the training set was used in GAN training, the test set was left untouched for final evaluation in classifier training. For a fair comparison, all images were resized to $1 2 8 \\times 1 2 8$ resolution for both GAN training and classifier training, which was also the highest resolution used in the baselines for image generation. For comparison, we also conducted experiments on the widely used MVTec Anomaly Detection dataset (Bergmann et al., 2019) in Appendix E.4. ",
"bbox": [
173,
713,
825,
839
],
"page_idx": 4
},
{
"type": "text",
"text": "4.1 DEFECT GENERATION ",
"text_level": 1,
"bbox": [
176,
856,
367,
869
],
"page_idx": 4
},
{
"type": "text",
"text": "Baselines. As discussed in Section 3, DT-GAN can either use the mapping network to randomly generate styles and defects, or it can use the style-content encoder to extract both from reference images. We refer to these cases as ‘latent-guided’ and ‘reference-guided’, respectively. ",
"bbox": [
176,
882,
823,
924
],
"page_idx": 4
},
{
"type": "text",
"text": "Since the two ways of guidance are fundamentally different, we evaluated them against two sets of baselines: Our reference-guided image generation was compared to Mokady et al. (2020) and StarGAN v2, because both of them can perform a reference-guided translation. Note that Mokady et al. (2020) can only translate between two domains while StarGAN v2 and DT-GAN can achieve multi-domain translation within a single model. Images generated through the latent-guided part of DT-GAN were compared to state-of-the-art GANs in image synthesis: BigGAN (Brock et al., 2019) and StyleGAN v2 (Karras et al., 2020b). We set BigGAN to condition on defect types during training while StyleGAN v2 was trained unconditionally. All baselines were trained from scratch with the public implementations provided by the authors1. ",
"bbox": [
174,
103,
825,
229
],
"page_idx": 5
},
{
"type": "text",
"text": "4.1.1 QUANTITATIVE EVALUATION ",
"text_level": 1,
"bbox": [
176,
246,
428,
260
],
"page_idx": 5
},
{
"type": "text",
"text": "Metrics. We employed the commonly used frechet inception distance (FID) (Heusel et al., 2017) to evaluate both the visual quality and the diversity of the generated images. We also report the kernel inception distance (KID) (Binkowski et al., 2018) which is a more stable metric for small sets of images like our SDI dataset. Lower FID and KID scores indicate better performance. ",
"bbox": [
174,
270,
825,
327
],
"page_idx": 5
},
{
"type": "text",
"text": "Both scores are shown in Table 1. We observe that methods like BigGAN and StyleGAN v2, which perform defect synthesis purely based on latent codes, generally provide unsatisfactory results on the SDI dataset, presumably due to the small number of defective samples that were available. These methods then struggle to capture the complex and irregular patterns of defects. We also experimented with augmentation methods for GAN training (Karras et al., 2020a; Zhao et al., 2020) but did not find a consistent improvement (see Appendix E.2). We thus only report the best scores. ",
"bbox": [
174,
333,
825,
417
],
"page_idx": 5
},
{
"type": "text",
"text": "Reference-guided synthesis methods like Mokady et al. (2020) and StarGAN v2 seem to generate more realistic images. The scores of StarGAN v2 on a single product are omitted here because generating images with specified background is not possible due to its network design—the product type changes in output images, which we refer to as ‘identity-shift’. As seen in Table 1, our method achieves better scores in all cases. We believe this is due to the fact that our method allows free combination of foreground defects and backgrounds, making the generated images more diverse even with a small number of training samples. ",
"bbox": [
174,
424,
825,
522
],
"page_idx": 5
},
{
"type": "table",
"img_path": "images/7998b6b2f82acd4e8a5d2d8cfa152b29cacad12cfc7d986a268c2db781bbb119.jpg",
"table_caption": [
"Table 1: Quantitative comparison of DT-GAN with baseline image synthesis methods using FID and KID. Note that the reported values are not comparable between columns, because they were calculated on different training sets. "
],
"table_footnote": [],
"table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"4\">FID↓</td><td colspan=\"4\">KID↓</td></tr><tr><td>A</td><td>B</td><td>C</td><td>All</td><td>A</td><td>B</td><td>C</td><td>All</td></tr><tr><td>Mokady (2020)</td><td>68.69</td><td>66.90</td><td>36.21</td><td>58.63</td><td>0.050</td><td>0.036</td><td>0.030</td><td>0.036</td></tr><tr><td>StarGAN v2</td><td>1</td><td></td><td>1</td><td>37.70</td><td>-</td><td>1</td><td>1</td><td>0.013</td></tr><tr><td>StyleGAN v2</td><td>90.10</td><td>52.95</td><td>138.09</td><td>35.34</td><td>0.072</td><td>0.027</td><td>0.186</td><td>0.013</td></tr><tr><td>BigGAN + DiffAug</td><td>218.74</td><td>134.41</td><td>270.89</td><td>155.88</td><td>0.220</td><td>0.121</td><td>0.378</td><td>0.099</td></tr><tr><td>Ours</td><td>58.43</td><td>36.44</td><td>22.68</td><td>29.73</td><td>0.025</td><td>0.013</td><td>0.012</td><td>0.009</td></tr></table>",
"bbox": [
176,
585,
815,
699
],
"page_idx": 5
},
{
"type": "text",
"text": "4.1.2 QUALITATIVE EVALUATION ",
"text_level": 1,
"bbox": [
176,
719,
418,
734
],
"page_idx": 5
},
{
"type": "text",
"text": "We present a qualitative comparison with the baseline methods in latent-guided image synthesis in Figure 3. To make a fair comparison, we trained StyleGAN v2 and BigGAN on each product separately to have control on background products. Note however, that images from DT-GAN were always obtained from a single model. We can see that some generated samples from StyleGAN v2 do not contain clear defects, and samples from BigGAN present abnormal grid patterns. Both methods do not take images as inputs but generate synthetic images according to a given latent code which contains information for both FG and BG. This conditioning leads to limited diversity in the output images. On the other hand, StarGAN v2 performs translation based on input images but suffers from the same entanglement issue. Thus, it fails to preserve the background, which results in artifacts or identity-shift in its outputs. Our network architecture that disentangles foreground and background seems to mitigate these issues. See Appendix E.4 for more images. ",
"bbox": [
174,
743,
825,
897
],
"page_idx": 5
},
{
"type": "image",
"img_path": "images/e8844ad801507fcb58625110b5ddd1e08b278ccc393d4b6551f6e75e4f93f6ca.jpg",
"image_caption": [
"Figure 3: Qualitative comparison of latent-guided image synthesis results. In each subfigure: on the left, defective images are fully generated from random noise. On the right, random defects are synthesized onto given normal samples. Note that BigGAN\\* denotes it was trained with DiffAug. "
],
"image_footnote": [],
"bbox": [
176,
103,
825,
267
],
"page_idx": 6
},
{
"type": "image",
"img_path": "images/c8d4f138dd7a663cb4fbcdd6d95ca7b5d88bc4505014c289d8d78e678a6ef857.jpg",
"image_caption": [
"Figure 4: Qualitative comparison of reference-guided image synthesis results on the SDI dataset. Each method transforms the given source images into target foreground domains (e.g., Scratches) with the styles and contents extracted from the reference images. "
],
"image_footnote": [],
"bbox": [
183,
319,
816,
484
],
"page_idx": 6
},
{
"type": "text",
"text": "Also for reference-guided image synthesis, where we used different background and foreground reference images as illustrated in Figure 4, only our method produces high quality images with preserved background from the source and transferred foreground defect from the reference. ",
"bbox": [
174,
560,
825,
603
],
"page_idx": 6
},
{
"type": "text",
"text": "Ablation study. We visually demonstrate the effect of each component we added to DT-GAN compared to StarGAN v2 in Figure 5, using the examples of both latent- and reference-guided image synthesis from Normal to Scratches. The quantitative evaluation can be found in Appendix E.3. ",
"bbox": [
174,
609,
825,
651
],
"page_idx": 6
},
{
"type": "text",
"text": "Column (a) corresponds to StarGAN v2 and highlights the drawback of entangled FG/BG again (i.e. the identity-shift in the background). We first tackle this problem by modeling the style code and foreground content explicitly and feeding them separately to the generator. This leads to a better preservation of the background structure in column (b) for the reference-guided subnetwork, but not for the latent-guided synthesis on the bottom of Figure 5. Thus, we add a foreground classifier in the discriminator in (c) to ensure the output image contains the desired foreground content (scratch). Similarly, we introduce a background classifier to the discriminator in column (d). Note that the additional product type labels can be acquired automatically from production lines. ",
"bbox": [
173,
659,
825,
771
],
"page_idx": 6
},
{
"type": "text",
"text": "For column (e), we add the separate decoders for foreground and background in the generator which are fused only in the end. This enhances the preservation of background characteristics like lighting even more. Imposing an additional penalty for foreground content extracted from a normal sample as described in Section 3.1 leads to another visual improvement of the foreground edges for reference-guided synthesis in column (f). Finally, inspired by StyleGAN, we incorporate adaptive noise injection to the mapping network, which significantly boosts the performance of our latentguided image synthesis as shown in column (g). ",
"bbox": [
174,
777,
825,
875
],
"page_idx": 6
},
{
"type": "text",
"text": "Styling. We visually demonstrate the effect of style codes in our method by randomly sampling those and combining them with fixed reference background and foreground images in Figure 6, where a variety of artistic styles can be seen on the output columns. ",
"bbox": [
176,
882,
823,
924
],
"page_idx": 6
},
{
"type": "image",
"img_path": "images/91696fc85e55662030167a35ef4aae436fa0857c2b3a62e62f0e14e5967749b8.jpg",
"image_caption": [
"Figure 5: Ablation study. (a) The baseline StarGAN v2. (b) $^ +$ Style-Content branches. (c) $^ +$ Foreground classifier. (d) $^ +$ Background classifier. (e) $^ +$ Separately decoding foreground and background in $G$ . (f) $^ +$ Anchor foreground domain (e.g. Normal). (g) $^ +$ Noise injection in Mapping Network. "
],
"image_footnote": [],
"bbox": [
215,
102,
781,
310
],
"page_idx": 7
},
{
"type": "image",
"img_path": "images/10b4554eb02cdbab48f0a3b29e5fed2318aee10f044aacf5703500d8bb21eef0.jpg",
"image_caption": [
"Figure 6: Visual effect of randomly sampled style codes on fixed pairs of reference background (Source) and foreground (Content) images. "
],
"image_footnote": [],
"bbox": [
183,
375,
815,
539
],
"page_idx": 7
},
{
"type": "text",
"text": "4.2 DT-GAN FOR DATA AUGMENTATION ",
"text_level": 1,
"bbox": [
176,
602,
472,
616
],
"page_idx": 7
},
{
"type": "text",
"text": "We also evaluated our method as a data augmentation method for defect classification on the SDI dataset. We defined one task ‘general’, where the classifier was trained on images from all products at once, while task ‘single product’ only used the subset of images for one product. ",
"bbox": [
174,
631,
825,
672
],
"page_idx": 7
},
{
"type": "text",
"text": "Besides, we incrementally varied the amount of real Normal data available for classifier training: 4500, 6600, 12000 and 18600. In the case of defective images, all of them were always used due to the small amount unless otherwise specified. As backbone we used a ResNet-50 (He et al., 2016a) with ImageNet pretrained weights. For experiments with synthetic data, we attached an auxiliary domain classifier to the network through a Gradient Reversal Layer (Ganin & Lempitsky, 2015). ",
"bbox": [
174,
680,
825,
751
],
"page_idx": 7
},
{
"type": "table",
"img_path": "images/928c69ed8d652dba082f99aeef3e7de87cc055491f1db2d2d419fae8e599b312.jpg",
"table_caption": [
"Table 2: Quantitative comparison of the baseline methods on defect classification task at the scale of 12000 images/class. The reported values are the achieved error rates $( \\% )$ over five runs. "
],
"table_footnote": [],
"table_body": "<table><tr><td>Method</td><td>ResNet-50</td><td>EfficientNet-b4</td></tr><tr><td>No-Aug</td><td>21.64±1.24</td><td>12.06±0.64</td></tr><tr><td>Trad-Aug</td><td>12.58±0.81</td><td>9.33±0.73</td></tr><tr><td>Mokady (2020)</td><td>11.11±1.19</td><td>13.26±1.13</td></tr><tr><td>StarGAN v2</td><td>13.07±1.30</td><td>12.25±0.79</td></tr><tr><td>StyleGAN v2</td><td>11.55±1.79</td><td>11.68±0.76</td></tr><tr><td>BigGAN+DiffAug</td><td>11.45±0.61</td><td>12.06±0.50</td></tr><tr><td>Ours</td><td>9.9±0.69</td><td>9.14±1.02</td></tr></table>",
"bbox": [
266,
805,
725,
925
],
"page_idx": 7
},
{
"type": "text",
"text": "Since the SDI dataset is highly imbalanced, we oversampled the minority classes (Ling et al., 1998) unless the data was balanced through synthetic images. Additionally, we always applied traditional data augmentation techniques like random horizontal flips, jittering and lighting (Shorten & Khoshgoftaar, 2019) except where noted. All following results were evaluated by the achieved error rates over five runs with different random seeds. ",
"bbox": [
174,
103,
825,
172
],
"page_idx": 8
},
{
"type": "text",
"text": "Effectiveness of synthetic data. We first compare classifier performance for no augmentation (NoAug), traditional data augmentation (Trad-Aug), and a combination of traditional augmentation with synthetic images for GAN methods including DT-GAN. We also introduce a stronger backbone, EfficientNet-b4 (Tan & Le, 2019), to demonstrate that our results are not confined to a specific network. Table 2 shows that our method is the only one that improves performance for both backbones, presumably due to the combination of high visual image quality and diversity in our samples. ",
"bbox": [
173,
180,
825,
265
],
"page_idx": 8
},
{
"type": "table",
"img_path": "images/8d583e7701fa68183a5b7e4a5236d7a737bd6b648588956f2a2416af51c4e12b.jpg",
"table_caption": [
"Table 3: Experimental results on using different amount of synthetic images generated by DT-GAN to train classifiers. The left-most column stands for number of samples per class to be classified. The training set of the baselines is balanced by oversampling while ours is by synthetic images. "
],
"table_footnote": [],
"table_body": "<table><tr><td rowspan=\"2\">Dataset Size</td><td colspan=\"2\">20A</td><td colspan=\"2\">All</td></tr><tr><td>Trad-Aug</td><td>Ours</td><td>Trad-Aug</td><td>Ours</td></tr><tr><td>4500</td><td>15.55±0.63</td><td>14.28±1.25</td><td>12.75±0.61</td><td>11.04±0.76</td></tr><tr><td>6600</td><td>16.69±0.76</td><td>14.41±3.12</td><td>13.07±1.57</td><td>10.60±0.48</td></tr><tr><td>12000</td><td>16.95±1.02</td><td>14.22±1.53</td><td>12.05±0.81</td><td>9.90±0.69</td></tr><tr><td>18600</td><td>16.12±2.19</td><td>15.36±0.86</td><td>12.37±0.32</td><td>10.21±0.96</td></tr></table>",
"bbox": [
282,
327,
712,
428
],
"page_idx": 8
},
{
"type": "text",
"text": "Impact of dataset size. Motivated by the limited availability of data in real-world production scenarios, we therefore evaluated DT-GAN for data augmentation on a subset of the full SDI dataset (All), which only contains 20 defective samples in product A for each defect type (20A). In this case, DT-GAN was also trained on the reduced subset. As shown in Table 3, there is a clear improvement when synthetic images from DT-GAN are used as data augmentation, even for the extremely limited data subset. Further results on single product classifiers can be found in Appendix E.1. ",
"bbox": [
173,
438,
825,
522
],
"page_idx": 8
},
{
"type": "table",
"img_path": "images/974a838e3b729a382b7808545ffbfcb351041081afc0d6165f506ec8cd4fa186.jpg",
"table_caption": [
"Table 4: Cross-domain effect on single product classifiers trained with reference-guided synthetic images at the scale of 12000 images/class. "
],
"table_footnote": [],
"table_body": "<table><tr><td></td><td>Trad-Aug</td><td>vA</td><td>VB</td><td>vC</td><td>vABC</td></tr><tr><td>A</td><td>13.81±2.36</td><td>11.81±2.65</td><td>12.72±2.87</td><td>11.99±1.63</td><td>11.09±3.49</td></tr><tr><td>B</td><td>6.80±1.64</td><td>6.40±1.34</td><td>6.60±1.52</td><td>6.59±1.34</td><td>5.60±1.34</td></tr><tr><td>C</td><td>16.57±3.20</td><td>13.14±2.81</td><td>11.23±0.80</td><td>14.85±1.73</td><td>11.42±0.96</td></tr></table>",
"bbox": [
253,
568,
741,
637
],
"page_idx": 8
},
{
"type": "text",
"text": "Cross-domain effect. We hypothesized that limited data can be counteracted by transferring defects across multiple background products, if there are at least some defects that occur on multiple products (See Appendix E.1 for further discussion). We tested this approach by comparing the performance of classifiers trained on synthetic images with defects from a specific source (vA, vB, vC) to classifiers trained on images with defects from all products (vABC). As we can see in Table 4, the best performances are reached by the models that take over defects from other products. We interpret this as support for our hypothesis and its practical usefulness. ",
"bbox": [
173,
647,
825,
746
],
"page_idx": 8
},
{
"type": "text",
"text": "5 CONCLUSION ",
"text_level": 1,
"bbox": [
176,
766,
318,
782
],
"page_idx": 8
},
{
"type": "text",
"text": "We propose a novel method, DT-GAN, which allows diverse defect synthesis both by generating from randomly sampled noise and by following the guidance of given reference images. Due to explicit style-content separation and FG/BG disentanglement, DT-GAN achieves higher image fidelity, better variance in defects and full control over background and foreground while being sample-efficient. We demonstrated the feasibility and benefits of DT-GAN on a real industrial defect classification task and the results show our method provides consistent gains even with limited data and boosts the performance of classifiers compared to state-of-the-art image synthesis methods. For future investigation, we aim to represent defects more explicitly (e.g., localization) to improve the explainability of the model and also enhance the model transferability to unseen products. ",
"bbox": [
173,
797,
825,
924
],
"page_idx": 8
},
{
"type": "text",
"text": "REPRODUCIBILITY STATEMENT ",
"text_level": 1,
"bbox": [
174,
103,
395,
118
],
"page_idx": 9
},
{
"type": "text",
"text": "We aim for full reproducibility by publishing the source code and dataset with the final version of the paper. Besides, we provide descriptions of the training details in Appendix B, the evaluation setup in Appendix C and the network architecture in Appendix D. ",
"bbox": [
174,
127,
823,
170
],
"page_idx": 9
},
{
"type": "text",
"text": "REFERENCES \nPaul Bergmann, Michael Fauser, David Sattlegger, and Carsten Steger. Mvtec ad — a comprehensive real-world dataset for unsupervised anomaly detection. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 9584–9592, 2019. doi: 10.1109/CVPR.2019.00982. \nMikolaj Binkowski, Danica J. Sutherland, Michael Arbel, and A. Gretton. Demystifying MMD GANs. ArXiv, abs/1801.01401, 2018. \nAndrew Brock, Jeff Donahue, and K. Simonyan. Large scale gan training for high fidelity natural image synthesis. ArXiv, abs/1809.11096, 2019. \nYuhua Chen, Wen Li, Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Domain adaptive faster rcnn for object detection in the wild. 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 3339–3348, 2018. \nYunjey Choi, Youngjung Uh, Jaejun Yoo, and Jung-Woo Ha. Stargan v2: Diverse image synthesis for multiple domains. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. \nJia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Ieee, 2009. \nYaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In Francis Bach and David Blei (eds.), Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pp. 1180–1189, Lille, France, 07–09 Jul 2015. PMLR. URL https://proceedings.mlr.press/v37/ ganin15.html. \nIan Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial networks. In NeurIPS, 2014. \nKaiming He, X. Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 770–778, 2016a. \nKaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks, 2016b. URL http://arxiv.org/abs/1603.05027. cite arxiv:1603.05027Comment: ECCV 2016 camera-ready. \nMartin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and S. Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In NIPS, 2017. \nXun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Oct 2017. \nXun Huang, Ming-Yu Liu, Serge J. Belongie, and J. Kautz. Multimodal unsupervised image-toimage translation. ArXiv, abs/1804.04732, 2018. \nPhillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A. Efros. Image-to-image translation with conditional adversarial networks. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 5967–5976, 2017. \nJustin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution, 2016. ",
"bbox": [
166,
169,
826,
929
],
"page_idx": 9
},
{
"type": "text",
"text": "Tero Karras, Miika Aittala, Janne Hellsten, Samuli Laine, Jaakko Lehtinen, and Timo Aila. Training generative adversarial networks with limited data, 2020a. ",
"bbox": [
171,
103,
825,
132
],
"page_idx": 10
},
{
"type": "text",
"text": "Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of stylegan. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020b. ",
"bbox": [
176,
142,
821,
185
],
"page_idx": 10
},
{
"type": "text",
"text": "Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical Report 0, University of Toronto, Toronto, Ontario, 2009. ",
"bbox": [
173,
195,
821,
224
],
"page_idx": 10
},
{
"type": "text",
"text": "Christian Ledig, Lucas Theis, Ferenc Huszar, Jose Caballero, Andrew Cunningham, Alejandro ´ Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photo-realistic single image super-resolution using a generative adversarial network. In CVPR, 2017. ",
"bbox": [
173,
234,
826,
277
],
"page_idx": 10
},
{
"type": "text",
"text": "Charles Ling, , Charles X. Ling, and Chenghui Li. Data mining for direct marketing: Problems and solutions. In In Proceedings of the Fourth International Conference on Knowledge Discovery and Data Mining (KDD-98, pp. 73–79. AAAI Press, 1998. ",
"bbox": [
173,
286,
826,
330
],
"page_idx": 10
},
{
"type": "text",
"text": "Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), December 2015. ",
"bbox": [
169,
340,
823,
369
],
"page_idx": 10
},
{
"type": "text",
"text": "Mario Luciˇ c, Michael Tschannen, Marvin Ritter, Xiaohua Zhai, Olivier Bachem, and Sylvain Gelly. ´ High-fidelity image generation with fewer labels. In Kamalika Chaudhuri and Ruslan Salakhutdinov (eds.), Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 4183–4192. PMLR, 09–15 Jun 2019. URL https://proceedings.mlr.press/v97/lucic19a.html. ",
"bbox": [
173,
378,
825,
450
],
"page_idx": 10
},
{
"type": "text",
"text": "Liqian Ma, Xu Jia, Stamatios Georgoulis, Tinne Tuytelaars, and Luc Van Gool. Exemplar guided unsupervised image-to-image translation with semantic consistency. In ICLR, 2019. ",
"bbox": [
174,
459,
823,
489
],
"page_idx": 10
},
{
"type": "text",
"text": "Qi Mao, Hsin-Ying Lee, Hung-Yu Tseng, Siwei Ma, and Ming-Hsuan Yang. Mode seeking generative adversarial networks for diverse image synthesis. 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1429–1437, 2019a. ",
"bbox": [
174,
498,
823,
542
],
"page_idx": 10
},
{
"type": "text",
"text": "Qi Mao, Hsin-Ying Lee, Hung-Yu Tseng, Siwei Ma, and Ming-Hsuan Yang. Mode seeking generative adversarial networks for diverse image synthesis. In CVPR, 2019b. ",
"bbox": [
169,
551,
823,
582
],
"page_idx": 10
},
{
"type": "text",
"text": "Ron Mokady, Sagie Benaim, Lior Wolf, and Amit Bermano. Masked based unsupervised content transfer. In International Conference on Learning Representations, 2020. URL https:// openreview.net/forum?id $=$ BJe-91BtvH. ",
"bbox": [
174,
590,
823,
633
],
"page_idx": 10
},
{
"type": "text",
"text": "Henry Y. T. Ngan, Grantham K. H. Pang, and Nelson H. C. Yung. Review article: Automated fabric defect detection-a review. Image Vision Comput., 29(7):442–458, June 2011. ISSN 0262- 8856. doi: 10.1016/j.imavis.2011.02.002. URL https://doi.org/10.1016/j.imavis. 2011.02.002. ",
"bbox": [
173,
643,
825,
700
],
"page_idx": 10
},
{
"type": "text",
"text": "Shuanlong Niu, Bin Li, Xinggang Wang, and Hui Lin. Defect image sample generation with gan for improving defect recognition. IEEE Transactions on Automation Science and Engineering, 17(3):1611–1622, 2020. doi: 10.1109/TASE.2020.2967415. ",
"bbox": [
173,
710,
825,
753
],
"page_idx": 10
},
{
"type": "text",
"text": "Taesung Park, Ming-Yu Liu, Ting-Chun Wang, and Jun-Yan Zhu. Semantic image synthesis with spatially-adaptive normalization. In CVPR, 2019. ",
"bbox": [
169,
763,
825,
792
],
"page_idx": 10
},
{
"type": "text",
"text": "Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zach DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017. ",
"bbox": [
171,
803,
823,
833
],
"page_idx": 10
},
{
"type": "text",
"text": "Deepak Pathak, Philipp Krahenb ¨ uhl, Jeff Donahue, Trevor Darrell, and Alexei A. Efros. Context ¨ encoders: Feature learning by inpainting. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2536–2544, 2016. ",
"bbox": [
173,
842,
825,
885
],
"page_idx": 10
},
{
"type": "text",
"text": "Sebastian Ruder. An overview of gradient descent optimization algorithms. arXiv preprint arXiv:1609.04747, 2016. ",
"bbox": [
173,
895,
823,
924
],
"page_idx": 10
},
{
"type": "text",
"text": "Connor Shorten and T. Khoshgoftaar. A survey on image data augmentation for deep learning. Journal of Big Data, 6:1–48, 2019. ",
"bbox": [
171,
103,
821,
132
],
"page_idx": 11
},
{
"type": "text",
"text": "Mingxing Tan and Quoc Le. EfficientNet: Rethinking model scaling for convolutional neural networks. In Kamalika Chaudhuri and Ruslan Salakhutdinov (eds.), Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 6105–6114. PMLR, 09–15 Jun 2019. URL https://proceedings.mlr. press/v97/tan19a.html. ",
"bbox": [
174,
141,
823,
212
],
"page_idx": 11
},
{
"type": "text",
"text": "Dingdong Yang, Seunghoon Hong, Yunseok Jang, Tiangchen Zhao, and Honglak Lee. Diversitysensitive conditional generative adversarial networks. In ICLR, 2019. ",
"bbox": [
174,
219,
821,
250
],
"page_idx": 11
},
{
"type": "text",
"text": "Gongjie Zhang, Kaiwen Cui, Tzu-Yi Hung, and Shijian Lu. Defect-gan: High-fidelity defect synthesis for automated defect inspection. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), pp. 2524–2534, January 2021. ",
"bbox": [
174,
257,
825,
301
],
"page_idx": 11
},
{
"type": "text",
"text": "Shengyu Zhao, Zhijian Liu, Ji Lin, Jun-Yan Zhu, and Song Han. Differentiable augmentation for data-efficient gan training, 2020. ",
"bbox": [
173,
309,
823,
338
],
"page_idx": 11
},
{
"type": "text",
"text": "Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Oct 2017a. ",
"bbox": [
173,
347,
825,
390
],
"page_idx": 11
},
{
"type": "text",
"text": "Jun-Yan Zhu, Richard Zhang, Deepak Pathak, Trevor Darrell, Alexei A. Efros, O. Wang, and E. Shechtman. Toward multimodal image-to-image translation. In NIPS, 2017b. ",
"bbox": [
173,
398,
823,
428
],
"page_idx": 11
},
{
"type": "text",
"text": "A THE SURFACE DEFECT INSPECTION DATASET ",
"text_level": 1,
"bbox": [
174,
102,
589,
118
],
"page_idx": 12
},
{
"type": "text",
"text": "The Surface Defect Inspection (SDI) dataset consists of 20,414 images at $1 2 8 \\times 1 2 8$ resolution. It contains three background domains—product A, product $\\mathbf { B }$ and product C, each can be further classified into three foreground domains—Normal, Scratches and Spots. Figure 7 shows example images of the SDI dataset. To be noticed that the dataset is highly imbalanced not only between normal and defective samples but also between different products as shown in Table 5. This sets a more challenging task when training deep neural networks like GANs and downstream classifiers. ",
"bbox": [
174,
133,
825,
231
],
"page_idx": 12
},
{
"type": "text",
"text": "For each foreground and background domains, we randomly select 50 images for a joint validation/test set, which is then further split into separate sets in the ratio of 3:7, and use all remaining images as training sets for GAN and classifier training. We present the distribution of the training set when training DT-GAN in Table 6. Note that the normal samples used in GAN training are only a subset of all available samples in Normal and we keep the rest of them for generating defective samples at test time. For classifier training, we show the statistics in Table 7, where the number of normal samples involved in classifier training increase incrementally. The validation set is used to select the best model during classifier training while the test set is left untouched until the final evaluation. Both of the validation and test set are inaccessible by DT-GAN. ",
"bbox": [
174,
237,
825,
363
],
"page_idx": 12
},
{
"type": "table",
"img_path": "images/c5ad4cce383f42b999dbec5baa09abd0eec003f8449b17cca61eb4e7218407fe.jpg",
"table_caption": [
"Table 5: Distribution of the full SDI dataset. "
],
"table_footnote": [],
"table_body": "<table><tr><td></td><td colspan=\"3\">Overview</td></tr><tr><td></td><td>A</td><td>B</td><td>C</td></tr><tr><td>Normal</td><td>6250</td><td>6250</td><td>6250</td></tr><tr><td>Scratches</td><td>340</td><td>167</td><td>121</td></tr><tr><td>Spots</td><td>108</td><td>670</td><td>258</td></tr></table>",
"bbox": [
192,
410,
485,
496
],
"page_idx": 12
},
{
"type": "table",
"img_path": "images/d3b1a834deec1f06f6598262b6c7958b3d090165d454d73f8326527e6462444b.jpg",
"table_caption": [
"Table 6: The training set for DT-GAN and the baseline image synthesis methods. "
],
"table_footnote": [],
"table_body": "<table><tr><td></td><td colspan=\"3\">Overview</td></tr><tr><td></td><td>A</td><td>B</td><td>C</td></tr><tr><td>Normal</td><td>700</td><td>700</td><td>700</td></tr><tr><td>Scratches</td><td>290</td><td>117</td><td>71</td></tr><tr><td>Spots</td><td>58</td><td>620</td><td>208</td></tr></table>",
"bbox": [
514,
416,
808,
503
],
"page_idx": 12
},
{
"type": "table",
"img_path": "images/ecde65a45fe9d34b0e307da325180a667544009c522094149b40f88f28ea42b7.jpg",
"table_caption": [
"Table 7: The training, validation and test set for classifier training, where $N$ increases incrementally—1500, 2200, 4000 and 6200. "
],
"table_footnote": [],
"table_body": "<table><tr><td></td><td colspan=\"3\">Train</td><td colspan=\"3\">Validation</td><td colspan=\"3\">Test</td></tr><tr><td></td><td>A</td><td>B</td><td>C</td><td>A</td><td>B</td><td>C</td><td>A</td><td>B</td><td>C</td></tr><tr><td>Normal</td><td>N</td><td>N</td><td>N</td><td>12</td><td>18</td><td>15</td><td>38</td><td>32</td><td>35</td></tr><tr><td>Scratches</td><td>290</td><td>117</td><td>71</td><td>14</td><td>16</td><td>15</td><td>36</td><td>34</td><td>35</td></tr><tr><td>Spots</td><td>58</td><td>620</td><td>208</td><td>14</td><td>16</td><td>15</td><td>36</td><td>34</td><td>35</td></tr></table>",
"bbox": [
173,
564,
833,
652
],
"page_idx": 12
},
{
"type": "text",
"text": "B TRAINING DETAILS ",
"text_level": 1,
"bbox": [
176,
680,
372,
696
],
"page_idx": 12
},
{
"type": "text",
"text": "DT-GAN. We follow the training scheme as described in StarGAN v2 with minor modifications. To fit the model on a single Nvidia GTX TITAN X, the batch size is reduced to four while the model is still trained for 100,000 iterations. The training time is about three and a half days on the dedicated GPU with the modified network architecture2 and loss functions mentioned in Section 3 in PyTorch (Paszke et al., 2017). We set $\\lambda _ { \\mathrm { s t y } } = 1$ , $\\lambda _ { \\mathrm { d s } } = 1$ , $\\lambda _ { \\mathrm { c y c } } = 1$ , $\\lambda _ { \\mathrm { c o n . c y c } } = 1$ , $\\lambda _ { \\mathrm { c l s } } = 1$ and $\\lambda _ { \\mathrm { B G . c l s } } = 1$ for the SDI dataset. All other design choices remain the same as in StarGAN v2. ",
"bbox": [
173,
712,
825,
795
],
"page_idx": 12
},
{
"type": "text",
"text": "Classifiers. We train all the classifiers that use ResNet-50 as backbone for 100 epochs with the SGD optimizer (Ruder, 2016) and batch size 256. The initial learning rate is 0.001, momentum is 0.9 and weight decay is 1e-4. A learning rate scheduler is set to reduce the learning rate by factor of 0.1 when the validation loss stops decreasing for 5 epochs. The same setting also applies to EfficientNet-b4, except the batch size is reduced to 128. Although DT-GAN can synthesize realistic defective samples, we notice that there still exists a domain gap between the generated samples and the real samples. To explore the full potential of the generated samples, we attach an auxiliary source classifier to distinguish between synthetic and real samples. Then, this classifier is connected to the backbone (e.g. ResNet-50) through a Gradient Reversal Layer. With the help of the Gradient Reversal Layer, the backbone is forced to extract the shared features between synthetic and real samples, which ensures all training samples are effectively learned. ",
"bbox": [
173,
801,
825,
900
],
"page_idx": 12
},
{
"type": "image",
"img_path": "images/2b5df2b8d264369f1ee04ca1e3d7919ee1d3d69e7370aa9deec145bb6941e15e.jpg",
"image_caption": [
"Figure 7: Overview of the SDI dataset. "
],
"image_footnote": [],
"bbox": [
173,
83,
826,
664
],
"page_idx": 13
},
{
"type": "text",
"text": "",
"bbox": [
174,
776,
825,
833
],
"page_idx": 13
},
{
"type": "text",
"text": "We design a two-layer perceptron that connects to the average pooling layer in ResNet-50 as shown in Figure 8. Note that the usual fully connected layer after the average pooling in ResNet-50 remains the same and is not affected by the extra branch we added. Inspired by Chen et al. (2018), a threelayer perceptron is used for EfficientNet-b4 instead as shown in Figure 9. Its layers are initialized with a random normal distribution, where the standard deviation is set to 0.01 for the first two layers and 0.05 for the output layer. The biases for all layers are set to 0. ",
"bbox": [
173,
840,
825,
924
],
"page_idx": 13
},
{
"type": "image",
"img_path": "images/5876fcb93af3f0aad7fc6536e733bff52799290b671bdeef4fd81bf21ab172fb.jpg",
"image_caption": [
"Figure 8: ResNet-50 with GRL. "
],
"image_footnote": [],
"bbox": [
212,
102,
460,
167
],
"page_idx": 14
},
{
"type": "image",
"img_path": "images/79d423c36937100d387ec0e803940f1adbc96236a1a0b915320ec3741d5f7095.jpg",
"image_caption": [
"Figure 9: EfficientNet-b4 with GRL. "
],
"image_footnote": [],
"bbox": [
500,
102,
826,
167
],
"page_idx": 14
},
{
"type": "text",
"text": "C EVALUATION SETUP ",
"text_level": 1,
"bbox": [
176,
220,
377,
236
],
"page_idx": 14
},
{
"type": "text",
"text": "Generated samples from DT-GAN. DT-GAN requires images as input for generating synthetic data. At test time, we translated each Normal image in the SDI dataset into four defective images: two with Scratches and two with Spots. The translations were performed by two subnetworks: by the mapping network $M$ using random noise (‘latent-guided’) and by the style-content encoder $E$ using a reference image (‘reference-guided’). We first randomly sampled one latent code for each defective foreground domain. Similarly, we also randomly sampled one reference image from the training set for each defective foreground domain. The corresponding style codes and defect contents were then produced by the two subnetworks respectively and fed to the generator for target image generation. ",
"bbox": [
173,
251,
825,
376
],
"page_idx": 14
},
{
"type": "text",
"text": "We conducted classification experiments separately on images generated from the two subnetworks and a mixture set of both (i.e. $50 \\%$ from each subnetwork). Experiments show consistent gains of using synthetic images generated from DT-GAN (Table 8). We observe that the latent-guided synthetic images in general perform better than the reference-guided one, while the mixture set provides more stable results with regard to the standard deviation. Presumably the mixture set benefits from the combination of samples from reference-guided synthesis, which are well aligned with the original defect distribution, and the samples from latent-guided synthesis, i.e. from random noise, which adds novel but plausible defects to the dataset. In the main text, we report the results of the mixture set for all experiments, including the quantitative evaluation of DT-GAN. ",
"bbox": [
174,
382,
825,
508
],
"page_idx": 14
},
{
"type": "table",
"img_path": "images/c1d4e75efc50b8836e9f56d1642ae073df8bae94b456b2fba3105e400e5d6572.jpg",
"table_caption": [
"Table 8: Classification results with regard to the synthetic images generated from the two subnetworks and the mixture set. "
],
"table_footnote": [],
"table_body": "<table><tr><td rowspan=\"2\">Dataset Size</td><td colspan=\"4\">All</td></tr><tr><td>Trad-Aug</td><td>Latent</td><td>Reference</td><td>Mix</td></tr><tr><td>4500</td><td>12.75±0.61</td><td>10.72±0.96</td><td>11.48±0.88</td><td>11.04±0.76</td></tr><tr><td>6600</td><td>13.07±1.57</td><td>10.34±1.86</td><td>11.55±1.64</td><td>10.60±0.48</td></tr><tr><td>12000</td><td>12.05±0.81</td><td>9.90±1.26</td><td>10.40±0.99</td><td>9.90±0.69</td></tr><tr><td>18600</td><td>12.37±0.32</td><td>11.04±1.26</td><td>12.12±0.75</td><td>10.21±0.96</td></tr></table>",
"bbox": [
285,
558,
709,
659
],
"page_idx": 14
},
{
"type": "text",
"text": "Frechet inception distance (FID) and Kernel inception distance (KID). ´ We used the feature vectors from the last average pooling layer of the ImageNet pretrained Inception-V3 to calculate both scores. For each test image from the Normal domain, we translated it into a synthetic defective image of each defect domain. The style codes and contents for the translation were acquired in two ways: by randomly sampling from the standard normal distribution and by randomly sampling a reference image from the train set of a defect domain. To calculate the FID and KID score, we generated 4000 defective samples per product per defect domain for each way of guidance, and formed the mixture set by randomly sampling 2000 images per product per defect domain from each way. The reported FID and KID scores were then computed between the defective images in the training set and the mixture set of synthetic defective images. The same procedure was applied when computing scores on single product subsets of the SDI dataset. For example, for product A, we calculated the scores between the defective image of product A in the training set and the mixture set of synthetic defective images of product A. ",
"bbox": [
173,
678,
825,
858
],
"page_idx": 14
},
{
"type": "text",
"text": "D NETWORK ARCHITECTURE ",
"text_level": 1,
"bbox": [
176,
878,
436,
895
],
"page_idx": 14
},
{
"type": "text",
"text": "In this section, we provide the architectural details of all four modules in DT-GAN. ",
"bbox": [
173,
909,
717,
924
],
"page_idx": 14
},
{
"type": "table",
"img_path": "images/1c48ba4f6a9c5f47866cc9bb38143dabaa253479bdaae65b20f932c892e1f632.jpg",
"table_caption": [
"Table 9: Generator architecture. "
],
"table_footnote": [],
"table_body": "<table><tr><td colspan=\"7\">(a)Encoder</td></tr><tr><td>Layer</td><td colspan=\"2\">Resample</td><td>Norm</td><td colspan=\"3\">Output Shape</td></tr><tr><td>Image x</td><td colspan=\"2\"></td><td>-</td><td colspan=\"3\">128 × 128×3</td></tr><tr><td>Conv 1×1</td><td colspan=\"2\"></td><td>-</td><td colspan=\"3\">128 ×128 ×128</td></tr><tr><td>ResBlk</td><td colspan=\"2\">AvgPool</td><td>IN</td><td colspan=\"3\">64× 64×256</td></tr><tr><td>ResBlk</td><td colspan=\"2\">AvgPool</td><td>IN</td><td colspan=\"3\">32 × 32 × 512</td></tr><tr><td>ResBlk</td><td colspan=\"2\">AvgPool</td><td>IN</td><td colspan=\"3\">16 × 16 × 512</td></tr><tr><td>ResBlk</td><td colspan=\"2\"></td><td>IN</td><td colspan=\"3\">16 ×16× 512</td></tr><tr><td>ResBlk</td><td colspan=\"2\"></td><td>IN</td><td colspan=\"3\">16 ×16 × 512</td></tr><tr><td colspan=\"3\">(b) Background Decoder</td><td colspan=\"5\">(c) Foreground Decoder</td></tr><tr><td>Layer</td><td>Resample</td><td>Norm</td><td> Output Shape</td><td>Layer</td><td>Resample Norm</td><td>Output Shape</td></tr><tr><td>Input</td><td></td><td>-</td><td>16 × 16 × 448</td><td>Input ResBlk</td><td></td><td>16 × 16 × 64</td></tr><tr><td>ResBlk</td><td></td><td>IN 16 ×16× 448 16 ×16× 512</td><td>ResBlk</td><td></td><td>AdaIN</td><td>16 ×16× 64</td></tr><tr><td>ResBlk</td><td></td><td>IN</td><td></td><td>=</td><td>AdaIN</td><td>16 × 16 × 256</td></tr><tr><td>ResBlk</td><td>=</td><td>IN</td><td>16 ×16 × 512</td><td>ResBlk</td><td>AdaIN</td><td>16 ×16× 256</td></tr><tr><td>ResBlk</td><td>Upsample</td><td>IN</td><td>32 × 32×512</td><td>ResBlk Upsample ResBlk</td><td>AdaIN</td><td>32 × 32 × 256</td></tr><tr><td>ResBlk ResBlk</td><td>Upsample Upsample</td><td>IN IN</td><td>64 × 64× 256 128 × 128× 448</td><td>Upsample</td><td>AdaIN</td><td>64×64×128</td></tr><tr><td></td><td></td><td></td><td>ResBlk</td><td>Upsample</td><td>AdaIN</td><td>128 ×128 × 64</td></tr><tr><td colspan=\"7\">(d) Fusion</td></tr><tr><td>Layer</td><td colspan=\"2\">Resample</td><td colspan=\"2\">Norm</td><td colspan=\"2\">Output Shape</td></tr><tr><td>Input</td><td colspan=\"2\"></td><td colspan=\"2\"></td><td colspan=\"2\">128 × 128 × (448 + 64)</td></tr><tr><td>Conv 1×1</td><td colspan=\"2\"></td><td colspan=\"2\"></td><td colspan=\"2\">128 × 128× 3</td></tr></table>",
"bbox": [
176,
132,
818,
497
],
"page_idx": 15
},
{
"type": "table",
"img_path": "images/1098199c42bf1a6e4062025eaaa671f3e1525ccdf2528cdf76e0b9528b15881a.jpg",
"table_caption": [
"Table 10: Mapping network architecture. "
],
"table_footnote": [],
"table_body": "<table><tr><td>Layer</td><td></td><td>Activation</td><td></td><td></td><td></td><td>Output Shape</td></tr><tr><td>Latent z</td><td></td><td>=</td><td></td><td></td><td></td><td>16</td></tr><tr><td>Linear</td><td></td><td>ReLU</td><td></td><td></td><td></td><td>512</td></tr><tr><td>Linear</td><td></td><td>ReLU</td><td></td><td></td><td></td><td>512</td></tr><tr><td>Linear</td><td></td><td>ReLU</td><td></td><td></td><td></td><td>512</td></tr><tr><td>Linear</td><td></td><td>ReLU</td><td></td><td></td><td></td><td>512</td></tr><tr><td colspan=\"3\">(b) Style Code</td><td colspan=\"5\">(c) Content</td></tr><tr><td>Layer</td><td>Activation</td><td> Output Shape</td><td>Layer</td><td>Resample Activation</td><td></td><td>Noise</td><td> Output Shape</td></tr><tr><td>Input</td><td>=</td><td>512</td><td>Input</td><td></td><td></td><td>=</td><td>512</td></tr><tr><td>Linear</td><td>ReLU</td><td>512</td><td>Reshape</td><td></td><td>-</td><td>-</td><td>1×1×512</td></tr><tr><td>Linear</td><td>ReLU</td><td>512</td><td>ResBlk</td><td>Upsample</td><td>IN</td><td>True</td><td>2×2×512</td></tr><tr><td>Linear</td><td>ReLU</td><td>512</td><td>ResBlk</td><td>Upsample</td><td>IN</td><td>True</td><td>4×4×512</td></tr><tr><td>Linear</td><td>1</td><td>64</td><td>ResBlk</td><td>Upsample</td><td>IN</td><td>True</td><td>8×8×256</td></tr><tr><td></td><td></td><td></td><td>ResBlk</td><td>Upsample</td><td>IN</td><td>True</td><td>16 ×16×128</td></tr><tr><td></td><td></td><td></td><td>Conv 1×1</td><td>=</td><td>IN</td><td>True</td><td>16 × 16× 64</td></tr></table>",
"bbox": [
173,
554,
825,
804
],
"page_idx": 15
},
{
"type": "text",
"text": "Generator (Table 9). For the SDI dataset, the encoder part of the generator consists of three downsampling blocks and two intermediate blocks (Table 9 (a)), all of them are pre-activation residual units (He et al., 2016b). Then the encoded feature map is split channel-wise into background (Table 9 (b)) and foreground (Table 9 (c)). Both of them are then carried through separate decoders. We use the instance normalization (IN) and the adaptive instance normalization (AdaIN) as indicated. The style code is injected into all AdaIN layers to modulate the affine transformations. Note that ",
"bbox": [
173,
839,
825,
924
],
"page_idx": 15
},
{
"type": "table",
"img_path": "images/0490c17ed37be089529218dd050adf14532c06146d2b840c7e6b071380cd65e8.jpg",
"table_caption": [
"Table 11: Style-content encoder and discriminator architectures. "
],
"table_footnote": [],
"table_body": "<table><tr><td colspan=\"6\">(a)SharedLayers</td></tr><tr><td>Layer</td><td colspan=\"2\">Resample</td><td colspan=\"2\">Norm</td><td>Output Shape</td></tr><tr><td>Input x</td><td colspan=\"2\"></td><td colspan=\"2\"></td><td>128 × 128 ×3</td></tr><tr><td>Conv 1×1</td><td colspan=\"2\">1</td><td colspan=\"2\"></td><td>128 × 128 × 64</td></tr><tr><td>ResBlk</td><td colspan=\"2\">AvgPool</td><td colspan=\"2\"></td><td>64 × 64× 256</td></tr><tr><td>ResBlk</td><td colspan=\"2\">AvgPool</td><td colspan=\"2\"></td><td>32 × 32×512</td></tr><tr><td>ResBlk</td><td colspan=\"2\">AvgPool</td><td colspan=\"2\"></td><td>16 ×16 × 512</td></tr><tr><td>(b) Style Code /Discriminator and BG Classifier</td><td></td><td></td><td colspan=\"3\">(c) Content /FG Classifier</td></tr><tr><td>Layer</td><td>Resample Norm</td><td>Output Shape</td><td>Layer</td><td>Resample Norm</td><td>Output Shape</td></tr><tr><td>Input</td><td>-</td><td>16 ×16× 512</td><td>Input</td><td></td><td>16 ×16× 512</td></tr><tr><td>ResBlk</td><td>AvgPool</td><td>8×8×512</td><td colspan=\"2\">LReLU</td><td>16 ×16 × 512</td></tr><tr><td>ResBlk</td><td>AvgPool</td><td>4×4×512</td><td colspan=\"2\">Conv 1×1*K</td><td>16×16×64*K</td></tr><tr><td>LReLU</td><td></td><td>4×4×512</td><td colspan=\"2\"></td><td></td></tr><tr><td>Conv 4×4</td><td></td><td>1×1×512</td><td colspan=\"2\"></td><td></td></tr><tr><td>LReLU</td><td></td><td>1×1×512</td><td colspan=\"4\"></td></tr><tr><td>Reshape</td><td></td><td>512</td><td colspan=\"4\"></td></tr><tr><td>Linear *K</td><td></td><td>D*K</td><td colspan=\"4\"></td></tr></table>",
"bbox": [
171,
131,
834,
404
],
"page_idx": 16
},
{
"type": "text",
"text": "AdaIN is only used in the foreground decoder. The outputs of both decoders are only fused in the end (Table 9 (d)). ",
"bbox": [
174,
428,
823,
457
],
"page_idx": 16
},
{
"type": "text",
"text": "Mapping Network (Table 10). The mapping network consists of four shared linear layers (Table 10 (a)) and two separate branches: one for generating style codes (Table 10(b)) and one for contents (Table 10(c)). Each of them is further divided into $K$ output branches, where $K$ denotes the number of domains. The dimension of the input, the output style code and the output content is set to 16, 64, and $1 6 \\times 1 6 \\times 6 4$ , respectively. The latent code is sampled from the standard normal distribution. Note that we apply per-pixel noise after each convolution in the content branch, which we have observed to increase the diversity of generated defects significantly (cf. Figure 5 (g)). ",
"bbox": [
173,
463,
825,
560
],
"page_idx": 16
},
{
"type": "text",
"text": "Style-Content Encoder (Table 11). The style-content encoder consists of a CNN (Table 11 (a)) with two branches (Table 11 (b) and (c)) as in the mapping network. Each branch has $K$ outputs, where $K$ is the number of domains. Three pre-activation residual blocks are shared among two branches, followed by a specific structure for each branch. The output dimension $D$ in Table 11 is set to 64, which denotes the dimension of the style code. ",
"bbox": [
174,
568,
825,
637
],
"page_idx": 16
},
{
"type": "text",
"text": "Discriminator (Table 11). The discriminator is a multi-task discriminator with two auxiliary classifiers for the foreground content and the background. The structure is almost identical to the stylecontent encoder, except $D$ is set to 1 for real/fake classification. The background classifier acts in parallel to final linear layer in Table 11 (b) and provides the logits for background classification. The foreground classifier instead acts on top of the output in Table 11 (c) and four more pre-activation residual layers are applied to encode the content into logits for foreground content classification. ",
"bbox": [
173,
643,
825,
728
],
"page_idx": 16
},
{
"type": "text",
"text": "E ADDITIONAL RESULTS ",
"text_level": 1,
"bbox": [
174,
747,
398,
763
],
"page_idx": 16
},
{
"type": "text",
"text": "E.1 ADDITIONAL RESULTS ON THE SDI DATASET ",
"text_level": 1,
"bbox": [
176,
779,
527,
792
],
"page_idx": 16
},
{
"type": "text",
"text": "We provide additional reference-guided image synthesis results on the SDI dataset in Figure 10. We demonstrate all the possible transfers among all foreground domains. Both style codes and contents are extracted from the reference images. To be noted that DT-GAN can append and remove foreground defects not only onto Normal samples but also to defective samples. For example, in the fifth column of Figure 10, the original scratch in the source image is removed and only the defects from the reference images are presented in the output images. ",
"bbox": [
174,
804,
825,
888
],
"page_idx": 16
},
{
"type": "text",
"text": "Besides, we present additional evaluations showing the effectiveness of our synthetic data according to Table 3. As seen in Table 12, the synthetic images from DT-GAN also boost the performance in single product classifiers, where the classifiers were trained on the subset of images for one product (A, B, C) instead of the full dataset (ABC). ",
"bbox": [
173,
895,
823,
924
],
"page_idx": 16
},
{
"type": "image",
"img_path": "images/ba0e2234e87b25b63cc95ac4e5644f8da2a00a1e319667a7cf9fa0a32eed56c7.jpg",
"image_caption": [
"Figure 10: Reference-guided image synthesis results on the SDI dataset. The first row and the first column are the real images sampled from the dataset, while the rest are synthetic images generated by the proposed DT-GAN. Our model provides translations between different foreground domains (Normal, Scratches and Spots) with styles and contents extracted from reference images while the backgrounds from source images are well preserved. "
],
"image_footnote": [],
"bbox": [
178,
98,
823,
609
],
"page_idx": 17
},
{
"type": "text",
"text": "",
"bbox": [
174,
734,
823,
763
],
"page_idx": 17
},
{
"type": "text",
"text": "As discussed in Section 4.2, we assumed that the data-insufficiency problem can be mitigated by transferring defects across multiple background products. To examine if this assumption holds, we compared the performance of classifiers trained on synthetic images with defects from a specific source (vA, vB, vC) to classifiers trained on images with defects from all products (vABC). The results on the cross-domain effect with regard to different sizes of the training set are shown in Table 13. We again notice that using our synthetic data is beneficial. Moreover, in most cases the performance is further improved by exploiting cross-domain information (i.e. by transferring defects from other products). We interpret this as support for our assumption and the practical usefulness of our method in the real-world scenario. The case of cross-domain image synthesis when the desired combination is not presented in the training set is covered in the study on the MVTec Anomaly Detection dataset (Bergmann et al., 2019) (see Appendix E.4). ",
"bbox": [
173,
771,
825,
924
],
"page_idx": 17
},
{
"type": "table",
"img_path": "images/20974be996d9fce37f644ecdf9151a7e5df8554b4465f8cbe6a1c0ef5f25b6a6.jpg",
"table_caption": [
"Table 12: Quantitative results for DT-GAN as a data augmentation method to train general and single product classifiers. The left-most column indicates the number of samples per class, including all images from the training set plus increasing amounts of synthetic images. In the first row, 20A refers to the case of 20 real defective samples for product A, while All refers to the full training set. "
],
"table_footnote": [],
"table_body": "<table><tr><td rowspan=\"3\">Dataset Size</td><td colspan=\"8\">20A</td></tr><tr><td colspan=\"2\">A</td><td colspan=\"2\">B</td><td colspan=\"2\">C</td><td colspan=\"2\">ABC</td></tr><tr><td>Trad-Aug</td><td>Ours</td><td>Trad-Aug</td><td>Ours</td><td>Trad-Aug</td><td>Ours</td><td>Trad-Aug</td><td>Ours</td></tr><tr><td>4500</td><td>35.09±2.62 27.64±3.12</td><td></td><td>7.8±1.48</td><td>5.6±1.67</td><td></td><td></td><td>15.24±1.90 13.14±1.7015.55±0.63 14.28±1.25</td><td></td></tr><tr><td>6600</td><td>39.64±2.28 27.64±1.65</td><td></td><td>8.8±1.64</td><td>6.2±1.64</td><td>15.81±1.731</td><td></td><td></td><td>12.38±1.6516.69±0.76 14.41±3.12</td></tr><tr><td>12000</td><td>34.18±4.39 28.55±7.32</td><td></td><td>5.8±0.45</td><td>5.6±1.14</td><td></td><td></td><td>16.19±1.17 10.86±1.28 16.95±1.02 14.22±1.53</td><td></td></tr><tr><td>18600</td><td>39.45±7.06 32.55±5.04</td><td></td><td>7.2±0.84</td><td>5.2±1.10</td><td></td><td></td><td>14.86±0.85 13.14±2.06 16.12±2.19 15.36±0.86</td><td></td></tr><tr><td rowspan=\"3\">Dataset Size</td><td colspan=\"8\">All</td></tr><tr><td>A</td><td></td><td colspan=\"2\">B</td><td colspan=\"2\">C</td><td colspan=\"2\">ABC</td></tr><tr><td>Trad-Aug</td><td>Ours</td><td>Trad-Aug</td><td></td><td>Ours</td><td>Trad-Aug</td><td>Ours</td><td>Trad-Aug</td><td>Ours</td></tr><tr><td>4500</td><td>16.00±1.041</td><td>10.18±1.75 8.79±0.45</td><td></td><td>5.60±1.51</td><td></td><td></td><td></td><td>17.13±6.62 14.09±2.2712.75±0.61 11.04±0.76</td></tr><tr><td>6600</td><td>14.90±1.38</td><td>10.54±1.22 7.60±1.51</td><td></td><td>6.80±3.11</td><td>15.23±2.33 11.42±0</td><td></td><td></td><td>13.07±1.57 10.60±0.48</td></tr><tr><td>12000</td><td>13.81±2.36</td><td>6.72±1.65 6.80±1.64</td><td></td><td>4.60±0</td><td>16.57±3.20 13.90±2.5712.05±0.81</td><td></td><td></td><td>9.90±0.69</td></tr><tr><td>18600</td><td>13.63±2.22 10.54±2.45 6.80±1.79</td><td></td><td></td><td></td><td></td><td></td><td></td><td>4.99±1.87 15.62±0.85 11.61±1.24 12.37±0.32 10.21±0.96</td></tr></table>",
"bbox": [
178,
169,
816,
407
],
"page_idx": 18
},
{
"type": "table",
"img_path": "images/f17f93e8ebcc379ed4eada67e2de92805226db4f931acda640080a5aad9fc349.jpg",
"table_caption": [
"Table 13: Cross-domain effect on single product classifiers trained with reference-guided synthetic images at all scales. Note that here A, B and C stand for 3 products in the SDI dataset while vA, vB, vC and vABC indicate the defects are copied from which reference set. "
],
"table_footnote": [],
"table_body": "<table><tr><td rowspan=\"2\">Dataset Size</td><td colspan=\"5\">A</td></tr><tr><td>Trad-Aug</td><td>vA</td><td>vB</td><td>vC</td><td>vABC</td></tr><tr><td>4500</td><td>16.00±1.04</td><td>12.90±2.61</td><td>13.08±1.65</td><td>14.90±2.46</td><td>15.27±3.49</td></tr><tr><td>6600</td><td>14.90±1.38</td><td>13.99±1.89</td><td>11.26±1.04</td><td>14.36±4.04</td><td>16.00±2.85</td></tr><tr><td>12000</td><td>13.81±2.36</td><td>11.81±2.65</td><td>12.72±2.87</td><td>11.99±1.63</td><td>11.09±3.49</td></tr><tr><td>18600</td><td>13.63±2.22</td><td>12.72±5.22</td><td>14.36±3.83</td><td>14.18±5.05</td><td>13.81±8.56</td></tr><tr><td>Dataset</td><td colspan=\"5\">B</td></tr><tr><td>Size</td><td>Trad-Aug</td><td>vA</td><td>vB</td><td>vC</td><td>VABC</td></tr><tr><td>4500</td><td>8.79±0.45</td><td>7.80±2.15</td><td>5.60±1.14</td><td>10.19±0.84</td><td>6.79±1.30</td></tr><tr><td>6600</td><td>7.60±1.51</td><td>6.80±1.65</td><td>7.80±1.10</td><td>8.00±2.34</td><td>6.00±1.41</td></tr><tr><td>12000</td><td>6.80±1.64</td><td>6.40±1.34</td><td>6.60±1.52</td><td>6.59±1.34</td><td>5.60±1.34</td></tr><tr><td>18600</td><td>6.80±1.79</td><td>6.19±1.78</td><td>4.40±1.14</td><td>6.60±1.95</td><td>5.99±1.58</td></tr><tr><td>Dataset</td><td colspan=\"5\">C</td></tr><tr><td>Size</td><td>Trad-Aug</td><td>vA</td><td>VB</td><td>vC</td><td>vABC</td></tr><tr><td>4500</td><td>17.14±4.62</td><td>14.85±0.52</td><td>16.76±2.58</td><td>13.90±1.98</td><td>12.00±1.59</td></tr><tr><td>6600</td><td>15.23±2.33</td><td>13.14±1.24</td><td>13.90±2.29</td><td>14.28±1.34</td><td>12.57±1.57</td></tr><tr><td>12000</td><td>16.57±3.20</td><td>13.14±2.81</td><td>11.23±0.80</td><td>14.85±1.73</td><td>11.42±0.96</td></tr><tr><td>18600</td><td>15.62±0.85</td><td>13.71±1.73</td><td>15.99±6.75</td><td>12.57±3.26</td><td>12.95±2.98</td></tr></table>",
"bbox": [
240,
478,
753,
781
],
"page_idx": 18
},
{
"type": "text",
"text": "E.2 ADDITIONAL FID AND KID RESULTS ON THE SDI DATASET ",
"text_level": 1,
"bbox": [
174,
810,
630,
827
],
"page_idx": 18
},
{
"type": "text",
"text": "We provide additional results in the case of training GANs with augmentation methods in Table 14. Augmentation methods like ADA (Karras et al., 2020a) or DiffAug (Zhao et al., 2020) are proposed to adapt GAN training to limited data. We applied these augmentation methods to StyleGAN v2 and BigGAN, because these state-of-art image synthesis methods are not optimized for small dataset. However, incorporating the augmentation methods in training GANs on the SDI dataset is not always beneficial. The performance of StyleGAN v2 is largely degraded when using ADA, potentially due to the conflict between augmentation methods and the decentralized location of defects—in the SDI dataset, defects can occur anywhere on the surface. This is in contrast to datasets that were used to evaluate the aforementioned augmentation methods in GANs, where the objects are centralized (e.g., ImageNet (Deng et al., 2009), Cifar (Krizhevsky & Hinton, 2009)) and their attributes (e.g., beard, eye glasses in CelebA (Liu et al., 2015)) only occur in specific images parts. ",
"bbox": [
174,
839,
825,
924
],
"page_idx": 18
},
{
"type": "text",
"text": "",
"bbox": [
173,
103,
825,
174
],
"page_idx": 19
},
{
"type": "table",
"img_path": "images/45a92e9be03f105fca9e42ed49982648d41734c531d7e3f15ce1a34f30d32186.jpg",
"table_caption": [
"Table 14: Quantitative comparison of DT-GAN with baseline image synthesis methods using FID and KID. Note that the reported values are not comparable between columns, because they are calculated on different training sets. The scores of StarGAN v2 on single products are omitted because generating images with specified background is not possible due to its network design. "
],
"table_footnote": [],
"table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"4\">FID↓</td><td colspan=\"4\">KID↓</td></tr><tr><td>A</td><td>B</td><td>C</td><td>All</td><td>A</td><td>B</td><td>C</td><td>All</td></tr><tr><td>Mokady et al. (2020)</td><td>68.69</td><td>66.90</td><td>36.21</td><td>58.63</td><td>0.050</td><td>0.036</td><td>0.030</td><td>0.036</td></tr><tr><td>StarGAN v2</td><td>-</td><td>-</td><td>1</td><td>37.70</td><td>1</td><td>-</td><td>1</td><td>0.013</td></tr><tr><td>StyleGAN v2</td><td>90.10</td><td>52.95</td><td>138.09</td><td>35.34</td><td>0.072</td><td>0.027</td><td>0.186</td><td>0.013</td></tr><tr><td>StyleGAN v2 + ADA</td><td>149.66</td><td>42.75</td><td>135.69</td><td>76.16</td><td>0.138</td><td>0.019</td><td>0.191</td><td>0.055</td></tr><tr><td>BigGAN</td><td>235.66</td><td>192.89</td><td>193.61</td><td>151.43</td><td>0.248</td><td>0.199</td><td>0.276</td><td>0.115</td></tr><tr><td>BigGAN + DiffAug</td><td>218.74</td><td>134.41</td><td>270.89</td><td>155.88</td><td>0.220</td><td>0.121</td><td>0.378</td><td>0.099</td></tr><tr><td>Ours</td><td>58.43</td><td>36.44</td><td>22.68</td><td>29.73</td><td>0.025</td><td>0.013</td><td>0.012</td><td>0.009</td></tr></table>",
"bbox": [
173,
252,
821,
390
],
"page_idx": 19
},
{
"type": "text",
"text": "E.3 ABLATION STUDY WITH REGARD TO FID AND KID SCORES ",
"text_level": 1,
"bbox": [
174,
417,
629,
433
],
"page_idx": 19
},
{
"type": "text",
"text": "We report the FID and KID scores of the ablation study in Table 15. We notice that both subnetworks show positive correlation to each modification except for structural change as in (a) and (e) . Among the two subnetworks, the reference-guided subnetwork outperforms the latent-guided one in the beginning, which is due to the fact that transferring existing contents is easier than generating them from random noise. This effect is also observed in Figure 5. However, the performance of the latentguided subnetwork improves significantly after applying per-pixel noise injection. The subnetwork can now output non-deterministic foreground contents even for a fixed input vector which results in better visual quality and higher diversity of generated defects. In the main text, the scores of the mixture set are reported. ",
"bbox": [
173,
443,
825,
569
],
"page_idx": 19
},
{
"type": "table",
"img_path": "images/d91c27f754a46e96b8e6645e98fa2909f79399eb5f16398ddc585747f2f70c05.jpg",
"table_caption": [
"Table 15: Ablation study with regard to FID and KID scores. "
],
"table_footnote": [],
"table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">FID↓</td><td colspan=\"3\">KID↓</td></tr><tr><td>Latent</td><td>Reference</td><td>Mix</td><td>Latent</td><td>Reference</td><td>Mix</td></tr><tr><td>(a) Baseline StarGAN v2</td><td>37.73</td><td>37.99</td><td>37.70</td><td>0.013</td><td>0.013</td><td>0.013</td></tr><tr><td>(b)+ Style-Content branches</td><td>43.90</td><td>32.61</td><td>33.36</td><td>0.017</td><td>0.011</td><td>0.011</td></tr><tr><td>(c)+Foreground classifier</td><td>37.14</td><td>32.34</td><td>27.69</td><td>0.014</td><td>0.011</td><td>0.008</td></tr><tr><td>(d) + Background classifier</td><td>34.12</td><td>32.50</td><td>30.23</td><td>0.011</td><td>0.011</td><td>0.010</td></tr><tr><td>(e)+ Separately decoding foreground and background in G</td><td>48.52</td><td>38.11</td><td>34.79</td><td>0.017</td><td>0.015</td><td>0.011</td></tr><tr><td>(f) + Anchor foreground domain (e.g. No rmal)</td><td>43.66</td><td>37.45</td><td>32.15</td><td>0.019</td><td>0.015</td><td>0.011</td></tr><tr><td></td><td>33.05</td><td></td><td></td><td>0.009</td><td>0.011</td><td></td></tr><tr><td>(g)+ Noise injection in Mapping Network</td><td></td><td>34.42</td><td>29.73</td><td></td><td></td><td>0.009</td></tr></table>",
"bbox": [
173,
607,
836,
757
],
"page_idx": 19
},
{
"type": "text",
"text": "E.4 ADDITIONAL RESULTS ON THE MVTEC ANOMALY DETECTION DATASET ",
"text_level": 1,
"bbox": [
174,
786,
720,
801
],
"page_idx": 19
},
{
"type": "text",
"text": "The MVTec Anomaly Detection dataset (Bergmann et al., 2019) contains 15 different object and texture categories for anomaly detection. The dataset is formed of non-defective image for training and both non-defective and defective images with various kinds of defects for testing. The pixel-level annotations of all defective images are also provided. It is worth noting that the MVTec Anomaly Detection dataset is relatively small scale in number of images, where the number of training images is ranging from 60 to 391. Moreover, the number of defective images for each defect category in the test set is varying only from 8 to 30, which is relatively limited considering the sophisticated pattern of defects. ",
"bbox": [
173,
811,
825,
924
],
"page_idx": 19
},
{
"type": "text",
"text": "We conducted image synthesis experiments on a subset of MVTec Anomaly Detection dataset, where we selected four texture categories: Carpet, Leather, Wood and Tile for our targeted scenario i.e. surface defects. Furthermore, we aggregated some of the original defect types defined in the MVTec Anomaly Detection dataset into scratches and spots according to their visual appearance. We then simply added the subset of the MVTec Anomaly Detection dataset to the training set together with the SDI dataset for training DT-GAN. Details of the resulting dataset are shown in Table 17. Note that the small scale of available data posts a major challenge for training generative models. ",
"bbox": [
174,
103,
825,
214
],
"page_idx": 20
},
{
"type": "text",
"text": "Quantitative Evaluation. We present additional quantitative results on the subset of the MVTec Anomaly Detection dataset in Table 16, following the same evaluation setup as described in Appendix C. As shown in Table 16, our method achieves the best scores in Carpet and Wood, which supports our claim that DT-GAN generates synthetic images with higher fidelity and more diverse defect. However, we also observe that StyleGAN v2 seems to outperform our method in Leather and Tile. ",
"bbox": [
174,
222,
825,
305
],
"page_idx": 20
},
{
"type": "text",
"text": "Please note that FID and KID are not optimized to evaluate such a small dataset, there the results should only be interpreted together with the qualitative results. ",
"bbox": [
176,
313,
821,
340
],
"page_idx": 20
},
{
"type": "text",
"text": "Note the we again omit the FID and KID of StarGAN v2 because it is not cable of generating images for a specified product due to the ‘identity-shift’, which is also explained in detail in the qualitative evaluation. ",
"bbox": [
174,
347,
825,
390
],
"page_idx": 20
},
{
"type": "table",
"img_path": "images/48579259fe7630f714f2c1e1b5470350c7a4af04e5a533325a61185f9ce9ab51.jpg",
"table_caption": [
"Table 16: Quantitative comparison of DT-GAN with baseline image synthesis methods using FID and KID. Note that the reported values are not comparable between columns, because they were calculated on different training sets. "
],
"table_footnote": [],
"table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"4\">FID↓</td><td colspan=\"4\">KID↓</td></tr><tr><td>Carpet</td><td>Leather</td><td>Tile</td><td>Wood</td><td>Carpet</td><td>Leather</td><td>Tile</td><td>Wood</td></tr><tr><td>Mokady (2020)</td><td>41.87</td><td>60.26</td><td>275.12</td><td>81.71</td><td>0.04</td><td>0.03</td><td>0.29</td><td>0.04</td></tr><tr><td>StarGAN v2</td><td>1</td><td></td><td></td><td></td><td>1</td><td></td><td>=</td><td>1</td></tr><tr><td>StyleGAN v2</td><td>51.37</td><td>51.60</td><td>225.96</td><td>140.01</td><td>0.05</td><td>0.03</td><td>0.23</td><td>0.12</td></tr><tr><td>BigGAN + DiffAug</td><td>34.47</td><td>101.70</td><td>391.54</td><td>113.32</td><td>0.03</td><td>0.07</td><td>0.42</td><td>0.07</td></tr><tr><td>Ours</td><td>22.79</td><td>86.13</td><td>321.35</td><td>75.83</td><td>0.01</td><td>0.07</td><td>0.36</td><td>0.03</td></tr></table>",
"bbox": [
194,
453,
799,
566
],
"page_idx": 20
},
{
"type": "text",
"text": "Qualitative Evaluation. For qualitative results, we again discuss the ‘latent-guided’ and ‘referenceguided’ synthesis separately. ",
"bbox": [
176,
589,
821,
618
],
"page_idx": 20
},
{
"type": "text",
"text": "We present the ‘latent-guided’ image synthesis results of StyleGAN v2 in Figure 11 and Figure 12 and BigGAN in Figure 13 and Figure 14. The results are acquired by training one model for each product and then generating 16 images from randomly sampled latent codes from each of them. As pointed out in Section 4.1.2, both methods can not adapt well on small dataset. They suffer from model collapsing and show signs of overfitting by generating images similar to the training data. For example, StyleGAN v2 generates images either with no clear defect or identical to the training set (e.g., Leather in Figure 11 and Product B in Figure 12). The overfitting we observe here also explains the better FID and KID scores in Table 16. For Tile, we can see clear signs of mode collapse in the generated Tile images of StyleGAN v2. Similarly, BigGAN produces images with single mode and abnormal patterns (e.g., grid structure and gray edges). Unlike StyleGAN v2 and BigGAN, StarGAN v2 and our method both require images as input (i.e. Source). Therefore, we randomly sampled two Normal images and applied eight defects which are generated from randomly sampled latent codes to each of them. As seen in Figure 15 and Figure 16, StarGAN v2 fails to preserve the background from the given input images due to the highly entangled FG and BG. Also it fails to generates legit and diverse defects without separately modeling the style and the content. In contrast to aforementioned methods, our DT-GAN produces images with higher fidelity and more diversity in defect patterns as shown in Figure 17 and Figure 18. We believe this again prove the importance of style-content separation and FG/BG disentanglement, which we introduce in Section 3.1. ",
"bbox": [
174,
625,
825,
888
],
"page_idx": 20
},
{
"type": "text",
"text": "For ‘reference-guided’ image synthesis, the results of Mokady et al. (2020) are shown in Figure 19 and Figure 20 while the results of StarGAN v2 are in Figure 21 and Figure 22. We can observe a clear shift in color in all the outputs from Mokady et al. (2020). Moreover, Mokady et al. (2020) can only transfer content between two domains. In order to perform translation from a non-defective sample to a defective one, we trained a model for each type of defect and for each product. This sums up to be 13 models (Scratches and Spots for 6 categories and Scratches only for Tile). The results from the intended use within one background domain can be found on the diagonal and are marked in red in both Figure 19 and Figure 20. We still show the images that we feed in images from other background domains. As expected, the model then fails to preserve the background of given source images and introduce artifacts to the outputs. Similarly, StarGAN v2 does not preserve the background from the input images. Without style-content separation and FG/BG disentanglement, we observe that StarGAN v2 encodes the background characteristics together with the foreground content of the reference images, which results in identity-shits in its output images. Moreover, the output images either show no clear defect or contain abnormal patterns which sabotage the fidelity. On the contrary, our method can faithfully transfer the foreground content of reference images across given background of different products as shown in Figure 23 and Figure 24, which demonstrate the effectiveness of the style-content separation and FG/BG disentanglement we introduced in Section 3.1. ",
"bbox": [
173,
895,
823,
924
],
"page_idx": 20
},
{
"type": "text",
"text": "",
"bbox": [
174,
104,
825,
325
],
"page_idx": 21
},
{
"type": "text",
"text": "It is also worth noting that our method can perform cross-domain image synthesis even the desired combination is not presented in the training set. We demonstrate this on product Tile, which only has images with Scratches but no Spots. As shown in Figure 18 and Figure 24, DT-GAN can generated spots one given Tile images. However, this kind of transformation is most useful when the desired combination is reasonable for the downstream applications. ",
"bbox": [
174,
333,
823,
402
],
"page_idx": 21
},
{
"type": "text",
"text": "Limitation and Future Work. We have demonstrated the feasibility of the proposed DT-GAN by incorporating more products from the MVTec Anomaly Detection dataset in our training procedure. Intensive experiments have shown that the generated images from DT-GAN yielded better results compared to the baseline image synthesis methods. However, we noticed that despite the diverse patterns of the generated defects, DT-GAN tends to apply the styles learned from the SDI dataset also to the samples from the MVTec Anomaly Detection dataset. For example, we can observe some ”halo” effects in Leather and Wood in Figure 18 and some of the generated scratches in Figure 17 and Figure 23 are rather weakly pronounced. We hypothesize this can be counteracted by explicitly localizing the defect and enforcing the model to learn conditional relationships between ‘styles’ and different backgrounds. We aim to address these issues in future work. ",
"bbox": [
174,
410,
825,
547
],
"page_idx": 21
},
{
"type": "table",
"img_path": "images/e872d4c36a2361439e0ef7091ef852bb00bbd7ba065cebeee40346b44c21a5cb.jpg",
"table_caption": [
"Table 17: Overview of our formation of the MVTec Anomaly Detection sub-dataset. The first column represents the original defect types in the MVTec Anomaly Detection dataset while the first row stands for the defect types in our targeted scenario. We list the ID of samples we took from the MVTec Anomaly Detection dataset and show the number of samples in row Sum. "
],
"table_footnote": [],
"table_body": "<table><tr><td colspan=\"3\">(a) Carpet</td></tr><tr><td></td><td>Scratches</td><td>Spots</td></tr><tr><td>Color</td><td>011,012,014,016, 017</td><td>000,003,004,007,015,018</td></tr><tr><td>Thread</td><td>000-018</td><td></td></tr><tr><td>Hole</td><td>-</td><td>000 - 016</td></tr><tr><td>Sum</td><td>24</td><td>23</td></tr><tr><td colspan=\"3\">(b) Leather</td></tr><tr><td></td><td>Scratches</td><td>Spots</td></tr><tr><td>Color</td><td>001,003,005,007,009,011,013,015,018</td><td>000,002,006,008,010,012,014</td></tr><tr><td>Cut</td><td>000 -018 000 - 006,009 - 016</td><td>-</td></tr><tr><td>Fold Glue</td><td></td><td>000 - 002,005-009,011-015,018</td></tr><tr><td>Poke</td><td>003,009,010,016,017</td><td>000-017</td></tr><tr><td>Sum</td><td></td><td>39</td></tr><tr><td></td><td>48</td><td></td></tr><tr><td colspan=\"3\">(c) Tile</td></tr><tr><td></td><td>Scratches</td><td>Spots</td></tr><tr><td>Crack</td><td>000 - 016</td><td>二</td></tr><tr><td>Sum</td><td>17</td><td>0</td></tr><tr><td colspan=\"3\">(d) Wood</td></tr><tr><td></td><td>Scratches</td><td>Spots</td></tr><tr><td>Color</td><td>003,005</td><td></td></tr><tr><td>Scratch</td><td>001-006,008- 010,013 -016,018- 020</td><td>000 - 016</td></tr><tr><td>Hole</td><td>=</td><td>000 - 004,006-009</td></tr><tr><td>Combined</td><td>008</td><td>001,002,009</td></tr><tr><td>Sum</td><td>19</td><td>12</td></tr></table>",
"bbox": [
171,
324,
828,
761
],
"page_idx": 22
},
{
"type": "text",
"text": "Randomly Sampled Defects (Scratches) ",
"text_level": 1,
"bbox": [
400,
143,
619,
155
],
"page_idx": 23
},
{
"type": "image",
"img_path": "images/567f75bf12cbd5a5119634c75240da3d88366422eb7484cba51a63409149e476.jpg",
"image_caption": [
"Figure 11: Latent-guided image synthesis results of StyleGAN v2 on the SDI dataset and the MVTec AD dataset. We train a model for each product and generate 16 Scratches images from randomly sampled latent codes. "
],
"image_footnote": [],
"bbox": [
243,
156,
758,
830
],
"page_idx": 23
},
{
"type": "image",
"img_path": "images/3f55519405e1df2af7deb5998aea2cd1baa9a5f4eca9816aac99ce93d6637aef.jpg",
"image_caption": [
"Figure 12: Latent-guided image synthesis results of StyleGAN v2 on the SDI dataset and the MVTec AD dataset. We train a model for each product and generate 16 Spots images from randomly sampled latent codes. "
],
"image_footnote": [],
"bbox": [
243,
200,
758,
782
],
"page_idx": 24
},
{
"type": "image",
"img_path": "images/9af2881df4cd89bcd7f83e40ecac133c4486b383aca6a5f80167e218d4861e0f.jpg",
"image_caption": [
"Figure 13: Latent-guided image synthesis results of BigGAN with DiffAug on the SDI dataset and the MVTec AD dataset. We train a model for each product and generate 16 Scratches images from randomly sampled latent codes. "
],
"image_footnote": [],
"bbox": [
243,
155,
758,
833
],
"page_idx": 25
},
{
"type": "image",
"img_path": "images/6502d31fa4830920177c7a1201405a5d38fd61293a22fa5cc40cc805b4888a23.jpg",
"image_caption": [
"Figure 14: Latent-guided image synthesis results of BigGAN with DiffAug on the SDI dataset and the MVTec AD dataset. We train a model for each product and generate 16 Spots images from randomly sampled latent codes. "
],
"image_footnote": [],
"bbox": [
243,
200,
758,
782
],
"page_idx": 26
},
{
"type": "image",
"img_path": "images/753dedb2a88181dd1a02122d6d4012b9e01f9fd382ccd9580c8645207ed06d8d.jpg",
"image_caption": [
"Figure 15: Latent-guided image synthesis results of StarGAN v2 on the SDI dataset and the MVTec AD dataset. The model is trained on a joint set of aforementioned datasets and performs translation from Normal to Scratches. Note that without the style-content separation and the FG/BG disentanglement, StarGAN v2 not only fails to preserve the background from the given Source image but also fail to generates legit defects. "
],
"image_footnote": [],
"bbox": [
210,
142,
790,
814
],
"page_idx": 27
},
{
"type": "image",
"img_path": "images/49e2bc6b1e4d4de05a60e2ef2fb4992d1dc00bdd8bcc62cfa38819c364a1a72e.jpg",
"image_caption": [
"Figure 16: Latent-guided image synthesis results of StarGAN v2 on the SDI dataset and the MVTec AD dataset. The model is trained on a joint set of aforementioned datasets and performs translation from Normal to Spots. Note that without the style-content separation and the FG/BG disentanglement, StarGAN v2 not only fails to preserve the background from the given Source image but also fail to generates legit defects. "
],
"image_footnote": [],
"bbox": [
212,
140,
790,
816
],
"page_idx": 28
},
{
"type": "image",
"img_path": "images/d7665bc9189f97191cb363ff43243d45d9c0eed07ddb8d132a1899df30a87129.jpg",
"image_caption": [
"Figure 17: Latent-guided image synthesis results of DT-GAN on the SDI dataset and the MVTec AD dataset. The model is trained on a joint set of aforementioned datasets and performs translation from Normal to Scratches. Note the our model takes input Source images as background and only synthesizes the foreground defects from randomly sampled latent code compared to StyleGAN v2 and BigGAN. "
],
"image_footnote": [],
"bbox": [
212,
142,
790,
815
],
"page_idx": 29
},
{
"type": "image",
"img_path": "images/6dc33723b61a8a29ea99523303f759e2ec80cca613f5db714539c271f27d80a8.jpg",
"image_caption": [
"Figure 18: Latent-guided image synthesis results of DT-GAN on the SDI dataset and the MVTec AD dataset. The model is trained on a joint set of aforementioned datasets and performs translation from Normal to Spots. Note the our model takes input Source images as background and only synthesizes the foreground defects from randomly sampled latent code compared to StyleGAN v2 and BigGAN. "
],
"image_footnote": [],
"bbox": [
212,
140,
790,
816
],
"page_idx": 30
},
{
"type": "image",
"img_path": "images/6fbc28db81f825e8f35749ff8c9692af1a0d34358c15a1ea8e335765a76b1ab6.jpg",
"image_caption": [
"Figure 19: Reference-guided image synthesis results of Mokady et al. (2020) on the SDI dataset and the MVTec AD dataset. We train a model for each product and each defect type. Then we translate Normal images to Scratches by taking the Source as background and applying the foreground defect from Reference to it. "
],
"image_footnote": [],
"bbox": [
215,
263,
789,
700
],
"page_idx": 31
},
{
"type": "image",
"img_path": "images/52103c7943c67c62f890f5864b5e34df9520df52349661b703bc363d3ec05466.jpg",
"image_caption": [
"Figure 20: Reference-guided image synthesis results of Mokady et al. (2020) on the SDI dataset and the MVTec AD dataset. We train a model for each product and each defect type. Then we translate Normal images to Spots by taking the Source as background and applying the foreground defect from Reference to it. "
],
"image_footnote": [],
"bbox": [
215,
263,
790,
699
],
"page_idx": 32
},
{
"type": "image",
"img_path": "images/cb73ee815eca7466279848e34aba2a7625dd3b27655d8dcff88d57a806fdbab6.jpg",
"image_caption": [
"Figure 21: Reference-guided image synthesis results StarGAN v2 on the SDI dataset and the MVTec AD dataset. The model is trained on a joint set of aforementioned datasets and performs translation from Normal to Scratches by taking the Source as background and applying the foreground defect from Reference to it. Note that without the style-content separation and the FG/BG disentanglement, StarGAN v2 not only fails to preserve the background from the given Source image but also fail to generates legit defects. "
],
"image_footnote": [],
"bbox": [
215,
246,
789,
685
],
"page_idx": 33
},
{
"type": "image",
"img_path": "images/c0757dd5081906d67150a0b1e7071d90d4070ef9a33fedd3004d5d77e8301ddd.jpg",
"image_caption": [
"Figure 22: Reference-guided image synthesis results of StarGAN v2 on the SDI dataset and the MVTec AD dataset. The model is trained on a joint set of aforementioned datasets and performs translation from Normal to Spots by taking the Source as background and applying the foreground defect from Reference to it. Note that without the style-content separation and the FG/BG disentanglement, StarGAN v2 not only fails to preserve the background from the given Source image but also fail to generates legit defects. "
],
"image_footnote": [],
"bbox": [
215,
247,
790,
685
],
"page_idx": 34
},
{
"type": "image",
"img_path": "images/8f5416bea6a57fe53694b7b81ca32fab188b10b5307dd5743801f95cfe3dc61b.jpg",
"image_caption": [
"Figure 23: Reference-guided image synthesis results DT-GAN on the SDI dataset and the MVTec AD dataset. The model is trained on a joint set of aforementioned datasets and performs translation from Normal to Scratches by taking the Source as background and applying the foreground defect from Reference to it. "
],
"image_footnote": [],
"bbox": [
215,
260,
790,
700
],
"page_idx": 35
},
{
"type": "image",
"img_path": "images/038273ee81067405ed8edb30707628ce21e36f0f73845fa8004a02f19865a69d.jpg",
"image_caption": [
"Figure 24: Reference-guided image synthesis results of DT-GAN on the SDI dataset and the MVTec AD dataset. The model is trained on a joint set of aforementioned datasets and performs translation from Normal to Spots by taking the Source as background and applying the foreground defect from Reference to it. "
],
"image_footnote": [],
"bbox": [
215,
262,
790,
700
],
"page_idx": 36
}
] |