# A Novel Dataset for Fabric Defect Detection: Bridging Gaps in Anomaly Detection
## 1 Introduction  
Clothing is a basic necessity, and the textile industry is one of the oldest industries in human civilization. As such, ensuring high product quality by detecting fabric defects has posed a persistent challenge for the textile industry. Currently, human inspection remains the primary method due to the lack of superior alternatives. However, this approach is labour-intensive and prone to errors due to visual fatigue and distractions. Human accuracy in defect detection hovers around 60-75%, diminishing further as work time increases, or for visually intricate fabrics like stripes. Several constraints compound this issue: industrial processes must remain seamless without any disruption, and the array of fabric defects is vast, and constantly evolving with new collections. Furthermore, each manufacturer holds different standards for what constitutes a defect, with up to 235 different types of defects [1]. Traditionally, computer vision-based solutions to the problem involved performing mathematical operations on the images, such as analysing grey-pixel-value distribution in an image, histogram statistics, and other such methods, but these methods boosted questionable performance, and few if any were actually applied in the previously described factory conditions. Recently, there has been a notable increase in the adoption of deep learning-based approaches for anomaly and defect detection. In this area, these approaches boast considerable increases in performance over traditional approaches, but as in other areas where deep learning is applied, massive quantities of data are necessary to train the deep learning models. Furthermore, as mentioned before, the lack of a universal standardized taxonomy of what is to be considered a defect makes it difficult to create universally applicable datasets for this area. The defects themselves are also sometimes difficult even for humans to spot. Some defects vary significantly according to their characteristics, while others vary slightly, making applying general algorithms to this problem difficult. Furthermore, not all defects occur at the same rates, with some rare defects barely occurring at all, resulting in unbalanced datasets, which increases the difficulty in using supervised methods. Additionally, not all fabric types have the same texture, with the same types of defects occasionally looking different in different types of fabrics, further compounding the problem [2]. Due to these difficulties, vast quantities of data are necessary to train models that can accurately detect such defects. Despite that, there are few good datasets in this area, with most of them suffering from either a severe deficit in available samples, annotation, or all of the former, although the situation has improved in recent years with datasets such as ZJU-Leaper [3]. One of the innovations of these new datasets consists in, instead of labelling each defect individually, addressing all defects as a single class, following the idea of one-class classification. This approach has been used across many different areas to solve the issue of unbalanced datasets, with promising results. In Table 1, we summarize the most important aspects of each dataset we encountered in our search. For each dataset, we collected how many samples it has, whether it classifies defects as multiple classes, and if so, how many, as well as whether it uses synthetic images or not.