## 4 Dataset Description and Establishment
### Dataset Establishment  
Because of the difficulty associated with collecting samples containing the whole feature space in the field and estimating all kinds of poses with theoretical formulae, in this paper, we set up an experimental image dataset containing nine features with production experience and use techniques to generate more examples by deforming the existing ones [32]. The process of setting up the dataset is as follows: first, typical images of the nine features are set up; then, ten seed images of each type are set up, with each seed image of the same type being different, as depicted in Figure 6 (using the same blue and smooth background plate without texture). Then, the images are expanded to a scale of 4500 by zoom, translation, rotation, and other means to enhance the generalization ability of the network model [38]. The data extension method [39] is as follows:  
**Step 1:** The seed images are rotated from \(-5\) degrees to 4 degrees with the increment of 1 degree;  
**Step 2:** The images obtained by Step 1 are scaled by a factor ranging from 0.8 to 1.2 with an increment of 0.1;  
**Step 3:** All images are uniformly scaled to 28 \(\times\) 28 by the bilinear interpolation method;  
**Step 4:** All images are grayed and converted into line vectors;  
**Step 5:** The labels are added and the dataset is established. Figure 5: The nine characteristics of tail ropes. (**a**) Normal; (**b**) disproportional spacing; (**c**) twisted rope; (**d**) broken strand ((**d1**) refers to broken strand of the left rope, (**d2**) of the right rope, and (**d3**) of double ropes); and (**e**) broken rope ((**e1**) refers to the left broken rope, (**e2**) refers to the right broken rope, (**e3**) refers to the double broken ropes). In data expansion process, the rotation is designed to simulate the inaccuracy of the camera installation angle in the actual shooting or the swing of the tail rope in the field of vision. Scaling is used to simulate different image sizes. The bilinear interpolation method is used to scale the images to a uniform size to facilitate the standardization of the data (the size of the image in this paper is 28 \(\times\) 28, and common sizes are 32 \(\times\) 32, 64 \(\times\) 64, etc.). Gray processing is used to remove the influence of color and illumination so that the input data contain only the position and the defect feature information of the tail ropes. After converting the grayscale images into vectors and adding labels, data mining can begin, using the constructed algorithm model. It is known that the images collected by CCD cameras under actual working conditions are of two wire ropes in different states, with the position of the wire ropes and the state of the broken strand on the ropes being the main image characteristics. The recognition results should not be influenced by the image background, oil pollution on the wire rope surface, obvious light changes, and so on. Figure 6: The seed images. (**a**) Normal; (**b**) disproportional spacing; **c**) twisted rope; (**d1**) broken strand of the left rope; (**d2**) broken strand of the right rope; (**d3**) broken strand of double rope; (**e1**) left broken rope; (**e2**) right broken rope; (**e3**) double broken ropes. After image preprocessing, the experimental dataset is essentially consistent with the actual scene dataset, which is a 28 \(\times\) 28 gray pixel matrix that can directly reflect the position of the wire rope and the shape of the broken strand. In order to further illustrate the feature information of the position and defect of the tail rope after scaling and grayscale processing, we display bilinear interpolation scale images and grayscale images in Figure 7. We randomly selected some images in Figure 6 (e.g., the eighth image of the twisted rope (c-8) and the first image of the broken strand of the left rope (d1-1)), then we used the following image processing method: first, the bilinear interpolation method was used to scale the size to 28 \(\times\) 28. Then, graying was done.