Contact net bolt weak supervision detection model training method, detection method and system

Through the weak supervision detection method, the candidate region generation and feature extraction network are used to solve the problems of low efficiency and high cost of high-speed railway catenary bolt detection, achieving low labor cost and high accuracy detection results, which is suitable for complex railway sites.

CN118552807APending Publication Date: 2024-08-27BEIJING JIAOTONG UNIV

Patent Information

Application Number
CN202410631198.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Existing high-speed rail catenary bolt detection methods are inefficient and costly, especially manual detection and non-destructive testing. Machine vision detection requires a large number of labeled samples, making labeling difficult and difficult to meet the detection efficiency requirements of high-speed rail systems.

Method used

Using a weakly supervised detection method, through the candidate region generation network, candidate region feature extraction network and classification network, using the selective search algorithm and VGG16 model, candidate region features are generated and classified. Only image-level annotation is required, which reduces labor costs and improves the detection accuracy.

Benefits of technology

It achieves low labor cost and high accuracy catenary bolt detection, adapts to complex and changeable railway sites, and improves detection efficiency and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552807A
    Figure CN118552807A
Patent Text Reader

Abstract

The invention provides an overhead line system bolt weak supervision detection model training method, detection method and system, and belongs to the technical field of image processing based on deep learning, and the method comprises the steps: employing an unmanned plane carrying a high-definition zoom camera to carry out the inspection along the side upper part of a railway line, and obtaining the line overhead line system bolt data; preprocessing original overhead line system bolt data and making a data set; constructing an overhead line system bolt weak supervision detection model; generating a candidate region; constructing an overhead line system bolt weak supervision detection model; extracting candidate region features; constructing an overhead line system bolt weak supervision detection model; classifying candidate areas; and generating a weak supervision detection result of the overhead line system bolt. According to the method, the manpower consumption of data labeling in the target detection process can be greatly saved, the detection precision of the overhead line system bolt can be effectively improved compared with unsupervised detection, the method has important significance for realizing the automation of overhead line system bolt detection, the overhead line system bolt detection means can be perfected, and the intelligent level of detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing based on deep learning, and in particular to a weak supervision detection model training method, a detection method and a system for contact network bolts. Background Art

[0002] With the rapid development of high-speed rail technology, high-speed rail has become an important part of modern urban transportation. The increase in high-speed rail operating mileage and speed will put forward higher requirements for the stable and safe operation of high-speed rail. In order to ensure the safe and efficient operation of high-speed rail, timely inspection and maintenance of high-speed rail contact network is crucial. Bolts are connecting parts of key parts of contact network. Their normal geometric shape is very important for maintaining the structural safety and stability of key parts of contact network. However, during the long-term operation of high-speed rail contact network bolts, defects such as loosening, falling off, and breaking may occur. These defects may be caused by a variety of reasons, such as vibration of high-speed railways, environmental corrosion, and material fatigue. The existence of bolt defects may cause deformation of the contact network structure, thereby affecting the efficiency and safety of power transmission. Therefore, it is necessary to regularly inspect the contact network bolts, timely discover related risks, and take measures such as maintenance or replacement in advance to maintain the safety and stable operation of the high-speed rail contact network system.

[0003] At present, the inspection methods for high-speed railway contact network bolts mainly include manual inspection, non-destructive inspection and machine vision inspection. In the manual inspection method, engineers conduct inspections through direct observation or using tools. This method is simple to operate, but inefficient and greatly affected by human factors, which may lead to missed inspections or misjudgments. Non-destructive inspection methods, such as X-ray inspection and ultrasonic inspection, can inspect the internal structure of bolts, but the equipment is expensive, the operation is complicated, and there are high requirements for the inspection environment. The machine vision inspection method uses a high-definition camera to collect bolt images, and then uses image processing and analysis technology to detect defects.

[0004] Although the above existing detection methods can meet the requirements of high-speed rail contact network bolt detection to a certain extent, there are still certain shortcomings. First, manual detection and non-destructive testing methods have high cost and time pressure in large-scale applications, and it is difficult to meet the requirements of high-speed rail systems for detection efficiency. Secondly, the mainstream direction of machine vision detection methods is the fully supervised method based on deep learning, which requires a large number of labeled samples as support. However, bolts usually account for a small proportion of an image, making it difficult to label, and labeling a large number of bolt samples requires a lot of manpower. Summary of the invention

[0005] The object of the present invention is to provide a weakly supervised detection model training method, a detection method and a system for contact network bolts, so as to solve at least one technical problem existing in the above-mentioned background technology.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] In a first aspect, the present invention provides a method for training a weakly supervised detection model for a contact network bolt, comprising:

[0008] Acquire training data; the training data includes a plurality of contact network images and bolt category indication features of label images, wherein the bolt category indication features indicate the position distribution of at least one bolt category in the label image;

[0009] Based on the multiple contact network images as input, and based on the bolt category indication features of the label images as output, a contact network bolt weak supervision detection model is trained; the contact network bolt weak supervision detection model includes a candidate region generation network, a candidate region feature extraction network and a classification network;

[0010] The candidate region generation network is used to generate candidate regions using a selective search algorithm; the candidate region feature extraction network is used to extract candidate region features based on the original contact network image and the generated candidate region image;

[0011] The classification network includes a basic classification layer and a refined classification layer; the basic classification layer is used to take the label image and the candidate region features as input, and obtain the candidate region score matrix by element-by-element multiplication after normalization, and obtain the score of the entire image belonging to a certain category by summing and pooling; the refined classification layer is used to take the candidate region, the label image and the candidate region score matrix as input, and output the candidate region cluster center.

[0012] Optionally, a selective search algorithm is used to generate candidate regions, including: creating an initial region and calculating similarity, merging similar regions, and calculating similarity of the merged regions until no similar regions exist; wherein the similarity calculation includes color similarity, texture similarity, scale similarity, and filling similarity.

[0013] Optionally, feature extraction of candidate regions includes: using VGG16 as the backbone network of the model to extract features of the candidate regions, wherein VGG16 contains 16 weight layers, including 13 convolutional layers and 3 fully connected layers, and using a ReLU activation function after each convolutional layer and fully connected layer to introduce nonlinearity; replacing the last maximum pooling layer of VGG16 with a spatial pyramid pooling layer, and the last layer is the output layer, and using a Softmax function to output the probability of each category.

[0014] Optionally, in the basic classification layer, the candidate region features of the image and its candidate region boxes are input into two fully connected layers, and the two matrices are the parameters of the two fully connected layers; the matrices after Softmax regression of the two fully connected layers are multiplied element by element to obtain a candidate region score matrix, and after summing and pooling, the score of the entire image belonging to a certain category is obtained; given the image-level annotation information and the above-mentioned score belonging to the c-th category target, the parameters of the basic classification layer network are learned by optimizing the loss function.

[0015] Optionally, in the refined classification layer, clusters and centers of different targets are found according to the graph model-based algorithm, and then supervision for training the kth refined classifier is optimized based on the classification scores of the candidate regions and the image-level labels. Finally, the parameters of the refined classification layer network are learned based on the loss function of the refined classification layer network and iterated.

[0016] In a second aspect, the present invention provides a contact network bolt weak supervision detection model training system, comprising:

[0017] An acquisition module, used to acquire training data; the training data includes a plurality of contact network images and bolt category indication features of label images, wherein the bolt category indication features indicate the position distribution of at least one bolt category in the label image;

[0018] A training module, used for training a weakly supervised detection model for contact network bolts based on the multiple contact network images as input and the bolt category indication features of the label images as output; the contact network bolt weakly supervised detection model includes a candidate region generation network, a candidate region feature extraction network and a classification network;

[0019] The candidate region generation network is used to generate candidate regions using a selective search algorithm; the candidate region feature extraction network is used to extract candidate region features based on the original contact network image and the generated candidate region image;

[0020] The classification network includes a basic classification layer and a refined classification layer; the basic classification layer is used to take the label image and the candidate region features as input, and obtain the candidate region score matrix by element-by-element multiplication after normalization, and obtain the score of the entire image belonging to a certain category by summing and pooling; the refined classification layer is used to take the candidate region, the label image and the candidate region score matrix as input, and output the candidate region cluster center.

[0021] In a third aspect, the present invention provides a method for weak supervision detection of contact network bolts, comprising:

[0022] Acquire overhead contact network images;

[0023] The acquired contact network image is processed using a contact network bolt weak supervision detection model to obtain the results of bolt detection in the image, wherein the bolt detection results include four types of results: blurred bolts, bolt heads, bolt sides and nuts; the contact network bolt weak supervision detection model is obtained using the contact network bolt weak supervision detection model training method as described in the first aspect.

[0024] In a fourth aspect, the present invention provides a contact network bolt weak supervision detection system, comprising:

[0025] An acquisition module, used for acquiring an image of the contact network;

[0026] A detection module is used to process the acquired contact network image using a contact network bolt weak supervision detection model to obtain the results of bolt detection in the image, wherein the bolt detection results include four types of results: blurred bolts, bolt heads, bolt sides and nuts; the contact network bolt weak supervision detection model is obtained using the contact network bolt weak supervision detection model training method as described in the first aspect.

[0027] In a fifth aspect, the present invention provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by a processor, the contact network bolt weak supervision detection method as described in the third aspect is implemented.

[0028] In a sixth aspect, the present invention provides a computer device comprising a memory and a processor, wherein the processor and the memory communicate with each other, the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the contact network bolt weak supervision detection method as described in the third aspect.

[0029] In the seventh aspect, the present invention provides an electronic device, comprising: a processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the contact network bolt weak supervision detection method as described in the third aspect.

[0030] In an eighth aspect, the present invention provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by a processor, the contact network bolt weak supervision detection model training method as described in the first aspect is implemented.

[0031] In a ninth aspect, the present invention provides a computer device comprising a memory and a processor, wherein the processor and the memory communicate with each other, the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the contact network bolt weak supervision detection model training method as described in the first aspect.

[0032] In the tenth aspect, the present invention provides an electronic device, comprising: a processor, a memory and a computer program; wherein the processor is connected to the memory, and the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the contact network bolt weak supervision detection model training method as described in the first aspect.

[0033] The invention has the following beneficial effects: the weak supervision method used only requires image-level annotation, and the process of making a data set does not require annotation of target borders, which greatly saves labor costs and has higher accuracy; the SPP layer in the algorithm can capture multi-scale information, and the image enhancement method used in the data preprocessing part can improve the robustness and generalization performance of the method, and can better adapt to complex and changeable railway site conditions.

[0034] Additional advantages of the present invention will be more clearly given in the following description or learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0036] Figure 1 The present invention is a flowchart of the overall steps of the weak supervision detection method for contact network bolts described in an embodiment of the present invention.

[0037] Figure 2 Schematic diagram of the method for collecting data using a drone according to an embodiment of the present invention.

[0038] Figure 3 This is a framework diagram of the weak supervision detection model for contact network bolts described in an embodiment of the present invention.

[0039] Figure 4 This is a schematic diagram of a .JSON file containing bolt category information according to an embodiment of the present invention.

[0040] Figure 5 This is a block diagram of the candidate region generated according to an embodiment of the present invention.

[0041] Figure 6 Schematic diagram of mAP values ​​of four types of weakly supervised detection results of contact network bolts described in an embodiment of the present invention.

[0042] Figure 7 Schematic diagram of CORLOC values ​​of four types of weak supervision detection results of contact network bolts described in an embodiment of the present invention.

[0043] Figure 8 This is a schematic diagram of an example of visualization of contact network bolt detection results according to an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below by the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.

[0045] It should be understood by those skilled in the art that unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this invention belongs.

[0046] It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have a meaning consistent with that in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless as defined herein.

[0047] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements and / or groups thereof.

[0048] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. Different embodiments or examples described in this specification and features of different embodiments or examples may be combined and combined by those skilled in the art without contradiction.

[0049] To facilitate understanding of the present invention, the present invention is further explained below with reference to specific embodiments in conjunction with the accompanying drawings, and the specific embodiments do not constitute a limitation on the embodiments of the present invention.

[0050] Those skilled in the art should understand that the drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily necessary for implementing the present invention.

[0051] Example 1

[0052] In this embodiment 1, a contact network bolt weak supervision detection model training system is first provided, including: an acquisition module, used to acquire training data; the training data includes multiple contact network images and bolt category indication features of label images, and the bolt category indication features indicate the position distribution of at least one bolt category in the label image; a training module is used to train the contact network bolt weak supervision detection model based on the multiple contact network images as input and the bolt category indication features of the label image as output; the contact network bolt weak supervision detection model includes a candidate region generation network, a candidate region feature extraction network and a classification network ; Wherein, the candidate region generation network is used to generate candidate regions using a selective search algorithm; the candidate region feature extraction network is used to extract candidate region features based on the original contact network image and the generated candidate region image; the classification network includes a basic classification layer and a refined classification layer; the basic classification layer is used to take the label image and the candidate region features as input, and after normalization, multiply the elements one by one to obtain the candidate region score matrix, and after summing and pooling, obtain the score of the entire image belonging to a certain category; the refined classification layer is used to take the candidate region, label image and candidate region score matrix as input, and take the candidate region cluster center as output.

[0053] In this embodiment 1, the above-mentioned training system is used to implement a weak supervision detection model training method for contact network bolts, and a weak supervision detection model for contact network bolts is obtained. The training method includes: obtaining training data; the training data includes multiple contact network images and bolt category indication features of label images, and the bolt category indication features indicate the position distribution of at least one bolt category in the label image; based on the multiple contact network images as input and the bolt category indication features of the label images as output, the contact network bolt weak supervision detection model is trained; the contact network bolt weak supervision detection model includes a candidate region generation network, a candidate region feature extraction network, and a candidate region feature generation network. network and classification network; wherein, the candidate region generation network is used to generate candidate regions using a selective search algorithm; the candidate region feature extraction network is used to extract candidate region features based on the original contact network image and the generated candidate region image; the classification network includes a basic classification layer and a refined classification layer; the basic classification layer is used to take the label image and the candidate region features as input, and after normalization, multiply the elements by element to obtain the candidate region score matrix, and after summing and pooling, obtain the score of the entire image belonging to a certain category; the refined classification layer is used to take the candidate region, label image and candidate region score matrix as input, and take the candidate region cluster center as output.

[0054] A selective search algorithm is used to generate candidate regions, including: creating an initial region and calculating similarity, merging similar regions, and calculating similarity of the merged regions until no similar regions exist; wherein the similarity calculation includes color similarity, texture similarity, scale similarity, and filling similarity.

[0055] The candidate region feature extraction includes: using VGG16 as the backbone network of the model to extract the features of the candidate region, wherein VGG16 contains 16 weight layers, including 13 convolutional layers and 3 fully connected layers, and using the ReLU activation function after each convolutional layer and fully connected layer to introduce nonlinearity; replacing the last maximum pooling layer of VGG16 with a spatial pyramid pooling layer, and the last layer is the output layer, using the Softmax function to output the probability of each category.

[0056] In the basic classification layer, the candidate region features of the image and its candidate region boxes are input into two fully connected layers, and the two matrices are the parameters of the two fully connected layers; the matrix after the Softmax regression of the two fully connected layers is multiplied element by element to obtain the candidate region score matrix, and after summing and pooling, the score of the whole picture belonging to a certain category is obtained; given the image-level annotation information and the above-mentioned score belonging to the c-th category target, the parameters of the basic classification layer network are learned by optimizing the loss function.

[0057] In the refined classification layer, the clusters and centers of different targets are found according to the algorithm based on the graph model, and then the supervision for training the kth refined classifier is optimized based on the classification scores of the candidate regions and the image-level labels. Finally, the parameters of the refined classification layer network are learned based on the loss function of the refined classification layer network and iterated.

[0058] Specifically, a drone equipped with a high-definition zoom camera is used to inspect along the side of the railway line to obtain the line contact network bolt data, and the original contact network bolt data is preprocessed and the data set is produced. Specifically, it includes: using a drone equipped with a high-definition zoom camera to conduct a flight inspection along the side of the railway line to obtain contact network images. The flight trajectory is parallel to the track direction. The drone's flight altitude is maintained at a vertical height of 30 to 50 meters from the contact network, a horizontal distance of 20 to 30 meters, and a flight speed of 2 to 3m / s. A ground base station is also required during operation, and the control radius is 30km.

[0059] The original contact network bolt data preprocessing and data set production are obtained by the following method: first, the part containing the bolts in the original image is extracted by cropping, and then the image is enhanced and expanded by four ways of brightness change, shift, flip, filtering, etc., and several CAD bolt simulation pictures without background are mixed in to enhance the subsequent training effect. The pictures are divided into training set, validation set and test set according to the ratio of 8:1:1, the bolt categories are divided, and a .JSON file containing the bolt category information is produced.

[0060] The generation of candidate regions in the contact network bolt weak supervision detection model is obtained by the following method: inputting the contact network bolt image, obtaining the initial region R = {r1, ..., r n}, then initialize the similarity set S = Φ, for each adjacent region (r i , r j )Calculate (r i , r j ) similarity s(r i , r j ), S = S ∪ s (r i , r j ) until S≠Φ, and the highest similarity value is obtained: s(r i , r j )=max(S), merge the corresponding areas: r t =r i ∪r j , remove all the information about region r from S i Similarity: S = S\S(r i , r * ), calculate r t The similarity with its adjacent regions is obtained by the similarity set S t , update the similarity set: S = S ∪ St and the new region set R = R∪r t , and finally obtain the candidate region set.

[0061] The classification of candidate regions in the weakly supervised detection model for contact network bolts is obtained by the following method: given an input image and its candidate region features F, they are successively input into a basic instance classification network and a refined instance classification network of k iterations to train the parameters of these k+1 networks, including the training of the basic instance classification network and the refined instance classification network.

[0062] Construction and training of basic instance classification networks, including:

[0063] The image and its candidate region boxes The candidate region features F are input into two fully connected layers to generate two matrices X cls (F,W cls ), (hereinafter referred to as X cls , X det ), where W cls , W det are the parameters of these two fully connected layers. Candidate region score matrix The two Softmax regression matrices are multiplied element by element, as shown below:

[0064]

[0065] Finally, we can get the score of the entire image belonging to the cth target as follows:

[0066]

[0067] [σ(X cs )] cr It represents the probability that the rth candidate region belongs to the cth class object. [σ(X det )] cr is a normalized weight, which represents the contribution of the rth candidate region to the image being classified as the cth object. So the weighted summation of [φ(F, W 0 )] c In the interval (0, 1).

[0068] Given image-level annotation information y = [y1, ..., y C ] T , and the above [φ(F,W 0 )] c , by optimizing the loss function to learn the parameters F, W of the basic instance classification network 0 The standard loss function of the basic instance classification network is as follows:

[0069]

[0070] The construction and training of the refined instance classification network includes:

[0071] First, we find the clusters and centers of different targets based on the graph model-based algorithm, and then generate and optimize the supervision for training the kth refined instance classifier based on the candidate region classification scores and image-level labels. in is the label of the nth bag, that is, the nth cluster. Finally, the parameters of the refined instance classification network are learned based on the loss function of the refined instance classification network, and iterated k times, where k is 3.

[0072] Refine the loss function formula of the instance classification network:

[0073]

[0074] Example 2

[0075] In this embodiment 2, a contact network bolt weak supervision detection system is provided, including: an acquisition module for acquiring a contact network image; a detection module for processing the acquired contact network image using a contact network bolt weak supervision detection model to obtain a result of bolt detection in the image, wherein the bolt detection result includes four types of results: blurred bolts, bolt heads, bolt sides and nuts.

[0076] In this embodiment 2, a weak supervision detection method for contact network bolts is implemented using the above-mentioned system to achieve contact network bolt target detection with low labor cost. By using a drone equipped with a high-definition zoom camera to patrol along the upper side of the railway line, the railway contact network bolt data is obtained quickly, efficiently and widely. After collecting the original data, preprocessing is performed to construct a weak supervision model to achieve weak supervision detection of contact network bolts. The monitoring method includes: obtaining a contact network image; using a contact network bolt weak supervision detection model to process the obtained contact network image to obtain the result of bolt detection in the image, wherein the bolt detection result includes four types of results: blurred bolts, bolt heads, bolt sides and nuts. The contact network bolt weak supervision detection model is obtained using a contact network bolt weak supervision detection model training method.

[0077] In this embodiment 2, the contact network bolt weak supervision detection model training method includes the following steps:

[0078] Step 1: Use a drone equipped with a high-definition zoom camera to inspect along the side of the railway line and obtain the line contact network bolt data;

[0079] Step 2: Preprocessing of original contact network bolt data and preparation of data set;

[0080] Step 3: Constructing a weak supervision detection model for contact network bolts: candidate area generation;

[0081] Step 4: Construct a weak supervision detection model for contact network bolts: feature extraction of candidate areas;

[0082] Step 5: Construct a weakly supervised detection model for contact network bolts: candidate area classification.

[0083] The scheme of step 1 using a drone with a high-definition zoom camera to inspect along the side of the railway line and obtain the data of the contact network bolts is as follows: a drone equipped with a high-definition zoom camera is used to conduct a flight inspection along the side of the railway line to obtain the contact network image. The flight trajectory is parallel to the track direction, the flight height of the drone is maintained at a vertical height of 30 to 50 meters from the contact network, the horizontal distance is 20 to 30 meters, the flight speed is 2 to 3m / s, and a ground base station needs to be set up during the operation, and the control radius is 30km.

[0084] The preprocessing scheme of the original point contact network bolt data in step 2 is as follows: first, the part containing the bolts in the original image is extracted by cropping, and then the image is enhanced and expanded by four ways of brightness change, shift, flip, filtering, etc., and several CAD bolt simulation pictures without background are mixed in to enhance the subsequent training effect. The pictures are divided into training set, verification set and test set according to the ratio of 8:1:1, the bolt categories are divided, and a .JSON file containing the bolt category information is produced.

[0085] The step 3 constructs a weakly supervised detection model for contact network bolts: The candidate region generation scheme is as follows: The candidate region is generated using a selective search algorithm. The calculation steps are as follows: (1) Create an initial region and calculate the similarity; (2) Merge similar regions; (3) Calculate the similarity of the merged regions; (4) Repeat (2) and (3) until there are no similar regions. The similarity calculation includes color similarity, texture similarity, scale similarity, and filling similarity.

[0086] The step 4 constructs a weakly supervised detection model for contact network bolts: The candidate area feature extraction scheme is as follows: VGG16 is used as the backbone network of the model to extract the features of the candidate area. VGG16 contains 16 weight layers, including 13 convolutional layers and 3 fully connected layers, and a ReLU (Rectified Linear Unit) activation function is used after each convolutional layer and fully connected layer to introduce nonlinearity. The last maximum pooling layer of VGG16 is replaced with a spatial pyramid pooling (SPP) layer. The last layer is the output layer, which uses the Softmax function to output the probability of each category.

[0087] The candidate area classification scheme of the contact network bolt image in step 5 is as follows:

[0088] Given an input image and its candidate region features F, they are successively input into the basic instance classification network and the refined instance classification network for k iterations to train the parameters of these k+1 networks.

[0089] 1. Construction and training of basic instance classification network

[0090] The image and its candidate region boxes The candidate region features F are input into two fully connected layers, which will produce two matrices X cls (F,W cls ), (hereinafter referred to as X cls , X det ), where W cls , W det are the parameters of the two fully connected layers (abbreviated as W 0 ). Candidate region score matrix The two Softmax regression matrices are multiplied element by element. Then the score of the entire image belonging to the cth class target is calculated [φ(F, W 0 )] c Finally, the image level annotation information y = [y1, ..., y C ] T , the parameters of the basic instance classification network are learned by minimizing the loss function formula of the basic instance classification network.

[0091] 2. Construction and training of refined instance classification network

[0092] First, we find the clusters and centers of different targets based on the graph model-based algorithm, and then generate and optimize the supervision for training the kth refined instance classifier based on the candidate region classification scores and image-level labels. Finally, the parameters of the refined instance classification network are learned based on the loss function of the refined instance classification network and iterated k times.

[0093] Example 3

[0094] This embodiment 3 provides a weak supervision detection method for contact network bolts, such as Figure 1 As shown, it is achieved through the following technical solution, which includes the following steps: Step 1: Use a drone equipped with a high-definition zoom camera to patrol along the upper side of the railway line to obtain line contact network bolt data; Step 2: Preprocess the original contact network bolt data and prepare the data set; Step 3: Construct a weak supervision detection model for contact network bolts: generate candidate areas; Step 4: Construct a weak supervision detection model for contact network bolts: extract features of candidate areas; Step 5: Construct a weak supervision detection model for contact network bolts: classify candidate areas; Step 6: Generate weak supervision detection results for contact network bolts.

[0095] In step 1, if Figure 2 As shown in the figure, a drone equipped with a high-definition zoom camera is used to fly along the side of the railway line to obtain images of the contact network. The flight trajectory is parallel to the track direction. The drone's flight altitude is maintained at a vertical height of 30 to 50 meters from the contact network, a horizontal distance of 20 to 30 meters, and a flight speed of 2 to 3 m / s. A ground base station is also required during the operation, and the control radius is 30 km.

[0096] In step 2, the part containing bolts in the original image is first extracted by cropping, and the image is enhanced and expanded by four methods such as brightness change, shift, flip, and filtering, and several CAD bolt simulation images without background are mixed in to enhance the subsequent training effect. The images are divided into training set, validation set, and test set according to the ratio of 8:1:1, and the bolt categories are divided to create a .JSON file containing bolt category information.

[0097] In step 3, a selective search algorithm is used to generate candidate regions.

[0098] The specific algorithm flow of using the selective search algorithm to generate candidate regions is as follows.

[0099]

[0100] There are 4 similarity measurement formulas, which are integrated and normalized to [0, 1].

[0101] (1) Color similarity

[0102] Count the pixels in each area and generate a 75-dimensional histogram vector Where n = 75. In order to normalize the histogram, the present invention adopts the L1 norm.

[0103] Through the histogram, the color similarity between two regions can be calculated as shown in Formula 1.

[0104]

[0105] The histogram vector of the merged region can be calculated as follows.

[0106]

[0107] Where size(r i ) represents the region r i The area after merging is size(r t )=size(r i )+size(r j ).

[0108] (2) Texture similarity

[0109] First, we use a Gaussian distribution with a variance of 1 to perform gradient statistics in 8 directions, and then calculate the histogram with the statistical results equal to 10 intervals. Thus, we get the gradient of each region r i The texture histogram vector of Where n = 240, T i It is also a vector normalized by the L1 norm of the region.

[0110] Texture similarity S texture (r i , r j ) is calculated as shown in Formula 3:

[0111]

[0112] (3) Scale similarity

[0113] Scale similarity S size (r i , r j ) is calculated as shown in Formula 4:

[0114]

[0115] (4) Filling similarity

[0116] First define a rectangular area BB ij , which means that it contains r i and r j The smallest bounding box of . Then the similarity calculation formula is given as:

[0117]

[0118] (5) Similarity calculation formula

[0119] Combining the above four sub-formulas, we can get the final formula for calculating similarity as shown in 6.

[0120]

[0121] Among them, a i The value of is 0 or 1, indicating whether a certain similarity is adopted.

[0122] Step 4: Use VGG16 as the backbone network of the model to extract the features of the candidate region. VGG16 contains 16 weight layers, including 13 convolutional layers and 3 fully connected layers, and uses the ReLU (Rectified Linear Unit) activation function after each convolutional layer and fully connected layer to introduce nonlinearity. The last layer is the output layer, which uses the Softmax function to output the probability of each category, as shown in Equation 7.

[0123]

[0124] Since the fully connected layer can only process fixed-size inputs, in this embodiment, the last maximum pooling layer of VGG16 is replaced by a spatial pyramid pooling (SPP) layer.

[0125] Step 5: Given an input image and its candidate region features F, they are successively input into the basic instance classification network and the refined instance classification network for k iterations to train the parameters of these k+1 networks.

[0126] The specific construction and training process of the basic instance classification network and the refined instance classification network is as follows:

[0127] 1. Construction and training of basic instance classification network

[0128] The image and its candidate region boxes The candidate region features F are input into two fully connected layers to generate two matrices X cls (F,W cls ), (hereinafter referred to as X cls , X det ), where W cls , W det are the parameters of these two fully connected layers. Candidate region score matrix The result is obtained by multiplying the two Softmax regression matrices element by element, as shown in Formula 8.

[0129]

[0130] Finally, the score of the entire image belonging to the cth target can be obtained, as shown in Formula 9.

[0131]

[0132] [σ(X cs )] cr It represents the probability that the rth candidate region belongs to the cth class object. [σ(X det )] cr is a normalized weight, which represents the contribution of the rth candidate region to the image being classified as the cth object. So the weighted summation of [φ(F, W 0 )] c In the interval (0, 1).

[0133] Given image-level annotation information y = [y1, ..., y C ] T , and the above [φ(F,W 0 )] c, by optimizing the loss function to learn the parameters F, W of the basic instance classification network 0 The standard loss function of the basic instance classification network is shown in Equation 10.

[0134]

[0135] 2. Construction and training of refined instance classification network

[0136] Step 1: For a picture divided into many candidate regions, first find the candidate box cluster centers for different targets The algorithm is as follows.

[0137]

[0138] Step 2: Generate candidate region clusters based on cluster centers is the background class, and the others are target classes. The algorithm is as follows.

[0139]

[0140]

[0141] Step 3: Generate supervision for training the kth refined instance classifier based on the candidate region classification scores and image-level labels in is the label of the nth bag, that is, the nth cluster.

[0142] Step 4: Loss function L based on formula 11 k Optimize network parameters F, W k .

[0143]

[0144] are the confidence score of the nth object cluster, the number of candidate regions contained in the nth cluster, and the classification score of the rth candidate region. or They represent that the rth candidate region belongs to the nth object cluster or background cluster respectively. Represents the loss function weight. If the rth candidate region belongs to the nth cluster: then for object clustering, Equal to the cluster confidence score For background clustering, Equal to the confidence score of the candidate region

[0145] Step 5: Iterate k times.

[0146] In step 6, the image to be detected and the candidate area of ​​the image generated in step 2 are input into the contact network bolt weak supervision detection model constructed and trained by steps 3, 4, and 5 to obtain the detection result.

[0147] This example verifies the proposed weak supervision detection method for contact network bolts based on multi-instance learning by applying this method on a high-speed railway line section in a railway bureau. The specific steps are as follows:

[0148] A drone equipped with a high-definition zoom camera is used to fly along the side of the railway line to obtain images of the contact network. The flight trajectory is parallel to the track direction. The drone's flight altitude is maintained at a vertical height of 20 to 50 meters from the contact network, a horizontal distance of 20 to 30 meters, and a flight speed of 2 to 3 m / s. A ground base station is also required during the operation, with a control radius of 30 km.

[0149] First, the part of the original image containing the bolt is extracted by cropping, and then the image is enhanced and expanded by four methods such as brightness change, shift, flip, and filtering, and several CAD bolt simulation pictures without background are mixed in to enhance the subsequent training effect. The pictures are divided into training set, validation set, and test set according to the ratio of 8:1:1, and the bolt categories are divided into four categories: fuzzy bolts, bolt heads, bolt sides, and nuts. A .JSON file containing bolt category information is created, such as Figure 4 .

[0150] The candidate regions are generated using the selective search algorithm. The calculation steps are as follows: (1) Create the initial region and calculate the similarity; (2) Merge similar regions; (3) Calculate the similarity of the merged regions; (4) Repeat (2) and (3) until there are no similar regions.

[0151] Implement the above steps based on Python to generate candidate areas of the image, such as Figure 5 .

[0152] Use the VGG16 trained on Imagenet as the backbone network of the model to extract the features of the candidate region, and use the SPP layer to replace the last maximum pooling layer of VGG16. Input the image and its candidate region, given the bounding box b of the rth candidate region r and its upper left and lower right vertex coordinates (x1, y1, x2, y2), b r The coordinates of the image are mapped to the convolutional layer features to obtain new coordinates (x1 / 16, y1 / 16, x2 / 16, y2 / 16). Then the convolutional layer features of the corresponding area are cut out and adjusted to a fixed size of 7×7.

[0153] Given the image of the training set and its generated candidate region box The candidate region feature F is obtained by inputting the feature map into the classification and detection branches after the fully connected layer. Softmax normalization is applied along the two dimensions of category and candidate region. The calculation process is as follows:

[0154]

[0155]

[0156] Multiply the outputs of the two branches element by element to get the score matrix for each candidate region The scores are sorted and NMS is performed to obtain high-probability candidate regions. By adding up the candidate regions, the class score of the image [φ(F, W 0 )] c .

[0157] The class score of the input image [φ(F, W 0 )] c and image-level annotation information y = [y1, ..., y C ] T The network parameters F, W are obtained according to the following loss function 0 :

[0158]

[0159] Then, the refined instance classification network training is performed for k iterations with k being 3, according to the supervision The network parameters F, W are learned by optimizing the following loss function k :

[0160]

[0161] Step 6: Input the image to be detected and its candidate area into the trained contact network bolt weak supervision detection model, and the obtained detection result evaluation is as follows: Figure 6 and 7 , the detection result visualization example is as follows Figure 8 .

[0162] The overall prediction results of the evaluation model are evaluated using AP (Average Precision) and Corloc (Correct Localization), a commonly used indicator for weak supervision.

[0163] In order to further verify the effectiveness of this method, it is compared with other classic weak supervision detection methods. The results are shown in Tables 1 and 2.

[0164] Table 1 Comparison of mAP results

[0165]

[0166]

[0167] According to the test results, it can be seen that the weak supervision detection method for contact network bolts based on multi-instance learning in this embodiment is superior to classic weak supervision learning methods such as OICR and WSDDN. It can be seen that the method of the present invention can realize the detection and classification of contact network bolts with high accuracy and has certain engineering application value. In addition, the method can be implemented during line operation without affecting train operation, and can greatly release line capacity, which is of great significance for high-speed railways and high-running-density railways.

[0168] Example 4

[0169] This embodiment 4 provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by the processor, the contact network bolt weak supervision detection model training method as described in embodiment 1 is implemented.

[0170] Example 5

[0171] This embodiment 5 provides a computer device, including a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the contact network bolt weak supervision detection model training method as described in embodiment 1.

[0172] Example 6

[0173] This embodiment 6 provides an electronic device, including: a processor, a memory and a computer program; wherein the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the contact network bolt weak supervision detection model training method as described in embodiment 1.

[0174] Example 7

[0175] This embodiment 7 provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by the processor, the contact network bolt weak supervision detection method as described in embodiment 2 is implemented.

[0176] Example 8

[0177] This embodiment 8 provides a computer device, including a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the contact network bolt weak supervision detection method as described in embodiment 2.

[0178] Example 9

[0179] This embodiment 9 provides an electronic device, including: a processor, a memory and a computer program; wherein the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the contact network bolt weak supervision detection method as described in embodiment 2.

[0180] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0181] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0182] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0183] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0184] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative work on the basis of the technical solution disclosed in the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for training a weakly supervised detection model for contact network bolts, characterized in that: include: Acquire training data; the training data includes a plurality of contact network images and bolt category indication features of label images, wherein the bolt category indication features indicate the position distribution of at least one bolt category in the label image; Based on the multiple contact network images as input, and based on the bolt category indication features of the label images as output, a contact network bolt weak supervision detection model is trained; the contact network bolt weak supervision detection model includes a candidate region generation network, a candidate region feature extraction network and a classification network; The candidate region generation network is used to generate candidate regions using a selective search algorithm; the candidate region feature extraction network is used to extract candidate region features based on the original contact network image and the generated candidate region image; The classification network includes a basic classification layer and a refined classification layer; the basic classification layer is used to take the label image and the candidate region features as input, and obtain the candidate region score matrix by element-by-element multiplication after normalization, and obtain the score of the entire image belonging to a certain category by summing and pooling; the refined classification layer is used to take the candidate region, the label image and the candidate region score matrix as input, and output the candidate region cluster center.

2. The method for training a weakly supervised detection model for contact network bolts according to claim 1, characterized in that: A selective search algorithm is used to generate candidate regions, including: creating an initial region and calculating similarity, merging similar regions, and calculating similarity of the merged regions until no similar regions exist; wherein the similarity calculation includes color similarity, texture similarity, scale similarity, and filling similarity.

3. The method for training a weakly supervised detection model for contact network bolts according to claim 1, characterized in that: The candidate region feature extraction includes: using VGG16 as the backbone network of the model to extract the features of the candidate region, wherein VGG16 contains 16 weight layers, including 13 convolutional layers and 3 fully connected layers, and using the ReLU activation function after each convolutional layer and fully connected layer to introduce nonlinearity; replacing the last maximum pooling layer of VGG16 with a spatial pyramid pooling layer, and the last layer is the output layer, using the Softmax function to output the probability of each category.

4. The method for training a weakly supervised detection model for contact network bolts according to claim 1, characterized in that: In the basic classification layer, the candidate region features of the image and its candidate region boxes are input into two fully connected layers, and the two matrices are the parameters of the two fully connected layers; the matrix after the Softmax regression of the two fully connected layers is multiplied element by element to obtain the candidate region score matrix, and after summing and pooling, the score of the whole picture belonging to a certain category is obtained; given the image-level annotation information and the above-mentioned score belonging to the c-th category target, the parameters of the basic classification layer network are learned by optimizing the loss function.

5. The method for training a weakly supervised detection model for contact network bolts according to claim 2, characterized in that: In the refined classification layer, the clusters and centers of different targets are found according to the algorithm based on the graph model, and then the supervision for training the kth refined classifier is optimized based on the classification scores of the candidate regions and the image-level labels. Finally, the parameters of the refined classification layer network are learned based on the loss function of the refined classification layer network and iterated.

6. A method for weak supervision detection of contact network bolts, characterized in that: include: Acquire overhead contact network images; The acquired contact network image is processed using a contact network bolt weak supervision detection model to obtain the results of bolt detection in the image, wherein the bolt detection results include four types of results: blurred bolts, bolt heads, bolt sides and nuts; the contact network bolt weak supervision detection model is obtained using the contact network bolt weak supervision detection model training method as described in any one of claims 1 to 5.

7. A contact network bolt weak supervision detection system, characterized in that: include: An acquisition module, used for acquiring an image of the contact network; A detection module is used to process the acquired contact network image using a contact network bolt weak supervision detection model to obtain the results of bolt detection in the image, wherein the bolt detection results include four types of results: blurred bolts, bolt heads, bolt sides and nuts; the contact network bolt weak supervision detection model is obtained using the contact network bolt weak supervision detection model training method as described in any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by the processor, the contact network bolt weak supervision detection method as described in claim 6 is implemented.

9. A computer device, characterized in that: It includes a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the contact network bolt weak supervision detection method as described in claim 6.

10. An electronic device, characterized in that: include: A processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the contact network bolt weak supervision detection method as described in claim 6.

Citation Information

Patent Citations

  • Weak supervision detection method for lack-of-pin bolts of power transmission line

    CN114627455A

  • Remote sensing image weak supervision target detection method for optimizing feature extraction

    CN116957051A

  • Machine Vision Based Inspection

    US20220172335A1

Cited By

  • Weak supervision target detection method based on misclassification correction and related equipment

    CN120014234A

  • Weakly supervised object detection method based on misclassification correction and related device

    CN120014234B