Processing method and system of pin type backboard, program product and storage medium
By automatically adjusting the distance and parameters through image recognition technology, the problem of frequent shutdown and debugging of the needle-type backplane processing system when facing different types of backplanes is solved, efficient processing parameter adjustment is achieved, production efficiency is improved, and labor costs and the risk of misoperation are reduced.
Patent Information
- Application Number
- CN202510721861.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-26
AI Technical Summary
The existing needle-type backplane processing system needs to be frequently shut down to adjust parameters when frequently switching between different types of backplanes, resulting in low production efficiency, high labor costs and a high risk of misoperation.
Through image recognition technology, the distance is automatically adjusted, complete details are obtained, image preprocessing and feature extraction are performed, the backplane type is identified in real time, and the position, direction, offset and rotation angle are accurately calculated to achieve precise adjustment of processing parameters.
It improves the adaptability to different types of backplanes, solves the problem of frequent shutdowns for debugging, improves production efficiency, and reduces labor costs and the risk of operational errors.
Smart Images

Figure CN120707476A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and in particular to a processing method, system, program product and storage medium for a pin-type backplane. Background Art
[0002] With the continuous development of electronic products, pin backplanes, as an important component of connectors, are widely used in various electronic devices. The precise processing of pin backplanes is crucial to ensuring the performance and reliability of electronic products.
[0003] The relevant pin-type backplane processing system utilizes a fixed-parameter design. During the initial production phase, the system sets processing parameters based on a specific pin-type backplane model, including key parameters such as processing speed, pressure, and temperature. These preset parameters remain unchanged during system operation, ensuring stable processing of the corresponding backplane model. When a new backplane model is required, technicians adjust the system's built-in parameters to accommodate the new processing requirements.
[0004] However, as market demands for faster product updates continue to increase, related technical solutions are becoming increasingly limited in the face of rapidly changing processing requirements. Each changeover to a different pin-type backplane requires machine downtime and parameter adjustment, a time-consuming process requiring specialized technicians. In a production environment characterized by frequent switching between different backplane models, frequent downtime for adjustments reduces production efficiency while increasing labor costs and the risk of errors. Summary of the Invention
[0005] The present application provides a method, system, program product and storage medium for processing a pin-type backplane, which are used to improve production efficiency.
[0006] In a first aspect, the present application provides a method for processing a pin-type backboard, comprising: obtaining current image information of the current pin-type backboard when a current pin-type backboard is detected; determining whether the current image information contains all the details of the current pin-type backboard; if the current image information does not contain all the details of the current pin-type backboard, adjusting the distance between the current pin-type backboard and re-acquiring the image information of the current pin-type backboard, and using the re-acquired image information as the current image information; if the current image information contains all the details of the current pin-type backboard, pre-processing the current image information; performing feature extraction on the pre-processed current image information to obtain feature information, wherein the feature extraction package It includes morphological processing, contour recognition and feature point detection; matching feature information with multiple pre-stored pin-type backboard templates; determining the type corresponding to the pin-type backboard template with the highest matching degree as the type of the current pin-type backboard, and determining processing parameters according to the type of the current pin-type backboard; matching feature information with the pin-type backboard template with the highest matching degree to determine the position and direction information of the current pin-type backboard; calculating the offset and rotation angle information of the current pin-type backboard based on the position and direction information; adjusting processing parameters according to the offset and rotation angle information, and processing the current pin-type backboard; after processing, inspecting the current pin-type backboard according to a preset quality inspection model.
[0007] By adopting the above technical solution, the distance is automatically adjusted to ensure the acquisition of complete details, and image preprocessing and feature extraction are performed. It is possible to detect and automatically identify the type of the current needle-type backplane in real time, and accurately calculate the position, direction, offset and rotation angle of the backplane, thereby achieving precise adjustment of processing parameters. This method improves the adaptability to different types of backplanes, solves the problem of frequent shutdown and debugging in related methods, improves production efficiency, and reduces labor costs and the risk of operational errors.
[0008] In combination with some embodiments of the first aspect, in some embodiments, the pre-training process of the preset quality detection model is: combining the generated background noise image with the training image to obtain a simulated abnormal image, where the training image is a historically correct image of the needle-type backboard; extracting the training feature information of the training image, and storing the training feature information as memory information; extracting the simulated feature information of the simulated abnormal image; calculating the difference between the simulated feature information and the memory information, where the background noise image is used as supervision data; based on the difference, obtaining the similarity of each area of the simulated abnormal image; and determining the area where the similarity is lower than the similarity threshold as an abnormal area.
[0009] By employing this technical solution, the generated background noise image is combined with the training image to create more realistic and diverse simulated abnormal images, enhancing the model's ability to identify various abnormal conditions. The features of the normal backplane are extracted and stored as memory information, establishing a reliable standard reference. By calculating the difference between the simulated features and the memory information and using a similarity threshold to identify abnormal areas, the model can more accurately identify various processing defects. This not only improves quality control effectiveness but also reduces the probability of misjudgments and missed detections, providing reliable quality assurance for the production process and improving the overall quality of the product.
[0010] In combination with some embodiments of the first aspect, in some embodiments, the step of combining the generated background noise image with the training image to obtain a simulated abnormal image specifically includes: binarizing the training image to obtain a binarized training image, wherein the area of interest is set to a high brightness value and the area of no interest is set to a low brightness value; generating a background noise image with a random peak distribution; threshold filtering the background noise image to obtain a filtered background noise image, deleting pixels above a first preset threshold and below a second preset threshold, wherein the first preset threshold is greater than the second preset threshold; segmenting the filtered background noise image to obtain multiple sub-noise images; and combining the sub-noise image with the binarized training image to obtain a simulated abnormal image.
[0011] By employing this technical solution, binarization highlights key areas in the training images, while a background noise image with random peak distribution simulates the various interferences that occur in actual processing. Threshold filtering removes extreme noise, making the simulation closer to reality. By segmenting the noise image and combining it with the binarized training image, a variety of anomalies are created. This method generates a variety of simulated anomaly images, greatly enhancing the model's ability to recognize a variety of actual anomalies.
[0012] In combination with some embodiments of the first aspect, in some embodiments, the step of calculating the difference between the simulated feature information and the memory information specifically includes: concatenating the training feature information and the memory information to form a combined feature map; performing a convolution operation on the combined feature map to obtain a fused feature; implementing a coordinate attention mechanism on the combined feature map to obtain an attention weight; multiplying the fused feature and the attention weight element-by-element to obtain an enhanced feature map; reducing the number of channels of the enhanced feature map to obtain an abnormality probability map; and determining the abnormality probability map as a difference.
[0013] By adopting the above technical solution, the concatenation of training features and memory information preserves the integrity of both types of information, while the convolution operation further fuses features and extracts higher-level information. The introduction of the coordinate attention mechanism highlights important areas and improves the accuracy of anomaly detection. Through element-by-element multiplication and channel reduction operations, abnormal features are extracted and a high-quality anomaly probability map is generated. This difference calculation method can accurately capture subtle abnormal features, greatly improving the accuracy and efficiency of anomaly detection.
[0014] In combination with some embodiments of the first aspect, in some embodiments, the step of implementing a coordinate attention mechanism on the combined feature map to obtain an attention weight specifically includes: performing global average pooling on the combined feature map in the height and width directions respectively to obtain two one-dimensional feature vectors; splicing the two one-dimensional feature vectors to form a two-dimensional feature map representing spatial position information; using a multi-layer perceptron to perform a nonlinear transformation on the two-dimensional feature map to obtain a transformed feature map; splitting the transformed feature map in the height and width directions respectively to obtain a height attention vector and a width attention vector; performing an outer product operation on the height attention vector and the width attention vector to generate a two-dimensional spatial attention map; mapping the numerical values in the two-dimensional spatial attention map to between zero and one to obtain attention weights.
[0015] By adopting the above technical solution, global average pooling extracts the spatial information of the feature map, while the nonlinear transformation of the multi-layer perceptron enhances the expressiveness of the features. The splitting in the height and width directions captures spatial information of different dimensions. The two-dimensional spatial attention map generated by the outer product operation fully considers the spatial relationship, and the numerical mapping ensures the reasonable distribution of attention weights. This attention mechanism can accurately locate abnormal areas and improve the accuracy of anomaly detection.
[0016] In combination with some embodiments of the first aspect, in some embodiments, the step of preprocessing the current image information specifically includes: grayscale processing the current image information; removing image noise from the current image information after grayscale processing; image enhancement of the current image information after noise removal; and performing image binarization operation on the enhanced current image information.
[0017] By adopting the above technical solutions, grayscale processing simplifies image information and highlights key features, while the noise removal step improves image quality and reduces interference factors. Image enhancement further highlights important details, and the binarization operation further simplifies the image, laying the foundation for subsequent contour recognition and feature point detection.
[0018] In combination with some embodiments of the first aspect, in some embodiments, the step of determining whether the current image information contains all the details of the current pin-type backplate specifically includes: calculating the clarity of the current image information; determining whether the clarity is greater than an image quality threshold; if it is not greater than the image quality threshold, the current image information does not contain all the details of the current pin-type backplate; if it is greater than the image quality threshold, extracting the outline in the current image information; determining whether the outline is complete; if the outline is complete, the current image information contains all the details of the current pin-type backplate; if the outline is incomplete, the current image information does not contain all the details of the current pin-type backplate.
[0019] By adopting the above technical solution, clarity calculation provides an objective assessment of image quality, contour extraction and integrity judgment further verify the integrity of the image, and automatic adjustments are made when conditions are not met to ensure the acquisition of high-quality images. This multi-level judgment mechanism not only ensures that the acquired image information is complete and clear, but also greatly reduces misjudgments and repeated processing caused by poor image quality.
[0020] In the second aspect, the present application provides a needle-type backplane processing system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, and the computer program code includes computer instructions, and one or more processors call the computer instructions to enable the needle-type backplane processing system to execute the method described in the first aspect and any implementation method of the first aspect.
[0021] In a third aspect, the present application provides a computer program product comprising instructions, which, when run on a pin-type backplane processing system, enables the pin-type backplane processing system to execute the method described in the first aspect and any implementation of the first aspect.
[0022] In a fourth aspect, the present application provides a computer-readable storage medium comprising instructions, which, when executed on a pin-type backplane processing system, enables the pin-type backplane processing system to execute the method described in the first aspect and any implementation of the first aspect.
[0023] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. By automatically adjusting the distance to ensure the acquisition of complete details, image preprocessing and feature extraction can be performed. It can detect and automatically identify the type of current pin-type backplane in real time, accurately calculate the position, direction, offset and rotation angle of the backplane, and thus achieve precise adjustment of processing parameters. This method improves the adaptability to different types of backplanes, solves the problem of frequent shutdown and debugging in related methods, improves production efficiency, and reduces labor costs and the risk of operational errors.
[0024] 2. By combining the generated background noise images with the training images, we created more realistic and diverse simulated anomaly images, enhancing the model's ability to identify various anomalies. The features of the normal backplane were extracted and stored as memory information, establishing a reliable standard reference. By calculating the difference between the simulated features and the memory information and using a similarity threshold to identify anomaly areas, the model was able to more accurately identify various processing defects. This not only improved quality control effectiveness but also reduced the probability of misjudgments and missed detections, providing reliable quality assurance for the production process and improving the overall quality of the product.
[0025] 3. Binarization highlights key areas in the training image, while the background noise image with random peak distribution simulates the various interferences that occur in actual processing. Threshold filtering removes extreme noise, making the simulation closer to reality. By segmenting the noise image and combining it with the binarized training image, a variety of anomalies are created. This method generates a variety of simulated anomaly images, greatly enhancing the model's ability to recognize various actual anomalies. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is a flow chart of a method for processing a needle-type backplane according to an embodiment of the present application; Figure 2 is another flow chart of the method for processing a needle-type backplane according to an embodiment of the present application; Figure 3 This is a schematic diagram of an exemplary hardware structure of a needle-type backplane processing system in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The terms used in the following examples of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in the specification and appended claims of this application, the singular expressions "a," "an," "said," "above," "the," and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in this application refers to and includes any or all combinations of one or more of the listed items.
[0028] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.
[0029] See also Figure 1 , Figure 1This is a flow chart of a method for processing a needle-type backplane according to an embodiment of the present application; S101, when a current pin-type backplane is detected, obtaining current image information of the current pin-type backplane; The current pin-type backboard refers to a specific pin-type backboard being inspected or processed. The current image information is used to represent digital image data of the pin-type backboard obtained by an image acquisition device, which includes visual features and details of the backboard.
[0030] In some embodiments, when the sensor or vision detects the presence of the pin-type backplane, it immediately triggers an image acquisition device (such as a high-resolution camera or an industrial camera) to capture an image of the current pin-type backplane.
[0031] S102, determining whether the current image information contains all details of the current pin-type backplane; Full detail refers to all important features on the pointer backplate, including key elements such as pins, pads, and circuit traces. Full detail means that all these key features are clearly visible in the image, with no missing or blurred parts.
[0032] In some embodiments, the image is checked to see if it contains all expected key areas, such as pin areas, circuit areas, etc. If the image quality is found to be unsatisfactory or lacks certain key details, the image will be marked as unqualified for subsequent adjustment and re-acquisition.
[0033] In some specific embodiments, an image is evaluated to determine whether it contains all the details of the current pin-type backplane by sequentially calculating image clarity, identifying key feature edges using an edge detection algorithm, calculating contrast and brightness distribution, comparing the image with a preset standard image template, and checking for the presence of expected key areas. Only when clarity reaches the expected level, expected key features are successfully identified, contrast and brightness distribution meet the standards, and all expected key areas are present is the image considered to contain all the details of the current pin-type backplane; if any of these conditions are not met, the image is considered not to contain all the details of the current pin-type backplane.
[0034] In some specific embodiments, step S102 specifically includes: S1021, calculating the clarity of the current image information; In some embodiments, the image needs to be converted to grayscale (if not already converted). Next, an edge detection operator (such as the Sobel or Laplacian) is applied to highlight edges and details within the image. Next, statistical characteristics of edge strength, such as variance or mean gradient magnitude, can be calculated. Another approach is to perform a frequency domain transform (such as a Fourier transform) on the image to analyze the energy distribution of high-frequency components. Finally, depending on the characteristics of the selected method, the calculated results are normalized to a standard range to obtain the final sharpness score.
[0035] S1022, determining whether the clarity is greater than an image quality threshold; S1023: If the value is not greater than the image quality threshold, the current image information does not contain all details of the current pin-type backplane; S1024: If the image quality is greater than the image quality threshold, extract the contour in the current image information; Contour refers to the continuous curve at the edge of an object in an image, which represents the shape characteristics of the object.
[0036] In some embodiments, the contour extraction process typically begins with image preprocessing, such as denoising and edge enhancement. Next, an edge detection algorithm (such as the Canny edge detector) is applied to identify edge pixels in the image. Next, a contour tracing algorithm (such as boundary tracing or contour approximation) is used to organize connected edge pixels into continuous contour lines. Finally, the extracted contours undergo post-processing, such as smoothing or simplification, to remove noise and unnecessary details.
[0037] S1025, determining whether the outline is complete; The contour refers to the outer boundary line of the pin-type backplane extracted in step S1024. The integrity indicates whether the contour is continuous and closed and can accurately reflect the actual shape of the pin-type backplane.
[0038] In some embodiments, the process of determining contour integrity includes multiple steps. First, the contour is checked for closure, meaning that the starting and ending points are connected. Next, the contour's geometric properties, such as area, perimeter, and circularity, are analyzed to determine if it conforms to the expected pin-back shape. Furthermore, the contour's complexity is checked to ensure it lacks excessive branching or unusual projections and depressions. Furthermore, the extracted contour can be compared to a predefined pin-back template to calculate similarity or matching.
[0039] S1026. If the outline is complete, the current image information includes all details of the current pin-type back plate; S1027: If the outline is incomplete, the current image information does not contain all the details of the current pin-type back plate.
[0040] It can be seen that clarity calculation provides an objective assessment of image quality, contour extraction and integrity judgment further verify the integrity of the image, and automatic adjustments will be made when the conditions are not met to ensure the acquisition of high-quality images. This multi-level judgment mechanism not only ensures that the acquired image information is complete and clear, but also greatly reduces misjudgments and repeated processing caused by poor image quality.
[0041] S103: If the current image information does not include all details of the current pin-type back plate, adjust the distance between the current pin-type back plate and reacquire the image information of the current pin-type back plate, and use the reacquired image information as the current image information; The distance refers to the vertical distance from the lens of the image acquisition device to the surface of the pin-type backplane.
[0042] In some embodiments, the position of an image capture device (e.g., a camera) or a pin-type backplane is adjusted. This adjustment involves moving the camera forward and backward, changing its focal length, or adjusting the conveyor belt or image capture device. Once the adjustment is complete, the image capture process is retriggered to acquire a new image. The newly acquired image replaces the previously unqualified image and becomes the new current image information. The judgment process in S102 is then repeated. This process is repeated multiple times until an image that meets the requirements is obtained.
[0043] S104, if the current image information includes all details of the current pin-type backplane, pre-process the current image information; In some embodiments, images that have been confirmed to be of acceptable quality undergo a series of processing operations. These operations include, but are not limited to: image denoising to eliminate random noise generated during the acquisition process; contrast enhancement to highlight important features in the image; image sharpening to improve the clarity of edges and details; color correction to ensure that image colors accurately reflect the actual situation; and geometric correction to correct lens distortion. The purpose of preprocessing is to provide higher quality, more standardized image input for subsequent feature extraction and analysis, thereby improving the accuracy and efficiency of subsequent processing.
[0044] In some specific embodiments, step S104 includes: S1041, grayscale processing is performed on the current image information; In some embodiments, the grayscale process first calculates a weighted average of the RGB values of each pixel. Common weights are set based on the human eye's sensitivity to different colors. The calculated grayscale value is then assigned to each pixel, resulting in a single-channel grayscale image.
[0045] S1042, removing image noise from the current image information after grayscale processing; In some embodiments, the denoising process first requires identifying the type of noise in the image. Common noise types include Gaussian noise and salt-and-pepper noise. Next, an appropriate filtering method is selected based on the noise type, such as mean filtering, median filtering, or Gaussian filtering. The selected filter is then applied to the entire image, suppressing the noise by calculating local pixel values. Finally, an image with reduced noise and preserved detail is obtained. This process can improve the image's signal-to-noise ratio, facilitating subsequent feature extraction and image analysis.
[0046] S1043, performing image enhancement on the current image information after noise removal; In some embodiments, the image enhancement process first analyzes the image's histogram to understand the distribution of pixel values. Then, based on the image's characteristics and processing objectives, an appropriate enhancement method is selected, such as histogram equalization, gamma correction, or sharpening filtering. The selected enhancement algorithm is then applied to the entire image. Finally, some post-processing is required, such as limiting the pixel value range to ensure that the enhanced image is not oversaturated or distorted. This process can improve image contrast, clarity, and detail visibility, facilitating subsequent feature extraction and image analysis.
[0047] S1044: Perform an image binarization operation on the enhanced current image information.
[0048] In some embodiments, the binarization process first requires determining an appropriate threshold value, which can be achieved using a fixed threshold method, an adaptive threshold method, or an image histogram-based method. Next, each pixel in the image is compared against the threshold. Pixels greater than or equal to the threshold are set to their maximum value (e.g., 255, representing white); pixels less than the threshold are set to their minimum value (e.g., 0, representing black). Finally, a binary image containing only black and white is obtained.
[0049] It can be seen that the grayscale processing simplifies the image information and highlights the key features, while the noise removal step improves the image quality and reduces interference factors. Image enhancement further highlights important details, and the binarization operation further simplifies the image, laying the foundation for subsequent contour recognition and feature point detection.
[0050] S105, performing feature extraction on the pre-processed current image information to obtain feature information, wherein the feature extraction includes morphological processing, contour recognition, and feature point detection; Feature information refers to a data set extracted to describe the features of the pin-type backplane.
[0051] In some embodiments, morphological processing, such as corrosion and dilation operations, is performed on the preprocessed image to eliminate noise and enhance specific structures. Then, contour recognition is performed to detect the outer boundary of the pin-type backplane and the boundaries of important internal components. Next, feature point detection is performed to identify key points on the backplane, such as pin positions, special marks, etc. The extracted feature information includes the geometric shape of the backplane, the pin distribution pattern, the position of special marks, etc. This information will be used in subsequent matching and analysis processes.
[0052] S106, matching the characteristic information with a plurality of pre-stored pin-type backplane templates; The plurality of pre-stored pin-type backplane templates refer to standard feature descriptions of different types of pin-type backplanes stored in the database.
[0053] In some embodiments, the feature information extracted in S105 is compared with multiple pin-type backplane templates stored in a database. This comparison involves multiple aspects, such as geometric similarity, consistency in feature point distribution, and matching of key dimensions. Various matching algorithms, such as template matching, feature point matching, or graph-based matching, are used. For each template, a matching score or similarity metric is calculated. This process is performed in parallel to improve efficiency, especially when a large number of templates are involved. The matching results are used for subsequent type determination and location positioning.
[0054] In some specific embodiments, a normalized cross-correlation algorithm is used for template matching; the Euclidean distance between feature points is calculated; the RANSAC algorithm is used to screen matching point pairs; shape context descriptors are calculated and the similarity is compared; and the Hough transform is used to detect the consistency of key geometric features, which is not limited here.
[0055] S107, determining the type corresponding to the pin-type backplane template with the highest matching degree as the type of the current pin-type backplane, and determining processing parameters according to the type of the current pin-type backplane; S108, matching the feature information with the pin-type backplane template with the highest matching degree to determine the position and direction information of the current pin-type backplane; In some embodiments, the feature information extracted in S105 is finely matched with the best matching template determined in S107. This process involves operations such as feature point alignment and edge alignment, and calculates the spatial transformation relationship between the current backplane features and the template features, including translation and rotation. Through this transformation relationship, the precise position coordinates of the backplane on the work platform and the rotation angle relative to the standard orientation can be determined.
[0056] In some specific embodiments, feature point matching algorithms such as SIFT or SURF are used for precise matching; the least squares method is applied to estimate the transformation matrix; the Hough transform is used to detect the main edge lines; the angle between the edge lines and the reference axis is calculated to determine the direction; and the center position of the backplane is determined using the center of mass calculation, which is not limited here.
[0057] S109, calculating the offset and rotation angle information of the current pin-type back plate based on the position and direction information; The offset indicates the distance difference between the actual position of the current pin type back plate and the ideal position, and the rotation angle information indicates the angle difference between the actual direction of the current pin type back plate and the standard direction.
[0058] In some embodiments, the actual position and orientation determined in S108 are compared with the preset ideal position and orientation. For the position, the offset distance on the X-axis and Y-axis, including the height deviation on the Z-axis, is calculated. For the orientation, the difference between the actual rotation angle and the standard angle is calculated.
[0059] In some specific embodiments, vector subtraction is used to calculate the center point offset; quaternion representation is applied to calculate the spatial rotation angle; Euler angle decomposition is used to calculate the rotation angle of each axis; and a homogeneous transformation matrix is used to represent the comprehensive position and direction deviation.
[0060] S110, adjusting processing parameters according to the offset and rotation angle details, and processing the current needle-type back plate; The offset and rotation angle information refers to the difference between the actual position and direction of the pin back plate calculated in S109 and the ideal state.
[0061] In some embodiments, the standard machining parameters determined in S107 are adjusted based on the offset and rotation angle information calculated in S109, including modifying the coordinate origin of the machining equipment, adjusting the tool path, etc. The adjusted parameters are transmitted to the control of the machining equipment, and then the machining process is started.
[0062] In some specific embodiments, the G code of the CNC machine tool is modified to compensate for position deviation; the focus position and cutting path of the laser cutting are adjusted; the reference coordinates of the visual guidance are updated; and the worktable angle of the multi-axis machining center is adjusted according to the rotation angle, which is not limited here.
[0063] S111. After processing, the current pin-type backplane is inspected according to a preset quality inspection model.
[0064] In some embodiments, the processed pin-type backplane is transferred to the inspection area. Inspection involves multiple aspects, such as dimensional measurement, appearance inspection, electrical performance testing, etc. Various sensors and measuring equipment, such as high-precision cameras, 3D scanners, electrical testers, etc., are used to collect various data of the backplane. These data are input into the preset quality inspection model for analysis. The model considers multiple quality indicators, such as pin spacing, solder joint quality, circuit connectivity, etc., and gives a comprehensive evaluation result. If any unqualified items are detected, a detailed report will be generated and correction suggestions will be given. The goal of this process is to ensure that each processed pin-type backplane meets the predetermined quality standards.
[0065] It can be seen that by automatically adjusting the distance to ensure the acquisition of complete details, performing image preprocessing and feature extraction, it is possible to detect and automatically identify the type of the current needle-type backplane in real time, and accurately calculate the position, direction, offset and rotation angle of the backplane, thereby achieving precise adjustment of processing parameters. This method improves the adaptability to different types of backplanes, solves the problem of frequent shutdown and debugging in related methods, improves production efficiency, and reduces labor costs and the risk of operational errors.
[0066] In the actual production process, due to the strict requirements of quality control, the probability of abnormal samples appearing in the needle-type backplane is low, and the abnormal forms are diverse, which makes it difficult to obtain a sufficient number and diversity of abnormal samples to train the quality detection model.
[0067] Therefore, see Figure 2 , Figure 2 : is another flow chart of the method for processing the pin-type backplane in the embodiment of the present application; in some embodiments,: The pre-training process of the preset quality detection model is: S201, combining the generated background noise image with the training image to obtain a simulated abnormal image, where the training image is a historical correct image of the needle-type backplate; The background noise image refers to an artificially generated image containing random noise or interference, which is used to simulate various interference factors that occur in actual detection. The training image refers to a known correct needle backplate image, which is used as a benchmark for model training. The simulated abnormal image refers to the image obtained by combining the background noise image with the training image, which is used to simulate abnormal situations that occur in actual detection.
[0068] In some embodiments, this step creates a series of simulated anomaly images by superimposing or fusing an artificially generated background noise image with a historically known correct needle backplate image. These simulated anomaly images contain features of the normal backplate image while also introducing various interferences and anomalies that occur during actual detection.
[0069] In some specific embodiments, S2011, binarizing the training image to obtain a binarized training image, wherein the region of interest is set to a high brightness value, and the region of no interest is set to a low brightness value; Binarization is the process of reducing the pixel values in an image to two levels. It is often used to highlight specific features or areas in an image. The high brightness value is usually represented by 255, representing white or the brightest pixel. The low brightness value is usually represented by 0, representing black or the darkest pixel.
[0070] In some embodiments, this step first identifies a region of interest in the image based on prior knowledge. Next, the pixel values of the entire image are converted to two extreme values: pixels in the region of interest are set to a high brightness value (e.g., 255), while pixels in other areas are set to a low brightness value (e.g., 0). This process effectively removes grayscale details from the image, highlighting key structures or features and providing a clear binary image for subsequent analysis and processing.
[0071] S2012, generating a background noise image with random peak distribution; Background noise images are artificially generated images that simulate interference or noise that occurs in real scenes. Random peak distribution refers to the irregular high and low variations in noise intensity in the image.
[0072] In some embodiments, a specific algorithm is used to generate a new image of the same size as the original image, which contains randomly distributed noise patterns. The intensity and position of these noise patterns are random, forming different peak areas to simulate various interferences that occur in the actual environment, such as uneven lighting, shadows, reflections, etc. This randomness helps to enhance the model's adaptability to various noise conditions.
[0073] S2013, performing threshold filtering on the background noise image to obtain a filtered background noise image, deleting pixels above a first preset threshold and below a second preset threshold, wherein the first preset threshold is greater than the second preset threshold; The first preset threshold is used to filter out excessively high noise and avoid it approaching the area of interest. If it is not processed, it will interfere with the judgment of the quality detection model. By setting an appropriate high threshold, these high-intensity noises that lead to misjudgment can be effectively eliminated while retaining the true key feature information. The second preset threshold is used to filter out excessively low noise and avoid it approaching the area of no interest. By setting an appropriate low threshold, these low-intensity noises that cause false alarms can be removed, thereby making the true subtle defects or non-critical area features more prominent.
[0074] S2014, segmenting the filtered background noise image to obtain a plurality of sub-noise images; In actual use, pin-type backplane images usually do not have large areas or a large number of defects. Considering this characteristic, directly filtering background noise images is not applicable; In some embodiments, a certain image segmentation algorithm is used to divide the background noise image after threshold filtering into multiple sub-images. These sub-images have the same size and shape and are also irregularly segmented according to the distribution characteristics of the noise. Through this segmentation, a series of local noise patterns can be obtained. Each sub-noise image can be independently used in the subsequent image synthesis process, thereby increasing the variability and authenticity of the final simulated abnormal image.
[0075] S2015. Combining the sub-noise image with the binarized training image to obtain a simulated abnormal image.
[0076] In some embodiments, the binarized training image obtained in step S2011 is used as a basis, one or more sub-noise images from step S2014 are selected, and then combined using an image fusion algorithm. This process involves pixel-level operations, such as weighted superposition or pixel-by-pixel mathematical operations. The result is a new image that retains the main features of the original training image while introducing noise interference in certain areas to simulate various abnormal conditions encountered in actual detection.
[0077] It can be seen that the binarization processing highlights the key areas in the training image, while the background noise image with random peak distribution simulates the various interferences that occur in actual processing. Threshold filtering removes extreme noise, making the simulation closer to the actual situation. By segmenting the noise image and combining it with the binarized training image, a variety of abnormal situations are created. The simulated abnormal images generated by this method are diverse, which greatly enhances the model's ability to recognize various actual abnormal situations.
[0078] S202, extracting training feature information of the training image and storing the training feature information as memory information; The training feature information represents the data extracted from the training image that can represent the characteristics of the image, which is used for subsequent comparison and analysis. The memory information refers to the data set formed by storing the extracted training feature information, which is used for model learning and reference.
[0079] In some embodiments, a specific algorithm or neural network is first used to extract information representing the image's features from a training image (i.e., a known, correct pin-type backplate image). These features include texture, shape, and color distribution. This extracted feature information is then stored in a structured form, forming a "memory library." This memory library serves as a reference for the model to determine whether new input images are abnormal.
[0080] In some specific embodiments, a CNN network including multiple layers of convolution and pooling operations is constructed; then, a training image is input into the network, and the output of the middle layer of the network is obtained as feature information; finally, the feature information is saved as a multi-dimensional tensor and stored in memory or hard disk, which is not limited here.
[0081] S203, extracting simulated feature information of the simulated abnormal image; It should be noted that the principle and process of this step are similar to those of step S202. The relevant principles and processes can be referred to step S202 and will not be repeated here.
[0082] S204, calculating the difference between the simulated feature information and the memory information, wherein the background noise image is used as supervision data; The discrepancy represents the degree of difference between the simulated feature information and the memorized information, and is used to quantify the degree of anomaly. Computation refers to the process of deriving a result through a mathematical method, and supervised data refers to known labels or reference information used to guide model learning, in this case, background noise images.
[0083] In some embodiments, an appropriate measurement method is selected, such as Euclidean distance, cosine similarity, or Mahalanobis distance, and then this method is used to calculate the difference between the simulated feature information extracted in step S203 and the memory information stored in step S202. In this process, the background noise image serves as a supervisory information to help the model understand which differences are caused by noise, thereby more accurately identifying true anomalies.
[0084] In some embodiments, the simulated feature information and the memory information are represented as high-dimensional vectors; the Euclidean distance or Manhattan distance between the two vectors is calculated; and the calculated distance value is compared with a preset threshold to determine the degree of difference, which is not limited here.
[0085] In some embodiments, step S204 specifically includes: S2041, concatenating the training feature information and the memory information to form a combined feature map; In some embodiments, feature information is first extracted from the current training image, typically obtained through the output of one or more layers of a neural network. Then, the corresponding normal sample features are retrieved from the model's memory mechanism. Finally, these two features are concatenated along a certain dimension to form a new, larger feature map. This combined feature map contains information about both the current sample and the normal sample, providing a comparative basis for subsequent anomaly detection.
[0086] In some specific embodiments, the channel dimension concatenation method can be used: first, ensure that the training feature information and the memory information have the same spatial dimensions (height and width); then, concatenate the two in the channel dimension, that is, if the training feature has C1 channels and the memory feature has C2 channels, the final combined feature map will have C1+C2 channels; finally, the concatenated feature map is normalized to ensure the consistency of the numerical range, which is not limited here.
[0087] S2042, performing a convolution operation on the combined feature map to obtain a fusion feature; In some embodiments, one or more convolution kernels are used to scan and calculate the combined feature map. The convolution kernel slides on the feature map, covering a local area each time, multiplying the value of the area by the convolution kernel weight and summing the results to obtain a value on the output feature map.
[0088] In some specific embodiments, one or more convolution kernels are defined, such as 3x3 or 5x5 in size, and the number of convolution kernels determines the number of output channels; the step size and padding method are set, such as a step size of 1, and zero padding is used to keep the spatial size unchanged; a convolution operation is performed on the combined feature map, and a nonlinear activation function (such as ReLU) is added to increase the expressive power of the model, which is not limited here.
[0089] S2043, applying a coordinate attention mechanism to the combined feature map to obtain an attention weight; The coordinate attention mechanism refers to a special attention calculation method that takes into account the importance of different positions in the feature map. The combined feature map refers to the feature representation obtained in step S2041 that contains training feature information and memory information. The attention weight represents the importance score of each position or each channel in the feature map, which is used to highlight key information.
[0090] In some embodiments, information aggregation is performed on the combined feature map in the spatial dimension and channel dimension respectively to obtain spatial attention representing the importance of position and channel attention representing the importance of channel. Then, these two types of attention information are fused to obtain attention weights that comprehensively consider spatial position and feature channels. This mechanism can help the model better pay attention to abnormal areas or features and improve the accuracy of anomaly detection.
[0091] In some specific embodiments, feature maps are compressed in the channel dimension by global average pooling and maximum pooling, and then spatial attention weights are generated using a shared multi-layer perceptron; feature maps are compressed by average pooling and maximum pooling in the spatial dimension, and channel attention weights are generated using 1D convolution; spatial attention and channel attention are combined through element-wise multiplication to obtain the final attention weight, which is not limited here.
[0092] S20431. Perform global average pooling on the combined feature map in the height and width directions to obtain two one-dimensional feature vectors; A combined feature map represents a two-dimensional or three-dimensional tensor containing both training feature information and memory information. Global average pooling is the process of averaging the entire spatial dimension of a feature map. Height refers to the vertical dimension of the feature map, while width refers to the horizontal dimension. A one-dimensional feature vector is the result of compressing two-dimensional or three-dimensional data into a one-dimensional array.
[0093] In some embodiments, each row of the combined feature map is averaged along the width direction to obtain a one-dimensional vector representing height information; then, each column of the combined feature map is averaged along the height direction to obtain a one-dimensional vector representing width information. These two one-dimensional vectors capture the overall feature distribution of the feature map in the vertical and horizontal directions, respectively, providing compressed but information-rich input for subsequent spatial attention calculations.
[0094] In some specific embodiments, each row of the combined feature map is traversed, the average value of each row is calculated, and a one-dimensional vector in the height direction is formed; each column of the combined feature map is traversed, the average value of each column is calculated, and a one-dimensional vector in the width direction is formed; the two obtained one-dimensional vectors are normalized to ensure consistency in the numerical range, which is not limited here.
[0095] S20432. Concatenate the two one-dimensional feature vectors to form a two-dimensional feature map representing spatial position information; A one-dimensional feature vector refers to the compressed features in the height and width directions obtained through global average pooling in step S20431. Concatenation refers to the operation of merging two or more data structures into a new data structure. A two-dimensional feature map refers to a data structure containing two spatial dimensions and is used to represent spatial distribution information. Spatial position information refers to the position distribution features on a two-dimensional plane.
[0096] In some embodiments, the one-dimensional vector representing height information is expanded into a matrix that repeats in the width direction; the one-dimensional vector representing width information is then expanded into a matrix that repeats in the height direction; and finally, these two matrices are concatenated along the channel dimension to produce a new two-dimensional feature map. Each position in this two-dimensional feature map contains the corresponding height and width information, thus representing the spatial position characteristics of the original feature map.
[0097] In some specific embodiments, the one-dimensional vector in the height direction is copied and expanded in the width direction to form a matrix; the one-dimensional vector in the width direction is copied and expanded in the height direction to form another matrix; these two matrices are spliced in the channel dimension to obtain the final two-dimensional feature map, which is not limited here.
[0098] S20433, using a multilayer perceptron to perform nonlinear transformation on the two-dimensional feature map to obtain a transformed feature map; A multilayer perceptron (MLP) is a neural network structure consisting of multiple fully connected layers. Nonlinear transformation refers to the use of nonlinear activation functions to process data, increasing the model's expressive power. The two-dimensional feature map is the feature representation containing spatial position information obtained in step S20432. The transformed feature map is the new feature representation obtained after processing by the multilayer perceptron.
[0099] In some embodiments, the two-dimensional feature map is flattened into a one-dimensional vector. This vector is then fed into a multi-layer perceptron consisting of multiple fully connected layers, each followed by a nonlinear activation function (such as ReLU). Finally, the output of the multi-layer perceptron is reshaped into a two-dimensional feature map. This process allows the model to learn more complex feature combinations, enhancing the expressive power of the original spatial information and facilitating more accurate subsequent attention calculations.
[0100] In some specific embodiments, the two-dimensional feature map is flattened into a one-dimensional vector; the transformation is performed through multiple fully connected layers, and a ReLU activation function is used after each layer; the output is reshaped into a two-dimensional feature map, and a batch normalization layer can be added if necessary to stabilize the training, which is not limited here.
[0101] S20434, splitting the transformed feature map in the height and width directions respectively to obtain a height attention vector and a width attention vector; The transformed feature map refers to the feature representation obtained after processing by the multilayer perceptron in step S20433. Splitting refers to the operation of decomposing a data structure into multiple substructures. The height attention vector refers to a one-dimensional vector representing the vertical importance distribution of the feature map. The width attention vector refers to a one-dimensional vector representing the horizontal importance distribution of the feature map.
[0102] In some embodiments, the transformed feature map is split along the channel dimension into two parts. The first part is then averaged or max-pooled along the width direction to obtain a one-dimensional vector representing the importance of the height direction. The second part is then averaged or max-pooled along the height direction to obtain a one-dimensional vector representing the importance of the width direction. In this way, two attention vectors are obtained, which respectively capture the importance distribution of the feature map in the two spatial dimensions.
[0103] In some specific embodiments, the transformed feature map is divided into two parts in the channel dimension; the first part is globally average pooled in the width direction to obtain a height attention vector; the second part is globally average pooled in the height direction to obtain a width attention vector, which is not limited here.
[0104] S20435, performing an outer product operation on the height attention vector and the width attention vector to generate a two-dimensional spatial attention map; The height attention vector and width attention vector refer to the one-dimensional vectors obtained in step S20434 that represent the importance of the vertical and horizontal directions, respectively. The outer product operation represents the mathematical operation of multiplying two vectors to obtain a matrix. The two-dimensional spatial attention map refers to the feature map obtained by the outer product operation that represents the distribution of attention on a two-dimensional plane.
[0105] In some embodiments, the height attention vector is treated as a column vector and the width attention vector as a row vector, and the outer product of these two vectors is calculated. The result is a two-dimensional matrix, where each element represents the intensity of attention at the corresponding spatial position. This two-dimensional spatial attention map combines attention information from both the height and width directions, accurately representing the importance of different spatial positions.
[0106] In some specific embodiments, the height attention vector is taken as a column vector and the width attention vector is taken as a row vector; matrix multiplication is performed directly to obtain a two-dimensional spatial attention map; the obtained attention map is normalized to ensure that the value is within a reasonable range, which is not limited here.
[0107] S20436. Map the values in the two-dimensional spatial attention map to between zero and one to obtain the attention weight.
[0108] The two-dimensional spatial attention map refers to the matrix representing the spatial attention distribution obtained by the outer product operation in step S20435.
[0109] In some embodiments, a suitable activation function (such as a sigmoid function) is selected; each element in the two-dimensional spatial attention map is then processed through this activation function; and finally a new two-dimensional matrix is obtained, in which the value of each element is constrained to be between 0 and 1. This process ensures the consistency of the numerical range of the attention weights, facilitating subsequent weighted operations with the feature map, and also enhances the contrast of attention strength between different locations.
[0110] It can be seen that global average pooling extracts the spatial information of the feature map, while the nonlinear transformation of the multi-layer perceptron enhances the expressiveness of the features. The splitting in height and width directions captures spatial information of different dimensions. The two-dimensional spatial attention map generated by the outer product operation fully considers the spatial relationship, and the numerical mapping ensures the reasonable distribution of attention weights. This attention mechanism can accurately locate abnormal areas and improve the accuracy of anomaly detection.
[0111] S2044, multiplying the fusion feature and the attention weight element by element to obtain an enhanced feature map; The fused feature refers to the feature representation obtained through the convolution operation in step S2042. The attention weight refers to the weight value calculated by the coordinate attention mechanism in step S2043. Element-wise multiplication refers to the multiplication of elements at corresponding positions. The enhanced feature map refers to the feature map after the weighting of the attention mechanism, highlighting important information.
[0112] In some embodiments, the fused features obtained in S2042 are multiplied element-by-element by the attention weights obtained in S2043. This process can be understood as applying an importance coefficient to each position and each channel of the fused features. The multiplication operation will amplify the feature values of areas with high attention weights, while suppressing the feature values of areas with low attention weights. The enhanced feature map obtained after processing retains the structure of the original features, but highlights the information that is important to the anomaly detection task, which is conducive to improving the effect of subsequent processing.
[0113] In some specific embodiments, dimensionality expansion is required to ensure that the shape of the attention weight matches the fused feature; the fused feature and the attention weight are directly element-wise multiplied; and the product result is normalized to keep the feature value within a reasonable range, which is not limited here.
[0114] S2045, reducing the number of channels of the enhanced feature map to obtain an abnormality probability map; The enhanced feature map refers to the feature representation obtained by multiplying the fusion feature and the attention weight in step S2044. Reducing the number of channels means reducing the depth dimension of the feature map. The abnormality probability map refers to a two-dimensional image representing abnormality at each spatial position.
[0115] In some embodiments, a dimensionality reduction method, such as a 1x1 convolution or fully connected layer, is used to reduce the number of channels in the enhanced feature map, typically to one or a few channels. This process can be viewed as a comprehensive evaluation of the multi-channel features at each spatial location to determine the anomaly probability at that location. The resulting anomaly probability map retains the structure of the original image in the spatial dimension, but each location has only one or a few values, representing the probability of an anomaly at that location.
[0116] In some specific embodiments, a 1x1 convolution kernel with 1 (or a few) output channels is defined; this 1x1 convolution is applied to the enhanced feature map to achieve channel compression; and a Sigmoid activation function is used to map the output value to a range between 0 and 1 to represent the abnormality probability, which is not limited here.
[0117] S2046. Determine the abnormal probability map as a difference.
[0118] It can be seen that the concatenation of training features and memory information preserves the integrity of both types of information, while the convolution operation further fuses features and extracts higher-level information. The introduction of the coordinate attention mechanism highlights important areas and improves the accuracy of anomaly detection. Through element-by-element multiplication and channel reduction operations, abnormal features are extracted and a high-quality anomaly probability map is generated. This difference calculation method can accurately capture subtle abnormal features and greatly improve the accuracy and efficiency of anomaly detection.
[0119] S205, based on the differences, obtaining the similarity of each region of the simulated abnormal image; Similarity indicates the degree of similarity between each region in the simulated abnormal image and the corresponding region in the normal image, and is used to quantify the normality of each region. A region is a local area or subregion in an image, which can be a fixed-size square or an irregularly shaped segmentation.
[0120] In some embodiments, the simulated abnormal image is divided into a plurality of regions, and then a similarity value is calculated for each region based on the difference calculated in step S204. The similarity value reflects the degree of similarity between the region and the corresponding region of the normal image, and the higher the similarity, the more normal the region.
[0121] In some specific embodiments, a window of fixed size is defined and slid on the simulated abnormal image; then, for each window position, the similarity between the features in the window and the corresponding memory information is calculated; finally, the calculated similarity value is assigned to the pixel where the center point of the window is located, which is not limited here.
[0122] S206: Determine the region whose similarity is lower than the similarity threshold as an abnormal region.
[0123] As can be seen, by combining the generated background noise images with the training images, more realistic and diverse simulated anomaly images were created, enhancing the model's ability to identify various anomalies. The features of normal backplanes were extracted and stored as memory information, establishing a reliable standard reference. By calculating the difference between the simulated features and the memory information and using a similarity threshold to identify anomaly areas, the model can more accurately identify various processing defects, improving quality control effectiveness while reducing the probability of misjudgments and missed detections. This provides reliable quality assurance for the production process and enhances the overall quality level of the product.
[0124] The following introduces an exemplary pin-type backplane processing system 300 provided in an embodiment of the present application. Figure 3 Schematic diagram of an exemplary hardware structure of a pin-type backplane processing system 300 provided in an embodiment of the present application.
[0125] In some embodiments, the needle-type backboard processing system 300 is a computer device or the needle-type backboard processing system 300 includes a computer device. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with other external terminals or servers through a network connection. In some embodiments, the network interface can be a wired network interface, and in some embodiments, the network interface can also be a wireless network interface. When the computer program is executed by the processor, the method in the embodiment of the present application is implemented.
[0126] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0127] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0128] As used in the above embodiments, the term “when” may be interpreted to mean “if” or “after” or “in response to determining that” or “in response to detecting that”, depending on the context. Similarly, the phrases “upon determining that” or “if (stated condition or event) is detected” may be interpreted to mean “if determining that” or “in response to determining that” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.
[0129] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive).
[0130] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for processing a needle-type backplane, characterized in that: include: When a current pin-type backplane is detected, obtaining current image information of the current pin-type backplane; Determining whether the current image information includes all details of the current pin-type backplane; If the current image information does not include all details of the current pin-type backplane, adjusting the distance from the current pin-type backplane, and reacquiring the image information of the current pin-type backplane, and using the reacquired image information as the current image information; If the current image information includes all details of the current pin-type backplane, pre-processing the current image information; Performing feature extraction on the pre-processed current image information to obtain feature information, wherein the feature extraction includes morphological processing, contour recognition and feature point detection; Matching the characteristic information with a plurality of pre-stored pin-type backplane templates; Determine the type corresponding to the pin-type backboard template with the highest matching degree as the type of the current pin-type backboard, and determine the processing parameters according to the type of the current pin-type backboard; Matching the feature information with the pin-type backplate template with the highest matching degree to determine the position and direction information of the current pin-type backplate; Calculating the offset and rotation angle information of the current pin-type backplate based on the position and direction information; Adjusting the processing parameters according to the offset and the rotation angle information to process the current pin-type back plate; After processing, the current pin-type backplane is inspected according to a preset quality inspection model.
2. The method according to claim 1, characterized in that The pre-training process of the preset quality detection model is: Combining the generated background noise image with a training image to obtain a simulated abnormal image, wherein the training image is a historical correct image of the needle-type backplate; extracting training feature information of the training image and storing the training feature information as memory information; extracting simulated feature information of the simulated abnormal image; calculating a difference between the simulated feature information and the memory information, wherein the background noise image serves as supervisory data; Based on the difference, obtaining the similarity of each region of the simulated abnormal image; The region where the similarity is lower than the similarity threshold is determined as an abnormal region.
3. The method according to claim 2, characterized in that The step of combining the generated background noise image with the training image to obtain a simulated abnormal image specifically includes: Binarization is performed on the training image to obtain a binary training image, wherein the region of interest is set to a high brightness value, and the region of no interest is set to a low brightness value; Generate a background noise image with random peak distribution; Performing threshold filtering on the background noise image to obtain a filtered background noise image, deleting pixels above a first preset threshold and below a second preset threshold, wherein the first preset threshold is greater than the second preset threshold; Segmenting the filtered background noise image to obtain a plurality of sub-noise images; The sub-noise image is combined with the binarized training image to obtain a simulated abnormal image.
4. The method according to claim 2, characterized in that The step of calculating the difference between the simulation feature information and the memory information specifically includes: Connecting the training feature information and the memory information in series to form a combined feature map; Performing a convolution operation on the combined feature map to obtain a fusion feature; Implementing a coordinate attention mechanism on the combined feature map to obtain an attention weight; Multiplying the fusion feature and the attention weight element by element to obtain an enhanced feature map; Reducing the number of channels of the enhanced feature map to obtain an abnormality probability map; The abnormal probability map is determined as the difference.
5. The method according to claim 4, characterized in that The step of implementing a coordinate attention mechanism on the combined feature map to obtain an attention weight specifically includes: Performing global average pooling on the combined feature map in the height and width directions respectively to obtain two one-dimensional feature vectors; splicing the two one-dimensional feature vectors to form a two-dimensional feature map representing spatial position information; Performing a nonlinear transformation on the two-dimensional feature map using a multi-layer perceptron to obtain a transformed feature map; Splitting the transformed feature map in height and width directions respectively to obtain a height attention vector and a width attention vector; Perform an outer product operation on the height attention vector and the width attention vector to generate a two-dimensional spatial attention map; The values in the two-dimensional spatial attention map are mapped to between zero and one to obtain the attention weight.
6. The method according to claim 1, wherein The step of preprocessing the current image information specifically includes: Performing grayscale processing on the current image information; removing image noise from the current image information after grayscale processing; Performing image enhancement on the current image information after noise removal; An image binarization operation is performed on the enhanced current image information.
7. The method according to claim 1, characterized in that The step of determining whether the current image information includes all details of the current pin-type backplane specifically includes: Calculating the clarity of the current image information; Determining whether the clarity is greater than an image quality threshold; If it is not greater than the image quality threshold, the current image information does not include all details of the current pin-type backplane; If it is greater than the image quality threshold, extracting the contour in the current image information; determining whether the outline is complete; If the outline is complete, the current image information includes all details of the current pin-type backplane; If the outline is incomplete, the current image information does not include all details of the current pin backplane.
8. A needle-type backboard processing system, characterized in that: The needle-type backboard processing system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the needle-type backboard processing system to execute the method described in any one of claims 1-7.
9. A computer program product comprising instructions, characterized in that When the computer program product is run on a pin-type backplane processing system, the pin-type backplane processing system is enabled to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium comprising instructions, characterized in that: When the instruction is executed on a pin-type backplane processing system, the pin-type backplane processing system is caused to execute the method according to any one of claims 1 to 7.