An automated detection method for defects such as foreign matter and pin retraction / reverse pins in electrical connectors.

By using a CMOS camera and a Faster R-CNN neural network model to automate the inspection of electrical connector images, the problem of low efficiency and poor accuracy of manual inspection in existing technologies is solved, and efficient and accurate defect identification and traceability inspection are achieved.

CN114119489BActive Publication Date: 2026-03-06BEIJING INST OF ASTRONAUTICAL SYST ENG
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111271995.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2026-03-06
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

In the current technology, the quality inspection of electrical connectors relies on manual judgment, which is inefficient, inaccurate, and has a low degree of automation, making it difficult to effectively identify defects such as pin retraction and pin bending.

Method used

Images of electrical connectors are captured using a CMOS camera. Image preprocessing, feature extraction, and recognition are performed using a Faster R-CNN neural network model and principal component analysis. Defect detection is then performed using algorithms such as the sum of absolute errors.

Benefits of technology

It has enabled automated detection of defects in electrical connectors, improving detection efficiency and accuracy, and enhancing the traceability and automation level of the detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114119489B_ABST
    Figure CN114119489B_ABST
Patent Text Reader

Abstract

This invention discloses an automated detection method for foreign objects and pin retraction / backward defects in electrical connectors. The method includes the following steps: Step 1: Under illumination, an image of the inside of the electrical connector cavity is acquired using a CMOS camera; Step 2: The image of the inside of the electrical connector cavity acquired in Step 1 is generated into a raw bitstream, which is transmitted through a control system to a receiving and decompression module. The receiving and decompression module decompresses the raw bitstream to obtain image / video data; Step 3: The image / video data obtained in Step 2 is preprocessed, and the preprocessed image / video data is converted to a new format, ultimately generating image / video data in a format acceptable to the detection network. This invention improves testing efficiency, accuracy, and traceability, enhances the level of automated testing, and improves the reliability of electrical connectors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automated testing technology, and in particular relates to an automated testing method for defects such as foreign objects and retracted pins in electrical connectors. Background Technology

[0002] Electrical connectors, as crucial components of electrical circuit interconnection systems, are widely used in aerospace products to transmit and control electrical signals and connect electronic and electrical equipment. Their reliability and quality control directly impact the stable operation of aerospace products and the safe flight of rockets. However, common quality issues such as pin retraction, pin bending, pin reversal, and foreign matter in connector cavities are frequently observed in the institute's quality information system. Therefore, strengthening quality control measures for electrical connectors and improving automated testing capabilities are urgently needed.

[0003] The current equipment appearance inspection, multimedia recording inspection, and connector pin retraction inspection conducted on the supporting products before factory acceptance testing, comprehensive testing, and various large-scale tests all rely on human visual judgment and identification. The inspection efficiency is low, and there are some situations where it is difficult to capture with a point-and-shoot camera, pinhole shadows interfere with judgment, and individual differences in judgment lead to missed detections. These are "hand-and-ear" type of testing items, and the effectiveness and coverage of the tests are inconsistent, with low automation and poor traceability. The lessons learned from this are very painful. Summary of the Invention

[0004] The technical problem solved by this invention is to overcome the shortcomings of the prior art and provide an automated detection method for defects such as foreign objects and retracted pins in electrical connectors, which improves testing efficiency, testing accuracy and traceability, and enhances the level of automated testing and the reliability of electrical connectors.

[0005] The objective of this invention is achieved through the following technical solution: an automated detection method for defects such as foreign objects and retracted pins in electrical connectors, the method comprising the following steps: Step 1: Under illumination by a light source, an image of the inside of the electrical connector cavity is acquired using a CMOS camera; Step 2: The image of the inside of the electrical connector cavity acquired in Step 1 is generated into a raw bitstream, which is transmitted through a control system to a receiving and decompression module, which decompresses the raw bitstream to obtain image / video data; Step 3: The image / video data obtained in Step 2 is preprocessed, and the preprocessed image / video data is converted to a new format to finally generate image / video data in a format acceptable to the detection network.

[0006] The aforementioned automated detection method for defects such as foreign objects and retracted pins in electrical connectors further includes: Step 4: Training a Faster R-CNN neural network model, using an image of the electrical connector cavity as input, and obtaining weight parameters and classification results after training; Step 5: Extracting data feature values ​​from the converted image / video data obtained in Step 3 to obtain different types of data feature information; Step 6: Using principal component analysis to determine the principal component elements from the data feature information extracted in Step 5, and performing data information mining on the principal component elements to obtain a data mining model; Step 7: Adjusting the 2D pose of the feature regions in the converted image / video data from Step 3, segmenting and extracting information about the electrical connector pins; Step 8: Training the information about the electrical connector pins from Step 7 using a Faster R-CNN neural network model, and processing the training results to obtain a neural network model with better robustness and higher accuracy; Step 9: Based on the weight parameters and classification results obtained in Step 4, and according to the data mining model in Step 6 and the neural network model in Step 8, finally outputting the detection result of the electrical connector.

[0007] In the above-mentioned automated detection method for defects such as foreign objects and retracted pins in electrical connectors, the image data preprocessing in step three includes the following steps: video segment extraction, system correction, single-frame video acquisition, image data augmentation, grayscale binarization, image enhancement, image filtering, and sliding window image segmentation.

[0008] In the above-mentioned automated detection method for defects such as foreign objects and retracted pins in electrical connectors, in step four, KMeans mean clustering is used to determine the prior box, and then a CNN deep convolutional neural network layer, an ROI pooling layer, and a fully connected layer are constructed in sequence.

[0009] In the above-mentioned automated detection method for defects such as foreign objects and retracted pins in electrical connectors, the data feature extraction method in step five includes: regional color saturation analysis, regional grayscale value analysis, and extraction of pin area distribution information.

[0010] In the above-mentioned automated detection method for defects such as foreign objects and retracted pins in electrical connectors, in step six, principal component analysis is a widely used data dimensionality reduction algorithm that maps n-dimensional features to k-dimensional features. These k-dimensional features are entirely new orthogonal features, which are reconstructed based on the original n-dimensional features.

[0011] In the above-mentioned automated detection method for defects such as foreign objects and retracted pins in electrical connectors, the mathematical model for pose adjustment in step seven is as follows:

[0012]

[0013] e(q) = f(q))f

[0014] J(q k+1 )=J(q k )+[Δe(q k )-J(q k )Δq k ]

[0015] Where J is the Jacobian matrix of the image, e(q) is the feature map bias of the image; f is the pose adjustment relationship function of different pixels, q is different images in the video stream, m is the number of pixels that need pose adjustment, n is the number of images in the video stream, f(q) is the feature map formed after pose adjustment of a certain image, and J(q) is the feature map formed after pose adjustment of a certain image. k+1 J(q) is the matrix formed after the (k+1)th image undergoes the Jacobian matrix transformation. k Let Δe(q) be the matrix formed after the Jacobian matrix transformation of the k-th image. k ) represents the feature map bias of the k-th image, Δq k Let q be the deviation of the k-th image. k+1 For the (k+1)th image, q k Let k be the k-th image.

[0016] In the above-mentioned automated detection method for defects such as foreign objects and retracted pins in electrical connectors, in step eight, the training results are processed using the absolute error summation algorithm, sequential similarity detection, squared difference summation algorithm, and normalized correlation coefficient matching algorithm.

[0017] In the aforementioned automated detection method for defects such as foreign objects and retracted pins in electrical connectors, in step eight, the initial floating-point parameter x of the Faster R-CNN neural network model is... f Normalizing to the range [0,1] yields the normalized value N(x). f ); normalize the value N(x) f ) is quantized to the nearest integer point x q .

[0018] In the above-mentioned automated detection method for defects such as foreign objects and retracted pins in electrical connectors, the normalization formula is:

[0019]

[0020] Among them, w min and w max N(x) represents the minimum and maximum values ​​of the weights in each layer of the network. f ) represents the normalized value; x f These are the initial floating-point parameters for the Faster R-CNN neural network model;

[0021] The quantification formula is:

[0022]

[0023] in, This represents reduction to the nearest integer, where k is the number of quantization bits.

[0024] Compared with the prior art, the present invention has the following advantages:

[0025] (1) The present invention combines system correction, grayscale binarization, image enhancement, image filtering and other algorithms to quickly and accurately complete the pre-processing of the image, and pre-extract the possible areas where the retracted pins and reversed pins of the electrical connector exist, thereby reducing the burden of subsequent network recognition.

[0026] (2) The network recognition module of the present invention adopts the Faster R-CNN neural network model and uses tensor decomposition and other methods to accelerate the model training and inference speed, which can efficiently and accurately complete the recognition of the retracted needles in the selected possible areas, thereby identifying and classifying defects.

[0027] (3) The data feature extraction algorithm of the present invention can extract features for small target samples, and the pixel information obtained by the pin area distribution information extraction algorithm can accurately map the defect area of ​​the inner cavity of the electrical connector.

[0028] (4) This invention uses the Softmax function to post-process the network output and uses the idea of ​​probability statistics to ensure the accuracy of recognition;

[0029] (5) The present invention performs 2D pose adjustment on the preprocessed image and calculates it using the Jacobian matrix and its iterative equation, which facilitates subsequent segmentation and extraction of the pin information of the electrical connector.

[0030] (6) The detection output of the electrical connector of the present invention combines neural network model matching and data mining-assisted discrimination to ensure the accuracy of the detection results;

[0031] (7) The present invention adjusts the network structure to speed up training, reduce network resource consumption, and reduce deployment difficulty and hardware requirements. Attached Figure Description

[0032] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0033] Figure 1 This is a flowchart of an automated detection technology method for excess material and retracted pin defects in electrical connectors based on computer vision, provided in an embodiment of the present invention.

[0034] Figure 2 This invention relates to an instrument for implementing an automated detection technology and method for defects such as foreign objects and retracted pins in electrical connectors based on computer vision. Detailed Implementation

[0035] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0036] Figure 2 This invention relates to an instrument for implementing an automated detection method for defects such as foreign objects, retracted pins, and bent pins in electrical connectors based on computer vision. For example... Figure 2 As shown, the testing instrument includes a clamping mechanism for fixing the component to be tested; an image acquisition section for acquiring image signals from the internal cavity of the electrical connector; and a back-end operation processing system for analyzing and recognizing image data and controlling user operations. The detailed component composition of each part is as follows:

[0037] A. Clamping mechanism

[0038] 1. Adaptive Diameter Fixture: Due to the significant size differences between different models of electrical connectors, a fixing fixture is designed at the outermost end of the instrument. The fixture uses suction cups at the bottom to adhere to the outer surface of the electrical connection to be tested. Two movable hinges at the top allow for free movement of the fixture, enabling angle adjustment to fix components of different diameters.

[0039] B. Image Acquisition Section

[0040] 2. Acquisition chamber housing: The outer side of the housing is connected to the fixing fixture. The cavity is shaped like a trumpet, which allows the internal searchlight and camera to be installed at multiple angles, enabling clear imaging of various details inside the electrical connector.

[0041] 3. CMOS Camera: A camera employing a CMOS image sensor. It is positioned at multiple angles within the instrument's internal cavity. Due to the instrument's relatively small overall size, a miniature CMOS camera is chosen to achieve multi-angle, high-precision imaging of the pins and plugs within the electrical connector cavity.

[0042] 4. Medical multi-angle shadowless lamp: Arranged at multiple angles inside the testing instrument, it can clearly project the light source to every corner of the electrical connector cavity. At the same time, the light source generated by the shadowless lamp prevents shadows from being cast on the pins and plugs inside the electrical connector, thus helping to acquire clearer image signals.

[0043] C. Backend Operation Processing System

[0044] 5. LED indicator lights: Used to display the current system status, including whether the detected electrical connectors are defective, the system power status, and personal operating information.

[0045] 6. TF Data Storage Card: The data storage card can record key operational information of the system, and save the test results of each electrical connector component for users to view and trace, and is used to calculate the failure rate of the entire batch of electrical connector components.

[0046] 7. Micro CPU Central Processing Unit: The CPU translates user operation information into machine language, and is connected to the user interface, memory card, power supply, and core computing chip. It is the information transmission center of the back-end operating system.

[0047] 8. AMOLED capacitive display screen: This display screen is touch-sensitive, and users can control the entire instrument through the user interface of the built-in operating system.

[0048] 9. NLP Intelligent Voice Module: Used to intelligently broadcast each test result, system operation status, key user operation information, etc., to present the operation results more clearly and concisely.

[0049] 10. System Power Supply: The power supply connects to the voice module, central processing unit, cooling system, etc., and provides power support to this system.

[0050] 11. Reserved Bluetooth VR interface: As a reserved function in the system, VR virtual observation function can be developed later to further observe the specific situation of the internal cavity of the electrical connector.

[0051] 12. Superconducting VC liquid cooling system: It adopts VC liquid cooling heat dissipation plate, high thermal conductivity gel and multi-layer graphite heat dissipation film. It can automatically activate the heat dissipation function for high computing load and high output scenarios, reduce system power consumption and ensure the safe operation of various electronic components.

[0052] 13. Intel NCS2 Neural Compute Stick: A dedicated deep neural network hardware accelerator that enhances the neural network training computing power of artificial intelligence chips, effectively improving the image detection and data analysis performance of the entire system.

[0053] 14. Artificial Intelligence Chip: A core chip component integrating data processing, image analysis, deep learning, and other artificial intelligence computing. The main modules on the chip include:

[0054] a. High-concurrency thread pool unit: Provides multi-threaded processing capabilities, controls multi-threaded concurrency for deep learning computations with high computing power requirements, makes full use of the computing resources on the chip, and helps to quickly and efficiently complete various time-consuming network training and data mining algorithms.

[0055] b. GPU (Graphics Processing Unit): For algorithms with high computational resource requirements, the GPU memory module can be called to accelerate computation, effectively improving the model training speed of neural network algorithms.

[0056] c. On-chip electronic components: These are electronic components such as resistors, capacitors, and wiring that are required for the normal operation of the chip.

[0057] d. Chip transformer power supply: An extended power supply unit for the chip. It converts the external power supply voltage into the voltage required for the chip to operate.

[0058] e.Eyeriss Deep Neural Network Accelerator: Currently a relatively advanced accelerator for deep convolutional neural networks, it optimizes the energy efficiency of the entire system through architecture reconfiguration, including the accelerator chip and off-chip DRAM. This chip module can effectively improve the computational speed of deep convolutional neural networks used for image processing.

[0059] f. Image preprocessing module: Performs preliminary preprocessing and transformation on the image signals acquired by the front-end acquisition cavity to form the input for neural network model calculation.

[0060] g. Data processing driver unit: Used for data preprocessing to prepare for data mining, data analysis, and neural network model training.

[0061] h. Deep learning computing unit: Used for training deep neural network models, it is the core computing unit in artificial intelligence chips.

[0062] i. Off-chip random access memory (SRAM): Dynamically stores intermediate information such as variables and model parameters during the calculation process to support the computing chip to quickly access the required parameters.

[0063] j.Socket wireless communication module: Integrates wireless communication units such as Bluetooth and WiFi, enabling the artificial intelligence chip to communicate with mobile clients in real time.

[0064] k. Data Mining Calculation Unit: Used for data mining calculations to efficiently analyze the detected electrical connector test data and determine the relationship between its health status and various parameters.

[0065] Figure 1 This is a flowchart of an automated detection method for excess material and pin retraction / backward pin defects in electrical connectors based on computer vision, provided in an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0066] Step 1: Acquire defect images. Under illumination, use a CMOS camera to acquire images of the cavity inside the electrical connector and transmit the acquired data to the image acquisition card; all pixels form a set of particulate pixels.

[0067] Step 2: The raw bitstream is generated from the image of the electrical connector cavity acquired in Step 1. This raw bitstream is transmitted through the control system to the receiving and decompression module, where it is decompressed to obtain image / video data. The raw bitstream in the video is typically encoded using H.264.

[0068] Step 3: Perform video image data preprocessing on the image / video data obtained in Step 2. This mainly includes video segment extraction, system correction, single-frame video acquisition, image data augmentation, grayscale binarization, image enhancement, image filtering, sliding window image segmentation, and other steps. Then, convert the format of the processed image data to finally generate a data signal that can be accepted by the detection network.

[0069] Step 4: Train the Faster R-CNN neural network model, using the defective image dataset as input, and obtain the weight parameters of each network and the classification results after training;

[0070] Step 5: Extract data feature values ​​from the image and video data obtained in Step 3 to obtain different types of data feature information;

[0071] Step Six: Use Principal Component Analysis (PCA) to determine the principal component elements from the data feature information extracted in Step Five, and then perform data information mining on them;

[0072] Step 7: Perform 2D pose adjustment on the feature regions in the image and video data from Step 3, segment and extract the information of the electrical connector pins;

[0073] Step 8: Train the information of the electrical connector pins in Step 7 using the FastR-CNN network, and process the training results using the sum of absolute errors (SAD), sequential similarity detection (SSDA), sum of squared differences (SAD), and normalized correlation coefficient matching (NCC) algorithm to obtain a model with better robustness and higher accuracy.

[0074] Step 9: Based on the results obtained from the network in Step 4, the data mining model in Step 6 is used to make the discrimination and the neural network model in Step 8 is used to match the results, and finally the detection results of the electrical connector are output.

[0075] In step three, image data preprocessing should include the following steps: After storing the original images and videos as bitstreams, data acquisition is first performed, using methods such as video frame segmentation, video segment extraction, and image data augmentation to obtain more accurate and effective data; then, the image and video data are repaired and optimized, using grayscale processing, image enhancement, and other methods to extract and amplify features, and filtering modules are used to select the features we need. Image grayscale processing can be used as a preprocessing step for image processing, preparing for subsequent higher-level operations such as image segmentation, image recognition, and image analysis. The brightness of three parts of the color image can be used as the grayscale values ​​of three grayscale images, and one grayscale image is selected according to application needs. The floating-point conversion algorithm is shown below:

[0076] Gray = R × 0.3 + G × 0.59 + B × 0.11

[0077] Where R, G, and B represent the three primary colors of an image; image enhancement can improve the visual effect of an image or make it more suitable for human or machine analysis and processing. Its linear transformation mathematical model is shown below:

[0078]

[0079] Where [a,b] represents the grayscale range of the image, f(x,y) is the input image, and c,d are parameters. Image filtering, which aims to suppress noise in the target image while preserving as much detail as possible, is an indispensable operation in image preprocessing. Its effectiveness directly impacts the efficiency and reliability of subsequent image processing and analysis. For a digital image, the filter used at each point represents the sum of the products of the corresponding neighboring pixels defined by the filter template and the filter coefficients, as shown in the following equation:

[0080]

[0081] Where w(s,t) are the filter coefficients.

[0082] In step four, the Faster R-CNN neural network, developed from R-CNN and Fast R-CNN, uses the selective search algorithm to obtain target candidate regions. Each candidate region is then scaled to the same size, and all are input into a CNN to extract features before being classified using an SVM. Finally, regression is performed on the classification results. The model should include the following steps: first, KMeans clustering is used to determine prior bounding boxes; then, a deep convolutional neural network layer (CNN), a region-of-interest (ROI) pooling layer, and a fully connected layer are constructed sequentially. The detection part mainly includes regression processing of the bounding boxes and passing the classification results through a Softmax layer to ensure classification accuracy. The Softmax function uses a probabilistic approach and is widely used in multi-class classification scenarios. Its function form is:

[0083]

[0084] In step five, the data feature extraction methods include: regional color saturation analysis, regional grayscale value analysis, and extraction of pin area distribution information. Saturation can be defined as chroma divided by lightness, and like chroma, it characterizes the degree to which a color deviates from gray of the same brightness, also known as color purity. Saturation depends on the ratio of chromatic components and achromatic components (gray) in the color. The greater the chromatic component, the greater the saturation; the greater the achromatic component, the lower the saturation. Grayscale uses black tones to represent objects, that is, using black as the base color, and displaying images with different saturations of black. Each grayscale object has a brightness value from 0% (white) to 100% (black). Images generated using black-and-white or grayscale scanners are usually displayed in grayscale.

[0085] In step six, Principal Component Analysis (PCA) is a widely used data dimensionality reduction algorithm. Its main idea is to map n-dimensional features onto k-dimensional data. These k-dimensional features are entirely new orthogonal features, reconstructed from the original n-dimensional features. PCA works by sequentially finding a set of mutually orthogonal coordinate axes from the original space. The choice of these new coordinate axes is closely related to the data itself. Specifically, the first new coordinate axis is chosen to be the direction with the largest variance in the original data; the second new coordinate axis is chosen to be the direction with the largest variance in the plane orthogonal to the first axis; the third axis is the direction with the largest variance in the plane orthogonal to the first and second axes; and so on, resulting in n such coordinate axes. By obtaining these new coordinate axes in this way, we find that most of the variance is contained in the first k coordinate axes, while the variance contained in the later coordinate axes is almost zero. Therefore, we can ignore the remaining coordinate axes and only retain the first k axes that contain the vast majority of the variance. In fact, this is equivalent to retaining only the dimensional features that contain the majority of variance, while ignoring the dimensional features that contain almost zero variance, thus achieving dimensionality reduction of the data features.

[0086] In step seven, the mathematical model for pose adjustment is as follows:

[0087]

[0088] e(q)=f(q)-f

[0089] J(q k+1 )=J(q k )+[Δe(q k )-J(q k )Δq k ]

[0090] Where J is the Jacobian matrix of the image, and e(q) is the feature map deviation of the image; the pose change of the image can be calculated iteratively using the above model.

[0091] In step eight, to eliminate the influence of dimensions between floating-point parameters, data standardization is required to ensure comparability between data metrics. This involves standardizing the initial floating-point parameters x of the convolutional neural network. f Normalize it to the range [0, 1:

[0092]

[0093] Among them, w min and w max N(x) represents the minimum and maximum values ​​of the weights in each layer of the network. f () represents the normalized value;

[0094] The normalized value N(x) f ) is quantized to the nearest integer point x q :

[0095]

[0096] in, This represents reduction to the nearest integer, where k is the number of quantization bits.

[0097] This invention, based on the Fast R-CNN algorithm, can quickly perform image detection and classification. Pre-compressing and encoding the images and videos reduces the burden of subsequent image classification and recognition. For housing defect detection, this invention pre-processes images of electrical connector housings acquired by industrial cameras through filtering and noise reduction to obtain images of each defect area. Then, a Gaussian mixture classifier is used to classify each defect image, identifying the defects present in the housing, which can greatly improve detection accuracy. For pin retraction, pin bending, and foreign object defects, the image recognition-based pin retraction, pin bending, and foreign object detection system can quickly and accurately detect the position of the pin contacts, calculate their deviation distance, and effectively identify foreign objects present in the plug and cavity. Through the implementation of the above detection algorithms and the construction and verification of test prototypes, this invention obtains an effective automated defect detection algorithm, thereby improving testing efficiency, testing accuracy and traceability, and enhancing the level of automated testing and the reliability of electrical connectors.

[0098] This invention combines computer vision, artificial intelligence chips, and deep learning technologies to conduct research on automated detection technology for foreign objects and bent pin defects in electrical connectors, and to develop a prototype of a handheld universal automatic testing product for electrical connectors based on an embedded artificial intelligence chip. This effectively solves the long-standing problems encountered by these products. The product's characteristics of being "portable, universal, fast, and accurate" make it suitable for various scenarios and environments, including factory acceptance testing, comprehensive testing, and large-scale testing. It identifies defects such as bent pins, bent frames, bent pins, scratches, and foreign objects in cavities, thereby improving testing efficiency, accuracy, and traceability, and enhancing the level of automation and reliability of electrical connectors.

[0099] This invention combines system correction, grayscale binarization, image enhancement, and image filtering algorithms to quickly and accurately complete pre-processing of images, pre-extracting possible areas where retracted or bent pins exist in electrical connectors, reducing the burden on subsequent network recognition. The network recognition module of this invention uses a Faster R-CNN neural network model and employs tensor decomposition and other methods to accelerate model training and inference, enabling efficient and accurate recognition of retracted or bent pins in the selected possible areas, thereby identifying and classifying defects. The data feature extraction algorithm of this invention can extract features from small target samples, and the pixel information obtained by the pin area distribution information extraction algorithm can accurately map the defect area inside the electrical connector cavity. This invention uses the Softmax function to post-process the network output, using probabilistic statistics to ensure recognition accuracy. This invention performs 2D pose adjustment on the pre-processed image, using the Jacobian matrix and its iterative equation for calculation, facilitating subsequent segmentation and extraction of connector pin information. The detection output of this invention combines neural network model matching and data mining-assisted discrimination to ensure the accuracy of the detection results. This invention adjusts the network structure to accelerate training, reduce network resource consumption, and alleviate deployment difficulty and hardware requirements.

[0100] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications to the technical solutions of the present invention by utilizing the methods and techniques disclosed above without departing from the spirit and scope of the present invention. Therefore, any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solutions of the present invention shall fall within the protection scope of the technical solutions of the present invention.

Claims

1. A method for automatically detecting excess material and pin retraction defects of an electrical connector, the method comprising: The method comprises the following steps: Step one: under the irradiation of a light source, an image in a cavity of an electrical connector is collected by a CMOS camera to obtain an image in the cavity of the electrical connector; Step two: the image in the cavity of the electrical connector collected in step one is generated into an original code stream, which is transmitted into a receiving and decompression module through a control system, and the receiving and decompression module decompresses the original code stream to obtain image / video data; Step three: the image / video data obtained in step two is preprocessed, and the preprocessed image / video data is converted in format to finally generate converted image / video data that can be accepted by a detection network; Further comprising: Step four: a Faster R-CNN neural network model is trained with the image in the cavity of the electrical connector as input, and weight parameters and classification results are obtained after training; Step five: the converted image / video data obtained in step three is extracted for data feature values to obtain different types of data feature information; Step six: principal component analysis is used to determine principal component elements of the data feature information extracted in step five, and data information mining is performed on the principal component elements to obtain a data mining model; Step seven: the feature region in the converted image / video data in step three is adjusted in 2D pose, and the information of the electrical connector pin is segmented and extracted; Step eight: the information of the electrical connector pin in step seven is trained by the Faster R-CNN neural network model, and the training result is processed to obtain a neural network model with better robustness and more accurate accuracy; Step nine: according to the data mining model in step six and the neural network model in step eight, the weight parameters and classification results obtained in step four are finally output to obtain the detection result of the electrical connector.

2. The method of claim 1, wherein: In step three, the image data preprocessing comprises the following steps: video segment interception, system correction, video single frame collection, image data expansion, gray scale binaryzation, image enhancement, image filtering and sliding window image segmentation.

3. The method of claim 1, wherein: In step four, KMeans mean clustering is used to determine the prior box, and then a CNN deep convolutional neural network layer, an ROI pooling layer and a full connection layer are sequentially constructed.

4. The method of claim 1, wherein: In step five, the data feature extraction method comprises: regional color saturation analysis, regional gray value analysis and pin region distribution information extraction.

5. The method of claim 1, wherein: In step six, principal component analysis is a widely used data dimension reduction algorithm, which maps n-dimensional features to k-dimensional features, and the k-dimensional features are new orthogonal features reconstructed on the basis of the original n-dimensional features.

6. The method of claim 1, wherein: In step seven, the mathematical model of pose adjustment is as follows: e(q)=f(q)-f J(q k+1 ) = J(q k ) + [Δe(q k ) - J(q k ) Δq k ] Wherein, J is the Jacobian matrix of the image, e(q) is the feature map deviation of the image; f is the pose adjustment relationship function of different pixel points, q is different images of the video stream, m is the number of pixel points needing pose adjustment, n is the number of images of the video stream, f(q) is the feature map formed after pose adjustment of an image, J(q k+1 ) is the matrix formed after the Jacobian matrix transformation of the k+1th image, J(q k ) is the matrix formed after the Jacobian matrix transformation of the kth image, Δe(q k ) is the feature map deviation of the kth image, Δq k is the deviation of the kth image, q k+1 is the k+1th image, q k is the kth image.

7. The method of claim 1, wherein: In step eight, the training result is processed by using the absolute error sum algorithm, the sequential similarity detection, the square difference sum algorithm and the normalized correlation coefficient matching algorithm.

8. The method of claim 1, wherein: In step eight, the initial floating-point parameters x of the Faster R-CNN neural network model are normalized to the range [0, 1] to obtain normalized values N(x f ) = x / x max f ); The normalized value N(x f ) is quantized to the nearest integer point x q .

9. The method of claim 8, wherein: The normalization formula is: where w min and w max are the minimum and maximum values of the weights of each layer; N(x f ) is a normalization value; and x f is the initial floating-point parameter of the Faster R-CNN neural network model. The quantization formula is: wherein represents rounding to the nearest integer, k is the number of quantization bits.

Citation Information

Patent Citations

  • Image preprocessing system and method for increasing compression ratio of periodic texture image

    CN108830909A