A microwave substrate defect identification and automatic sorting method and system

CN121324361BActive Publication Date: 2026-10-23NANJING YUNTONG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511464129.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-10-23
Estimated Expiration
2045-10-14

AI Technical Summary

Technical Problem

[0009]针对上述现有技术中存在的问题,本发明提供一种微波基板缺陷识别与自动分拣方法及系统,通过四机位协同作业,结合视觉算法与机械控制,实现微波基板“上料-检测-分拣-放盘”的全流程处理,旨在解决现有技术中存在的以下核心问题:

Benefits of technology

1) 正反面识别效率与精度提升:采用轻量化YOLOv5-lite模型,识别速度达800片/小时,准确率≥98%(降低误操作率至2%以下),减少人工干预。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121324361B_ABST
    Figure CN121324361B_ABST
Patent Text Reader

Abstract

The application discloses a microwave substrate defect identification and automatic sorting method, comprising the following steps: setting a first station to distinguish the front and back of the microwave substrate, and entering a second station when judging that it is the front; setting the second station to detect and position the front, identify the front defects, and decide to enter a third station or move into a waste chute according to the identification result; setting the third station to detect the back and template matching; deciding to enter a fourth station or moving into the waste chute according to the detection result; setting the fourth station to place the microwave substrate and detect the uniformity; determining whether the sorting is completed according to the detection result; generating an ID for each microwave substrate, recording, inquiring and tracing data, and ensuring the whole-process processing quality of the microwave substrate. The application realizes the whole-process processing of the microwave substrate, helps to improve the product quality consistency and production efficiency, and brings higher economic benefits and quality management guarantee for enterprises.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of semiconductor manufacturing and intelligent quality inspection, and particularly relates to a method and system for microwave substrate defect identification and automatic sorting. Background Technology

[0002] Microwave substrates, as core components of electronic products, typically have geometric dimensions in the millimeter range and process precision in the micrometer range. Surface quality directly determines electrical performance (such as conduction resistance and insulation) and packaging reliability (such as bonding strength and heat dissipation efficiency). With the miniaturization and high integration of consumer electronics and automotive electronics, microwave substrate sizes are gradually shrinking to within 10mm, making surface defect detection and sorting a core bottleneck in the production process. Current microwave substrate inspection mainly faces the following technical challenges: 1. Random front and back states: When microwave substrates are stacked or scattered in material boxes, the front and back states are irregular, making manual flipping inefficient, with a high error rate and great difficulty; automated equipment lacks efficient recognition algorithms, which easily leads to problems such as "repeated detection" or "missed grabbing".

[0003] 2. Difficulty in identifying small defects: Defects of 1mm size (such as scratches 1mm in length and 0.1mm in width) account for only 0.1%-1% of the surface of microwave substrates ≤1cm. Traditional machine vision (such as edge detection and threshold segmentation) is affected by light reflection, resulting in low accuracy in identifying such defects.

[0004] 3. Insufficient double-sided inspection: Existing equipment mostly adopts the "single-sided inspection + manual flipping" mode, which results in low inspection efficiency due to the single-sided inspection and manual flipping steps.

[0005] 4. Inconsistent tray placement direction: If the angle deviation of the microwave substrate entering the waffle tray exceeds ±2°, it will cause the bonding position to shift in subsequent packaging processes, increasing the defect rate; existing equipment lacks a real-time angle correction mechanism, resulting in poor consistency of tray placement angle. 5. Inability to guarantee completeness: Waffle trays typically contain 100-500 slots. Existing systems lack slot occupancy and position deviation detection. When "empty slots" or "off-center" occur, there is no real-time alarm, leading to an increase in rework rate in subsequent processes.

[0006] 6. Lack of data traceability: Inspection data (such as defect location and angle deviation) is not bound to the unique ID of the microwave substrate. When quality problems occur, it is impossible to trace back to the specific work station and time, which does not meet the requirements of the ISO9001 quality management system in the semiconductor industry.

[0007] Furthermore, at the algorithmic level, traditional edge detection algorithms (such as the Canny algorithm) rely on gradient threshold settings, resulting in poor robustness to reflective microwave substrate surfaces—the detection accuracy drops by 25% when the light intensity changes by ±10%; threshold segmentation algorithms cannot distinguish between "micro-defects" and "surface textures." Convolutional Neural Networks (CNNs) show advantages in defect detection, but for small targets at the 1mm level, conventional CNNs lack sufficient feature extraction capabilities. At the mechanical structure level, existing production lines mostly adopt a 2-3 station design, failing to form a closed loop of "front and back recognition—double-sided detection—angle correction—fitness detection": some equipment lacks a reverse detection station, relying on manual supplementary inspection; some equipment lacks an angle correction module, with a tray placement accuracy of only ±0.3mm, which cannot meet the high-precision packaging requirements (requiring ±0.1mm).

[0008] Therefore, there is an urgent need for a system that integrates "optical imaging + deep learning algorithm + automated mechanical structure" to solve the problems of 1mm-level defect detection, front-back discrimination, angle correction, kitting inspection and data traceability of microwave substrates ≤1cm, realize full-process automation of "detection-sorting-traceability", and improve the quality inspection efficiency and yield of semiconductor production lines. Summary of the Invention

[0009] To address the problems existing in the prior art, this invention provides a microwave substrate defect identification and automatic sorting method and system. Through four-station collaborative operation, combined with visual algorithms and mechanical control, it achieves the entire process of microwave substrate "loading-inspection-sorting-repositioning," aiming to solve the following core problems existing in the prior art: 1) Automatic identification of the front and back sides of microwave substrates is inefficient due to interference from texture and reflection, requiring manual verification and slowing down the production line; 2) Small defects of 1mm level have weak features that are easily confused with conventional methods, which are not accurate enough and are prone to misjudgment and missed detection. 3) Microwave substrate testing often involves incomplete coverage on one side, and manual flipping operations can easily damage the microwave substrate. 4) The microwave substrate placement lacks a real-time angle correction mechanism, resulting in poor angle consistency and deviations that affect subsequent processes; 5) The carrier box lacks an associated verification mechanism, and the completeness of the kit is not guaranteed in real time. It is difficult to provide early warnings for incorrect boxes and empty slots. 6) The test data is not linked to the microwave substrate identification, resulting in a lack of data traceability and making it difficult to pinpoint the source of quality problems.

[0010] To achieve the above-mentioned technical objectives, the present invention provides the following technical solution: A method for defect identification and automatic sorting of microwave substrates, specifically including the following steps: S1. Set the first position to determine the front and back of the microwave substrate; if it is determined to be the front, proceed to the second position; if it is determined to be the back, wait for disturbance to flip or shift, and then re-identify. S2. Set up a second machine position to inspect and locate the front side of the microwave substrate, identify front side defects, and decide whether the microwave substrate enters the third machine position or is moved into the waste tank based on the front side defect results. S3. Set up a third camera position to inspect the reverse side of the microwave substrate and match the template; based on the results of the reverse side defects and template matching, determine whether the microwave substrate enters the fourth camera position or is moved into the waste tank. S4. Set the fourth position to perform microwave substrate placement and kitting test; determine whether sorting is complete based on the kitting test results; S5. Generate an ID for each microwave substrate and perform data recording, querying, and traceability to ensure the quality of microwave substrate processing throughout the entire process.

[0011] Furthermore, step S1 specifically includes: S11. Image acquisition: Using a top-view industrial camera, along with a coaxial light source and polarizer, to suppress reflections on the microwave substrate surface, acquire an image of the top of the microwave substrate. ; S12. Use a positive / negative recognition algorithm; build a classification model based on the lightweight convolutional neural network YOLOv5-lite, with the input image... Microwave output substrate category label , Indicates the front. The opposite side is indicated; the classification model is trained using a dataset of front and back images of microwave substrates with different lighting and stain scenes. The dataset is divided into a training set, a validation set, and a test set, and the model parameters are optimized through transfer learning. S13. Perform gripping control on the microwave substrate; if The control module sends instructions to the robotic arm to pick up the microwave substrate and place it on the transfer plate; if The microwave substrate is kept in the original material box, waiting to be re-identified after the next disturbance, which is achieved through a vibration mechanism.

[0012] Furthermore, step S2 specifically includes: S21. Positioning calculation: Using sub-pixel edge detection and principal axis fitting algorithms, the contour features of the microwave substrate are extracted, and the precise coordinates and attitude angles are calculated. S22. Frontal defect detection: A combination algorithm of super-resolution preprocessing, multi-scale CNN, and attention mechanism is used to detect minute defects. Based on the defect detection results, it is determined whether the microwave substrate enters the third position or is transferred to the waste tank.

[0013] Furthermore, step S21 specifically includes: S211, Edge extraction; Front image of microwave substrate. Gaussian filtering and Canny edge detection are performed to obtain the edge image E; S212, Subpixel Fitting: The least squares method is used to fit a straight line to edge E, and subpixel-level edge coordinates are calculated. ,in i= 1,2,..., n, n For the number of edge points, The first i The x and y coordinates of each edge point; S213, Principal Axis Calculation: Principal Component Analysis (PCA) is used to reduce the dimensionality of the obtained edge coordinates to obtain the principal axis direction of the microwave substrate, and then the center pixel coordinates are calculated. With attitude angle The formula is expressed as: ; in, , These are the first and second eigenvalues ​​obtained from principal component analysis, respectively. ; x-coordinate in the edge coordinate system with the vertical axis covariance; , They are respectively , The variance; S214, Coordinate Transformation; Combined with Hand-Eye Calibration Matrix , pixel coordinates Convert to robot coordinate system The formula is: .

[0014] Furthermore, step S22 specifically includes: S221. Super-resolution preprocessing; using the ESRGAN model to process the image. A 2x super-resolution reconstruction was performed. The model was trained using the DIV2K dataset and fine-tuned using microwave substrate defect images. The peak signal-to-noise ratio (PSNR) of the reconstructed image was ≥32dB, ensuring that the 1mm defect was clearly visible. S222, Multi-scale feature extraction; Based on the improved YOLOv5 network, an FPN structure is introduced to construct 5 feature scale layers P2-P6: Layer P2 is for small defects at the 1mm level, and the number of convolution kernels is increased by 1×1. Layers P3-P6: The original YOLOv5 feature fusion method is used to achieve multi-scale feature fusion through upsampling and downsampling, covering the defect detection requirements of 2-10mm. S223. Simultaneously, an attention mechanism is integrated, embedding SE and CBAM modules sequentially in layers P2-P4. The SE module assigns weights to the feature map channel dimensions, compresses the feature map channels through global average pooling, outputs the channel weights through a fully connected layer and a Sigmoid activation function, and multiplies them with the original feature map to obtain the channel-enhanced feature map. ;CBAM module for Spatial attention enhancement is performed by obtaining two 1×1 spatial feature maps through max pooling and average pooling. These are then concatenated and reduced to one channel via 1×1 convolution. After sigmoid activation, the feature maps are then... Multiply to obtain the final feature map. ; S224. Defect Judgment and Output: The network outputs the defect bounding box coordinates, confidence level, and category; and determines whether a defect exists based on the following conditions: If the pixel area of ​​the defect region satisfy: ; in, 64 represents the pixel area of ​​the microwave substrate, and 64 represents the pixel area of ​​the super-resolution image corresponding to a 1mm defect, with the confidence level greater than the upper limit of the set confidence threshold. If it is determined to be a "defect", the control module records the defect type and location, and then it is transferred to the waste tank. If the area condition is met and the confidence level is between the upper and lower limits of the set confidence level threshold, it is marked as a "suspicious defect" and enters the third camera position for review; If the confidence level is less than the lower limit of the set confidence level threshold, it is judged as "no defects on the front".

[0015] Furthermore, step S3 specifically includes: S31. Reverse Image Acquisition: The microwave substrate is flipped over by a flipping mechanism, and a downward-looking industrial camera with parameters consistent with the second-position camera, along with a dome diffuse light source, is used to acquire the reverse image. ; S32. Reverse Defect Detection: Employing the same super-resolution + multi-scale CNN + attention mechanism combined algorithm as the second camera position, detects defects ≥1mm on the reverse side and outputs defect labels. , This indicates that there is a defect. This indicates that the test is successful. S33. Perform template matching and angle correction; S34. Remove microwave substrates with defects: If If a defect has been identified during frontal inspection, the robotic arm will move the microwave substrate to the waste bin, simultaneously recording the defect type and location coordinates, and saving this information to the data traceability module; if Once the angle correction is complete, the microwave substrate is moved to the fourth position.

[0016] Furthermore, step S33 specifically includes: S331. Select a defect-free microwave substrate reverse image as a standard template T, and extract the coordinates of key features in the template. Where j = 1, 2, ..., m, and m is the number of feature points; S332. Perform pyramid cross-correlation matching; for the reverse image... Construct a four-layer Gaussian pyramid, perform normalized cross-correlation (NCC) matching at each layer, and calculate the matching score R, expressed by the formula: ; in, Template on the reverse image The offset in , Images The grayscale mean of template T ; Represents the reverse image In coordinates The grayscale value at that location; To apply offset The grayscale value at the corresponding position on the template; the closer the matching score is to 1, the higher the matching degree. Set a matching score threshold, and if the score exceeds the threshold, the matching is considered complete. S333. Calculate the rotation angle; calculate the rotation matrix using the least squares method based on the correspondence of the matched feature points. This allows us to obtain the precise rotation angle. The formula is expressed as: ; in, For image The coordinates of the matched feature points Rotation angle The corresponding rotation matrix; S334. Finally, perform angle correction; set the angle tolerance. ,like , To achieve the required angle, the robotic arm is controlled to perform a rotational motion, with the rotation angle being... The corrected angle deviation must be lower than the deviation threshold.

[0017] Furthermore, step S4 specifically includes: S41. Waffle plate positioning; The waffle plate is fixed by a positioning fixture, and the waffle plate grid matrix is ​​determined by visual calibration. Where r is the number of rows and c is the number of columns; each cell corresponds to a target coordinate in the robot coordinate system. ; S42. Microwave substrate placement: The control module drives the robot to pick up the microwave substrate and place it in the target grid position according to the microwave substrate posture information output by the third position. During the placement process, the posture is adjusted in real time to ensure that the deviation between the microwave substrate angle and the waffle grid reference line and the placement position accuracy are within the preset range. S43. Perform kitting inspection, specifically including: A top-view camera with parameters identical to the second camera position was used to capture panoramic images of the waffle disc. Covers all cells; Based on the target detection algorithm, the presence of a microwave substrate in each grid cell is identified, and a grid cell status label is output. , This indicates the presence of a microwave substrate. Indicates an empty space; right Calculate the actual center coordinates of the microwave substrate based on the grid position. With attitude angle If the following conditions are met: ,and If the grid position is normal, it is determined that the grid position is normal; otherwise, it is marked as misalignment or abnormal angle. If there is an empty space, that is If the position is misaligned or the angle is abnormal, the system will immediately trigger an audible and visual alarm, display the coordinates of the abnormal grid position on the human-machine interface, and suspend the sorting process until manual intervention is required. S44. When all slots of the waffle tray meet the requirements of having microwave substrates and having normal positions and angles, it is determined to be a complete set and sorting is completed. The control module sends an instruction to move the waffle tray to the next process. If there are any unprocessed abnormal slots, the waffle tray is temporarily stored in the buffer area until the abnormality is resolved.

[0018] Furthermore, step S5 specifically includes: S51. When each microwave substrate enters the first machine position, the system automatically generates a unique identifier. The identifier format is "date + workstation number + serial number", and this identifier follows the microwave substrate throughout the entire process of inspection and sorting without changing; S52. The data traceability module records key information in real time, stores it in the local database MySQL, and uploads it synchronously to the factory manufacturing execution system. S53, Through The system allows users to query microwave substrate data across the entire process by time range and workstation number, and export test reports to meet the needs of quality management and problem tracing.

[0019] The present invention also provides an application system for the above-mentioned microwave substrate defect identification and automatic sorting method, specifically including: The first camera module, including an upward-viewing industrial camera, a coaxial light source, a polarizer, and a vibration mechanism, is used to complete the identification and preliminary screening of the front and back sides of the microwave substrate, restricting only the front microwave substrate to enter the subsequent work stations. The second camera module includes an upward-looking industrial camera, a telecentric lens, a ring light source, and a defect detection algorithm operation unit, which are used to achieve precise positioning of the front side of the microwave substrate and front defect detection. The third camera module includes a downward-looking industrial camera, a dome diffuse light source, a flipping mechanism, and a template matching algorithm unit. It is used to complete the detection of defects on the reverse side of the microwave substrate, precise angle measurement and rotation correction, and to remove microwave substrates with defects. The fourth camera module includes an upward-facing industrial camera, a waffle plate positioning fixture, a robotic arm, a vacuum suction cup, and an audible and visual alarm, used to achieve precise placement and suitability testing of qualified microwave substrate waffle plates, as well as abnormal alarms. The track conveying system, including belt conveyors and positioning sensors, is used to stably transport the microwave substrate between various workstations, ensuring that the microwave substrate is accurately positioned when it arrives at the designated workstation. The control module, including an industrial PC, PLC, and motion control card, is used to coordinate the work of each module through industrial Ethernet, execute the full-process control logic of "identification-detection-correction-placement", and handle abnormal working conditions. The data traceability module, including a local database server and a human-machine interface, is used to store microwave substrate testing data throughout the entire process, provide data query, report export and data interaction with the MES system, and support remote monitoring and quality analysis.

[0020] Based on the above technical solution, the present invention has at least the following beneficial effects: 1) Improved efficiency and accuracy of front and back recognition: The lightweight YOLOv5-lite model is adopted, with a recognition speed of 800 pieces / hour and an accuracy of ≥98% (reducing the error rate to below 2%), reducing manual intervention.

[0021] 2) Enhanced small defect detection capability: Through the combined algorithm of "super-resolution preprocessing + multi-scale CNN + attention mechanism", the accuracy of 1mm-level defect detection is ≥99%, the false negative rate is ≤1%, and the false positive rate is ≤2%, which meets the high-precision quality inspection requirements of small-sized microwave substrates.

[0022] 3) Double-sided inspection with full coverage: The integrated third-position reverse inspection module eliminates the need for manual flipping, improving inspection efficiency by 30% and reducing the missed detection rate of reverse defects from 15% to 1%, ensuring the overall surface quality of the microwave substrate.

[0023] 4) Optimization of tray placement angle consistency: Based on template matching and real-time correction by the robot, the microwave substrate tray placement angle deviation is ≤ ±0.5° (75% lower than existing equipment), and the placement position accuracy is ≤ ±0.1mm, which meets the strict requirements of subsequent packaging processes for microwave substrate posture and reduces the packaging defect rate.

[0024] 5) Real-time integrity assurance: The fourth position has 100% integrity detection coverage, and the response time for missing or off-center detection is ≤0.5s. It can alarm in real time and pause the process to avoid rework in subsequent processes.

[0025] 6) Full-process data traceability: Each microwave substrate is bound with a unique ID, and data from the entire process of "material loading-inspection-sorting-tray placement" is recorded. Multi-dimensional queries and report export are supported, which meets the requirements of ISO9001 quality management system and facilitates the tracing of quality problems and production line optimization.

[0026] 7) Strong system scalability: The device hardware modules adopt standardized interfaces (such as camera USB3.0 and light source 24V DC interface), and the algorithm supports model transfer learning. It can quickly adapt to the detection and sorting of different types of small-sized components (size 1-10mm) such as LED microwave substrates, ceramic microwave substrates, and micro sensors, and has a wide range of applicable scenarios. Attached Figure Description

[0027] Figure 1 This is a flowchart of a microwave substrate defect identification and automatic sorting method proposed in this invention; Figure 2 This is a schematic diagram of the implementation module of the microwave substrate defect identification and automatic sorting method proposed in this invention. Detailed Implementation

[0028] To make the above-mentioned objectives, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. This will allow for a full understanding and implementation of how the present application uses technical means to solve technical problems in microwave substrate inspection such as "misjudgment of front and back sides, missed detection of minute defects, large posture deviations, and difficulty in managing kitting," and to achieve efficient sorting.

[0029] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware. Furthermore, this application can be implemented as a computer program product stored in one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.), wherein the program code can be read and executed by a processor to complete all or part of the steps of the methods described in this invention.

[0030] like Figure 1 and 2 As shown, this invention proposes a method and system for microwave substrate defect identification and automatic sorting. By integrating an improved YOLOv5 model architecture with subpixel edge detection, principal component analysis (PCA) localization, super-resolution preprocessing, and pyramid NCC template matching, this invention achieves high-precision defect identification and attitude calibration of the front / back images of microwave substrates. This effectively improves the positioning accuracy of microwave substrates, the detection rate of minute defects, and the robustness of the model to illumination reflections and surface stains. Furthermore, this invention constructs a complete platform integrating "image acquisition - data training - detection and sorting - data traceability," supporting front / back identification of microwave substrates, front / back defect detection, attitude correction, waffle plate matching determination, and full-process data recording and traceability. It boasts advantages such as high automation, fast detection speed, and strong industrial adaptability.

[0031] The microwave substrate surface defect detection and sorting integrated system proposed in this invention has the following modules, specifically including: The first camera module, including an upward-viewing industrial camera, a coaxial light source, a polarizer, and a vibration mechanism, is used to complete the identification and preliminary screening of the front and back sides of the microwave substrate, restricting only the front microwave substrate to enter the subsequent work stations. The second camera module includes an upward-looking industrial camera, a telecentric lens, a ring light source, and a defect detection algorithm operation unit, which are used to achieve precise positioning of the front side of the microwave substrate and front defect detection. The third camera module includes a downward-looking industrial camera, a dome diffuse light source, a flipping mechanism, and a template matching algorithm unit. It is used to complete the detection of defects on the reverse side of the microwave substrate, precise angle measurement and rotation correction, and to remove microwave substrates with defects. The fourth camera module includes an upward-facing industrial camera, a waffle plate positioning fixture, a robotic arm, a vacuum suction cup, and an audible and visual alarm, used to achieve precise placement and suitability testing of qualified microwave substrate waffle plates, as well as abnormal alarms. The track conveying system, including belt conveyors and positioning sensors, is used to stably transport the microwave substrate between various workstations, ensuring that the microwave substrate is accurately positioned when it arrives at the designated workstation. The control module, including an industrial PC, PLC, and motion control card, is used to coordinate the work of each module through industrial Ethernet, execute the full-process control logic of "identification-detection-correction-placement", and handle abnormal working conditions. The data traceability module, including a local database server and a human-machine interface, is used to store microwave substrate testing data throughout the entire process, provide data query, report export and data interaction with the MES system, and support remote monitoring and quality analysis.

[0032] Based on the above system, the method proposed in this invention specifically includes the following steps: S1. Set the first position to determine the front and back of the microwave substrate; if it is determined to be the front, proceed to the second position; if it is determined to be the back, wait for disturbance to flip or shift, and then re-identify. In a preferred embodiment, step S1 specifically includes: S11. Image acquisition: Using a top-view industrial camera, along with a coaxial light source and polarizer, to suppress reflections on the microwave substrate surface, acquire an image of the top of the microwave substrate. ; In this embodiment, the hardware parameters and optical settings of the first camera position are as follows: 1. Camera: Baslerac A2440-75uc industrial camera is selected, with a resolution of 2448×2048 (5 million pixels), a frame rate of 30fps, a USB3.0 interface, and support for ROI (Region of Interest) cropping, which can reduce data transfer volume and improve processing speed.

[0033] 2. Light source: The Keyence CA-DWW2 coaxial light source is used, with a wavelength of 550nm (green), a power of 10W, and a light emission uniformity of ≥90%. When used with a polarizer (model Edmund Optics 49-953), it can effectively suppress the metallic reflection on the surface of the microwave substrate (the reflectivity is reduced from 60% to below 10%), highlighting the difference in texture between the front and back surfaces (such as markings on the front and no markings on the back).

[0034] 3. Vibration mechanism: A small electromagnetic vibrator (model SZ-20) is selected, with an amplitude adjustable from 0-3mm and a vibration frequency of 50Hz. When the reverse microwave substrate is detected, the vibration mechanism starts for 0.5s, causing the microwave substrate to flip or shift and re-enter the identification process, thus avoiding the accumulation of reverse microwave substrates.

[0035] S12. Use a positive / negative recognition algorithm; build a classification model based on the lightweight convolutional neural network YOLOv5-lite, with the input image... Microwave output substrate category label , Indicates the front. The opposite side is indicated; the classification model is trained using a dataset of front and back images of microwave substrates with different lighting and stain scenes. The dataset is divided into training set, validation set, and test set, and the model parameters are optimized through transfer learning.

[0036] In this embodiment, the dataset is required to cover front and back images from different batches, under different lighting conditions, and with different surface conditions. Simultaneously, the images are preprocessed before being input into the classification model: cropped to 640×640 pixels, randomly rotated, and brightness adjusted to enhance the model's generalization ability.

[0037] In this embodiment, the classification model is a YOLOv5-lite model built on the PyTorch framework. Its backbone layer uses the MobileNetV3 lightweight network to reduce the number of parameters and improve inference speed. The trained model is converted to ONNX format and deployed to the embedded processor of the first camera. Camera images are read through OpenCV, the model is called to perform front and back recognition, and the results are output to the control module.

[0038] S13. Perform gripping control on the microwave substrate; if The control module sends commands to the robotic arm via RS485 protocol. The robotic arm moves to a position 5mm above the microwave substrate, activates the vacuum suction cup (with a suction force set to 1N, suitable for microwave substrates weighing 5-10mm), and picks up the microwave substrate onto the transfer plate (positioning accuracy ±0.1mm). The suction cup is then released to complete the placement. The microwave substrate is kept in the original material box and will be re-identified after the next disturbance (to avoid repeated flipping and wasting time). The disturbance is achieved through a vibration mechanism.

[0039] The specific process of disturbance and re-identification is as follows: the control module triggers the vibration mechanism to start for 0.5s, causing the microwave substrate to flip or shift. Then the camera re-acquires images for identification. If the reverse side is identified 3 times in a row, the system determines that the microwave substrate is "abnormal", transfers it to the waste tank and records the reason ("continuous reverse side not flipped").

[0040] S2. Set up a second machine position to inspect and locate the front side of the microwave substrate, identify front side defects, and decide whether the microwave substrate enters the third machine position or is moved into the waste tank based on the front side defect results. In this embodiment, the hardware configuration and optical parameters of the second camera position are specifically set as follows: The camera and lens adopt the same setup as the first-position camera, paired with a telecentric lens to ensure distortion-free imaging of the microwave substrate edge and improve positioning accuracy. A ring light source is used, with a 30° angle between the light source and the camera axis, uniformly illuminating the microwave substrate surface and avoiding shadow interference. The algorithm execution unit uses an embedded GPU module, supporting multi-threaded parallel processing to meet the computational power requirements of super-resolution preprocessing and multi-scale detection. Based on this, as a preferred implementation, step S2 specifically includes: S21. Positioning calculation: Using sub-pixel edge detection and principal axis fitting algorithms, the contour features of the microwave substrate are extracted, and the precise coordinates and attitude angles are calculated. More specifically, step S21 includes: S211, Edge extraction; Front image of microwave substrate. Gaussian filtering (variance set to 1.2, using a 5x5 convolution kernel) and Canny edge detection (with a high threshold) were performed. Low threshold ), to obtain the edge image E; S212, Subpixel Fitting: The least squares method is used to fit a straight line to edge E, and subpixel-level edge coordinates are calculated. ,in i= 1,2,..., n, n This represents the number of edge points, typically n ≥ 50 to ensure fitting accuracy. The first i The x and y coordinates of each edge point; The fitted straight line equation is ,in , ; The linear equations of the four sides of the microwave substrate are obtained by edge fitting, and the coordinates of the intersection points of adjacent sides are calculated (i.e., the four corner points of the microwave substrate, which are also the edge coordinates in step S213). S213, Principal Axis Calculation: Principal Component Analysis (PCA) is used to reduce the dimensionality of the obtained edge coordinates to obtain the principal axis direction of the microwave substrate, and then the center pixel coordinates are calculated. With attitude angle The formula is expressed as: ; in, , These are the first and second eigenvalues ​​obtained from principal component analysis, respectively. ; x-coordinate in the edge coordinate system and the vertical axis covariance; , They are respectively , The variance; S214, Coordinate Transformation; Combined with Hand-Eye Calibration Matrix , pixel coordinates Convert to robot coordinate system The formula is: .

[0041] S22, Front Defect Detection: A combined algorithm of super-resolution preprocessing, multi-scale CNN, and attention mechanism is used to detect minute defects. Based on the defect detection results, it is determined whether the microwave substrate enters the third machine position or is transferred to the waste tank. Step S22 specifically includes: S221. Super-resolution preprocessing; using the ESRGAN model to process the image. Perform 2x super-resolution reconstruction, with a model input of a 640×640 pixel image and an output of a 1280×1280 pixel image. The model was trained using the DIV2K dataset (including 800 training images and 100 validation images), and fine-tuned using 1000 microwave substrate defect images. The peak signal-to-noise ratio (PSNR) of the reconstructed images was ≥32dB, ensuring that 1mm defects were clearly visible. S222, Multi-scale feature extraction; Based on the improved YOLOv5 network, an FPN structure is introduced to construct 5 feature scale layers P2-P6: Layer P2 is for small defects at the 1mm level, and the number of 1×1 convolution kernels is increased (in this embodiment, it is increased from the original 32 to 64). Layers P3-P6: The original YOLOv5 feature fusion method is used to achieve multi-scale feature fusion through upsampling and downsampling, covering the defect detection requirements of 2-10mm. S223. Simultaneously, an attention mechanism is integrated, embedding SE and CBAM modules sequentially in layers P2-P4. The SE module assigns weights to the feature map channel dimensions, compresses the feature map channels through global average pooling, outputs the channel weights through a fully connected layer and a Sigmoid activation function, and multiplies them with the original feature map to obtain the channel-enhanced feature map. ;CBAM module for Spatial attention enhancement is performed by obtaining two 1×1 spatial feature maps through max pooling and average pooling. These are then concatenated and reduced to one channel via 1×1 convolution. After sigmoid activation, the feature maps are then... Multiply to obtain the final feature map. ; S224. Defect Judgment and Output: The network outputs the defect bounding box coordinates, confidence level, and category; and determines whether a defect exists based on the following conditions: If the pixel area of ​​the defect region satisfy: ; in, 64 represents the pixel area of ​​the microwave substrate, and 64 represents the pixel area of ​​the super-resolution image corresponding to a 1mm defect. If the confidence level is greater than the upper limit of the set confidence level threshold, it is judged as a "defect". The control module records the defect type and location, and then transfers it to the waste tank. If the area condition is met and the confidence level is between the upper and lower limits of the set confidence level threshold, it is marked as a "suspicious defect" and enters the third camera position for review; If the confidence level is less than the lower limit of the set confidence level threshold, it is judged as "no defects on the front".

[0042] In this application, only microwave substrates with no defects on both the front and back can enter the fourth inspection station. Therefore, in actual operation, microwave substrates that are judged to have no defects on the front must also enter the third inspection station for reverse side inspection.

[0043] S3. Set up a third camera position to inspect the reverse side of the microwave substrate and match the template; determine whether the microwave substrate enters the fourth camera position or is moved into the waste tank based on the reverse side defects and template matching results. In a preferred embodiment, step S3 specifically includes: S31. Reverse Image Acquisition: The microwave substrate is flipped over by a flipping mechanism, and a downward-looking industrial camera with parameters consistent with the second-position camera, along with a dome diffuse light source, is used to acquire the reverse image. ; In this embodiment, the hardware composition and flipping mechanism of the third camera position are as follows: a downward-looking industrial camera and a telecentric lens are installed inverted, and together with a dome diffuse light source, the reverse side of the microwave substrate is illuminated from below to avoid surface reflection; the flipping mechanism adopts a servo motor-driven rotating gripper with a rotation range of 0-180°, a positioning accuracy of ±0.1°, and an adjustable gripping force of 0.5-2N. After the microwave substrate arrives at the third camera position, the gripper clamps the microwave substrate from both sides, the servo motor drives it to rotate 180°, and after flipping, it is released to the detection platform.

[0044] S32. Reverse Defect Detection: Employing the same super-resolution + multi-scale CNN + attention mechanism combined algorithm as the second camera position, detects defects ≥1mm on the reverse side and outputs defect labels. , This indicates that there is a defect. This indicates that the test is successful. S33. Perform template matching and angle correction; this step adjusts all randomly placed microwave substrates to be horizontal and vertical, providing precise orientation for automatic sorting; step S33 specifically includes: S331. Select a defect-free microwave substrate reverse image as a standard template T, and extract the coordinates of key features (such as positioning holes and the corners of marking patterns) in the template. Where j = 1, 2, ..., m, and m is the number of feature points; S332, Perform pyramid cross-correlation matching; for the reverse image Construct a four-layer Gaussian pyramid, perform normalized cross-correlation (NCC) matching at each layer, and calculate the matching score R, expressed by the formula: ; in, Template on the reverse image The offset in , Images The grayscale mean of template T ; Represents the reverse image In coordinates The grayscale value at that location; To apply offset The grayscale value at the corresponding position on the template; the closer the matching score is to 1, the higher the matching degree. Set a matching score threshold, and if the score exceeds the threshold, the matching is considered complete. In this embodiment, the resolution of each layer is half that of the previous layer, and the resolution of the 4th layer is 156×156 pixels; coarse matching is performed in the 4th layer pyramid image, the NCC matching score R is calculated, and the matching score R is found. The candidate regions are identified; fine matching is performed in the corresponding 3-1 layer pyramid image to gradually narrow the search range, ultimately finding the candidate regions in the reverse image. Find the exact matching region and extract the actual coordinates of the four feature points. Furthermore, this embodiment also accelerates the pyramid NCC matching algorithm through hardware to meet real-time requirements.

[0045] S333. Calculate the rotation angle; calculate the rotation matrix using the least squares method based on the correspondence of the matched feature points. This allows us to obtain the precise rotation angle. The formula is expressed as: ; in, For image The coordinates of the matched feature points Rotation angle The corresponding rotation matrix; S334. Finally, perform angle correction; set the angle tolerance. ,like , To the required angle (general setting) ), control the robotic arm to perform a rotational motion, the rotation angle is The corrected angle deviation must be lower than the deviation threshold (in this embodiment, the deviation is required to be lower than the required threshold). ).

[0046] S34. Remove microwave substrates with defects: If If a defect has been identified during frontal inspection, the robotic arm will move the microwave substrate to the waste bin, simultaneously recording the defect type and location coordinates, and saving this information to the data traceability module; if Once the angle correction is complete, the microwave substrate is moved to the fourth position.

[0047] S4. Set up the fourth position to perform microwave substrate placement and kitting test; determine whether sorting is complete based on the kitting test results; In a preferred embodiment, step S4 specifically includes: S41. Waffle plate positioning; The waffle plate is fixed by a positioning fixture, and the waffle plate grid matrix is ​​determined by visual calibration. Where r is the number of rows and c is the number of columns; each cell corresponds to a target coordinate in the robot coordinate system. ; In this embodiment, the hardware layout of the waffle disk is as follows: The waffle plate positioning uses a customized positioning fixture (made of aluminum alloy with anodized surface). It uses four positioning pins (5mm in diameter, tolerance H7) to engage with the waffle plate positioning holes, achieving a positioning accuracy of ±0.02mm. A pressure sensor (range 0-10N, accuracy ±0.01N) is installed at the bottom of the fixture to ensure that the waffle plate is placed in place (pressure ≥2N is considered to be in place). S42. Placement of microwave substrate; In this embodiment, the robotic arm and suction cup adopt an ABBIRB120 four-axis robotic arm (working radius 580mm, repeatability ±0.05mm), and a custom vacuum suction cup (diameter 5-10mm adjustable, made of silicone to avoid scratching the surface of the microwave substrate) is installed at the end, with an adsorption force of 0.5-1.5N adjustable (dynamically adjusted according to the weight of the microwave substrate). Based on the microwave substrate attitude information output from the third camera, the control module drives the robotic arm to pick up the microwave substrate and place it in the target grid (using a trapezoidal velocity curve, with a maximum speed of 0.5 m / s and an acceleration of 1 m / s²). During placement, the attitude is adjusted in real time to ensure that the deviation between the microwave substrate angle and the waffle grid reference line, as well as the placement accuracy, are within the preset range (the robotic arm first picks up the microwave substrate and moves it to 3 mm above the target grid of the waffle, adjusts its attitude so that the deviation between the microwave substrate angle and the reference angle is ≤ ±0.5°, and then descends to 0.5 mm from the bottom of the grid and releases the suction cup to complete the placement); the entire placement process takes ≤ 0.8 s.

[0048] S43. Perform kitting inspection, specifically including: A top-view camera with parameters identical to the second camera position was used to capture panoramic images of the waffle disc. The system covers all grid cells; the camera used for kitting checks is the Baslerac A2440-75uc, equipped with a wide-angle lens (8mm focal length, 60° field of view), capable of covering 10×10 grid cells of a waffle plate (100×100mm in size) at once, capturing panoramic images. .

[0049] Based on the target detection algorithm, the presence of a microwave substrate in each grid cell is identified, and a grid cell status label is output. , This indicates the presence of a microwave substrate. Indicates an empty space; right Calculate the actual center coordinates of the microwave substrate based on the grid position. With attitude angle If the following conditions are met: ,and If the grid position is normal, it is determined that the grid position is normal; otherwise, it is marked as "offset" or "abnormal angle". If there is an empty space, that is If the position is misaligned or the angle is abnormal, the system will immediately trigger an audible and visual alarm (volume 85dB, red light flashing frequency 2Hz), and simultaneously display the coordinates of the abnormal grid position on the human-machine interface (HMI) and pause the sorting process, waiting for manual handling. After manual handling is completed, click the "Continue" button on the HMI to resume the process. If five consecutive grid positions are abnormal, the system will automatically stop and send an alarm message to the administrator's mobile phone. S44. When all slots of the waffle tray meet the requirements of having microwave substrates and having normal positions and angles, it is judged as "fitted and qualified" and sorting is completed. The control module sends a command to move the waffle tray to the next process (after fitting and qualification, each microwave substrate is defect-free, facing upwards, and has a sufficient number of chips on it, which means automatic sorting is completed, and manual intervention or processing is performed as needed later). If there are any unprocessed abnormal slots, the waffle tray is temporarily stored in the buffer area until the abnormality is resolved.

[0050] S5. Generate an ID for each microwave substrate and perform data recording, querying, and traceability to ensure the quality of microwave substrate processing throughout the entire process. In a preferred embodiment, step S5 specifically includes: S51. When each microwave substrate enters the first machine position, the system automatically generates a unique identifier. The identifier format is "date + workstation number + serial number", for example: "20240904-S1-000589". The date is accurate to the current day, the workstation number corresponds to the inspection workstation where the microwave substrate first enters, and the serial number increases sequentially according to the order in which the microwave substrates enter on the same day. This identifier follows the microwave substrate throughout the entire process of inspection and sorting without changing, laying the foundation for subsequent data traceability. S52, The data traceability module records key information in real time, including but not limited to the microwave substrate. The system records the inspection time at each workstation, the results of the front / back identification, the type and location of defects on the front / back sides, the attitude angle data, the coordinates of the placement grid, and the pass / fail determination. This information is first stored in a local MySQL database and then simultaneously uploaded to the factory's Manufacturing Execution System (MES). This enables distributed data storage and inter-system sharing, ensuring data integrity and real-time performance. S53, Through This system allows users to query the entire process data of microwave substrates by time range and workstation number, and export test reports to meet the needs of quality management and problem tracing. The system provides multi-dimensional query functions, supporting users to accurately locate individual microwave substrates by ChipID, or to query microwave substrate data in batches by time range (e.g., a specific day or week), workstation number, and other conditions. The query results not only include text records of each stage but also display visualized information such as defect images and angle deviation curves. Furthermore, it supports exporting the queried entire process data into standardized test reports (e.g., PDF format), meeting the needs of problem tracing, production analysis, and compliance auditing in quality management.

[0051] The present invention proposes a method and system for high-precision detection and automated sorting of various microwave substrates, which can be extended to the detection scenarios of similar products such as electronic components and micro parts. During the production process, the system can accurately locate quality problems and optimize production process parameters based on the full-process information recorded by the data traceability module, reduce the cost of manual intervention and the risk of defective products flowing through the system, and improve product quality consistency and production efficiency, thereby bringing higher economic benefits and quality management assurance to enterprises.

[0052] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0053] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).

[0054] The above embodiments provide a detailed description of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for defect identification and automatic sorting of microwave substrates, characterized in that, Specifically, the following steps are included: S1. Set up the first camera position to distinguish the front and back of the microwave substrate; when each microwave substrate enters the first camera position, the system automatically generates a unique identifier. The identifier format is "date + workstation number + serial number". This identifier follows the microwave substrate throughout the entire process of detection and sorting without changing. When it is determined to be the front, it enters the second machine position. If it is determined to be the back, it waits for disturbance to flip or shift before being re-identified. S2. Set up a second machine position to inspect and locate the front side of the microwave substrate, identify front side defects, and decide whether the microwave substrate enters the third machine position or is moved into the waste tank based on the front side defect results. S3. Set up a third camera position to perform reverse side inspection and template matching on the microwave substrate; determine whether the microwave substrate enters the fourth camera position or is moved into the waste bin based on the reverse side defects and template matching results; Step S3 specifically includes: S31, Reverse Image Acquisition: The microwave substrate is flipped over by a flipping mechanism, and a downward-looking industrial camera with the same parameters as the second camera position is used in conjunction with a dome diffuse light source to acquire the reverse image I3. S32. Reverse Defect Detection: Employing the same super-resolution + multi-scale CNN + attention mechanism combined algorithm as the second camera position, detects defects ≥1mm on the reverse side and outputs defect labels. , This indicates that there is a defect. This indicates that the test is successful. S33. Perform template matching and angle correction, specifically including: S331. Select a defect-free microwave substrate reverse image as a standard template T, and extract the coordinates of key feature points in the template. Where j = 1, 2, ..., m, and m is the number of feature points; S332. Perform pyramid cross-correlation matching; construct a 4-layer Gaussian pyramid for the reverse image I3, perform normalized cross-correlation (NCC) matching in each layer, and calculate the matching score R, expressed by the formula: ; in, Template on the reverse image The offset in , Reverse images The grayscale mean of template T ; Represents the reverse image In coordinates The grayscale value at that location; To apply offset The grayscale value at the corresponding position on the template; the closer the matching score is to 1, the higher the matching degree. Set a matching score threshold, and if the score exceeds the threshold, the matching is considered complete. S333. Calculate the rotation angle; calculate the rotation matrix using the least squares method based on the correspondence of the matched feature points. This allows us to obtain the precise rotation angle. The formula is expressed as: ; in, The coordinates of the feature points matched in image I3. Rotation angle The corresponding rotation matrix; S334. Finally, perform angle correction; set the angle tolerance. ,like , To achieve the required angle, the robotic arm is controlled to perform a rotational motion, with the rotation angle being... The corrected angle deviation must be lower than the deviation threshold. S34. Remove microwave substrates with defects: If The system controls a robotic arm to move the microwave substrate to a waste bin, simultaneously recording the defect type and location coordinates, and saving this information to the data traceability module; if Once the angle correction is complete, the microwave substrate is moved to the fourth position. S4. Set up the fourth position to perform microwave substrate placement and alignment detection; determine whether sorting is complete based on the alignment detection results; step S4 specifically includes: S41. Waffle plate positioning; The waffle plate is fixed by a positioning fixture, and the waffle plate grid matrix is ​​determined by visual calibration. Where r is the number of rows and c is the number of columns; each cell corresponds to a target coordinate in the robot coordinate system. ; S42. Microwave substrate placement: The control module drives the robot to pick up the microwave substrate and place it in the target grid position according to the microwave substrate posture information output by the third position. During the placement process, the posture is adjusted in real time to ensure that the deviation between the microwave substrate angle and the waffle grid reference line and the placement position accuracy are within the preset range. S43. Perform kitting inspection, specifically including: A top-view camera with the same parameters as the second camera position was used to capture a panoramic image of the waffle disk I4, covering all grid positions; Based on the target detection algorithm, the presence of a microwave substrate in each grid cell is identified, and a grid cell status label is output. , This indicates the presence of a microwave substrate. Indicates an empty space; right Calculate the actual center coordinates of the microwave substrate based on the grid position. ) and attitude angle If the following conditions are met: ,and If the grid position is normal, it is determined that the grid position is normal; otherwise, it is marked as "offset" or "abnormal angle". If there is an empty space, that is If the position is misaligned or the angle is abnormal, the system will immediately trigger an audible and visual alarm, display the coordinates of the abnormal grid position on the human-machine interface, and suspend the sorting process until manual intervention is required. S44. When all slots of the waffle tray meet the requirements of having microwave substrates and having normal positions and angles, it is judged as "fitting qualified" and sorting is completed; the control module sends an instruction to move the waffle tray to the next process; if there are any unprocessed abnormal slots, the waffle tray is temporarily stored in the buffer area until the abnormality is resolved. S5. Perform data recording, querying, and traceability to ensure the quality of microwave substrate processing throughout the entire process.

2. The microwave substrate defect identification and automatic sorting method according to claim 1, characterized in that, Step S1 specifically includes: S11. Image acquisition: Using a top-view industrial camera, along with a coaxial light source and polarizer, to suppress reflections on the microwave substrate surface, acquire an image of the top of the microwave substrate. ; S12. Use a positive / negative recognition algorithm; build a classification model based on the lightweight convolutional neural network YOLOv5-lite, with the input image... Microwave output substrate category label , Indicates the front. The opposite side is indicated; the classification model is trained using a dataset of front and back images of microwave substrates with different lighting and stain scenes. The dataset is divided into a training set, a validation set, and a test set, and the model parameters are optimized through transfer learning. S13. Perform gripping control on the microwave substrate; if The control module sends instructions to the robotic arm to pick up the microwave substrate and place it on the transfer plate; if The microwave substrate is kept in the original material box, waiting to be re-identified after the next disturbance, which is achieved through a vibration mechanism.

3. The microwave substrate defect identification and automatic sorting method according to claim 1, characterized in that, Step S2 specifically includes: S21. Positioning calculation: Using sub-pixel edge detection and principal axis fitting algorithms, the contour features of the microwave substrate are extracted, and the precise coordinates and attitude angles are calculated. S22. Frontal defect detection: A combination algorithm of super-resolution preprocessing, multi-scale CNN, and attention mechanism is used to detect minute defects. Based on the defect detection results, it is determined whether the microwave substrate enters the third position or is transferred to the waste tank.

4. The microwave substrate defect identification and automatic sorting method according to claim 3, characterized in that, Step S21 specifically includes: S211, Edge extraction; Front image of microwave substrate. Gaussian filtering and Canny edge detection are performed to obtain the edge image E; S212, Subpixel Fitting: A least-squares method is used to fit a straight line to the edge image E, and subpixel-level edge coordinates are calculated. Where i = 1, 2, ..., n, and n is the number of edge points. , Let x and y be the x and y coordinates of the i-th edge point, respectively. S213, Principal Axis Calculation: Principal Component Analysis (PCA) is used to reduce the dimensionality of the obtained edge coordinates to obtain the principal axis direction of the microwave substrate, and then the center pixel coordinates are calculated. With attitude angle The formula is expressed as: ; in, These are the first and second eigenvalues ​​obtained from principal component analysis. ; x-coordinate in the edge coordinate system and the vertical axis covariance; They are respectively , The variance; S214, Coordinate Transformation; Combined with Hand-Eye Calibration Matrix , pixel coordinates Convert to robot coordinate system The formula is: 。 5. The microwave substrate defect identification and automatic sorting method according to claim 3, characterized in that, Step S22 specifically includes: S221. Super-resolution preprocessing: The ESRGAN model is used to reconstruct the image I2 at twice the super-resolution. The model is trained using the DIV2K dataset and fine-tuned by combining microwave substrate defect images. The peak signal-to-noise ratio PSNR of the reconstructed image is ≥32dB, ensuring that the 1mm defect is clearly visible. S222, Multi-scale feature extraction; Based on the improved YOLOv5 network, an FPN structure is introduced to construct 5 feature scale layers P2-P6: Layer P2 is for small defects at the 1mm level, and the number of convolution kernels is increased by 1×1. Layers P3-P6: The original YOLOv5 feature fusion method is used to achieve multi-scale feature fusion through upsampling and downsampling, covering the defect detection requirements of 2-10mm. S223. Simultaneously, the attention mechanism is integrated, and SE and CBAM modules are embedded sequentially in layers P2-P4; The SE module assigns weights to the feature map channel dimensions, compresses the feature map channels through global average pooling, outputs the channel weights after passing them through a fully connected layer and a sigmoid activation function, and multiplies them with the original feature map to obtain the channel-enhanced feature map. ; CBAM module Spatial attention enhancement is performed by obtaining two 1×1 spatial feature maps through max pooling and average pooling. These are then concatenated and reduced to one channel via 1×1 convolution. After sigmoid activation, the feature maps are then... Multiply to obtain the final feature map. ; S224. Defect Judgment and Output: The network outputs the defect bounding box coordinates, confidence level, and category; and determines whether a defect exists based on the following conditions: If the pixel area of ​​the defect region satisfy: ; in, 64 represents the pixel area of ​​the microwave substrate, and 64 represents the pixel area of ​​the super-resolution image corresponding to a 1mm defect. If the confidence level is greater than the upper limit of the set confidence level threshold, it is judged as a "defect". The control module records the defect type and location, and then transfers it to the waste tank. If the area condition is met and the confidence level is between the upper and lower limits of the set confidence level threshold, it is marked as a "suspicious defect" and enters the third camera position for review; If the confidence level is less than the lower limit of the set confidence level threshold, it is judged as "no defects on the front".

6. The microwave substrate defect identification and automatic sorting method according to claim 1, characterized in that, Its features are, Step S5 specifically includes: S51. The data traceability module records key information in real time, stores it in the local database MySQL, and uploads it synchronously to the factory manufacturing execution system. S52, Through The system allows users to query microwave substrate data across the entire process by time range and workstation number, and export test reports to meet the needs of quality management and problem tracing.

7. The application system of the microwave substrate defect identification and automatic sorting method according to any one of claims 1-6, characterized in that, Specifically, it includes: The first camera module, including an upward-viewing industrial camera, a coaxial light source, a polarizer, and a vibration mechanism, is used to complete the identification and preliminary screening of the front and back sides of the microwave substrate, restricting only the front microwave substrate to enter the subsequent work stations. The second camera module includes an upward-viewing industrial camera, a telecentric lens, a ring light source, and a defect detection algorithm operation unit, which are used to achieve precise positioning of the front of the microwave substrate and front defect detection. The third camera module includes a downward-looking industrial camera, a dome diffuse light source, a flipping mechanism, and a template matching algorithm unit. It is used to complete the detection of defects on the reverse side of the microwave substrate, precise angle measurement and rotation correction, and to remove microwave substrates with defects. The fourth camera module includes an upward-facing industrial camera, a waffle plate positioning fixture, a robotic arm, a vacuum suction cup, and an audible and visual alarm, used to achieve precise placement and suitability testing of qualified microwave substrate waffle plates, as well as abnormal alarms. The track conveying system, including belt conveyors and positioning sensors, is used to stably transport the microwave substrate between various workstations, ensuring that the microwave substrate is accurately positioned when it arrives at the designated workstation. The control module, including PC, PLC, and motion control card, is used to coordinate the work of each module through industrial Ethernet, execute the full-process control logic of "identification-detection-correction-placement", and handle abnormal working conditions. The data traceability module, including a local database server and a human-machine interface, is used to store microwave substrate testing data throughout the entire process, provide data query, report export and data interaction with the MES system, and support remote monitoring and quality analysis.

Citation Information

Patent Citations

  • Dual-channel chip detection equipment

    CN113433070A

  • Wireless module appearance detection device

    CN115889206A