Motor commutator quality online detection system and method

By applying artificial intelligence and machine vision technology in motor commutator quality detection, the local viewing image of motor commutator is automatically processed, and the problems of traditional low detection efficiency and unstable results are solved, and intelligent online quality detection is realized. Improves the accuracy and efficiency of detection.

CN118655142BActive Publication Date: 2025-02-07RUIAN CHENGDE ELECTRIC APPLIANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410892505.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2025-02-07
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

Traditional motor commutator quality inspection relies on manual visual inspection and manual operation, resulting in inefficiency, unstable results, and difficulty in detecting small defects, which cannot meet the needs of large-scale production.

Method used

Using the online detection system of motor commutator quality based on artificial intelligence and machine vision, local viewing angle images are collected through the camera, superpixel segmentation and semantic encoding are performed, and combined with the significance-global semantic enhancement module, the global semantic feature vector is generated for Automated defect identification and quality detection.

Benefits of technology

The intelligent quality online inspection of the motor commutator is realized, and it can more comprehensively identify possible defects or problems that the motor steering gear may not meet the quality standards, reducing the possibility of human error and improving detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118655142B_ABST
    Figure CN118655142B_ABST
Patent Text Reader

Abstract

The present application relates to the field of motor commutators, and specifically to a system and method for online quality detection of motor commutators. It uses a camera to collect a local perspective image of the motor commutator from a first angle, and introduces an image processing and analysis algorithm based on artificial intelligence and machine vision at the back end to analyze the local perspective image, so as to learn and capture the global semantic features of the motor commutator in the local perspective image, thereby realizing automatic defect recognition and quality detection of the motor commutator. In this way, a more intelligent online quality detection of the motor commutator can be realized, so as to more comprehensively identify the defects that may occur in the motor commutator or the problems that do not meet the quality standards.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of motor commutators, and in particular to a system and method for online detection of motor commutator quality. Background Art

[0002] The motor commutator is a key component in the motor, responsible for changing the direction of the current during the motor's rotation, thereby ensuring the continuous and normal operation of the motor. In the actual production process of the motor, the commutator may have various defects or problems that do not meet the quality standards, such as shape defects of the commutator, such as bent hooks, broken hooks or foreign objects in the hook grooves, and surface defects such as cracks or copper powder. These quality problems or defects will directly affect the performance, reliability and life of the motor. Therefore, it is very important to effectively detect the quality of the motor commutator.

[0003] However, the traditional motor commutator quality inspection method mainly relies on manual visual inspection and manual operation. Manual visual inspection requires a lot of manpower and time investment, which cannot meet the needs of large-scale production and limits the improvement of production efficiency. At the same time, the manual inspection method is easily affected by individual subjective factors. Different operators may have different judgment criteria, resulting in instability of the inspection results. In addition, the quality inspection method of the motor steering gear that relies on manual inspection has a low level of intelligence, making it difficult to detect minor defects in the steering gear, which easily leads to the neglect of the quality problems of the motor commutator.

[0004] Therefore, an optimized online detection system for motor commutator quality is desired. Summary of the invention

[0005] This application is made in view of the above problems. One object of this application is to provide a system and method for online detection of motor commutator quality.

[0006] The embodiment of the present application provides a motor commutator quality online detection system, which includes:

[0007] A motor commutator local view angle image acquisition module, used to acquire a local view angle image of the motor commutator to be detected acquired by a camera from a first angle;

[0008] A local perspective super pixel block context semantic coding module is used to perform super pixel segmentation and super pixel block inter-language association coding on the local perspective image of the motor commutator to be detected to obtain a sequence of context motor commutator local perspective super pixel block semantic coding feature vectors;

[0009] A motor commutator local perspective super pixel block saliency semantic enhancement module, used for inputting the sequence of contextual motor commutator local perspective super pixel block semantic encoding feature vectors into the contextual semantic enhancement module based on saliency-globality to obtain a sequence of enhanced contextual motor commutator local perspective super pixel block semantic encoding feature vectors;

[0010] A motor commutator quality defect detection module is used to cascade the sequence of the enhanced context motor commutator local perspective superpixel block semantic encoding feature vectors into a local perspective global semantic feature vector of the motor commutator to be detected, use the local perspective global semantic feature vector of the motor commutator to be detected as the local perspective global semantic information of the motor commutator to be detected, and determine whether there is a defect based on the local perspective global semantic information of the motor commutator to be detected.

[0011] For example, according to the motor commutator quality online detection system of an embodiment of the present application, the local perspective super pixel block context semantic encoding module is used to:

[0012] Using a superpixel segmentation method, the local view image of the motor commutator to be detected is processed to obtain a sequence of local view superpixel blocks of the motor commutator;

[0013] The sequence of the motor commutator local perspective superpixel blocks is passed through a superpixel block interlanguage association encoder including a superpixel block embedding encoder to obtain a sequence of context motor commutator local perspective superpixel block semantic encoding feature vectors.

[0014] For example, according to the motor commutator quality online detection system of an embodiment of the present application, the motor commutator local perspective super pixel block saliency semantic enhancement module includes:

[0015] A semantic enhancement unit, used for inputting the sequence of semantic encoding feature vectors of the local perspective super pixel block of the context motor commutator into a context semantic enhancement module based on saliency-globality to obtain a sequence of enhanced semantic encoding feature vectors of the local perspective super pixel block of the context motor commutator;

[0016] a mean and maximum value processing unit, used to respectively calculate the mean and maximum value of each contextual motor commutator local perspective super pixel block semantic encoding feature vector in the sequence of the contextual motor commutator local perspective super pixel block semantic encoding feature vector to obtain a contextual motor commutator local perspective super pixel block semantic global representation vector composed of multiple vector means and a contextual motor commutator local perspective super pixel block semantic salient representation vector composed of multiple vector maximum values;

[0017] A global feature capture and expression unit, used for capturing and expressing the semantic global representation vector of the local perspective super pixel block of the context motor commutator to obtain a global semantic activation representation feature vector of the local perspective super pixel block of the context motor commutator;

[0018] A local feature capture and expression unit, used for capturing and expressing the semantic salient representation vector of the local perspective super pixel block of the context motor commutator to obtain a salient semantic activation representation feature vector of the local perspective super pixel block of the context motor commutator;

[0019] A fusion unit is used to fuse the global semantic activation representation feature vector of the local perspective superpixel block of the context motor commutator and the salient semantic activation representation feature vector of the local perspective superpixel block of the context motor commutator to obtain a global-salient semantic association activation feature vector of the local perspective superpixel block of the context motor commutator, and then perform nonlinear activation processing on the global-salient semantic association activation feature vector of the local perspective superpixel block of the context motor commutator to obtain a global-salient semantic association weight feature vector of the local perspective superpixel block of the context motor commutator;

[0020] A positional dot multiplication unit is used to perform positional dot multiplication on the sequence of semantic coding feature vectors of the local perspective superpixel block of the context motor commutator using the global-salient semantic association weight feature vector of the local perspective superpixel block of the context motor commutator as a weight and add the sequence of semantic coding feature vectors of the local perspective superpixel block of the context motor commutator to obtain the sequence of enhanced semantic coding feature vectors of the local perspective superpixel block of the context motor commutator.

[0021] For example, according to the motor commutator quality online detection system of an embodiment of the present application, the global feature capture expression unit is used to:

[0022] The contextual motor commutator local view super pixel block semantic global representation vector is one-dimensionally convolutionally encoded and then The activation function is used to process the semantic global representation vector of the super pixel block of the local perspective of the activation expression context motor commutator;

[0023] The activation expression context motor commutator local perspective super pixel block semantic global representation vector is again one-dimensionally convolutionally encoded and then matrix multiplied with the first trainable linear transformation weight matrix to obtain the context motor commutator local perspective super pixel block global semantic representation feature vector.

[0024] For example, according to the motor commutator quality online detection system of an embodiment of the present application, the local feature capture expression unit is used to:

[0025] The semantic salient representation vector of the local perspective superpixel block of the contextual motor commutator is encoded by one-dimensional convolution. The activation function is used to process the semantic salient representation vector of the super pixel block of the local perspective of the activation expression context motor commutator;

[0026] The activation expression context motor commutator local perspective super pixel block semantic salient representation vector is again subjected to one-dimensional convolution encoding and then matrix multiplied with the second trainable linear transformation weight matrix to obtain the context motor commutator local perspective super pixel block salient semantic representation feature vector.

[0027] For example, according to the motor commutator quality online detection system of an embodiment of the present application, the fusion unit is used to:

[0028] Fusion of the contextual motor commutator local perspective superpixel block global semantic activation representation feature vector and the contextual motor commutator local perspective superpixel block salient semantic activation representation feature vector to obtain the contextual motor commutator local perspective superpixel block global-salient semantic association activation feature vector;

[0029] Using the hyperbolic tangent function and The function performs activation processing on the global-salient semantic association activation feature vector of the local perspective superpixel block of the context motor commutator to obtain the global-salient feature hyperbolic tangent activation semantic representation vector of the local perspective superpixel block of the context motor commutator and the global-salient feature S-type activation semantic representation vector of the local perspective superpixel block of the context motor commutator;

[0030] The global-salient feature hyperbolic tangent activation semantic representation vector of the local perspective superpixel block of the context motor commutator and the global-salient feature S-type activation semantic representation vector of the local perspective superpixel block of the context motor commutator are point-multiplied by position to obtain the global-salient semantic association weight feature vector of the local perspective superpixel block of the context motor commutator.

[0031] For example, according to the motor commutator quality online detection system of an embodiment of the present application, the motor commutator quality defect detection module is used to:

[0032] After cascading the sequence of semantic encoding feature vectors of the local perspective superpixel block of the enhanced context motor commutator into the global semantic feature vector of the local perspective of the motor commutator to be detected, the global semantic feature vector of the local perspective of the motor commutator to be detected is passed through a classifier-based quality inspection result generator to obtain a quality inspection result, and the quality inspection result is used to indicate whether there is a defect.

[0033] For example, according to the embodiment of the present application, the online detection system for the quality of the motor commutator further includes a training module for training the superpixel block interlanguage association encoder including the superpixel block embedding encoder, the saliency-globality based contextual semantic enhancement module and the classifier-based quality inspection result generator.

[0034] For example, according to the motor commutator quality online detection system of the embodiment of the present application, the training module includes:

[0035] A training data acquisition unit, used to acquire training data, wherein the training data includes a training local perspective image of the motor commutator to be inspected acquired by a camera from a first angle and a real quality inspection result;

[0036] A training superpixel segmentation unit, used for processing the training local view image of the motor commutator to be detected by using a superpixel segmentation method to obtain a sequence of local view superpixel blocks of the motor commutator;

[0037] A training association encoding unit, used for passing the sequence of the training motor commutator local view super pixel blocks through the super pixel block interlanguage association encoder including the super pixel block embedding encoder to obtain a sequence of semantic encoding feature vectors of the training context motor commutator local view super pixel blocks;

[0038] A training motor commutator local perspective super pixel block saliency semantic enhancement unit is used to input the sequence of the training context motor commutator local perspective super pixel block semantic encoding feature vectors into the saliency-global based context semantic enhancement module to obtain a sequence of training enhanced context motor commutator local perspective super pixel block semantic encoding feature vectors;

[0039] A training motor commutator quality defect detection unit is used to cascade the sequence of the training enhanced context motor commutator local perspective superpixel block semantic encoding feature vectors into a training motor commutator local perspective global semantic feature vector, and then pass the training motor commutator local perspective global semantic feature vector through the classifier-based quality inspection result generator to obtain a training quality inspection result;

[0040] A classification loss function value calculation unit, used to calculate the cross entropy loss function value between the training quality inspection result and the real quality inspection result to obtain a classification loss function value;

[0041] A loss training unit is used to train the superpixel block interlanguage association encoder including the superpixel block embedding encoder, the saliency-global contextual semantic enhancement module and the classifier-based quality inspection result generator based on the classification loss function value.

[0042] The embodiment of the present application also provides a method for online detection of motor commutator quality, which comprises:

[0043] Acquire a local viewing angle image of the motor commutator to be inspected captured by a camera from a first angle;

[0044] Performing superpixel segmentation and superpixel block semantic association coding on the local perspective image of the motor commutator to be detected to obtain a sequence of semantic coding feature vectors of the local perspective superpixel blocks of the context motor commutator;

[0045] Inputting the sequence of semantic encoding feature vectors of the local perspective super pixel block of the contextual motor commutator into the contextual semantic enhancement module based on saliency-globality to obtain a sequence of enhanced semantic encoding feature vectors of the local perspective super pixel block of the contextual motor commutator;

[0046] After cascading the sequence of semantic encoding feature vectors of the local perspective superpixel block of the enhanced context motor commutator into a global semantic feature vector of the local perspective of the motor commutator to be detected, the global semantic feature vector of the local perspective of the motor commutator to be detected is used as the global semantic information of the local perspective of the motor commutator to be detected, and determining whether there is a defect based on the global semantic information of the local perspective of the motor commutator to be detected.

[0047] According to the motor commutator quality online detection system and method of the embodiment of the present application, the camera collects the local perspective image of the motor commutator from a first angle, and introduces an image processing and analysis algorithm based on artificial intelligence and machine vision at the back end to analyze the local perspective image, so as to learn and capture the global semantic features of the motor commutator in the local perspective image, thereby realizing automatic defect recognition and quality detection of the motor commutator. In this way, a more intelligent online detection of the motor commutator quality can be realized, so as to more comprehensively identify the defects that may occur in the motor commutator or the problems that do not meet the quality standards. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings of the embodiments of the present application are briefly introduced below. Obviously, the drawings described below only relate to some embodiments of the present application, and are not intended to limit the present application.

[0049] Figure 1 A schematic diagram of the application architecture of the online detection system for the quality of the motor commutator in an embodiment of the present application is shown;

[0050] Figure 2 A schematic diagram of the structure of an online detection system for motor commutator quality in an embodiment of the present application is shown;

[0051] Figure 3A schematic diagram of the structure of a motor commutator local perspective superpixel block saliency semantic enhancement module of a motor commutator quality online detection system in an embodiment of the present application is shown;

[0052] Figure 4 A flow chart of a method for online detection of motor commutator quality in an embodiment of the present application is shown;

[0053] Figure 5 An application scenario diagram of the online detection system for the quality of a motor commutator in an embodiment of the present application is shown; and

[0054] Figure 6 A schematic diagram of a storage medium according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0055] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work also fall within the scope of protection of the present application.

[0056] The terms used in this specification are those common terms currently widely used in the art in consideration of the functions of the present application, 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 application. Therefore, the terms used in the specification should not be understood as simple names, but rather as a general description based on the meaning of the terms and the present application.

[0057] Although the present application makes various references to certain modules in the system according to the embodiments of the present application, any number of different modules can be used and run on the user terminal and / or server. The modules are only illustrative, and different aspects of the system and method can use different modules.

[0058] Flowcharts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately 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 a certain step or several steps of operations may be removed from these processes.

[0059] Figure 1 A schematic diagram of the application architecture of the online detection system for the quality of a motor commutator in an embodiment of the present application is shown, including a server 100 and a terminal device 200.

[0060] 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.

[0061] 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.

[0062] 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 application, the memory 120 may be used to store the corresponding method of the motor commutator quality online detection system in the embodiment of the present application.

[0063] 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 motor commutator quality online detection methods in the embodiments of the present application according to the obtained program instructions.

[0064] In addition, the application architecture diagram in the embodiment of the present application is intended to more clearly illustrate the technical solution in the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application. Of course, for other application architectures and business applications, the technical solution provided in the embodiment of the present application is also applicable to similar problems.

[0065] The following is a non-restrictive description of the motor commutator quality online detection system provided according to at least one embodiment of the present application 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 application.

[0066] The motor commutator is an important part of the armature of DC motors and AC commutator motors. It is composed of many copper sheets separated by mica sheets and is cylindrical or disc-shaped. Each copper sheet is connected to several armature winding elements. When the armature rotates, the copper sheets successively contact the fixed brushes.

[0067] In response to the above technical problems, the technical concept of the present application is to collect a local perspective image of the motor commutator from a first angle through a camera, and introduce an image processing and analysis algorithm based on artificial intelligence and machine vision at the back end to analyze the local perspective image, so as to learn and capture the global semantic features of the motor commutator in the local perspective image, thereby realizing automatic defect recognition and quality inspection of the motor commutator. In this way, a more intelligent online inspection of the quality of the motor commutator can be achieved to more comprehensively identify possible defects or problems that do not meet the quality standards of the motor commutator. For example, shape defects of the commutator, such as bent hooks, broken hooks or foreign objects in the hook groove, and surface defects, such as cracks or copper powder, reduce the possibility of human error.

[0068] Figure 2A schematic diagram of the structure of an online motor commutator quality detection system 800 in an embodiment of the present application is shown. The online motor commutator quality detection system 800 includes: a motor commutator local perspective image acquisition module 810, which is used to obtain a local perspective image of the motor commutator to be detected acquired by a camera from a first angle; a local perspective superpixel block context semantic encoding module 820, which is used to perform superpixel segmentation and superpixel block inter-language association encoding on the local perspective image of the motor commutator to be detected to obtain a sequence of context motor commutator local perspective superpixel block semantic encoding feature vectors; a motor commutator local perspective superpixel block saliency semantic enhancement module 830, which is used to encode the context motor commutator local perspective superpixel block semantic encoding The sequence of feature vectors is input into a saliency-global contextual semantic enhancement module to obtain a sequence of enhanced context motor commutator local perspective superpixel block semantic encoding feature vectors; a motor commutator quality defect detection module 840 is used to cascade the sequence of enhanced context motor commutator local perspective superpixel block semantic encoding feature vectors into a local perspective global semantic feature vector of the motor commutator to be detected, and then use the local perspective global semantic feature vector of the motor commutator to be detected as the local perspective global semantic information of the motor commutator to be detected, and determine whether there is a defect based on the local perspective global semantic information of the motor commutator to be detected.

[0069] Specifically, in the technical solution of the present application, first, a local perspective image of the motor commutator to be detected is acquired by a camera from a first angle. Next, considering that there may be a large amount of information in the local perspective image of the motor commutator to be detected, it is difficult to guarantee the sufficiency and detail of the expression of the tiny features of the motor commutator. Therefore, in the technical solution of the present application, the local perspective image of the motor commutator to be detected is processed using a superpixel segmentation method to obtain a sequence of local perspective superpixel blocks of the motor commutator. It should be understood that superpixel segmentation is a method of segmenting an image into local compact regions with semantic information, which helps to extract more representative and detailed feature information. The superpixel segmentation method can more accurately identify the regional boundaries in the image than the traditional pixel-level segmentation method, which helps to more accurately locate the various parts of the commutator in the local perspective image, so as to divide the image into smaller regions with more semantic information, laying a good foundation for subsequent feature extraction and analysis.

[0070] Then, since each motor commutator local perspective superpixel block in the sequence of the motor commutator local perspective superpixel blocks has local area feature information about the motor steering under the local perspective, these local area features have implicit correlation and mutual influence, and this correlation semantic information helps to more comprehensively understand the local perspective global semantics and features of the steering, which is beneficial to the subsequent defect identification task. Based on this, in the technical solution of the present application, the sequence of the motor commutator local perspective superpixel blocks is further passed through a superpixel block interlanguage association encoder including a superpixel block embedding encoder to obtain a sequence of contextual motor commutator local perspective superpixel block semantic encoding feature vectors. Through the processing of the superpixel block interlanguage association encoder including the superpixel block embedding encoder, each motor commutator local perspective superpixel block can be embedded and encoded respectively, so as to convert its embedding map into a vector form that can be processed by a computer, and capture the key visual features in each motor commutator local perspective superpixel block respectively, which are crucial for understanding the local properties of the commutator. Then, after processing the semantic encoding of the local perspective superpixel block of the contextual motor commutator, the correlation and contextual information between the semantic features of each superpixel block under the local perspective of the motor steering can be extracted, which helps to more comprehensively understand the local perspective characteristics of the commutator, thereby improving the accuracy and robustness of steering quality detection.

[0071] Correspondingly, the local perspective superpixel block context semantic coding module 820 is used to: use the superpixel segmentation method to process the local perspective image of the motor commutator to be detected to obtain a sequence of local perspective superpixel blocks of the motor commutator; pass the sequence of local perspective superpixel blocks of the motor commutator through a superpixel block interlanguage association encoder including a superpixel block embedding encoder to obtain a sequence of context motor commutator local perspective superpixel block semantic coding feature vectors.

[0072] Furthermore, considering that each contextual motor commutator local perspective superpixel block semantic coding feature vector in the sequence of contextual motor commutator local perspective superpixel block semantic coding feature vectors contains contextual semantic coding features of each superpixel block under the local perspective of the motor steering, although these contextual motor commutator local perspective superpixel block semantic coding feature vectors can reflect the contextual semantic information of each superpixel block, in the subsequent defect detection task, different local area superpixel block semantics have different importance and contribution to it. Based on this, in order to further improve the understanding and characterization capabilities of the local perspective features of the motor commutator, in the technical solution of the present application, the sequence of contextual motor commutator local perspective superpixel block semantic coding feature vectors is further input into a contextual semantic enhancement module based on saliency-globality to obtain a sequence of enhanced contextual motor commutator local perspective superpixel block semantic coding feature vectors. Through the processing of the saliency-global contextual semantic enhancement module, the intrinsic implicit correlation relationship and global features between the contextual semantic features of each superpixel block in the local perspective of the motor commutator can be learned and captured, and the contribution of different superpixel block local area semantics to subsequent defect recognition tasks can be identified. In this way, different attention levels can be applied to these different superpixel block semantic features in the process of different superpixel block semantic aggregation representation, thereby helping the model to better understand the salient areas and global structures in the local perspective image, improve the representation ability of the local perspective features of the motor commutator, and provide a basis for subsequent motor commutator defect detection tasks.

[0073] Accordingly, if Figure 3As shown, the motor commutator local perspective superpixel block saliency semantic enhancement module 830 includes: a semantic enhancement unit 831, which is used to input the sequence of the context motor commutator local perspective superpixel block semantic encoding feature vectors into the context semantic enhancement module based on saliency-globality to obtain a sequence of enhanced context motor commutator local perspective superpixel block semantic encoding feature vectors; a mean and maximum processing unit 832, which is used to respectively calculate the mean and maximum value of each context motor commutator local perspective superpixel block semantic encoding feature vector in the sequence of the context motor commutator local perspective superpixel block semantic encoding feature vectors to obtain a context motor commutator local perspective superpixel block semantic global representation vector composed of multiple vector means and a context motor commutator local perspective superpixel block semantic salient representation vector composed of multiple vector maximum values; a global feature capture and expression unit 833, which is used to perform feature capture and expression on the context motor commutator local perspective superpixel block semantic global representation vector to obtain a context motor commutator local perspective superpixel block global semantic activation representation feature vector; a local feature capture and expression unit 834, which is used to process the context motor commutator The local perspective superpixel block semantic salient representation vector is used for feature capture and expression to obtain the context motor commutator local perspective superpixel block salient semantic activation representation feature vector; a fusion unit 835 is used to fuse the context motor commutator local perspective superpixel block global semantic activation representation feature vector and the context motor commutator local perspective superpixel block salient semantic activation representation feature vector to obtain the context motor commutator local perspective superpixel block global-salient semantic association activation feature vector, and then perform nonlinear activation processing on the context motor commutator local perspective superpixel block global-salient semantic association activation feature vector to obtain the context motor commutator local perspective superpixel block global-salient semantic association weight feature vector; a position point multiplication unit 836 is used to use the context motor commutator local perspective superpixel block global-salient semantic association weight feature vector as a weight, perform position point multiplication on the sequence of the context motor commutator local perspective superpixel block semantic encoding feature vectors, and add the sequence of the context motor commutator local perspective superpixel block semantic encoding feature vectors to obtain the sequence of the enhanced context motor commutator local perspective superpixel block semantic encoding feature vectors.

[0074] The global feature capture and expression unit 833 is used to: perform one-dimensional convolution encoding on the semantic global representation vector of the local perspective super pixel block of the context motor commutator, and then generate a new semantic global representation vector. The activation function is processed to obtain the global semantic representation vector of the local perspective superpixel block of the activation expression context motor commutator; the global semantic representation vector of the local perspective superpixel block of the activation expression context motor commutator is again encoded through one-dimensional convolution and then matrix multiplied with the first trainable linear transformation weight matrix to obtain the global semantic representation feature vector of the local perspective superpixel block of the context motor commutator.

[0075] The local feature capture and expression unit 834 is used to: perform one-dimensional convolution encoding on the semantic salient representation vector of the local perspective super pixel block of the context motor commutator, and then generate a local feature capture and expression unit 834 through An activation function is used to obtain a semantically salient representation vector of a local perspective superpixel block of an activation expression context motor commutator; the semantically salient representation vector of a local perspective superpixel block of an activation expression context motor commutator is again encoded through one-dimensional convolution and then matrix multiplied with a second trainable linear transformation weight matrix to obtain a salient semantic representation feature vector of a local perspective superpixel block of a context motor commutator.

[0076] The fusion unit 835 is used to: fuse the global semantic activation representation feature vector of the local perspective superpixel block of the context motor commutator and the salient semantic activation representation feature vector of the local perspective superpixel block of the context motor commutator to obtain the global-salient semantic association activation feature vector of the local perspective superpixel block of the context motor commutator; respectively use the hyperbolic tangent function and The function activates the global-salient semantic association activation feature vector of the local perspective superpixel block of the context motor commutator to obtain the global-salient feature hyperbolic tangent activation semantic representation vector of the local perspective superpixel block of the context motor commutator and the global-salient feature S-type activation semantic representation vector of the local perspective superpixel block of the context motor commutator; and multiplies the global-salient feature hyperbolic tangent activation semantic representation vector of the local perspective superpixel block of the context motor commutator and the global-salient feature S-type activation semantic representation vector of the local perspective superpixel block of the context motor commutator by position point multiplication to obtain the global-salient semantic association weight feature vector of the local perspective superpixel block of the context motor commutator.

[0077] In a specific example, the motor commutator local perspective super pixel block saliency semantic enhancement module 830 is used to: input the sequence of context motor commutator local perspective super pixel block semantic encoding feature vectors into the context semantic enhancement module based on saliency-globality and process them with the following saliency enhancement formula to obtain the sequence of enhanced context motor commutator local perspective super pixel block semantic encoding feature vectors; wherein the saliency enhancement formula is: ;in, for each contextual motor commutator local perspective superpixel block semantic encoding feature vector in the sequence of contextual motor commutator local perspective superpixel block semantic encoding feature vectors, represents the global mean operation in the calculation vector, Represents the maximum value operation in the vector. is the semantic mean representation vector of the local perspective superpixel block of the contextual motor commutator, The semantic maximum representation vector of the local view superpixel block of the context motor commutator, represents one-dimensional convolutional coding, express Activation function, and They represent the trainable weight matrices for linear transformation, and are the semantic global representation feature vector of the local perspective superpixel block of the contextual motor commutator and the semantic salient representation feature vector of the local perspective superpixel block of the contextual motor commutator, respectively. for function, for function, It means point multiplication by position. A semantically encoded feature vector of each enhanced context motor commutator local perspective superpixel block in the sequence of semantically encoded feature vectors of the enhanced context motor commutator local perspective superpixel block.

[0078] Furthermore, after the sequence of semantic encoding feature vectors of the local perspective superpixel block of the enhanced context motor commutator is cascaded into the global semantic feature vector of the local perspective of the motor commutator to be detected, the global semantic feature vector of the local perspective of the motor commutator to be detected is passed through a quality inspection result generator based on a classifier to obtain a quality inspection result, and the quality inspection result is used to indicate whether there is a defect. In other words, the global semantic features under the local perspective of the motor converter are used for classification processing to automatically identify defects and quality inspection of the motor commutator. In this way, a more intelligent online quality inspection of the motor steering gear can be achieved to more comprehensively identify possible defects or problems that do not meet quality standards of the motor steering gear. For example, shape defects of the commutator, such as bent hooks, broken hooks or foreign objects in the hook groove, and surface defects, such as cracks or copper powder, reduce the possibility of human errors.

[0079] Correspondingly, the motor commutator quality defect detection module 840 is used to: cascade the sequence of the enhanced context motor commutator local perspective superpixel block semantic encoding feature vectors into the local perspective global semantic feature vector of the motor commutator to be detected, and then pass the local perspective global semantic feature vector of the motor commutator to be detected through a classifier-based quality inspection result generator to obtain a quality inspection result, and the quality inspection result is used to indicate whether there is a defect.

[0080] 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.

[0081] Furthermore, in the technical solution of the present application, the motor commutator quality online detection system also includes a training module for training the superpixel block interlanguage association encoder including the superpixel block embedding encoder, the saliency-globality based contextual semantic enhancement module and the classifier-based quality inspection result generator.

[0082] Among them, the training module includes: a training data acquisition unit, which is used to obtain training data, and the training data includes a training local perspective image of the motor commutator to be detected collected by a camera from a first angle and a real quality inspection result; a training superpixel segmentation unit, which is used to use a superpixel segmentation method to process the training local perspective image of the motor commutator to be detected to obtain a sequence of local perspective superpixel blocks of the training motor commutator; a training association encoding unit, which is used to pass the sequence of local perspective superpixel blocks of the training motor commutator through the superpixel block interlanguage association encoder containing the superpixel block embedding encoder to obtain a sequence of semantic encoding feature vectors of local perspective superpixel blocks of the training context motor commutator; a training motor commutator local perspective superpixel block saliency semantic enhancement unit, which is used to input the sequence of semantic encoding feature vectors of local perspective superpixel blocks of the training context motor commutator into the context semantics based on saliency-globality. A reinforcement module is used to obtain a sequence of semantic encoding feature vectors of local perspective superpixel blocks of a training reinforcement context motor commutator; a training motor commutator quality defect detection unit is used to cascade the sequence of semantic encoding feature vectors of local perspective superpixel blocks of the training reinforcement context motor commutator into a global semantic feature vector of the local perspective of the training motor commutator to be detected, and then pass the global semantic feature vector of the local perspective of the training motor commutator to be detected through the classifier-based quality inspection result generator to obtain a training quality inspection result; a classification loss function value calculation unit is used to calculate the cross entropy loss function value between the training quality inspection result and the true quality inspection result to obtain a classification loss function value; a loss training unit is used to train the superpixel block interlanguage association encoder including the superpixel block embedding encoder, the context semantic reinforcement module based on saliency-globality and the quality inspection result generator based on the classifier based on the classification loss function value.

[0083] Furthermore, the training motor commutator quality defect detection unit is used to: perform cluster optimization on the local perspective global semantic feature vector of the training motor commutator to be detected to obtain an optimized local perspective global semantic feature vector of the training motor commutator to be detected, and the process is expressed by the optimization formula: ;in, Represents the total number of eigenvalues ​​of the global semantic feature vector of the local perspective of the motor commutator to be tested, represents the number of features within a class, Represents the global semantic feature vector of the local perspective of the motor commutator to be tested for training, represents the weight hyperparameter, It means point multiplication by position. represents positional addition, It means to perform exponential operation on the eigenvalues ​​at each position in the vector. The optimized local perspective global semantic feature vector of the training motor commutator to be detected is obtained; the optimized local perspective global semantic feature vector of the training motor commutator to be detected is passed through a quality inspection result generator based on a classifier to obtain the training quality inspection result.

[0084] Specifically, the training motor commutator quality defect detection unit is used to: perform clustering operations on the local perspective global semantic feature vector of the training motor commutator to be detected, for example, perform clustering operations based on a distance between eigenvalues, and determine the number of features within the class; divide the total number of eigenvalues ​​of the local perspective global semantic feature vector of the training motor commutator to be detected by the number of features within the class to obtain a class importance value, and calculate the inverse of the class importance value to obtain a class constraint value; calculate the difference between the total number of eigenvalues ​​and the number of features within the class, and divide the total number of eigenvalues ​​by the difference to obtain an out-of-class proportion value; calculate the power function of each eigenvalue of the local perspective global semantic feature vector of the training motor commutator to be detected with the class importance value as an exponent, and compare it with the natural function The exponential values ​​with the number as the base and the class constraint value as the exponent are added, and then multiplied by the out-of-class proportion value to obtain the local perspective global semantic modulation vector of the training motor commutator to be detected; the local perspective global semantic feature vector of the training motor commutator to be detected is point multiplied with the class importance value to obtain the local perspective global semantic ontology vector of the training motor commutator to be detected; the weighted sum of the local perspective global semantic modulation vector of the training motor commutator to be detected and the local perspective global semantic ontology vector of the training motor commutator to be detected is calculated to obtain the optimized local perspective global semantic feature vector of the training motor commutator to be detected; the optimized local perspective global semantic feature vector of the training motor commutator to be detected is input into the classifier-based quality inspection result generator to obtain the training quality inspection result.

[0085] Here, for the image semantic features in the local image semantic space domain of the motor commutator to be detected expressed by each training enhanced context motor commutator local perspective superpixel block semantic encoding feature vector in the sequence of the training enhanced context motor commutator local perspective superpixel block semantic encoding feature vector, after the local-global image semantic space domain significance-global semantic enhancement, the distribution discretization of the training local perspective global semantic feature vector of the motor commutator to be detected after direct cascading, the applicant of the present application, while performing clustering operation on the training local perspective global semantic feature vector of the motor commutator to be detected, uses the training local perspective global semantic feature vector of the motor commutator to be detected to discretize the distribution of the training local perspective global semantic feature vector. The cluster importance measure of the eigenvalue of the feature vector is combined with the class constraint measure of the clustering operation to further perform responsive modulation with the out-of-class scale factor, and based on the clustering scaling of the feature ontology representation of the local perspective global semantic feature vector of the training motor commutator to be detected, the clustering operation is used to establish the simplicity and effectiveness of the overall feature purification of the feature set of the local perspective global semantic feature vector of the training motor commutator to be detected, and to suppress the logical inconsistency of the probability density distribution convergence caused by the clustering operation, so as to improve the classification iteration effect of the feature set of the local perspective global semantic feature vector of the training motor commutator to be detected input into the classifier-based quality inspection result generator, that is, to improve the speed of classification training and the accuracy of classification results. In this way, the automatic defect recognition and quality inspection of the motor commutator can be realized more accurately, so that the defects or problems that do not meet the quality standards of the motor steering gear can be more intelligently identified.

[0086] Based on the above embodiments, see Figure 4 As shown in FIG. 1 , it is a flow chart of a method for online detection of motor commutator quality in an embodiment of the present application. For example, the method for online detection of motor commutator quality can be executed by a server, which can be Figure 1 The server 100 shown in FIG. Figure 4As shown, according to the embodiment of the present application, the online detection method for the quality of the motor commutator includes the following steps: S510, obtaining a local perspective image of the motor commutator to be detected captured by a camera from a first angle; S520, performing superpixel segmentation and superpixel block inter-language association coding on the local perspective image of the motor commutator to be detected to obtain a sequence of context motor commutator local perspective superpixel block semantic coding feature vectors; S530, inputting the sequence of context motor commutator local perspective superpixel block semantic coding feature vectors into a saliency-global context semantic enhancement module to obtain a sequence of enhanced context motor commutator local perspective superpixel block semantic coding feature vectors; S540, after cascading the sequence of enhanced context motor commutator local perspective superpixel block semantic coding feature vectors into a local perspective global semantic feature vector of the motor commutator to be detected, the local perspective global semantic feature vector of the motor commutator to be detected is used as the local perspective global semantic information of the motor commutator to be detected, and determining whether there is a defect based on the local perspective global semantic information of the motor commutator to be detected.

[0087] Here, those skilled in the art can understand that the specific operations of each step in the above-mentioned motor commutator quality online detection method have been referred to above. Figure 2 to Figure 3 The motor commutator quality online detection system 800 has been introduced in detail, and therefore, its repeated description will be omitted.

[0088] Figure 5 FIG. 1 is an application scenario diagram of the online detection system for the quality of the motor commutator according to an embodiment of the present application. Figure 5 As shown, in this application scenario, first, a local perspective image of the motor commutator to be detected captured by a camera from a first angle is obtained (for example, Figure 5 D), then, the local perspective image of the motor commutator to be detected is input to a server (for example, Figure 5 In S) as shown in , the server can use the motor commutator quality online detection algorithm to process the local perspective image of the motor commutator to be detected to obtain a quality inspection result indicating whether there is a defect.

[0089] Based on the above embodiments, another exemplary embodiment of an electronic device is also provided in the embodiments of the present application. In some possible implementations, the electronic device in the embodiments of the present application may include a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the steps of the motor commutator quality online detection method in the above embodiments can be implemented when the processor executes the program.

[0090] For example, in the case of electronic equipment Figure 1Taking 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.

[0091] An embodiment of the present application also provides a computer-readable storage medium. Figure 6 1 shows a schematic diagram of a computer-readable storage medium 1000 according to an embodiment of the present application. Figure 6 As 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 detection method for the quality of the motor commutator according to the embodiment of the present application 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.

[0092] The embodiment of the present application also provides a computer program product or a computer program, which includes computer executable instructions, and the computer executable instructions 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 motor commutator quality online detection method according to the embodiment of the present application.

[0093] Those skilled in the art will appreciate that the contents disclosed in this application may be subject to various variations 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.

[0094] In addition, although the present application makes various references to certain units in the system according to embodiments of the present application, any number of different units can be used and run on the client and / or server. The units are only illustrative, and different aspects of the system and method can use different units.

[0095] 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 software function modules. The present application is not limited to any particular form of combination of hardware and software.

[0096] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which this application 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 extremely formal sense, unless explicitly defined as such herein.

[0097] The above is an explanation of the present application and should not be considered as a limitation thereof. Although several exemplary embodiments of the present application 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 application. Therefore, all of these modifications are intended to be included within the scope of the present application as defined by the claims. It should be understood that the above is an explanation of the present application and should not be considered to be 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 application is defined by the claims and their equivalents.

Claims

1. A motor commutator quality online detection system, characterized in that: include: A motor commutator local view angle image acquisition module, used to acquire a local view angle image of the motor commutator to be detected acquired by a camera from a first angle; A local perspective super pixel block context semantic coding module is used to perform super pixel segmentation and super pixel block inter-language association coding on the local perspective image of the motor commutator to be detected to obtain a sequence of context motor commutator local perspective super pixel block semantic coding feature vectors; A motor commutator local perspective super pixel block saliency semantic enhancement module, used for inputting the sequence of contextual motor commutator local perspective super pixel block semantic encoding feature vectors into the contextual semantic enhancement module based on saliency-globality to obtain a sequence of enhanced contextual motor commutator local perspective super pixel block semantic encoding feature vectors; A motor commutator quality defect detection module, which is used to cascade the sequence of semantic encoding feature vectors of the local perspective superpixel block of the enhanced context motor commutator into a global semantic feature vector of the local perspective of the motor commutator to be detected, use the global semantic feature vector of the local perspective of the motor commutator to be detected as the global semantic information of the local perspective of the motor commutator to be detected, and determine whether there is a defect based on the global semantic information of the local perspective of the motor commutator to be detected; The local view super pixel block context semantic encoding module is used to: Using a superpixel segmentation method, the local view image of the motor commutator to be detected is processed to obtain a sequence of local view superpixel blocks of the motor commutator; Passing the sequence of the motor commutator local view super pixel blocks through a super pixel block interlanguage association encoder including a super pixel block embedding encoder to obtain a sequence of semantic encoding feature vectors of the context motor commutator local view super pixel blocks; The motor commutator local perspective superpixel block saliency semantic enhancement module includes: A semantic enhancement unit, used for inputting the sequence of semantic encoding feature vectors of the local perspective super pixel block of the context motor commutator into a context semantic enhancement module based on saliency-globality to obtain a sequence of enhanced semantic encoding feature vectors of the local perspective super pixel block of the context motor commutator; A mean and maximum processing unit, used to respectively calculate the mean and maximum of each context motor commutator local perspective super pixel block semantic encoding feature vector in the sequence of the context motor commutator local perspective super pixel block semantic encoding feature vector to obtain a context motor commutator local perspective super pixel block semantic global representation vector composed of multiple vector means and a context motor commutator local perspective super pixel block semantic salient representation vector composed of multiple vector maximum values; A global feature capture and expression unit, used for capturing and expressing the semantic global representation vector of the local perspective super pixel block of the context motor commutator to obtain a global semantic activation representation feature vector of the local perspective super pixel block of the context motor commutator; A local feature capture and expression unit, used for capturing and expressing the semantic salient representation vector of the local perspective super pixel block of the context motor commutator to obtain a salient semantic activation representation feature vector of the local perspective super pixel block of the context motor commutator; A fusion unit is used to fuse the global semantic activation representation feature vector of the local perspective superpixel block of the context motor commutator and the salient semantic activation representation feature vector of the local perspective superpixel block of the context motor commutator to obtain a global-salient semantic association activation feature vector of the local perspective superpixel block of the context motor commutator, and then perform nonlinear activation processing on the global-salient semantic association activation feature vector of the local perspective superpixel block of the context motor commutator to obtain a global-salient semantic association weight feature vector of the local perspective superpixel block of the context motor commutator; A positional dot multiplication unit is used to perform positional dot multiplication on the sequence of semantic coding feature vectors of the local perspective superpixel block of the context motor commutator using the global-salient semantic association weight feature vector of the local perspective superpixel block of the context motor commutator as a weight and add the sequence of semantic coding feature vectors of the local perspective superpixel block of the context motor commutator to obtain the sequence of semantic coding feature vectors of the local perspective superpixel block of the context motor commutator; Wherein, the global feature capture expression unit is used to: The contextual motor commutator local view super pixel block semantic global representation vector is one-dimensionally convolutionally encoded and then The activation function is used to process the semantic global representation vector of the super pixel block of the local perspective of the activation expression context motor commutator; The activation expression context motor commutator local view super pixel block semantic global representation vector is again one-dimensionally convolutionally encoded and then matrix-multiplied with the first trainable linear transformation weight matrix to obtain the context motor commutator local view super pixel block global semantic representation feature vector; Wherein, the local feature capture expression unit is used to: The semantic salient representation vector of the local perspective superpixel block of the contextual motor commutator is encoded by one-dimensional convolution. The activation function is used to process the semantic salient representation vector of the super pixel block of the local perspective of the activation expression context motor commutator; The activation expression context motor commutator local view super pixel block semantic salient representation vector is again subjected to one-dimensional convolution encoding and then matrix multiplied with a second trainable linear transformation weight matrix to obtain the context motor commutator local view super pixel block salient semantic representation feature vector; Wherein, the fusion unit is used for: Fusion of the contextual motor commutator local perspective superpixel block global semantic activation representation feature vector and the contextual motor commutator local perspective superpixel block salient semantic activation representation feature vector to obtain the contextual motor commutator local perspective superpixel block global-salient semantic association activation feature vector; Using the hyperbolic tangent function and The function performs activation processing on the global-salient semantic association activation feature vector of the local perspective superpixel block of the context motor commutator to obtain the global-salient feature hyperbolic tangent activation semantic representation vector of the local perspective superpixel block of the context motor commutator and the global-salient feature S-type activation semantic representation vector of the local perspective superpixel block of the context motor commutator; Performing positional point multiplication of the hyperbolic tangent activation semantic representation vector of the global-salient feature of the local perspective superpixel block of the context motor commutator and the S-type activation semantic representation vector of the global-salient feature of the local perspective superpixel block of the context motor commutator to obtain a global-salient semantic association weight feature vector of the local perspective superpixel block of the context motor commutator; The motor commutator local perspective super pixel block saliency semantic enhancement module is used to: input the sequence of context motor commutator local perspective super pixel block semantic encoding feature vectors into the context semantic enhancement module based on saliency-globality and process them with the following saliency enhancement formula to obtain the sequence of enhanced context motor commutator local perspective super pixel block semantic encoding feature vectors; wherein the saliency enhancement formula is: ;in, for each contextual motor commutator local perspective superpixel block semantic encoding feature vector in the sequence of contextual motor commutator local perspective superpixel block semantic encoding feature vectors, represents the global mean operation in the calculation vector, Represents the maximum value operation in the vector. is the semantic mean representation vector of the local perspective superpixel block of the contextual motor commutator, The semantic maximum representation vector of the local view superpixel block of the context motor commutator, represents one-dimensional convolutional coding, express Activation function, and They represent the trainable weight matrices for linear transformation, and are the semantic global representation feature vector of the local perspective superpixel block of the contextual motor commutator and the semantic salient representation feature vector of the local perspective superpixel block of the contextual motor commutator, respectively. for function, for function, It means point multiplication by position. For each enhanced context motor commutator local perspective super pixel block semantic encoding feature vector in the sequence of enhanced context motor commutator local perspective super pixel block semantic encoding feature vectors; Wherein, the motor commutator quality defect detection module is used to: After cascading the sequence of semantic encoding feature vectors of the local perspective superpixel block of the enhanced context motor commutator into the global semantic feature vector of the local perspective of the motor commutator to be detected, the global semantic feature vector of the local perspective of the motor commutator to be detected is passed through a quality inspection result generator based on a classifier to obtain a quality inspection result, and the quality inspection result is used to indicate whether there is a defect; Among them, it also includes a training module for training the superpixel block interlanguage association encoder including the superpixel block embedding encoder, the contextual semantic enhancement module based on saliency-globality, and the quality inspection result generator based on the classifier; Wherein, the training module includes: A training data acquisition unit, used to acquire training data, wherein the training data includes a training local perspective image of the motor commutator to be inspected acquired by a camera from a first angle and a real quality inspection result; A training superpixel segmentation unit, used for processing the training local view image of the motor commutator to be detected by using a superpixel segmentation method to obtain a sequence of local view superpixel blocks of the motor commutator; A training association encoding unit, used for passing the sequence of the training motor commutator local view super pixel blocks through the super pixel block interlanguage association encoder including the super pixel block embedding encoder to obtain a sequence of semantic encoding feature vectors of the training context motor commutator local view super pixel blocks; A training motor commutator local perspective super pixel block saliency semantic enhancement unit is used to input the sequence of the training context motor commutator local perspective super pixel block semantic encoding feature vectors into the saliency-global based context semantic enhancement module to obtain a sequence of training enhanced context motor commutator local perspective super pixel block semantic encoding feature vectors; A training motor commutator quality defect detection unit is used to cascade the sequence of the training enhanced context motor commutator local perspective superpixel block semantic encoding feature vectors into a training motor commutator local perspective global semantic feature vector, and then pass the training motor commutator local perspective global semantic feature vector through the classifier-based quality inspection result generator to obtain a training quality inspection result; A classification loss function value calculation unit, used to calculate the cross entropy loss function value between the training quality inspection result and the real quality inspection result to obtain a classification loss function value; A loss training unit, configured to train the superpixel block interlanguage association encoder including the superpixel block embedding encoder, the saliency-globality based contextual semantic enhancement module, and the classifier based quality inspection result generator based on the classification loss function value; The training motor commutator quality defect detection unit is used to cluster and optimize the local perspective global semantic feature vector of the training motor commutator to be detected to obtain an optimized local perspective global semantic feature vector of the training motor commutator to be detected. The process is expressed by the optimization formula: ;in, Represents the total number of eigenvalues ​​of the global semantic feature vector of the local perspective of the motor commutator to be tested, represents the number of features within a class, Represents the global semantic feature vector of the local perspective of the motor commutator to be tested for training, represents the weight hyperparameter, It means point multiplication by position. represents positional addition, It means to perform exponential operation on the eigenvalues ​​at each position in the vector. The optimized local perspective global semantic feature vector of the training motor commutator to be detected is obtained; the optimized local perspective global semantic feature vector of the training motor commutator to be detected is passed through a quality inspection result generator based on a classifier to obtain the training quality inspection result.

2. A method for online detection of motor commutator quality, using the online detection system for motor commutator quality according to claim 1, characterized in that: include: Acquire a local viewing angle image of the motor commutator to be inspected captured by a camera from a first angle; Performing superpixel segmentation and superpixel block semantic association coding on the local perspective image of the motor commutator to be detected to obtain a sequence of semantic coding feature vectors of the local perspective superpixel blocks of the context motor commutator; Inputting the sequence of semantic encoding feature vectors of the local perspective super pixel block of the contextual motor commutator into the contextual semantic enhancement module based on saliency-globality to obtain a sequence of enhanced semantic encoding feature vectors of the local perspective super pixel block of the contextual motor commutator; After cascading the sequence of semantic encoding feature vectors of the local perspective superpixel block of the enhanced context motor commutator into a global semantic feature vector of the local perspective of the motor commutator to be detected, the global semantic feature vector of the local perspective of the motor commutator to be detected is used as the global semantic information of the local perspective of the motor commutator to be detected, and determining whether there is a defect based on the global semantic information of the local perspective of the motor commutator to be detected.

Citation Information

Patent Citations

  • Method for detecting image salient target

    CN110956185A

  • Image semantic segmentation method and device

    CN114913528A