Online defect detection system and method for carbon fiber sucker rod
By using the category-oriented enhanced attention adaptive allocation network and semantic-guided multi-channel feature integration module based on the gating mechanism in the online inspection of carbon fiber sucker rods, multi-scale features are extracted and integrated, which solves the problem that traditional inspection cannot be monitored in real time. , realizing automated defect detection of carbon fiber sucker rods and improving detection efficiency and accuracy.
Patent Information
- Application Number
- CN202410877493.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-07-02
AI Technical Summary
Traditional sucker rod inspection requires professional technicians and cannot achieve real-time monitoring, resulting in the inability to detect and deal with defects in time, increasing production risks.
The category-oriented enhanced attention adaptive allocation network and semantic-guided multi-channel feature integration module based on the gating mechanism are used to obtain the cross-sectional metallographic microscopic image of the carbon fiber sucker rod, extract multi-scale features and perform feature integration to achieve automatic defect identification and detection.
Online automated defect detection of carbon fiber sucker rods has been realized, which improves detection efficiency and accuracy, reduces production risks, and enables timely discovery and processing of defects.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present invention relates to the field of sucker rod detection, and in particular to an online defect detection system and method for a carbon fiber sucker rod. Background Art
[0002] With the rapid development of the oil industry, the performance and reliability of the sucker rod, as a key component in oil field exploitation, directly affect the oil production efficiency and the economic benefits of the oil field. Carbon fiber sucker rod is a sucker rod made of carbon fiber reinforced composite materials. Compared with traditional steel sucker rods, carbon fiber materials have high strength and stiffness, and at the same time have the advantage of light weight, which makes the carbon fiber sucker rod lighter at the same strength, thereby reducing the load on the pumping unit.
[0003] However, in the long-term use of sucker rods, due to the influence of corrosion, wear and mechanical stress, various defects such as microcracks, holes, fiber breakage, etc. are prone to occur. These defects will not only reduce the service life of the sucker rod, but also may cause serious safety accidents. Therefore, effective online detection and evaluation of them has important practical significance.
[0004] Traditional sucker rod inspection requires professional technicians to perform, and real-time monitoring may not be achieved, resulting in the inability to discover and handle problems in a timely manner, increasing production risks. Therefore, an online defect detection system and method for carbon fiber sucker rods is desired. Summary of the invention
[0005] The present disclosure is made in view of the above problems. One object of the present disclosure is to provide an online defect detection system and method for a carbon fiber sucker rod.
[0006] The embodiment of the present disclosure provides an online defect detection method for a carbon fiber sucker rod, which comprises: obtaining a cross-sectional metallographic microscopic image of a carbon fiber sucker rod to be detected; performing multi-scale image feature extraction on the cross-sectional metallographic microscopic image to obtain a carbon fiber sucker rod cross-sectional metallographic microscopic shallow feature map and a carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map; inputting the carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map into a category-guided enhanced attention adaptive allocation network based on a gating mechanism to obtain a carbon fiber sucker rod cross-sectional metallographic microscopic enhanced semantic feature map; performing feature integration on the carbon fiber sucker rod cross-sectional metallographic microscopic shallow feature map and the carbon fiber sucker rod cross-sectional metallographic microscopic enhanced semantic feature map to obtain a carbon fiber sucker rod cross-sectional metallographic fiber multi-scale fusion representation map; and determining the detection result of the carbon fiber sucker rod to be detected based on the carbon fiber sucker rod cross-sectional metallographic fiber multi-scale fusion representation map.
[0007] For example, according to the online defect detection method of the carbon fiber sucker rod according to the embodiment of the present disclosure, multi-scale image feature extraction is performed on the cross-sectional metallographic microscopic image to obtain the carbon fiber sucker rod cross-sectional metallographic microscopic shallow feature map and the carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map, including: inputting the cross-sectional metallographic microscopic image of the carbon fiber sucker rod to be detected into a carbon fiber sucker rod cross-sectional metallographic microscopic image feature extractor based on a hollow pyramid network to obtain the carbon fiber sucker rod cross-sectional metallographic microscopic shallow feature map and the carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map.
[0008] For example, according to an online defect detection method for a carbon fiber sucker rod according to an embodiment of the present disclosure, the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod is input into a category-guided enhanced attention adaptive allocation network based on a gating mechanism to obtain a metallographic microscopic enhanced semantic feature map of the cross section of the carbon fiber sucker rod, including: performing global pooling processing based on the maximum value, global pooling processing based on a random value, and global pooling processing based on an average value on the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod to obtain a cross-section metallographic microscopic semantic global maximum pooling feature vector, a cross-section metallographic microscopic semantic global mean pooling feature vector, and a cross-section metallographic microscopic semantic global random value pooling feature vector; fusing the cross-section metallographic microscopic semantic global maximum pooling feature vector, the cross-section metallographic microscopic semantic global mean pooling feature vector, and the cross-section metallographic microscopic semantic global random value pooling feature vector. The global random value pooling feature vector is used to obtain a cross-sectional metallographic microscopic global semantic multi-scale representation vector; the cross-sectional metallographic microscopic global semantic multi-scale representation vector is subjected to channel-by-channel semantic feature interaction and feature activation to obtain a cross-sectional metallographic microscopic channel semantic association feature vector; the cross-sectional metallographic microscopic channel semantic association feature vector is input into a gating unit to obtain a gated screening cross-sectional metallographic microscopic channel semantic association feature vector; the gated screening cross-sectional metallographic microscopic channel semantic association feature vector is normalized to obtain a gated screening cross-sectional metallographic microscopic channel semantic association weight feature vector; the gated screening cross-sectional metallographic microscopic channel semantic association weight feature vector is used as a weight feature vector, and its channel-by-channel point multiplication with the carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map is calculated to obtain the carbon fiber sucker rod cross-sectional metallographic microscopic enhanced semantic feature map.
[0009] For example, according to the online defect detection method of carbon fiber sucker rod of the embodiment of the present disclosure, the cross-section metallographic microstructure semantic global maximum pooling feature vector, the cross-section metallographic microstructure semantic global mean pooling feature vector and the cross-section metallographic microstructure semantic global random value pooling feature vector are fused to obtain the cross-section metallographic microstructure global semantic multi-scale representation vector, including: determining the first semantic pooling fusion weight, the second semantic pooling fusion weight and the third semantic pooling fusion weight; calculating the dot product of the first semantic pooling fusion weight and the cross-section metallographic microstructure semantic global mean pooling feature vector, the dot product of the second semantic pooling fusion weight and the cross-section metallographic microstructure semantic global maximum pooling feature vector and the dot product of the third semantic pooling fusion weight and the cross-section metallographic microstructure semantic global random value pooling feature vector, and adding them element by element according to position to obtain the cross-section metallographic microstructure global semantic multi-scale representation vector.
[0010] For example, according to the online defect detection method of carbon fiber sucker rod according to the embodiment of the present disclosure, channel-by-channel semantic feature interaction and feature activation are performed on the cross-sectional metallographic microscopic global semantic multi-scale representation vector to obtain the cross-sectional metallographic microscopic channel semantic association feature vector, including: passing the cross-sectional metallographic microscopic global semantic multi-scale representation vector through a fully connected layer to perform channel-by-channel semantic feature interaction and feature activation on the cross-sectional metallographic microscopic global semantic multi-scale representation vector to obtain the cross-sectional metallographic microscopic channel semantic association feature vector.
[0011] For example, according to the online defect detection method of the carbon fiber sucker rod according to the embodiment of the present disclosure, the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are feature integrated to obtain the metallographic fiber multi-scale fusion representation map of the carbon fiber sucker rod cross section, including: the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are integrated through a semantic-guided multi-channel feature integration module to obtain the metallographic fiber multi-scale fusion representation map of the carbon fiber sucker rod cross section.
[0012] For example, according to the online defect detection method of the carbon fiber sucker rod of the embodiment of the present disclosure, the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are integrated through a semantic-guided multi-channel feature integration module to obtain the metallographic fiber multi-scale fusion representation map of the carbon fiber sucker rod cross section, including: cascading the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section and the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section to obtain the metallographic microscopic semantic- shallow series feature map; convolutional coding is performed on the metallographic microscopy semantic-shallow series feature map of the carbon fiber sucker rod cross section to obtain the metallographic microscopy semantic-shallow correlation feature map of the carbon fiber sucker rod cross section; data distribution balance normalization processing is performed on the metallographic microscopy semantic-shallow correlation feature map of the carbon fiber sucker rod cross section to obtain the normalized carbon fiber sucker rod cross section metallographic microscopy semantic-shallow correlation feature map; global pooling processing based on the maximum value and global pooling processing based on the random value are performed on the normalized carbon fiber sucker rod cross section metallographic microscopy semantic-shallow correlation feature map. Pooling processing and global pooling processing based on average value are used to obtain the carbon fiber sucker rod cross-section metallographic microstructure semantic-shallow correlation global maximum pooling feature vector, the carbon fiber sucker rod cross-section metallographic microstructure semantic-shallow correlation global mean pooling feature vector and the carbon fiber sucker rod cross-section metallographic microstructure semantic-shallow correlation global random value pooling feature vector; calculate the carbon fiber sucker rod cross-section metallographic microstructure semantic-shallow correlation global maximum pooling feature vector, the carbon fiber sucker rod cross-section metallographic microstructure semantic-shallow correlation global mean pooling feature vector and the The position-weighted sum of the metallographic microscopic semantic-shallow association global random value pooling feature vectors of the carbon fiber sucker rod cross section is obtained to obtain a multi-scale pooling representation vector of the metallographic microscopic semantic-shallow association features of the carbon fiber sucker rod cross section; using the eigenvalue of each position in the multi-scale pooling representation vector of the metallographic microscopic semantic-shallow association features of the carbon fiber sucker rod cross section as the weight, each feature matrix along the channel dimension of the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section is weighted to obtain a multi-scale fusion representation map of the metallographic fiber of the carbon fiber sucker rod cross section.
[0013] For example, according to an online defect detection method for a carbon fiber sucker rod according to an embodiment of the present disclosure, the detection result of the carbon fiber sucker rod to be detected is determined based on a multi-scale fusion representation image of the metallographic fiber of the carbon fiber sucker rod cross section, including: inputting the multi-scale fusion representation image of the metallographic fiber of the carbon fiber sucker rod cross section into a classifier-based defect detector to obtain the detection result, and the detection result is used to indicate whether the carbon fiber sucker rod to be detected has defects.
[0014] For example, according to the online defect detection method of the carbon fiber sucker rod of the embodiment of the present disclosure, it also includes: a training stage, for training the carbon fiber sucker rod cross-section metallographic microscopic image feature extractor based on the hollow pyramid network, the category-guided enhanced attention adaptive allocation network based on the gating mechanism, the semantic-guided multi-channel feature integration module and the classifier-based defect detector; wherein the training stage includes: obtaining the training cross-section metallographic microscopic image of the carbon fiber sucker rod to be detected; inputting the training cross-section metallographic microscopic image of the carbon fiber sucker rod to be detected into the carbon fiber sucker rod cross-section metallographic microscopic image feature extractor based on the hollow pyramid network to obtain the training carbon fiber sucker rod cross-section metallographic microscopic shallow feature map and the training carbon fiber sucker rod cross-section metallographic microscopic semantic feature map; inputting the training carbon fiber sucker rod cross-section metallographic microscopic semantic feature map into the category-guided enhanced attention adaptive allocation network based on the gating mechanism to obtain the training carbon fiber sucker rod cross-section metallographic microscopic shallow feature map. The invention discloses a method for preparing a carbon fiber sucker rod cross-section metallographic microscopic image feature extractor based on a hollow pyramid network, a class-guided enhanced attention adaptive allocation network based on a gating mechanism, a semantically guided multi-channel feature integration module, and a classifier-based defect detector. The method comprises the following steps: a) performing a metallographic microscopic shallow feature map of a training carbon fiber sucker rod cross-section and a metallographic microscopic enhanced semantic feature map of a training carbon fiber sucker rod cross-section through a semantically guided multi-channel feature integration module to obtain a metallographic fiber multi-scale fusion representation map of a training carbon fiber sucker rod cross-section; b) performing a metallographic microscopic image feature extractor based on a hollow pyramid network, a class-guided enhanced attention adaptive allocation network based on a gating mechanism, a semantically guided multi-channel feature integration module, and a classifier-based defect detector. The metallographic fiber multi-scale fusion representation map of a training carbon fiber sucker rod cross-section is corrected each time the metallographic fiber multi-scale fusion representation map of a training carbon fiber sucker rod cross-section is classified and iterated through a classifier-based defect detector.
[0015] The embodiment of the present disclosure also provides an online defect detection system for carbon fiber sucker rods, which includes: an image acquisition module for acquiring a cross-sectional metallographic microscopic image of a carbon fiber sucker rod to be detected; a multi-scale image feature extraction module for performing multi-scale image feature extraction on the cross-sectional metallographic microscopic image to obtain a carbon fiber sucker rod cross-sectional metallographic microscopic shallow feature map and a carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map; a semantic enhancement module for inputting the carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map into a category-oriented enhanced attention adaptive allocation network based on a gating mechanism to obtain a carbon fiber sucker rod cross-sectional metallographic microscopic enhanced semantic feature map; a feature integration module A block is used to integrate the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section to obtain a metallographic fiber multi-scale fusion representation map of the carbon fiber sucker rod cross section; a detection confirmation module is used to determine the detection result of the carbon fiber sucker rod to be detected based on the metallographic fiber multi-scale fusion representation map of the carbon fiber sucker rod cross section; wherein, the metallographic microscopic semantic feature map of the carbon fiber sucker rod cross section is input into the category-oriented enhanced attention adaptive allocation network based on the gating mechanism to obtain the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section, including: The feature map is subjected to maximum value-based global pooling processing, random value-based global pooling processing and average value-based global pooling processing to obtain a cross-sectional metallographic microscopic semantic global maximum pooling feature vector, a cross-sectional metallographic microscopic semantic global mean pooling feature vector and a cross-sectional metallographic microscopic semantic global random value pooling feature vector; the cross-sectional metallographic microscopic semantic global maximum pooling feature vector, the cross-sectional metallographic microscopic semantic global mean pooling feature vector and the cross-sectional metallographic microscopic semantic global random value pooling feature vector are fused to obtain a cross-sectional metallographic microscopic global semantic multi-scale representation vector; the cross-sectional metallographic microscopic global semantic multi-scale representation vector is subjected to channel-by-channel semantic feature extraction. The invention discloses a method for obtaining a metallographic microscopic channel semantic association feature vector of a cross section by performing feature interaction and feature activation; inputting the metallographic microscopic channel semantic association feature vector of the cross section into a gating unit to obtain a gated screening metallographic microscopic channel semantic association feature vector; normalizing the gated screening metallographic microscopic channel semantic association feature vector to obtain a gated screening metallographic microscopic channel semantic association weight feature vector; taking the gated screening metallographic microscopic channel semantic association weight feature vector as the weight feature vector, calculating the channel-by-channel multiplication of the gated screening metallographic microscopic channel semantic association weight feature vector with the carbon fiber sucker rod cross section metallographic microscopic semantic feature map to obtain the carbon fiber sucker rod cross section metallographic microscopic enhanced semantic feature map.
[0016] According to the online defect detection system and method of carbon fiber sucker rods of the embodiments of the present disclosure, the system and method obtain a cross-sectional metallographic microscopic image of the carbon fiber sucker rod to be detected, and use an intelligent algorithm to capture the shallow features and image semantic features in the cross-sectional metallographic microscopic image, and introduce an attention mechanism to adaptively enhance the image semantic features to optimize the expression of the image semantic features, and then perform multi-scale integration and fusion of the shallow features and the optimized image semantic features to form a comprehensive defect feature representation. In this way, automatic defect recognition and detection of carbon fiber sucker rods can be achieved based on this comprehensive defect feature representation. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings of the embodiments of the present disclosure. Obviously, the drawings described below only relate to some embodiments of the present disclosure, and are not intended to limit the present disclosure.
[0018] Figure 1 A schematic diagram of the application architecture of the online defect detection method for carbon fiber sucker rods in an embodiment of the present disclosure is shown.
[0019] Figure 2 A flow chart of an online defect detection method for a carbon fiber sucker rod in an embodiment of the present disclosure is shown.
[0020] Figure 3 A cross-sectional metallographic micrograph of a carbon fiber sucker rod in an embodiment of the present disclosure is shown.
[0021] Figure 4 A flowchart of sub-step S530 of the online defect detection method for carbon fiber sucker rods in an embodiment of the present disclosure is shown.
[0022] Figure 5 A flowchart of sub-step S540 of the online defect detection method for carbon fiber sucker rods in an embodiment of the present disclosure is shown.
[0023] Figure 6 A structural schematic diagram of an online defect detection system for a carbon fiber sucker rod in an embodiment of the present disclosure is shown.
[0024] Figure 7 A schematic diagram of a storage medium according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present disclosure will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present disclosure, rather than all embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work also fall within the scope of protection of the present disclosure.
[0026] The terms used in this specification are those general terms currently widely used in the art in consideration of the functions of the present disclosure, but these terms may vary according to the intention of a person of ordinary skill in the art, precedents, or new technologies in the art. In addition, specific terms may be selected by the applicant, and in this case, their detailed meanings will be described in the detailed description of the present disclosure. Therefore, the terms used in the specification should not be understood as simple names, but rather as an overall description based on the meaning of the terms and the present disclosure.
[0027] Although the present disclosure makes various references to certain modules in the system according to embodiments of the present disclosure, any number of different modules can be used and run on a user terminal and / or server. The modules are illustrative only, and different aspects of the systems and methods can use different modules.
[0028] Flowcharts are used in this disclosure to illustrate the operations performed by the system according to the embodiments of the present disclosure. It should be understood that the preceding or following operations are not necessarily performed precisely in order. On the contrary, various steps may be processed in reverse order or simultaneously as required. At the same time, other operations may also be added to these processes, or one or more operations may be removed from these processes.
[0029] Figure 1 A schematic diagram of the application architecture of the online defect detection method for carbon fiber sucker rods in an embodiment of the present disclosure is shown, including a server 100 and a terminal device 200.
[0030] The terminal device 200 and the server 100 can be connected via the Internet to achieve mutual communication. Optionally, the above-mentioned Internet uses standard communication technology and / or protocol. The Internet is usually the Internet, but it can also be any network, including but not limited to any combination of a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or a virtual private network. In some embodiments, the data exchanged through the network can be represented by technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec), etc. can be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies.
[0031] The server 100 can provide various network services for the terminal device 200, wherein the server 100 can be a single server, a server cluster consisting of several servers, or a cloud computing center. Specifically, the server 100 may include a processor 110 (Center Processing Unit, CPU), a memory 120, an input device 130, and an output device 140, etc. The input device 130 may include a keyboard, a mouse, a touch screen, etc., and the output device 140 may include a display device, such as a liquid crystal display (Liquid Crystal Display, LCD), a cathode ray tube (Cathode Ray Tube, CRT), etc.
[0032] The memory 120 may include a read-only memory (ROM) and a random access memory (RAM), and provides the processor 110 with program instructions and data stored in the memory 120. In the embodiment of the present disclosure, the memory 120 may be used to store the program of the online defect detection method for carbon fiber sucker rods in the embodiment of the present disclosure.
[0033] The processor 110 calls the program instructions stored in the memory 120, and the processor 110 is used to execute the steps of any one of the online defect detection methods for carbon fiber sucker rods in the embodiments of the present disclosure according to the obtained program instructions.
[0034] In addition, the application architecture diagram in the embodiment of the present disclosure is intended to more clearly illustrate the technical solution in the embodiment of the present disclosure, and does not constitute a limitation on the technical solution provided in the embodiment of the present disclosure. Of course, for other application architectures and business applications, the technical solution provided in the embodiment of the present disclosure is also applicable to similar problems.
[0035] The following is a non-restrictive description of the online defect detection method for carbon fiber sucker rods provided according to at least one embodiment of the present disclosure through several examples or embodiments. As described below, different features in these specific examples or embodiments can be combined with each other without conflicting with each other to obtain new examples or embodiments, and these new examples or embodiments also fall within the scope of protection of the present disclosure.
[0036] In response to the above technical problems, the technical concept of the present application is to obtain a cross-sectional metallographic microscopic image of the carbon fiber sucker rod to be inspected, combine it with an intelligent algorithm to capture the shallow features and image semantic features in the cross-sectional metallographic microscopic image, and introduce an attention mechanism to adaptively enhance the image semantic features to optimize the expression of the image semantic features, and then integrate and fuse the shallow features with the optimized image semantic features at multiple scales to form a comprehensive defect feature representation. In this way, automatic defect recognition and detection of carbon fiber sucker rods can be achieved based on this comprehensive defect feature representation.
[0037] Based on this, Figure 2 The flowchart of the online defect detection method of the carbon fiber sucker rod in the embodiment of the present disclosure is shown. For example, the online defect detection method of the carbon fiber sucker rod can be executed by a server, which can be Figure 1 The server 100 shown in FIG. Figure 2As shown, the online defect detection method of the carbon fiber sucker rod according to the embodiment of the present disclosure includes the following steps: S510, obtaining a cross-sectional metallographic microscopic image of the carbon fiber sucker rod to be detected; S520, performing multi-scale image feature extraction on the cross-sectional metallographic microscopic image to obtain a carbon fiber sucker rod cross-sectional metallographic microscopic shallow feature map and a carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map; S530, inputting the carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map into a category-guided enhanced attention adaptive allocation network based on a gating mechanism to obtain a carbon fiber sucker rod cross-sectional metallographic microscopic enhanced semantic feature map; S540, performing feature integration on the carbon fiber sucker rod cross-sectional metallographic microscopic shallow feature map and the carbon fiber sucker rod cross-sectional metallographic microscopic enhanced semantic feature map to obtain a carbon fiber sucker rod cross-sectional metallographic fiber multi-scale fusion representation map; S550, determining the detection result of the carbon fiber sucker rod to be detected based on the carbon fiber sucker rod cross-sectional metallographic fiber multi-scale fusion representation map.
[0038] Specifically, in the technical solution of the present application, first, a cross-sectional metallographic microscopic image of the carbon fiber sucker rod to be tested is obtained. Figure 3 As shown, the cross-sectional metallographic microscopic image can provide the material microstructure information of the carbon fiber sucker rod to be tested, such as grain structure and fiber arrangement, etc., which can reflect the defects of the sucker rod, such as holes and cracks. It is worth mentioning that in actual application scenarios, obtaining the cross-sectional metallographic microscopic image of the carbon fiber sucker rod to be tested requires the use of specific technologies to allow the cross-sectional metallographic microscopic image to be obtained without interrupting production. For example, an optical window is set, that is, a transparent optical window is installed at a specific part of the sucker rod, allowing the imaging device to observe the internal structure of the sucker rod through these windows. For another example, by using high-speed imaging technology, images can be captured in a very short time, reducing the impact on the normal operation of the sucker rod to achieve online acquisition of images, thereby achieving real-time or near real-time defect detection. It is worth mentioning that from the cross-sectional metallographic microscopic image, it can be seen that the carbon core layer has no micron-level holes and the cross section is dense, indicating that the carbon fiber and the resin are well combined and the resin is completely infiltrated.
[0039] Then, the cross-sectional metallographic microscopic image of the carbon fiber sucker rod to be tested is input into the carbon fiber sucker rod cross-sectional metallographic microscopic image feature extractor based on the dilated pyramid network to obtain the carbon fiber sucker rod cross-sectional metallographic microscopic shallow feature map and the carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map. That is, the dilated / atrous convolutional network is used to capture the multi-scale features in the cross-sectional metallographic microscopic image of the carbon fiber sucker rod to be tested, such as shallow features such as edges and textures, and more abstract semantic features such as fiber arrangement.
[0040] Considering that in the feature map obtained by the carbon fiber sucker rod cross-section metallographic microscopic image feature extractor based on the hollow pyramid network, not all channel features are equally important to the final target task, namely defect detection. In particular, for the carbon fiber sucker rod cross-section metallographic microscopic semantic feature map containing more abstract features, if too much background or unimportant information is mixed in the feature distribution, it will have an adverse effect on the deep semantic feature expression and defect feature recognition of the cross-section metallographic microscopic image of the carbon fiber sucker rod. To this end, in the technical solution of the present application, the carbon fiber sucker rod cross-section metallographic microscopic semantic feature map is input into the category-oriented enhanced attention adaptive allocation network based on the gating mechanism to obtain the carbon fiber sucker rod cross-section metallographic microscopic enhanced semantic feature map. In this way, the category-oriented enhanced attention adaptive allocation network based on the gating mechanism can adaptively highlight the features most relevant to a specific defect category. For example, for crack defects, the model may enhance the channel features representing the crack edge or crack depth.
[0041] Correspondingly, in step S520, multi-scale image feature extraction is performed on the cross-sectional metallographic microscopic image to obtain a carbon fiber sucker rod cross-sectional metallographic microscopic shallow feature map and a carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map, including: inputting the cross-sectional metallographic microscopic image of the carbon fiber sucker rod to be detected into a carbon fiber sucker rod cross-sectional metallographic microscopic image feature extractor based on a hollow pyramid network to obtain the carbon fiber sucker rod cross-sectional metallographic microscopic shallow feature map and the carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map.
[0042] More specifically, in a specific example of the present application, the specific implementation process of inputting the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod into the category-oriented enhanced attention adaptive allocation network based on the gating mechanism to obtain the metallographic microscopic enhanced semantic feature map of the cross section of the carbon fiber sucker rod includes: first, performing global pooling processing based on the maximum value, global pooling processing based on the random value, and global pooling processing based on the average value on the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod to obtain the cross section metallographic microscopic semantic global maximum pooling feature vector, the cross section metallographic microscopic semantic global mean pooling feature vector, and the cross section metallographic microscopic semantic global random value pooling feature vector. Here, in the technical solution of the present application, different types of pooling operations are used to capture the diversified global feature information of the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod. Among them, the global pooling based on the maximum value can capture the maximum response in the local area, which may correspond to the significant features of each feature matrix along the channel dimension in the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod; while the global pooling based on the average value provides the average information of the local area, which can reflect the overall feature representation of the local area; in addition, the global pooling processing based on the average value can randomly select the elements in the local area according to the probability value, so as to avoid the excessive influence of the interference value on the representation of the global feature information and help to retain the diversity features in the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod. Then, the cross-section metallographic microscopic semantic global maximum pooling feature vector, the cross-section metallographic microscopic semantic global mean pooling feature vector and the cross-section metallographic microscopic semantic global random value pooling feature vector are fused to obtain the cross-section metallographic microscopic global semantic multi-scale representation vector. Then, the cross-section metallographic microscopic global semantic multi-scale representation vector is passed through a fully connected layer to perform channel-by-channel semantic feature interaction and feature activation on the cross-section metallographic microscopic global semantic multi-scale representation vector to obtain the cross-section metallographic microscopic channel semantic association feature vector. Here, the fully connected layer is used to perform channel-by-channel feature interaction and activation on the cross-sectional metallographic microscopic global semantic multi-scale representation vector, which helps to further extract and strengthen the relevance and importance between features. Subsequently, the cross-sectional metallographic microscopic channel semantic association feature vector is input into the gating unit to screen the features and retain the features with high relevance to the target task, thereby obtaining the gated screened cross-sectional metallographic microscopic channel semantic association feature vector. After this, the gated screened cross-sectional metallographic microscopic channel semantic association feature vector is normalized to ensure that each feature value is on the same scale, thereby obtaining the gated screened cross-sectional metallographic microscopic channel semantic association weight feature vector.Finally, the gated screening cross-sectional metallographic microscopic channel semantic association weight feature vector is used as the weight feature vector, and its channel-by-channel point multiplication with the carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map is calculated to achieve adaptive enhancement guided by the category characteristics of the carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map itself, thereby obtaining the carbon fiber sucker rod cross-sectional metallographic microscopic enhanced semantic feature map.
[0043] Accordingly, if Figure 4 As shown, in step S530, the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod is input into the category-oriented enhanced attention adaptive allocation network based on the gating mechanism to obtain the metallographic microscopic enhanced semantic feature map of the cross section of the carbon fiber sucker rod, including: S531, performing global pooling processing based on the maximum value, global pooling processing based on the random value, and global pooling processing based on the average value on the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod to obtain the cross-section metallographic microscopic semantic global maximum pooling feature vector, the cross-section metallographic microscopic semantic global mean pooling feature vector, and the cross-section metallographic microscopic semantic global random value pooling feature vector; S532, fusing the cross-section metallographic microscopic semantic global maximum pooling feature vector, the cross-section metallographic microscopic semantic global mean pooling feature vector, and the cross-section metallographic microscopic semantic global random value pooling feature vector to obtain the cross-section metallographic microscopic semantic global maximum pooling feature vector, the cross-section metallographic microscopic semantic global mean pooling feature vector, and the cross-section metallographic microscopic semantic global random value pooling feature vector. S533, performing channel-by-channel semantic feature interaction and feature activation on the cross-sectional metallographic microscopic global semantic multi-scale representation vector to obtain a cross-sectional metallographic microscopic channel semantic association feature vector; S534, inputting the cross-sectional metallographic microscopic channel semantic association feature vector into a gating unit to obtain a gated screening cross-sectional metallographic microscopic channel semantic association feature vector; S535, normalizing the gated screening cross-sectional metallographic microscopic channel semantic association feature vector to obtain a gated screening cross-sectional metallographic microscopic channel semantic association weight feature vector; S536, using the gated screening cross-sectional metallographic microscopic channel semantic association weight feature vector as a weight feature vector, calculating the channel-by-channel point multiplication of the gated screening cross-sectional metallographic microscopic channel semantic association weight feature vector with the carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map to obtain the carbon fiber sucker rod cross-sectional metallographic microscopic enhanced semantic feature map.
[0044] Among them, in step S532, the cross-section metallographic microscopy semantic global maximum pooling feature vector, the cross-section metallographic microscopy semantic global mean pooling feature vector and the cross-section metallographic microscopy semantic global random value pooling feature vector are fused to obtain the cross-section metallographic microscopy global semantic multi-scale representation vector, including: determining the first semantic pooling fusion weight, the second semantic pooling fusion weight and the third semantic pooling fusion weight; calculating the dot product of the first semantic pooling fusion weight and the cross-section metallographic microscopy semantic global mean pooling feature vector, the dot product of the second semantic pooling fusion weight and the cross-section metallographic microscopy semantic global maximum pooling feature vector and the dot product of the third semantic pooling fusion weight and the cross-section metallographic microscopy semantic global random value pooling feature vector, and adding them element by element according to position to obtain the cross-section metallographic microscopy global semantic multi-scale representation vector.
[0045] Among them, in step S533, the cross-sectional metallographic microscopic global semantic multi-scale representation vector is subjected to channel-by-channel semantic feature interaction and feature activation to obtain the cross-sectional metallographic microscopic channel semantic association feature vector, including: passing the cross-sectional metallographic microscopic global semantic multi-scale representation vector through a fully connected layer to perform channel-by-channel semantic feature interaction and feature activation on the cross-sectional metallographic microscopic global semantic multi-scale representation vector to obtain the cross-sectional metallographic microscopic channel semantic association feature vector.
[0046] Specifically, in one example, the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod is input into a category-oriented enhanced attention adaptive allocation network based on a gating mechanism to obtain a metallographic microscopic enhanced semantic feature map of the cross section of the carbon fiber sucker rod, including: inputting the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod into the category-oriented enhanced attention adaptive allocation network based on a gating mechanism and processing it with the following semantic enhancement formula to obtain the metallographic microscopic enhanced semantic feature map of the cross section of the carbon fiber sucker rod; wherein the semantic enhancement formula is: ;in, This is the metallographic microscopy semantic feature diagram of the cross section of the carbon fiber sucker rod. , and They represent global pooling based on average value, global pooling based on maximum value, and global pooling based on random value. , and They are the first semantic pooling fusion weight, the second semantic pooling fusion weight, and the third semantic pooling fusion weight. is the cross-sectional metallographic microscopic global semantic multi-scale representation vector, and are the weights and biases of the fully connected layer, for Activation function, is the semantic association feature vector of the cross-sectional metallographic microchannel, is the masking process of the gating unit, is the semantic association feature vector of the gated screening cross-section metallographic microscopic channel, is the first in the semantic association feature vector of the gated screening cross-section metallographic microscopic channel eigenvalues, is the semantic association weight feature vector of the gated screening cross-section metallographic microscopic channel, represents the channel-by-channel dot product of the feature vector and the feature map, It is a metallographic microscopic enhancement semantic feature diagram of the cross section of the carbon fiber sucker rod.
[0047] It should be understood that fusing the carbon fiber sucker rod cross-section metallographic microscopic shallow feature map and the carbon fiber sucker rod cross-section metallographic microscopic enhanced semantic feature map can form a comprehensive defect feature representation of the carbon fiber sucker rod. However, traditional feature fusion techniques, such as simple weighted summation at the pixel level or direct splicing between channels, may ignore the potential differences between features at the semantic level and detail level. In order to solve this problem, in the technical solution of the present application, further, the carbon fiber sucker rod cross-section metallographic microscopic shallow feature map and the carbon fiber sucker rod cross-section metallographic microscopic enhanced semantic feature map are passed through a semantic-guided multi-channel feature integration module to obtain a carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation map. Among them, the semantic-guided multi-channel feature integration module is based on an attention mechanism, and uses the semantic features in the carbon fiber sucker rod cross-section metallographic microscopic enhanced semantic feature map as guiding information to optimize the feature integration process. In this way, the model can more accurately identify and focus on the key foreground objects of the cross-section metallographic microscopic image of the carbon fiber sucker rod to be detected, especially those subtle cracks or holes.
[0048] Correspondingly, in step S540, the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are feature integrated to obtain a multi-scale fusion representation map of the metallographic fiber of the carbon fiber sucker rod cross section, including: the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are integrated through a semantic-guided multi-channel feature integration module to obtain a multi-scale fusion representation map of the metallographic fiber of the carbon fiber sucker rod cross section.
[0049] More specifically, in the embodiment of the present application, the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are integrated channel by channel to achieve guided fusion of semantic features, and through multi-mode pooling processing, the fusion feature distribution guided by semantic features is globally concentrated and represented, and this global concentrated representation is used as a weight distribution in the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section, thereby obtaining the metallographic fiber multi-scale fusion representation map of the carbon fiber sucker rod cross section. In this way, the effective combination of features at different levels is promoted, and the representation capability of defect features is enhanced.
[0050] Accordingly, if Figure 5 As shown, in step S540, the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are integrated through a semantic-guided multi-channel feature integration module to obtain a metallographic fiber multi-scale fusion representation map of the carbon fiber sucker rod cross section, including: S541, cascading the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section and the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section to obtain a metallographic microscopic semantic-shallow tandem feature map of the carbon fiber sucker rod cross section; S542, S543, performing data distribution balance normalization processing on the metallographic microscopy semantic-shallow correlation feature map of the carbon fiber sucker rod cross section to obtain a normalized carbon fiber sucker rod cross section metallographic microscopy semantic-shallow correlation feature map; S544, performing global pooling processing based on the maximum value, global pooling processing based on the random value and Global pooling processing based on the average value is used to obtain the global maximum pooling feature vector of the metallographic microstructure semantics-shallow association of the carbon fiber sucker rod cross section, the global mean pooling feature vector of the metallographic microstructure semantics-shallow association of the carbon fiber sucker rod cross section, and the global random value pooling feature vector of the metallographic microstructure semantics-shallow association of the carbon fiber sucker rod cross section; S545, calculating the global maximum pooling feature vector of the metallographic microstructure semantics-shallow association of the carbon fiber sucker rod cross section, the global mean pooling feature vector of the metallographic microstructure semantics-shallow association of the carbon fiber sucker rod cross section, and the carbon fiber The position-weighted sum of the metallographic microscopic semantic-shallow association global random value pooling feature vectors of the sucker rod cross section is performed to obtain a carbon fiber sucker rod cross section metallographic microscopic semantic-shallow association feature multi-scale pooling representation vector; S546, using the eigenvalue of each position in the carbon fiber sucker rod cross section metallographic microscopic semantic-shallow association feature multi-scale pooling representation vector as a weight, weighting each feature matrix along the channel dimension of the carbon fiber sucker rod cross section metallographic microscopic shallow feature map to obtain the carbon fiber sucker rod cross section metallographic fiber multi-scale fusion representation map.
[0051] Wherein, in step S543, the data distribution balance normalization processing is performed on the metallographic microscopic semantic-shallow correlation feature map of the cross section of the carbon fiber sucker rod to obtain a normalized carbon fiber sucker rod cross section metallographic microscopic semantic-shallow correlation feature map, including: batch normalization processing is performed on the metallographic microscopic semantic-shallow correlation feature map of the cross section of the carbon fiber sucker rod to obtain the normalized carbon fiber sucker rod cross section metallographic microscopic semantic-shallow correlation feature map.
[0052] Specifically, in one example, the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are processed by a semantic-guided multi-channel feature integration module to obtain a multi-scale fusion representation map of the metallographic fiber of the carbon fiber sucker rod cross section, including: the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are processed by the semantic-guided multi-channel feature integration module with the following multi-scale fusion formula to obtain a multi-scale pooling representation vector of the metallographic microscopic semantic-shallow correlation feature of the carbon fiber sucker rod cross section; wherein the multi-scale fusion formula is: ;in, and They are respectively the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section and the metallographic microscopic shallow layer feature map of the carbon fiber sucker rod cross section, Indicates cascade, represents convolutional coding, represents batch normalization processing, is the normalized carbon fiber sucker rod cross-section metallographic microscopy semantic-shallow correlation feature map, , and They represent global pooling based on average value, global pooling based on maximum value, and global pooling based on random value. , and They are the first weight hyperparameter, the second weight hyperparameter, and the third weight hyperparameter, It is a multi-scale pooling representation vector of the metallographic microscopic semantic-shallow correlation features of the cross-section of the carbon fiber sucker rod; then, the eigenvalues of each position in the multi-scale pooling representation vector of the metallographic microscopic semantic-shallow correlation features of the cross-section of the carbon fiber sucker rod are used as weights, and each feature matrix along the channel dimension of the metallographic microscopic shallow feature map of the cross-section of the carbon fiber sucker rod is weighted to obtain a multi-scale fusion representation map of the metallographic fiber of the cross-section of the carbon fiber sucker rod.
[0053] Then, the multi-scale fusion representation image of the metallographic fiber of the cross section of the carbon fiber sucker rod is input into a defect detector based on a classifier to obtain a detection result, and the detection result is used to indicate whether the carbon fiber sucker rod to be detected has defects.
[0054] Accordingly, in step S550, based on the multi-scale fusion representation image of the metallographic fiber of the carbon fiber sucker rod cross section, the detection result of the carbon fiber sucker rod to be inspected is determined, including: inputting the multi-scale fusion representation image of the metallographic fiber of the carbon fiber sucker rod cross section into a classifier-based defect detector to obtain the detection result, and the detection result is used to indicate whether the carbon fiber sucker rod to be inspected has defects.
[0055] It should be understood that the role of the classifier is to use the given categories and known training data to learn classification rules and classifiers, and then classify (or predict) unknown data. Logistic regression, SVM, etc. are often used to solve binary classification problems. For multi-class classification problems, logistic regression or SVM can also be used, but multiple binary classifications are required to form a multi-classification, but this is prone to errors and inefficient. Commonly used multi-classification methods include the Softmax classification function.
[0056] In a preferred embodiment, the input of the carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation image into a classifier-based defect detector to obtain a detection result includes the following steps: expanding the carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation image into a carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation vector; determining a first carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion eigenvalue and a second carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion eigenvalue at any two different positions of the carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation vector; determining the carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation vector by classifying The defect probability value indicating that the carbon fiber sucker rod to be detected has defects and the non-defect probability value indicating that the carbon fiber sucker rod to be detected has no defects are obtained by the classifier; the defect probability value is divided by the non-defect probability value to obtain the relative class probability distribution value of the metallographic fiber multi-scale fusion of the carbon fiber sucker rod cross section; the defect probability value is multiplied by the non-defect probability value to obtain the metallographic fiber multi-scale fusion collaborative class probability distribution value of the carbon fiber sucker rod cross section; the first carbon fiber sucker rod cross section metallographic fiber multi-scale fusion characteristic value and the second carbon fiber sucker rod cross section metallographic fiber multi-scale fusion characteristic value are respectively subtracted from the carbon fiber sucker rod cross section metallographic fiber multi-scale fusion characteristic value. The relative class probability distribution values are fused and multiplied to obtain the relative joint representation of the metallographic fiber multi-scale fusion of the carbon fiber sucker rod cross section; the first carbon fiber sucker rod cross section metallographic fiber multi-scale fusion characteristic value and the second carbon fiber sucker rod cross section metallographic fiber multi-scale fusion characteristic value are added and then divided by the carbon fiber sucker rod cross section metallographic fiber multi-scale fusion synergistic class probability distribution value to obtain the carbon fiber sucker rod cross section metallographic fiber multi-scale fusion system response representation; the carbon fiber sucker rod cross section metallographic fiber multi-scale fusion relative joint representation and the carbon fiber sucker rod cross section metallographic fiber multi-scale fusion system response representation are added as the first carbon fiber sucker rod cross section metallographic fiber multi-scale fusion relative joint representation. The matrix values at the coordinates corresponding to different positions of the metallographic fiber multi-scale fusion eigenvalues of the rod cross section and the metallographic fiber multi-scale fusion eigenvalues of the second carbon fiber sucker rod cross section are calculated to obtain the metallographic fiber multi-scale fusion correction matrix of the carbon fiber sucker rod cross section; the inner product of each row vector of the carbon fiber sucker rod cross section metallographic fiber multi-scale fusion correction matrix and the carbon fiber sucker rod cross section metallographic fiber multi-scale fusion representation vector is calculated to obtain the optimized carbon fiber sucker rod cross section metallographic fiber multi-scale fusion representation vector; and the optimized carbon fiber sucker rod cross section metallographic fiber multi-scale fusion representation vector is input into the defect detector based on the classifier to obtain the detection result.
[0057] That is, with respect to the carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation map, when the semantic features of the shallow and deep images of the cross-section metallographic microscopic image of the carbon fiber sucker rod to be detected are subjected to cross-depth semantic-guided fusion, the semantic-guided fusion difference of the semantic feature distribution of images at different depths causes the local distribution difference of the carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation map, thereby affecting the classification iteration effect. In the above preferred embodiment, the relative class probability distribution form of the defect class probability and the non-defect class probability and the collaborative class probability distribution form of the carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation map are obtained by the classifier as a feature set using the feature value of the carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation map as a unit. , respectively, perform relativity-based joint characterization and synergy-based response characterization of the eigenvalue pairs of the metallographic fiber multi-scale fusion representation diagram of the carbon fiber sucker rod cross section, so as to avoid the class induction bias caused by the corresponding local distribution differences between the eigenvalues of the metallographic fiber multi-scale fusion representation diagram of the carbon fiber sucker rod cross section, so as to establish a robust understanding paradigm for class cognition of the metallographic fiber multi-scale fusion representation diagram of the carbon fiber sucker rod cross section as a whole as a feature set, thereby improving the iterative effect of the metallographic fiber multi-scale fusion representation diagram of the carbon fiber sucker rod cross section as a feature set in the classification process, that is, to improve the classification training speed and the accuracy of the classification results when the metallographic fiber multi-scale fusion representation diagram of the carbon fiber sucker rod cross section is classified by the defect detector.
[0058] In another preferred embodiment, the online defect detection method for carbon fiber sucker rods further includes: a training phase, for training the carbon fiber sucker rod cross-section metallographic microscopic image feature extractor based on a hollow pyramid network, the category-guided enhanced attention adaptive allocation network based on a gating mechanism, the semantic-guided multi-channel feature integration module, and the classifier-based defect detector; wherein the training phase includes: obtaining a training cross-section metallographic microscopic image of the carbon fiber sucker rod to be detected; inputting the training cross-section metallographic microscopic image of the carbon fiber sucker rod to be detected into the carbon fiber sucker rod cross-section metallographic microscopic image feature extractor based on a hollow pyramid network to obtain a training carbon fiber sucker rod cross-section metallographic microscopic shallow feature map and a training carbon fiber sucker rod cross-section metallographic microscopic semantic feature map; inputting the training carbon fiber sucker rod cross-section metallographic microscopic semantic feature map into the category-guided enhanced attention adaptive allocation network based on a gating mechanism to obtain a training carbon fiber sucker rod cross-section metallographic microscopic shallow feature map. The invention discloses a method for preparing a micro-enhanced semantic feature map of a carbon fiber sucker rod cross section; the method comprises the steps of: passing the metallographic microscopic shallow feature map of the training carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the training carbon fiber sucker rod cross section through a semantic-guided multi-channel feature integration module to obtain a metallographic fiber multi-scale fusion representation map of the training carbon fiber sucker rod cross section; inputting the metallographic fiber multi-scale fusion representation map of the training carbon fiber sucker rod cross section into a defect detector based on a classifier to obtain a classification loss function value; based on the classification loss function value, the carbon fiber sucker rod cross section metallographic microscopic image feature extractor based on a hollow pyramid network, the category-guided enhanced attention adaptive allocation network based on a gating mechanism, the semantic-guided multi-channel feature integration module and the defect detector based on a classifier are trained, wherein each time the metallographic fiber multi-scale fusion representation map of the training carbon fiber sucker rod cross section is classified and iterated through the defect detector based on the classifier, the metallographic fiber multi-scale fusion representation map of the training carbon fiber sucker rod cross section is corrected.
[0059] Here, when the cross-depth semantic-guided fusion of the shallow and deep image semantic features of the training cross-sectional metallographic microscopic image of the carbon fiber sucker rod to be detected is performed on the training carbon fiber sucker rod cross-sectional metallographic fiber multi-scale fusion representation map, due to the semantic-guided fusion difference of the distribution of semantic features of images at different depths, the local distribution difference of the training carbon fiber sucker rod cross-sectional metallographic fiber multi-scale fusion representation map is caused, which affects the category harmony of the training carbon fiber sucker rod cross-sectional metallographic fiber multi-scale fusion representation map for the classifier predetermined category, thereby reducing the classification training effect. Based on this, each time the training carbon fiber sucker rod cross-sectional metallographic fiber multi-scale fusion representation map is classified and iterated by the classifier-based defect detector, the training carbon fiber sucker rod cross-sectional metallographic fiber multi-scale fusion representation map is corrected.
[0060] Specifically, each time the training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation image is classified and iterated by a defect detector based on a classifier, the training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation image is corrected, including: firstly, the training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation image is expanded into a training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation vector, the training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation vector is transformed with its own autocorrelation matrix, and the first and The inner product of the row vectors is used as the first The matrix value of the position is obtained to obtain a weight matrix, and then the weight matrix is matrix-multiplied with the autocorrelation matrix, and then further matrix-vector multiplied with the training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation vector to obtain a correction vector, and finally the correction vector is dot-multiplied with the training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation vector to obtain a corrected training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation vector, and the corrected training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation vector is restored to a corrected training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation map.
[0061] In this way, based on the self-correlation dimension of the training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation vector expanded based on the training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation graph as the object to be modulated, correlation expansion is performed based on the spatial sub-dimensional complexity of the high-dimensional feature space of the feature distribution, thereby introducing the decomposable correlation dimension offset of the training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation vector into the heterogeneous correlation embedding space, thereby enhancing its correlation self-consistency through the joint fine-tuning of the decomposable dimension set represented by the heterogeneous correlation embedding space, so as to improve the predetermined category harmony of the feature set of the training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation vector in the associated target classification domain, thereby improving the training effect of the training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation graph through the classifier.
[0062] Based on the above embodiments, see Figure 6, which is a schematic structural diagram of an online defect detection system 800 for a carbon fiber sucker rod in an embodiment of the present disclosure. The online defect detection system 800 of the carbon fiber sucker rod comprises: an image acquisition module 810, which is used to obtain a cross-sectional metallographic microscopic image of the carbon fiber sucker rod to be detected; a multi-scale image feature extraction module 820, which is used to perform multi-scale image feature extraction on the cross-sectional metallographic microscopic image to obtain a carbon fiber sucker rod cross-sectional metallographic microscopic shallow feature map and a carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map; a semantic enhancement module 830, which is used to input the carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map into a category-oriented enhanced attention adaptive allocation network based on a gating mechanism to obtain a carbon fiber sucker rod cross-sectional metallographic microscopic enhanced semantic feature map; a feature integration module 840, which is used to perform feature integration on the carbon fiber sucker rod cross-sectional metallographic microscopic shallow feature map and the carbon fiber sucker rod cross-sectional metallographic microscopic enhanced semantic feature map to obtain a carbon fiber sucker rod cross-sectional metallographic fiber multi-scale fusion representation map; and a detection confirmation module 850, which is used to determine the detection result of the carbon fiber sucker rod to be detected based on the carbon fiber sucker rod cross-sectional metallographic fiber multi-scale fusion representation map.
[0063] Here, those skilled in the art will appreciate that the specific functions and operations of each module in the online defect detection system 800 for carbon fiber sucker rods have been described in detail above. Figures 2 to 5 The online defect detection method of the carbon fiber sucker rod has been described in detail, and therefore, its repeated description will be omitted.
[0064] Based on the above embodiments, another exemplary embodiment of an electronic device is also provided in the embodiments of the present disclosure. In some possible implementations, the electronic device in the embodiments of the present disclosure may include a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the steps of the online defect detection method for carbon fiber sucker rods in the above embodiments can be implemented when the processor executes the program.
[0065] For example, the electronic device is disclosed in the present invention Figure 1 Taking the server 100 in the example as an example, the processor in the electronic device is the processor 110 in the server 100, and the memory in the electronic device is the memory 120 in the server 100.
[0066] An embodiment of the present disclosure also provides a computer-readable storage medium. Figure 7 FIG. 1 is a schematic diagram of a computer-readable storage medium 1000 according to an embodiment of the present disclosure. Figure 7As shown, the computer-readable storage medium 1000 stores computer-executable instructions 1001. When the computer-executable instructions 1001 are executed by the processor, the online defect detection method of the carbon fiber sucker rod according to the embodiment of the present disclosure described with reference to the above figures can be executed. The computer-readable storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc.
[0067] The embodiments of the present disclosure also provide a computer program product or a computer program, which includes computer executable instructions, which are stored in a computer-readable storage medium. The processor of the computer device reads the computer executable instructions from the computer-readable storage medium, and the processor executes the computer executable instructions, so that the computer device executes the online defect detection method of the carbon fiber sucker rod according to the embodiments of the present disclosure.
[0068] Those skilled in the art will appreciate that the contents disclosed in this disclosure may be subject to various modifications and improvements. For example, the various devices or components described above may be implemented by hardware, or by software, firmware, or a combination of some or all of the three.
[0069] In addition, although the present disclosure makes various references to certain units in the system according to embodiments of the present disclosure, any number of different units may be used and run on the client and / or server. The units are illustrative only, and different aspects of the systems and methods may use different units.
[0070] Those skilled in the art will appreciate that all or part of the steps in the above method can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk. Optionally, all or part of the steps in the above embodiment can also be implemented using one or more integrated circuits. Accordingly, each module / unit in the above embodiment can be implemented in the form of hardware or in the form of a software functional module. The present disclosure is not limited to any particular form of combination of hardware and software.
[0071] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present disclosure belongs. It should also be understood that terms such as those defined in common dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology and should not be interpreted in an idealized or highly formal sense, unless explicitly defined as such herein.
[0072] The above is an explanation of the present disclosure and should not be considered as a limitation thereof. Although several exemplary embodiments of the present disclosure have been described, it will be readily understood by those skilled in the art that many modifications may be made to the exemplary embodiments without departing from the novel teachings and advantages of the present disclosure. Therefore, all such modifications are intended to be included within the scope of the present disclosure as defined in the claims. It should be understood that the above is an explanation of the present disclosure and should not be considered as being limited to the specific embodiments disclosed, and modifications to the disclosed embodiments and other embodiments are intended to be included within the scope of the appended claims. The present disclosure is defined by the claims and their equivalents.
Claims
1. An online defect detection method for a carbon fiber sucker rod, characterized in that: include: Obtain a cross-sectional metallographic microscopic image of the carbon fiber sucker rod to be tested; Performing multi-scale image feature extraction on the cross-sectional metallographic microscopic image to obtain a carbon fiber sucker rod cross-sectional metallographic microscopic shallow layer feature map and a carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map; Inputting the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod into a category-oriented enhanced attention adaptive allocation network based on a gating mechanism to obtain a metallographic microscopic enhanced semantic feature map of the cross section of the carbon fiber sucker rod; The metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are integrated to obtain a metallographic fiber multi-scale fusion representation map of the carbon fiber sucker rod cross section; Determine the test result of the carbon fiber sucker rod to be tested based on the multi-scale fusion representation of the metallographic fiber of the carbon fiber sucker rod cross section; The method of inputting the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod into a category-oriented enhanced attention adaptive allocation network based on a gating mechanism to obtain the metallographic microscopic enhanced semantic feature map of the cross section of the carbon fiber sucker rod comprises: The cross-section metallographic microsemantic feature map of the carbon fiber sucker rod is subjected to global pooling processing based on maximum value, global pooling processing based on random value and global pooling processing based on average value to obtain a cross-section metallographic microsemantic global maximum value pooling feature vector, a cross-section metallographic microsemantic global mean value pooling feature vector and a cross-section metallographic microsemantic global random value pooling feature vector; Fusion of the cross-sectional metallographic microscopy semantic global maximum pooling feature vector, the cross-sectional metallographic microscopy semantic global mean pooling feature vector and the cross-sectional metallographic microscopy semantic global random value pooling feature vector to obtain a cross-sectional metallographic microscopy global semantic multi-scale representation vector; Performing channel-by-channel semantic feature interaction and feature activation on the cross-sectional metallographic microscopic global semantic multi-scale representation vector to obtain a cross-sectional metallographic microscopic channel semantic association feature vector; Inputting the cross-sectional metallographic microscopic channel semantic association feature vector into a gating unit to obtain a gated screening cross-sectional metallographic microscopic channel semantic association feature vector; Normalizing the gated screening cross-section metallographic microscopic channel semantic association feature vector to obtain a gated screening cross-section metallographic microscopic channel semantic association weight feature vector; The gated screening cross-section metallographic microscopic channel semantic association weight feature vector is used as a weight feature vector, and its channel-by-channel point multiplication with the carbon fiber sucker rod cross-section metallographic microscopic semantic feature map is calculated to obtain the carbon fiber sucker rod cross-section metallographic microscopic enhanced semantic feature map; The metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are integrated to obtain a multi-scale fusion representation map of the metallographic fiber of the carbon fiber sucker rod cross section, including: The metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are integrated through a semantically guided multi-channel feature integration module to obtain a multi-scale fusion representation map of the metallographic fiber of the carbon fiber sucker rod cross section; The metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are integrated through a semantically guided multi-channel feature integration module to obtain a multi-scale fusion representation map of the metallographic fiber of the carbon fiber sucker rod cross section, including: The carbon fiber sucker rod cross-section metallographic microscopic enhanced semantic feature map and the carbon fiber sucker rod cross-section metallographic microscopic shallow layer feature map are cascaded to obtain a carbon fiber sucker rod cross-section metallographic microscopic semantic-shallow layer series feature map; The carbon fiber sucker rod cross-section metallographic microscopic semantic-shallow layer series feature map is convolutionally encoded to obtain a carbon fiber sucker rod cross-section metallographic microscopic semantic-shallow layer correlation feature map; Performing data distribution balance normalization processing on the metallographic microscopic semantic-shallow layer correlation feature map of the cross section of the carbon fiber sucker rod to obtain a normalized metallographic microscopic semantic-shallow layer correlation feature map of the cross section of the carbon fiber sucker rod; The normalized carbon fiber sucker rod cross-section metallographic microscopic semantic-shallow layer association feature map is subjected to maximum value-based global pooling processing, random value-based global pooling processing, and average value-based global pooling processing to obtain a carbon fiber sucker rod cross-section metallographic microscopic semantic-shallow layer association global maximum value pooling feature vector, a carbon fiber sucker rod cross-section metallographic microscopic semantic-shallow layer association global average pooling feature vector, and a carbon fiber sucker rod cross-section metallographic microscopic semantic-shallow layer association global random value pooling feature vector; Calculate the position-weighted sum of the metallographic micro-semantics-shallow association global maximum pooling feature vector of the carbon fiber sucker rod cross section, the metallographic micro-semantics-shallow association global mean pooling feature vector of the carbon fiber sucker rod cross section, and the metallographic micro-semantics-shallow association global random value pooling feature vector of the carbon fiber sucker rod cross section to obtain a multi-scale pooling representation vector of the metallographic micro-semantics-shallow association feature of the carbon fiber sucker rod cross section; Taking the eigenvalues of each position in the multi-scale pooling representation vector of the metallographic microscopic semantic-shallow correlation features of the carbon fiber sucker rod cross section as weights, each feature matrix along the channel dimension of the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section is weighted to obtain the multi-scale fusion representation map of the metallographic fiber of the carbon fiber sucker rod cross section.
2. The online defect detection method of carbon fiber sucker rod according to claim 1, characterized in that: The cross-sectional metallographic microscopic image is subjected to multi-scale image feature extraction to obtain a carbon fiber sucker rod cross-sectional metallographic microscopic shallow layer feature map and a carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map, including: The cross-sectional metallographic microscopic image of the carbon fiber sucker rod to be tested is input into a carbon fiber sucker rod cross-sectional metallographic microscopic image feature extractor based on a hollow pyramid network to obtain a carbon fiber sucker rod cross-sectional metallographic microscopic shallow feature map and a carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map.
3. The online defect detection method of carbon fiber sucker rod according to claim 2 is characterized in that: The cross-sectional metallographic microscopic semantic global maximum pooling feature vector, the cross-sectional metallographic microscopic semantic global mean pooling feature vector and the cross-sectional metallographic microscopic semantic global random value pooling feature vector are fused to obtain a cross-sectional metallographic microscopic global semantic multi-scale representation vector, including: Determining a first semantic pooling fusion weight, a second semantic pooling fusion weight, and a third semantic pooling fusion weight; The dot product of the first semantic pooling fusion weight and the cross-sectional metallographic microscopy semantic global mean pooling feature vector, the dot product of the second semantic pooling fusion weight and the cross-sectional metallographic microscopy semantic global maximum pooling feature vector, and the dot product of the third semantic pooling fusion weight and the cross-sectional metallographic microscopy semantic global random value pooling feature vector are calculated and added element by element to obtain the cross-sectional metallographic microscopy global semantic multi-scale representation vector.
4. The online defect detection method of carbon fiber sucker rod according to claim 3 is characterized in that: The cross-sectional metallographic microscopic global semantic multi-scale representation vector is subjected to channel-by-channel semantic feature interaction and feature activation to obtain a cross-sectional metallographic microscopic channel semantic association feature vector, including: The cross-sectional metallographic microscopic global semantic multi-scale representation vector is passed through a fully connected layer to perform channel-by-channel semantic feature interaction and feature activation on the cross-sectional metallographic microscopic global semantic multi-scale representation vector to obtain the cross-sectional metallographic microscopic channel semantic association feature vector.
5. The online defect detection method of carbon fiber sucker rod according to claim 4, characterized in that: Based on the multi-scale fusion representation of the metallographic fiber cross-section of the carbon fiber sucker rod, the detection result of the carbon fiber sucker rod to be detected is determined, including: The multi-scale fusion representation image of the metallographic fiber cross-section of the carbon fiber sucker rod is input into a classifier-based defect detector to obtain the detection result, and the detection result is used to indicate whether the carbon fiber sucker rod to be detected has defects.
6. The online defect detection method of carbon fiber sucker rod according to claim 5, characterized in that: Also includes: In the training phase, the carbon fiber sucker rod cross-section metallographic microscopic image feature extractor based on the hollow pyramid network, the category-guided enhanced attention adaptive allocation network based on the gating mechanism, the semantic-guided multi-channel feature integration module and the classifier-based defect detector are trained; The training phase includes: Obtaining a metallographic microscopic image of the training cross section of the carbon fiber sucker rod to be tested; Inputting the training cross-section metallographic microscopic image of the carbon fiber sucker rod to be tested into a carbon fiber sucker rod cross-section metallographic microscopic image feature extractor based on a hollow pyramid network to obtain a training carbon fiber sucker rod cross-section metallographic microscopic shallow feature map and a training carbon fiber sucker rod cross-section metallographic microscopic semantic feature map; Inputting the training carbon fiber sucker rod cross-section metallographic microscopic semantic feature map into a category-oriented enhanced attention adaptive allocation network based on a gating mechanism to obtain a training carbon fiber sucker rod cross-section metallographic microscopic enhanced semantic feature map; The metallographic microscopic shallow feature map of the training carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the training carbon fiber sucker rod cross section are integrated through a semantically guided multi-channel feature module to obtain a metallographic fiber multi-scale fusion representation map of the training carbon fiber sucker rod cross section; Inputting the training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation image into a classifier-based defect detector to obtain a classification loss function value; The carbon fiber sucker rod cross-section metallographic microscopic image feature extractor based on the hollow pyramid network, the category-guided enhanced attention adaptive allocation network based on the gating mechanism, the semantic-guided multi-channel feature integration module and the classifier-based defect detector are trained based on the classification loss function value, wherein each time the training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation image is classified iteratively through the classifier-based defect detector, the training carbon fiber sucker rod cross-section metallographic fiber multi-scale fusion representation image is corrected.
7. An online defect detection system for carbon fiber sucker rods, characterized in that: include: An image acquisition module is used to obtain a cross-sectional metallographic microscopic image of the carbon fiber sucker rod to be tested; A multi-scale image feature extraction module is used to perform multi-scale image feature extraction on the cross-sectional metallographic microscopic image to obtain a carbon fiber sucker rod cross-sectional metallographic microscopic shallow layer feature map and a carbon fiber sucker rod cross-sectional metallographic microscopic semantic feature map; A semantic enhancement module, used for inputting the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod into a category-oriented enhanced attention adaptive allocation network based on a gating mechanism to obtain a metallographic microscopic enhanced semantic feature map of the cross section of the carbon fiber sucker rod; A feature integration module is used to integrate the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section to obtain a multi-scale fusion representation map of the metallographic fiber of the carbon fiber sucker rod cross section; A detection confirmation module, used to determine the detection result of the carbon fiber sucker rod to be detected based on the multi-scale fusion representation of the metallographic fiber cross-section of the carbon fiber sucker rod; The method of inputting the metallographic microscopic semantic feature map of the cross section of the carbon fiber sucker rod into a category-oriented enhanced attention adaptive allocation network based on a gating mechanism to obtain the metallographic microscopic enhanced semantic feature map of the cross section of the carbon fiber sucker rod comprises: The cross-section metallographic microsemantic feature map of the carbon fiber sucker rod is subjected to global pooling processing based on maximum value, global pooling processing based on random value and global pooling processing based on average value to obtain a cross-section metallographic microsemantic global maximum value pooling feature vector, a cross-section metallographic microsemantic global mean value pooling feature vector and a cross-section metallographic microsemantic global random value pooling feature vector; Fusion of the cross-sectional metallographic microscopy semantic global maximum pooling feature vector, the cross-sectional metallographic microscopy semantic global mean pooling feature vector and the cross-sectional metallographic microscopy semantic global random value pooling feature vector to obtain a cross-sectional metallographic microscopy global semantic multi-scale representation vector; Performing channel-by-channel semantic feature interaction and feature activation on the cross-sectional metallographic microscopic global semantic multi-scale representation vector to obtain a cross-sectional metallographic microscopic channel semantic association feature vector; Inputting the cross-sectional metallographic microscopic channel semantic association feature vector into a gating unit to obtain a gated screening cross-sectional metallographic microscopic channel semantic association feature vector; Normalizing the gated screening cross-section metallographic microscopic channel semantic association feature vector to obtain a gated screening cross-section metallographic microscopic channel semantic association weight feature vector; The gated screening cross-section metallographic microscopic channel semantic association weight feature vector is used as a weight feature vector, and its channel-by-channel point multiplication with the carbon fiber sucker rod cross-section metallographic microscopic semantic feature map is calculated to obtain the carbon fiber sucker rod cross-section metallographic microscopic enhanced semantic feature map; The metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are integrated to obtain a multi-scale fusion representation map of the metallographic fiber of the carbon fiber sucker rod cross section, including: The metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are integrated through a semantically guided multi-channel feature integration module to obtain a multi-scale fusion representation map of the metallographic fiber of the carbon fiber sucker rod cross section; The metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section and the metallographic microscopic enhanced semantic feature map of the carbon fiber sucker rod cross section are integrated through a semantically guided multi-channel feature integration module to obtain a multi-scale fusion representation map of the metallographic fiber of the carbon fiber sucker rod cross section, including: The carbon fiber sucker rod cross-section metallographic microscopic enhanced semantic feature map and the carbon fiber sucker rod cross-section metallographic microscopic shallow layer feature map are cascaded to obtain a carbon fiber sucker rod cross-section metallographic microscopic semantic-shallow layer series feature map; The carbon fiber sucker rod cross-section metallographic microscopic semantic-shallow layer series feature map is convolutionally encoded to obtain a carbon fiber sucker rod cross-section metallographic microscopic semantic-shallow layer correlation feature map; Performing data distribution balance normalization processing on the metallographic microscopic semantic-shallow layer correlation feature map of the cross section of the carbon fiber sucker rod to obtain a normalized metallographic microscopic semantic-shallow layer correlation feature map of the cross section of the carbon fiber sucker rod; The normalized carbon fiber sucker rod cross-section metallographic microscopic semantic-shallow layer association feature map is subjected to maximum value-based global pooling processing, random value-based global pooling processing, and average value-based global pooling processing to obtain a carbon fiber sucker rod cross-section metallographic microscopic semantic-shallow layer association global maximum value pooling feature vector, a carbon fiber sucker rod cross-section metallographic microscopic semantic-shallow layer association global average pooling feature vector, and a carbon fiber sucker rod cross-section metallographic microscopic semantic-shallow layer association global random value pooling feature vector; Calculate the position-weighted sum of the metallographic micro-semantics-shallow association global maximum pooling feature vector of the carbon fiber sucker rod cross section, the metallographic micro-semantics-shallow association global mean pooling feature vector of the carbon fiber sucker rod cross section, and the metallographic micro-semantics-shallow association global random value pooling feature vector of the carbon fiber sucker rod cross section to obtain a multi-scale pooling representation vector of the metallographic micro-semantics-shallow association feature of the carbon fiber sucker rod cross section; Taking the eigenvalues of each position in the multi-scale pooling representation vector of the metallographic microscopic semantic-shallow correlation features of the carbon fiber sucker rod cross section as weights, each feature matrix along the channel dimension of the metallographic microscopic shallow feature map of the carbon fiber sucker rod cross section is weighted to obtain the multi-scale fusion representation map of the metallographic fiber of the carbon fiber sucker rod cross section.
