# Transmission Tower Re-Identification Algorithm Based on Machine Vision
## 2 The Proposed Method
### The Framework of the Proposed Method  
The simplified system framework is shown in Figure 2. Overall, three sets of models need to be trained, which are the YOLOv8s (transmission tower detection), YOLOv5n-conv head (transmission tower detection), and the matching network (transmission tower matching). In Figure 2, 'Backbone: Inception-ResNet-v1 (d = 128)' indicates that our chosen backbone network is the Inception-ResNet-v1 (d = 128). Sections 2.4 and 2.5 consider more complexities beyond those depicted in Figure 2, such as instances where the images lack GPS information. \"The construction of the transmission tower identity matching template library\" will be elaborated in detail in Section 2.4. The \"transmission tower identity matching framework\" will be elaborated in detail in Section 2.5.  
The first part is the construction of the transmission tower matching template library. The specific steps are as follows:  
1. The YOLOv8s target detection network is used to crop the transmission tower from the images;
2. The matching network, utilizing Inception-ResNet-v1 (d = 128) as its backbone, is employed to obtain the feature vector of the cropped transmission tower image;
3. Positional information (GPS) is added to the transmission tower image; this item can be set to \"null\" in the absence of GPS;
4. Based on the above information, a transmission tower identity matching template library is established.  
The second part is the identity matching of the transmission tower in the input images (the identity matching stage), detailed as follows:  
1. The YOLOv5n-conv head network is employed to identify whether there is a transmission tower in the input images. If the input image contains transmission towers, the transmission towers are cropped from the image and processed through steps 2 and 3. If there is no tower, the image is skipped;
2. The cropped transmission tower image is processed through the matching network, which employs Inception-ResNet-v1 (d = 128) as its backbone, to obtain the feature vector for matching;
3. If the image designated for matching contains GPS data, images are filtered from the template library based on the GPS latitude and longitude. The feature vector awaiting matching is then matched with the images in this collection. If the original image lacks GPS information, the feature vector for matching is compared with all images in the template library for identity matching.  
Since our matching network is based on metric learning, it can adapt to new data without the need for frequent retraining [35]. We plan to train the matching network annually. In practical applications, the initial step entails the creation of a template library for matching transmission towers. This library is then employed in the identity matching stage when inspecting transmission lines. During the identity matching stage, if transmission towers are present in the input image, the identity matching algorithm is applied to align these towers with the corresponding entries in the template library. In Figure 2, the processed input image yields 'tower10, 0.549', where '0.549' denotes the minimum distance to the images in the template library. 'tower10' indicates that the cropped input image is  
Figure 2: Framework of the transmission tower identity matching system.  
matched to the image instance with the identifier 'tower10' in the database, signifying that the model has matched this cropped image to the tower10 instance. Moreover, when GPS information is accessible within the input images, it is considered for integration into the template library. This integration may involve replacing certain tower images to augment the accuracy of the matching process.  
In Section 2, this paper elaborates on the methods and models we utilized, while Section 3 is dedicated to the experiments and analyses conducted on these models and methods. The key technical points of this paper are illustrated in Figure 3.