## 3 Proposed Method
### Dataset Preparation  
The Leather Defect detection and Classification dataset [29] was originally created as a training and validation set for a deep learning neural network-based approach for automated localisation and classification of leather defects using a machine vision system [28]. Although the original dataset was captured in a much higher resolution of 4608 \(\times\) 3288 pixels, an open-source version was published at a greatly reduced resolution  
Figure 3: The adapted EfficientNet-B0 architecture with one output node for each of the six possible leather defect categories.  
Figure 2: A high-level representation of the Inception-V3 architecture.  
of 227 \(\times\) 227 pixels. This dataset with reduced image quality is selected in this study because we focus on achieving defect classification utilising smaller datasets of lower-resolution training images in order to reduce both image-capturing hardware requirements and computational complexity.  
In leather manufacturing, colours and finishes are typically introduced through a process known as finishing. The combination of processes such as dyeing, finishing, patination, embossing, fatliquoring, and sealing can result in a wide variety of colours and finishes. Furthermore, while other defects can occur in leather manufacturing, the presence of folding marks, grain off, growth, loose grain, and pinholes in an assortment of colours and finishes provides a comprehensive representation of the most common and impactful defects that arise in the process.  
While the colours of sample images can potentially impact classification outcomes, the diversity and distribution of colours across the dataset help alleviate this issue. Furthermore, the vision transformer benefits from processing colour images as opposed to grayscale images due to richer visual cues, such as hue, saturation, and contrast, which can enhance the model's ability to distinguish and classify objects accurately. By incorporating colour information, the vision transformer can potentially capture more fine-grained details and patterns, leading to improved performance.  
The dataset comprises a total of 3600 low-resolution sample images, split into 'training' and 'validation' sets, each of which are equally sub-divided into six categories of leather surface images, viz., 'folding marks', 'grain off', 'growth', 'loose grain', 'pinhole', and 'non defective'. Figure 4 illustrates one randomly selected sample image from each category of the dataset.  
The categories in the training set contain 480 unannotated images each, while the categories in the validation set have 120 images, each consisting of a variety of colours and finishes. As the dataset provides a sufficient number (3600) of well-distributed samples across various types, colours, and textures of finished leather surfaces, a good degree of diversity and representativeness is sufficiently captured.  
Unfortunately, the dataset contains no clearly annotated defective ground truths as can be found in the popular anomaly detection benchmarking MVTec AD dataset [46]. For this reason, the leather category taken from the MVTec AD dataset is resized to a matching resolution of 224 \(\times\) 224 pixels in order to confirm the models' ability to identify and localise defects.  
Figure 4: Sample images from each class found the leather defect detection and classification dataset [29]: (**a**) folding marks; (**b**) grain off; (**c**) growth marks; (**d**) loose grain; (**e**) no defect; (**f**) pinhole.