## 4 Experiments
### Baseline and Selected Representative Work for Comparison Study  
To objectively evaluate the proposed method, we compared it with five state-of-the-art (SOTA) methods, including two CNN-based methods [2; 12] and three traditional methods [7; 15; 17]. The CNN-based methods by [PERSON] et al. [12] and [PERSON] et al. [2] are the most relevant studies specifically designed for repeated pattern detection. The recent studies involving repeated pattern detection, such as those focusing on fabric defect detection [42] or landscape similarity analysis [29], are direct applications of [PERSON] et al.'s [12] method. Given the limited independent research on CNN-based repeated pattern detection algorithms, [PERSON] et al. [12] and [PERSON] et al. [2] remain the most appropriate baselines for comparison. Furthermore, traditional methods [7; 15; 17] were included to ensure a comprehensive evaluation.  
Figure 6: An example of ground truth image annotation. \(g_{x}\) and \(g_{y}\) are the ground truth in the \(x\) and \(y\) directions, respectively. The repeated pattern grid can be found from any point in the same image.  
[PERSON] et al. [12] were the first to use activations in a pre-trained classification CNN to detect repeated patterns, and it is the baseline method of this study. They considered using almost all the CNN filters of the AlexNet.  
[PERSON] et al. [2] proposed to select filters of the AlexNet by abandoning filters whose activation values were less than 0.65 of the maximum activation value among all the filters in the same convolutional layer. Moreover, their method regularized input images in advance as a pre-processing step, which is time-consuming. An example of their pre-processing is shown in Figure 7. The left is their input image, with uneven yarns and non-uniform color variations, and the right is the regularized image [2]. In the proposed method, pre-processing was unnecessary and therefore not included. Furthermore, their method returns multiple repeated pattern sizes, instead of an optimized pattern size for each image; the size that is closest to the ground truth is chosen as the final result for comparison study.  
A SIFT descriptor [7] is a classic local feature descriptor and is widely used in repeated pattern detection. Here, the same voting method (described in Equation (5)) was used to predict the repeated pattern sizes using a SIFT descriptor.  
[PERSON] et al. [15] did not require a definition of template patches in advance. They copied the input image and cyclic-rotated it by one pixel each time; the cyclic-rotated direction of the repeated pattern was obtained by comparing and minimizing bitwise XOR differences between the input image and the cyclic-rotated one. The repeated pattern size was determined by performing these operations along the \(x\) and \(y\) directions of the image.  
Comparatively, [PERSON] and [PERSON] [17] used template matching to predict the size of the repeated pattern of the input image. [PERSON] and [PERSON] [17] used a fixed initial point to search for repeat pattern size \(d^{*}\) for exact matching; in other words, there is no _dynamic similarity threshold_ (\(\epsilon\)) in Equation (7) or any flexible adjustment of pixel distance threshold \(\triangle d\).