Method and related device for detecting and positioning gradient of overhead line system positioner
By combining the YOLOv5E-L and YOLOv5E-d models with the LSD algorithm, the slope detection of the catenary locator was automated, solving the problems of high risk and long time consumption of manual measurement, and improving detection efficiency and accuracy.
Patent Information
- Application Number
- CN202511286135.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2025-12-19
AI Technical Summary
In the existing technology, the slope measurement of the overhead contact line locator relies on manual patrols and manual measurement, which is highly dangerous, time-consuming and labor-intensive, making it difficult to achieve automated and information-based detection.
The YOLOv5E-L and YOLOv5E-d models are used for non-contact detection. Image processing technology is used to automatically identify the locator and the support plate. The LSD algorithm is combined to detect the slope of the locator, so as to realize the automated detection and digitization of the locator slope.
This technology enables rapid and accurate detection of the slope of the overhead contact line locator, improving detection efficiency and accuracy, reducing manual intervention, and ensuring the reliability and safety of measurement results.
Smart Images

Figure CN121163469A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of rail transit inspection equipment technology, and in particular to a method and related device for detecting and locating the slope of a catenary locator. Background Technology
[0002] Measuring the slope of the overhead contact line positioner is one of the important tasks in maintaining the safety and reliability of the overhead contact line. The positioner's function is to fix the contact wire, ensuring that the current can flow smoothly and stably to the train. A slope within a reasonable range ensures the safe operation of rail transit trains within the prescribed working range. The overhead contact line system is exposed outdoors, with a support post at regular intervals. Each support post has a corresponding number and its positioning device. Natural environmental factors and continuous friction can damage the contact wire system.
[0003] Currently, the measurement and maintenance of overhead contact line facilities mainly rely on manual patrols and observations, using tools such as set squares for manual measurement. This method is highly dangerous, labor-intensive, and time-consuming. Summary of the Invention
[0004] The purpose of this application is to provide a method and related device for detecting and locating the slope of a catenary locator, which can automatically detect the geographical location and angle data value of the locator in a non-contact manner, and realize the digitalization and informatization of the status of the catenary locator.
[0005] To achieve the above objectives, this application provides the following solution:
[0006] In a first aspect, this application provides a method for detecting and locating the slope of a contact wire locator, the method comprising:
[0007] Obtain the image dataset to be tested; the image dataset to be tested consists of several images including locators and corresponding support sign devices.
[0008] The image dataset to be tested is input into the overhead contact line recognition model YOLOv5E-L to obtain an image set of category labels and location detection boxes; the category labels are two categories: locators and license plates; the overhead contact line recognition model YOLOv5E-L is a model that adds an ELAN structure to the YOLOv5 backbone network.
[0009] The image set of category labels and location detection boxes is cropped to obtain the cropped locator image and the cropped support plate image set.
[0010] The captured locator image is subjected to line detection based on LSD (Line Segment Detector) to obtain the locator slope value.
[0011] The extracted image set of the support plate number is input into the license plate number recognition model YOLOv5E-d to obtain the numbers on the support plate number; the license plate number recognition model YOLOv5E-d is a model with an ELAN structure added to the YOLOv5 backbone network.
[0012] Optionally, the method for determining the contact wire identification model YOLOv5E-L includes:
[0013] Obtain a historical image dataset; the historical image dataset consists of several images including locators and corresponding support sign devices.
[0014] The historical image dataset is labeled with category and location tags to obtain labeled images.
[0015] Image data augmentation is performed on the labeled image to obtain an augmented image.
[0016] The data-enhanced image is input into a first network structure model with an added ELAN structure on the YOLOv5 backbone network to obtain the output of the first network structure model; the output of the first network structure model is a predicted image with category labels and location detection boxes.
[0017] Based on the data-enhanced image, the output of the first network structure model, and the determined first loss function, a first loss value is determined.
[0018] Based on the first loss value, the network parameters of the first network structure model are optimized to obtain the overhead contact line identification model YOLOv5E-L.
[0019] Optionally, the method for determining the contact wire identification model YOLOv5E-L further includes:
[0020] The YOLOv5E-L overhead contact line identification model was evaluated using an evaluation model.
[0021] The expression for the evaluation model is:
[0022] E-score=AP×50%+FPS×50%;
[0023] Among them, E-score is an evaluation parameter that combines accuracy and speed; AP is the average accuracy; and FPS is the number of frames recognized per second by the model, which is an evaluation parameter for speed.
[0024] Optionally, the backbone network of the contact wire identification model YOLOv5E-L includes: an input layer, a first convolutional layer, a second convolutional layer, an ELAN multi-gradient fusion network layer, an MP network layer, a third convolutional layer, a first CSP network layer, a fourth convolutional layer, a second CSP network layer, and an SPPF network layer.
[0025] The input layer is used to input images.
[0026] The first convolutional layer is used for feature extraction and dimensionality reduction by halving the size of the image.
[0027] The second convolutional layer is used for feature extraction and dimensionality reduction by halving the size of the image.
[0028] The ELAN multi-gradient fusion network layer is used to increase the efficiency of feature extraction.
[0029] The MP network layer is used to halve the size of the image.
[0030] The third convolutional layer is used for feature extraction and reduces the size of the image by half.
[0031] The first CSP network layer is used to divide the input image data into two branches, perform convolution, and then stitch them together to increase the network depth.
[0032] The fourth convolutional layer is used for feature extraction and reduces the size of the image by half.
[0033] The second CSP network layer is used to divide the input image data into two branches, perform convolution, and then stitch them together to increase the network depth.
[0034] The SPPF network layer is used to perform region pooling on the input image data.
[0035] The image data enhancement includes: mosaic data enhancement, image flipping, random cropping, random stitching, and adaptive proportional scaling.
[0036] Optionally, the method for determining the license plate number recognition model YOLOv5E-d includes:
[0037] Obtain the pillar license plate dataset; the pillar license plate dataset includes: historical pillar license plate images and the corresponding numbers of the historical pillar license plates.
[0038] The historical pillar license plate image is input into a second network structure model with an added ELAN structure in the YOLOv5 backbone network to obtain the output of the second network structure model; the output of the second network structure model is the predicted number.
[0039] Based on the numerical number corresponding to the historical pillar license plate, the output of the second network structure model, and the determined second loss function, the second loss value is determined.
[0040] Based on the second loss value, the network parameters of the second network structure model are optimized to obtain the license plate number recognition model YOLOv5E-d.
[0041] Optionally, the backbone network of the license plate number recognition model YOLOv5E-d includes: an input layer, a first convolutional layer, a second convolutional layer, an ELAN multi-gradient fusion network layer, an MP network layer, a third convolutional layer, a first CSP network layer, a fourth convolutional layer, a second CSP network layer, and an SPPF network layer.
[0042] The input layer is used to input images.
[0043] The first convolutional layer is used for feature extraction and dimensionality reduction by halving the size of the image.
[0044] The second convolutional layer is used for feature extraction and dimensionality reduction by halving the size of the image.
[0045] The ELAN multi-gradient fusion network layer is used to increase the efficiency of feature extraction.
[0046] The MP network layer is used to halve the size of the image.
[0047] The third convolutional layer is used for feature extraction and reduces the size of the image by half.
[0048] The first CSP network layer is used to divide the input image data into two branches, perform convolution, and then stitch them together to increase the network depth.
[0049] The fourth convolutional layer is used for feature extraction and reduces the size of the image by half.
[0050] The second CSP network layer is used to divide the input image data into two branches, perform convolution, and then stitch them together to increase the network depth.
[0051] The SPPF network layer is used to perform region pooling on the input image data.
[0052] Secondly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the method for detecting and locating the slope of the contact wire locator as described in any of the above.
[0053] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for detecting and locating the slope of the contact wire locator as described above.
[0054] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method for detecting and positioning the slope of the contact wire locator as described above.
[0055] According to the specific embodiments provided in this application, the following technical effects are disclosed:
[0056] This application provides a method and related apparatus for detecting and locating the slope of overhead contact line locators. The method includes: acquiring a dataset of images to be tested, containing the locator and its corresponding support post number plate, providing a complete and related image foundation for subsequent slope detection and location of the overhead contact line locator, ensuring that detection and location have clear target object data support. The dataset of images to be tested is input into an improved overhead contact line recognition model YOLOv5E-L to obtain category labels and location detection boxes. By adding an ELAN structure, the model's recognition accuracy and efficiency for both locators and number plates are improved, achieving rapid and accurate classification and location of the targets. The image set containing the category labels and location detection boxes is cropped to obtain cropped images of the locator and support post number plates, removing irrelevant background interference, providing more focused and cleaner image data for subsequent slope detection and number recognition, and improving the targeting of subsequent steps. The cropped locator images are subjected to LSD-based line detection to obtain the locator slope value. The accuracy and stability of the LSD algorithm in line detection ensure the reliability of the locator slope measurement results, providing accurate slope parameters for catenary condition assessment. The cropped support plate image set is input into the YOLOv5E-d plate number recognition model to obtain the numbers on the support plates. Again, model optimization with added ELAN structure improves the accuracy of plate number recognition, achieving precise location of the support to which the locator belongs. This application, through the reasonable construction of the dataset, the application of the YOLOv5 model improved based on the ELAN structure, image cropping preprocessing, and the combination of the LSD line detection algorithm, forms a complete process from target recognition to parameter measurement and location positioning. This effectively improves the accuracy of catenary locator slope detection and the efficiency of support plate positioning, providing reliable technical support for the safe operation and maintenance of the catenary. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1This is an application environment diagram of a method for detecting and locating the slope of a contact wire locator according to an embodiment of this application.
[0059] Figure 2 This is a flowchart illustrating a method for detecting and locating the slope of a contact wire locator, provided in one embodiment of this application.
[0060] Figure 3 This is a schematic diagram of a video stream acquisition scheme (intelligent detection vehicle) provided in an embodiment of this application.
[0061] Figure 4 This is a diagram of an improved YOLOv5-based network structure provided in one embodiment of this application.
[0062] Figure 5 This is a schematic diagram of the detection results of the detection locator and the support plate provided in one embodiment of this application.
[0063] Figure 6 This is a schematic diagram illustrating the calculation of slope detection results using straight line detection, as provided in an embodiment of this application.
[0064] Figure 7 This is a schematic diagram of the license plate detection results after using the improved network structure of YOLOv5, as provided in an embodiment of this application.
[0065] Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application.
[0066] Figure label:
[0067] 1-Intelligent inspection vehicle; 2-Camera; 3-Locator; 4-Support post; 5-License plate. Detailed Implementation
[0068] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0069] In recent years, machine vision technology has experienced unprecedented development. With advancements in image processing and camera sensor technology, people can use computer vision to measure parameters in challenging real-world environments. For example, computer vision can be used to automatically measure the slope of locators and license plates.
[0070] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0071] The method for detecting and locating the slope of the contact wire locator provided in this application embodiment can be applied to, for example... Figure 1 The application environment shown is illustrated. Terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on another server. Terminal 102 can send the acquired image dataset to server 104. After receiving the image dataset, server 104 inputs it into the contact wire identification model YOLOv5E-L to obtain a set of images with category labels and location detection boxes. The category labels are two categories: locators and license plates. The contact wire identification model YOLOv5E-L is a model with an ELAN structure added to the YOLOv5 backbone network. The image set of category labels and location detection boxes is cropped to obtain cropped locator images and cropped support license plate images. Line detection based on LSD is performed on the cropped locator images to obtain the locator slope value. The cropped support license plate image set is input into the license plate number recognition model YOLOv5E-d to obtain the numbers on the support license plates. The license plate number recognition model YOLOv5E-d is a model with an ELAN structure added to the YOLOv5 backbone network. Server 104 can feed back the obtained locator slope value and the number on the support plate to terminal 102. Furthermore, in some embodiments, the method for detecting and locating the catenary locator slope can be implemented separately by server 104 or terminal 102. For example, terminal 102 can directly perform catenary locator slope detection and location on the image dataset to be tested, or server 104 can obtain the image dataset to be tested from the data storage system and perform catenary locator slope detection and location on the image dataset to be tested.
[0072] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, and tablets. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers, or it can be a cloud server.
[0073] In one exemplary embodiment, such as Figure 2 As shown, a method for slope detection and positioning of a catenary locator is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps S1 to S5. Wherein:
[0074] S1: Obtain the image dataset to be tested; the image dataset to be tested consists of several images including locators and corresponding support sign devices.
[0075] S2: Input the image dataset to be tested into the overhead contact line recognition model YOLOv5E-L to obtain an image set of category labels and location detection boxes; the category labels are two categories: locators and license plates; the overhead contact line recognition model YOLOv5E-L is a model that adds an ELAN structure to the YOLOv5 backbone network.
[0076] S3: Crop the image set of the category label and the location detection box to obtain the cropped locator image and the cropped support plate image set.
[0077] S4: Perform LSD-based line detection on the captured locator image to obtain the locator slope value.
[0078] S5: Input the extracted image set of the support plate into the license plate number recognition model YOLOv5E-d to obtain the numbers on the support plate; the license plate number recognition model YOLOv5E-d is a model with an ELAN structure added to the YOLOv5 backbone network.
[0079] Implementing steps S1 to S5 significantly improves the accuracy of locator slope detection, reaching over 95%, allowing for faster acquisition of locator pose information. Secondly, the improved YOLOv5 network architecture results in a smaller model size and faster speed. The deep learning-based detection method exhibits stronger generalization capabilities, recognizing locator and license plate images with different features and characteristics. This allows the trained model to predict locators and license plate images of varying sizes and environments. Finally, the convolutional neural network-based model offers even faster detection speeds and higher real-time performance.
[0080] As an optional implementation, the method for determining the contact wire identification model YOLOv5E-L includes:
[0081] A1: Obtain a historical image dataset; the historical image dataset consists of several images including locators and corresponding support sign devices.
[0082] A2: Label the historical image dataset with category and location tags to obtain labeled images.
[0083] A3: Perform image data augmentation on the labeled image to obtain an augmented image.
[0084] A4: Input the data-enhanced image into the first network structure model with an added ELAN structure in the YOLOv5 backbone network to obtain the output of the first network structure model; the output of the first network structure model is the predicted image with category labels and location detection boxes.
[0085] A5: Based on the data-enhanced image, the output of the first network structure model, and the determined first loss function, determine the first loss value.
[0086] A6: Based on the first loss value, the network parameters of the first network structure model are optimized to obtain the overhead contact line identification model YOLOv5E-L. The overhead contact line identification model YOLOv5E-L can identify the locator and license plate areas.
[0087] See Figure 3 In step A1, the contact wire support is captured in continuous frames by the camera 2 (DS2CD2T56EFWDA3, HIKVISION) fixed on the left side of the intelligent inspection vehicle 1, and then each frame image is processed.
[0088] Specifically, the camera 2 installed on the intelligent inspection vehicle 1 captures real-time video of the rail transit contact network, obtaining images containing the locator 3 and the support column 4 and license plate 5 devices. The images are then cropped and filtered to obtain an image dataset, which is then divided into a training set, a validation set, and a test set.
[0089] As an optional implementation, in step A1, the overhead contact line support is photographed continuously frame by frame by a fixed intelligent inspection vehicle, resulting in an image with a resolution of 2560×1920. During training, to adapt to the network model, the image is cropped into a square with a side length that is a multiple of 32, and further cropped to 896×896 pixels based on the positions of the locator and the support number plate.
[0090] Further, in step A1, the processed images are cropped and selected at a fixed size ratio, and the cropped images are divided into training set and validation set at a ratio of 7:3.
[0091] Furthermore, in step A1, a single sample in the dataset contains two category labels: locator 3 and license plate 5.
[0092] As an optional implementation, in step A3, the image data enhancement includes: mosaic data enhancement, image flipping, random cropping, random stitching, and adaptive proportional scaling.
[0093] like Figure 4As shown, the backbone network of the contact wire identification model YOLOv5E-L includes: an input layer, a first convolutional layer, a second convolutional layer, an ELAN multi-gradient fusion network layer, an MP network layer, a third convolutional layer, a first CSP network layer, a fourth convolutional layer, a second CSP network layer, and an SPPF network layer.
[0094] The input layer is used to input images.
[0095] The first convolutional layer is used for feature extraction and dimensionality reduction by halving the size of the image.
[0096] The second convolutional layer is used for feature extraction and dimensionality reduction by halving the size of the image.
[0097] The ELAN multi-gradient fusion network layer is used to increase the efficiency of feature extraction.
[0098] The MP network layer is used to halve the size of the image.
[0099] The third convolutional layer is used for feature extraction and reduces the size of the image by half.
[0100] The first CSP network layer is used to divide the input image data into two branches, perform convolution, and then stitch them together to increase the network depth.
[0101] The fourth convolutional layer is used for feature extraction and reduces the size of the image by half.
[0102] The second CSP network layer is used to divide the input image data into two branches, perform convolution, and then stitch them together to increase the network depth.
[0103] The SPPF network layer is used to perform region pooling on the input image data.
[0104] In step A4, the network structure model undergoes two convolutional layers after the network input, followed by an ELAN multi-gradient fusion network, and then downsampling through an MP network layer, thus extracting features more efficiently. Increasing the gradient paths in the shallow layers of the network better identifies the information features of each key neuron, and then the CSP structure facilitates faster fusion and downsampling, resulting in three feature maps of different sizes for detection.
[0105] As an optional implementation, the method for determining the contact wire identification model YOLOv5E-L further includes:
[0106] The YOLOv5E-L overhead contact line identification model was evaluated using an evaluation model.
[0107] The expression for the evaluation model is:
[0108] E-score=AP×50%+FPS×50%;
[0109] Among them, E-score is an evaluation parameter that combines accuracy and speed; AP is the average accuracy; and FPS is the number of frames recognized per second by the model, which is an evaluation parameter for speed.
[0110] like Figure 5 As shown, the designed recognition model YOLOv5E-L is used to predict the dataset to obtain the predicted image set. In step S3, the predicted image set is cropped to obtain the cropped locator image and the cropped support plate image set.
[0111] like Figure 6 As shown, in step S4, the LSD line detection is used on the cropped locator image, and the locator slope value is calculated by the coordinates of the endpoints and the judgment of positive and negative positioning.
[0112] As an optional implementation, the method for determining the license plate number recognition model YOLOv5E-d includes:
[0113] B1: Obtain the pillar license plate dataset; the pillar license plate dataset includes: historical pillar license plate images and the corresponding numbers of the historical pillar license plates.
[0114] B2: Input the image of the historical pillar license plate into the second network structure model with an added ELAN structure in the YOLOv5 backbone network to obtain the output of the second network structure model; the output of the second network structure model is the predicted number.
[0115] B3: Determine the second loss value based on the digital number corresponding to the historical pillar license plate, the output of the second network structure model, and the determined second loss function.
[0116] B4: Based on the second loss value, the network parameters of the second network structure model are optimized to obtain the license plate number recognition model YOLOv5E-d.
[0117] like Figure 7 As shown, the license plate number recognition model YOLOv5E-d is used to infer and output the predicted license plate number and correspond it with the locator. This number is used to realize the kilometer coordinate positioning of the locator.
[0118] like Figure 4 As shown, the backbone network of the license plate number recognition model YOLOv5E-d includes: an input layer, a first convolutional layer, a second convolutional layer, an ELAN multi-gradient fusion network layer, an MP network layer, a third convolutional layer, a first CSP network layer, a fourth convolutional layer, a second CSP network layer, and an SPPF network layer.
[0119] The input layer is used to input images.
[0120] The first convolutional layer is used for feature extraction and dimensionality reduction by halving the size of the image.
[0121] The second convolutional layer is used for feature extraction and dimensionality reduction by halving the size of the image.
[0122] The ELAN multi-gradient fusion network layer is used to increase the efficiency of feature extraction.
[0123] The MP network layer is used to halve the size of the image.
[0124] The third convolutional layer is used for feature extraction and reduces the size of the image by half.
[0125] The first CSP network layer is used to divide the input image data into two branches, perform convolution, and then stitch them together to increase the network depth.
[0126] The fourth convolutional layer is used for feature extraction and reduces the size of the image by half.
[0127] The second CSP network layer is used to divide the input image data into two branches, perform convolution, and then concatenate them to increase the network depth;
[0128] The SPPF network layer is used to perform region pooling on the input image data.
[0129] In summary, the method for detecting and locating the slope of the overhead contact line locator provided in this application has the following advantages: when detecting the locator and license plate, the trained model can directly predict the real-time video or image, automatically calculate the slope of the locator and output the corresponding license plate, without the need for manual measurement, complex feature engineering and feature extraction, and has high accuracy, fast speed and strong generalization ability.
[0130] According to this application, the network structure is built using the PyTorch open-source machine learning library, and the OpenCV open-source image processing library is used to complete the training and output of the model. The exported model can be called using different interfaces and then used in software.
[0131] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 8As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores the dataset of images to be tested. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for slope detection and positioning of a contact wire locator.
[0132] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0133] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method embodiments.
[0134] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the above-described method embodiments.
[0135] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described method embodiments.
[0136] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0137] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0138] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0139] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0140] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for detecting and locating the slope of a contact wire locator, characterized in that, The method for detecting and locating the slope of the overhead contact line locator includes: Obtain the image dataset to be tested; the image dataset to be tested consists of several images including locators and corresponding support sign devices. The image dataset to be tested is input into the overhead contact line recognition model YOLOv5E-L to obtain an image set of category labels and location detection boxes; the category labels are two categories: locators and license plates; the overhead contact line recognition model YOLOv5E-L is a model that adds an ELAN structure to the YOLOv5 backbone network; The image set of category labels and location detection boxes is cropped to obtain the cropped locator image and the cropped support plate image set; The LSD-based line detection is performed on the cropped locator image to obtain the locator slope value; The extracted image set of the support plate number is input into the license plate number recognition model YOLOv5E-d to obtain the numbers on the support plate number; the license plate number recognition model YOLOv5E-d is a model with an ELAN structure added to the YOLOv5 backbone network.
2. The method for detecting and locating the slope of the contact wire locator according to claim 1, characterized in that, The method for determining the contact wire identification model YOLOv5E-L includes: Acquire a historical image dataset; the historical image dataset consists of several images including locators and corresponding support signage devices. The historical image dataset is labeled with category and location tags to obtain labeled images; The labeled image is then subjected to image data augmentation to obtain an augmented image. The data-enhanced image is input into a first network structure model with an added ELAN structure in the YOLOv5 backbone network to obtain the output of the first network structure model; the output of the first network structure model is a predicted image with category labels and location detection boxes. Based on the data-enhanced image, the output of the first network structure model, and the determined first loss function, a first loss value is determined; Based on the first loss value, the network parameters of the first network structure model are optimized to obtain the overhead contact line identification model YOLOv5E-L.
3. The method for detecting and locating the slope of the contact wire locator according to claim 2, characterized in that, The method for determining the contact wire identification model YOLOv5E-L also includes: The YOLOv5E-L overhead contact line identification model was evaluated using an evaluation model. The expression for the evaluation model is: E-score=AP×50%+FPS×50%; Among them, E-score is an evaluation parameter that combines accuracy and speed; AP is the average accuracy; and FPS is the number of frames recognized per second by the model, which is an evaluation parameter for speed.
4. The method for detecting and locating the slope of the contact wire locator according to claim 1, characterized in that, The backbone network of the contact wire identification model YOLOv5E-L includes: an input layer, a first convolutional layer, a second convolutional layer, an ELAN multi-gradient fusion network layer, an MP network layer, a third convolutional layer, a first CSP network layer, a fourth convolutional layer, a second CSP network layer, and an SPPF network layer. The input layer is used to input images; The first convolutional layer is used for feature extraction and reduces the size of the image by half. The second convolutional layer is used for feature extraction and reduces the size of the image by half. The ELAN multi-gradient fusion network layer is used to increase the efficiency of feature extraction; The MP network layer is used to reduce the size of the image by half; The third convolutional layer is used for feature extraction and reduces the size of the image by half. The first CSP network layer is used to divide the input image data into two branches, perform convolution, and then concatenate them to increase the network depth. The fourth convolutional layer is used for feature extraction and reduces the size of the image by half. The second CSP network layer is used to divide the input image data into two branches, perform convolution, and then concatenate them to increase the network depth; The SPPF network layer is used to perform region pooling on the input image data.
5. The method for detecting and locating the slope of the contact wire locator according to claim 2, characterized in that, The image data enhancement includes: mosaic data enhancement, image flipping, random cropping, random stitching, and adaptive proportional scaling.
6. The method for detecting and locating the slope of the contact wire locator according to claim 1, characterized in that, The method for determining the license plate number recognition model YOLOv5E-d includes: Obtain the pillar license plate dataset; the pillar license plate dataset includes: historical pillar license plate images and the corresponding numbers of the historical pillar license plates; The historical pillar license plate image is input into a second network structure model with an added ELAN structure in the YOLOv5 backbone network to obtain the output of the second network structure model; the output of the second network structure model is the predicted number. Based on the digital number corresponding to the historical pillar license plate, the output of the second network structure model, and the determined second loss function, the second loss value is determined. Based on the second loss value, the network parameters of the second network structure model are optimized to obtain the license plate number recognition model YOLOv5E-d.
7. The method for detecting and locating the slope of the contact wire locator according to claim 1, characterized in that, The backbone network of the license plate number recognition model YOLOv5E-d includes: an input layer, a first convolutional layer, a second convolutional layer, an ELAN multi-gradient fusion network layer, an MP network layer, a third convolutional layer, a first CSP network layer, a fourth convolutional layer, a second CSP network layer, and an SPPF network layer. The input layer is used to input images; The first convolutional layer is used for feature extraction and reduces the size of the image by half. The second convolutional layer is used for feature extraction and reduces the size of the image by half. The ELAN multi-gradient fusion network layer is used to increase the efficiency of feature extraction; The MP network layer is used to reduce the size of the image by half; The third convolutional layer is used for feature extraction and reduces the size of the image by half. The first CSP network layer is used to divide the input image data into two branches, perform convolution, and then concatenate them to increase the network depth. The fourth convolutional layer is used for feature extraction and reduces the size of the image by half. The second CSP network layer is used to divide the input image data into two branches, perform convolution, and then concatenate them to increase the network depth; The SPPF network layer is used to perform region pooling on the input image data.
8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the method for detecting and locating the slope of the contact wire locator according to any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the method for detecting and locating the slope of the contact wire locator as described in any one of claims 1-7.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the method for detecting and locating the slope of the contact wire locator as described in any one of claims 1-7.
