Post-processing system for dual in-line package defect images combining bilayer occlusion perception and soft non-maximum suppression and method thereof
Patent Information
- Application Number
- TW113145785
- Authority / Receiving Office
- TW · TW
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2026-10-01
- Estimated Expiration
- 2044-11-26
AI Technical Summary
Current DIP defect detection technologies face limitations in flexibility and accuracy, particularly in multi-target scenarios and complex backgrounds, due to the inflexibility of bounding box detection and poor accuracy in measuring precise area or shape features.
A post-processing system combining dual-layer occlusion sensing and soft nonmaximum suppression, utilizing a bilayer convolutional network (BCNet) to detect and infer occluded portions, followed by soft nonmaximum suppression and polygon approximation to refine detection boxes and masks.
Improves defect detection flexibility and accuracy by accurately segmenting defect regions in complex backgrounds with multiple targets, reducing false positives and missed inspections, and enhancing detection efficiency and reliability.
Smart Images

Figure TWG2TB001913622_001 
Figure TWG2TB001913622_002 
Figure TWG2TB001913622_003
Abstract
Description
Technical Field
[0001] This invention relates to a post-processing system and method, particularly a post-processing system and method for dual in-line package defect images that combines dual-layer occlusion sensing and soft nonmaximum suppression. Prior Technology
[0002] In recent years, with the popularization and rapid development of integrated circuits, various integrated circuit components have sprung up like mushrooms after rain. However, defects often occur in the manufacturing process of integrated circuit components, so how to flexibly and accurately identify defects has become one of the problems that manufacturers urgently need to solve.
[0003] Generally, Dual In-line Package (DIP) is a common integrated circuit packaging technology, featuring multiple pins arranged in parallel, and is widely used in various electronic devices. Currently, DIP defect detection mainly relies on bounding box detection technology. However, this method has limitations in actual detection and subsequent processing. For example, target detection algorithms require frequent parameter adjustments to adapt to different detection environments and needs, significantly increasing maintenance costs. Furthermore, the accuracy of bounding box detection technology is not ideal in multi-target scenarios and complex backgrounds, especially when targets overlap or occlude. Additionally, bounding boxes lack flexibility in complex analyses, such as measuring the precise area or shape features of defects, resulting in a problem of poor flexibility and accuracy in defect detection.
[0004] In conclusion, it is clear that previous technologies have long suffered from poor flexibility and accuracy in defect detection, thus necessitating the development of improved technologies to address this issue. Summary of the Invention
[0005] This invention discloses a post-processing system and method for images of defects in dual in-line package (DIP) that combines dual-layer occlusion sensing with soft nonmaximum suppression.
[0006] First, this invention discloses a post-processing system for images of defects in dual in-line package (DIP) that combines dual-layer occlusion sensing and soft nonmaximum suppression. This system includes: an occlusion detection module, a filtering module, a computation module, an adjustment module, and an output module. The occlusion detection module receives a dual in-line package (DIP) image and inputs it into a bilayer convolutional network (BCNet) model to model the defect region of the DIP image as overlapping top and bottom layers. The BCNet model then detects occluded portions based on the top layer and infers occluded portions based on the bottom layer, outputting multiple masks and detection boxes. A filtering module connected to the occlusion detection module calculates the area of each mask and detection box and removes masks and detection boxes whose areas do not meet the area filtering threshold. A computation module connected to the filtering module performs soft non-maximum suppression (Soft NMS) to calculate the intersection over union (IoU) of each detection box with another detection box. The module connects to the operation module to sort all detection boxes according to their confidence levels, selects the detection box with the highest confidence level as the base box, compares the base box with the remaining detection boxes one by one and calculates the overlap rate, dynamically adjusts the confidence level based on the calculated overlap rate, and outputs detection boxes with high confidence and low overlap rate. The overlap rate and confidence level decay are negatively correlated. The output module connects to the adjustment module to perform polygon approximation processing on the output mask to obtain a polygon simplified mask, and displays the polygon simplified mask, detection boxes with high confidence and low overlap rate, and the dual in-line package image.
[0007] Furthermore, this invention also discloses a post-processing method for dual in-line package (DIP) defect images combining dual-layer occlusion perception and soft nonmaximum suppression. The steps include: receiving a DIP image and inputting it into a dual-layer convolutional network model to model the defect region of the DIP image as overlapping top and bottom layers; the dual-layer convolutional network model then detects occluded portions based on the top layer and infers occluded portions based on the bottom layer, causing the model to output multiple masks and multiple detection boxes; calculating the area of each mask and each detection box, and deleting masks and detection boxes whose areas do not meet the area filtering threshold; and performing soft nonmaximum suppression. The algorithm performs a control operation to calculate the overlap rate between each detection box and another detection box, and smoothly decays the confidence of overlapping detection boxes based on the overlap rate. All detection boxes are sorted according to their confidence, and the detection box with the highest confidence is selected as the base box. The base box is then compared with the remaining detection boxes one by one, and the overlap rate is calculated. At the same time, the confidence is dynamically adjusted based on the calculated overlap rate, and detection boxes with high confidence and low overlap rate are output. The overlap rate and the decay of confidence are negatively correlated. Polygon approximation processing is performed on the output mask to obtain a polygon simplified mask, and the polygon simplified mask, detection boxes with high confidence and low overlap rate, and dual in-line packaged image are displayed together.
[0008] The system and method disclosed in this invention are as described above. The difference between this invention and the prior art is that this invention models the defect region of the dual in-line package image as an overlapping top layer and bottom layer through a two-layer convolutional network model to detect occluded parts and infer the occluded parts, so as to output multiple masks and detection boxes. Then, the masks and detection boxes are filtered according to the area size, and soft nonmaximum suppression is performed to output detection boxes with high confidence and low overlap rate. Polygon approximation processing is performed to obtain a polygon simplified mask. Finally, the polygon simplified mask, the detection boxes with high confidence and low overlap rate and the dual in-line package image are displayed together.
[0009] Through the above-mentioned technical means, the present invention can achieve the technical effect of improving the flexibility and accuracy of defect detection. Simple Explanation of the Diagram
[0010] Figure 1 is a system block diagram of the dual in-line package defect image post-processing system that combines dual-layer occlusion perception and soft nonmaximum suppression according to the present invention. Figures 2A and 2B are flowcharts of the post-processing method for dual in-line package defect images that combines dual-layer occlusion perception and soft nonmaximum suppression according to the present invention. Figure 3 is a schematic diagram of post-processing of images of defects in dual in-line packages using the present invention. Figure 4 is a schematic diagram of applying the present invention to perform polygon approximation processing. Implementation
[0011] The following will describe the implementation of the present invention in detail with reference to the drawings and embodiments, so that the process of how the present invention uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.
[0012] First, please refer to "Figure 1". "Figure 1" is a system block diagram of the post-processing system for dual in-line package (DIP) defect images combining dual-layer occlusion perception and soft nonmaximum suppression according to the present invention. This system includes: an occlusion detection module 110, a filtering module 120, a computation module 130, an adjustment module 140, and an output module 150. The occlusion detection module 110 receives a DIP image (hereinafter referred to as a DIP image) and inputs it into a dual-layer convolutional network model (hereinafter referred to as a BCNet model) to model the defect region of the DIP image as an overlapping top layer and bottom layer. The BCNet model then detects the occluded portion based on the top layer and infers the occluded portion based on the bottom layer, outputting multiple masks and multiple detection boxes. The detection boxes are similar to bounding boxes, except that the detection boxes are generated by the BCNet model, while the bounding boxes are generated by traditional object detection algorithms. In practice, the BCNet model is a neural network based on deep learning that can handle the masking and detection boxes of multiple targets, while taking into account the occlusion relationship of each target.
[0013] The filtering module 120 is connected to the occlusion detection module 110 to calculate the area of each occlusion and each detection frame, and to delete occlusions and detection frames whose areas do not meet the area filtering threshold. For example, the area filtering threshold can be initially set to a pixel value, such as 200 pixels. If the calculated area of an occlusion or detection frame meets the 200-pixel requirement, it is retained, and those that do not are deleted. In practice, the area filtering threshold can also be dynamically adjusted. For example, the pixel value can be dynamically adjusted based on the total number of detection frames, where the total number is positively correlated with the pixel value. That is, the more detection frames there are, the higher the standard for filtering occlusions and detection frames becomes.
[0014] The computation module 130 is connected to the filtering module 120 to perform soft nonmaximum suppression (hereinafter referred to as Soft NMS) computation, which calculates the overlap rate between each detection box and another detection box, and smoothly decays the confidence of the overlapping detection boxes based on the overlap rate. Taking the calculation of the overlap rate as an example, assume the matrix of the first detection box is: The matrix of the second detection box is: In this case, a value of 1 represents that the pixel is part of the mask; a value of 0 represents that the pixel is not part of the mask. In this case, the overlapping area has 3 pixels (all of which have a value of 1 at the same position); the union area has a total of 5 pixels (the number of pixels other than those with a value of 0 at the same position). In this case, the overlap rate is calculated as "3 / 5 = 0.6".
[0015] Adjusting module 140 connects to computation module 130 to sort all detection boxes according to their confidence levels. The detection box with the highest confidence level is selected as the base box. The base box is then compared with each of the remaining detection boxes, and the overlap rate is calculated. Simultaneously, the confidence level is dynamically adjusted based on the calculated overlap rate, and detection boxes with high confidence and low overlap rate are output. The overlap rate is negatively correlated with the decrease in confidence level. In practical implementation, the confidence level can be calculated using the formula: " To calculate, where, It is the confidence level of the adjusted detection frame. This is the confidence level before adjustment (or the initial preset confidence level if it's the initial state), and IoU is the overlap ratio between this detection box and the base box. It's an adjustment factor that controls the degree of decay. For example, suppose the initial confidence level is 0.9 and the IoU is 0.6... If the confidence level is 0.5, then the calculated confidence level is 0.438.
[0016] Output module 150 is connected to adjustment module 140 to perform polygon approximation processing on the output mask to obtain a simplified polygon mask. Simultaneously, the simplified polygon mask, high-confidence detection boxes with low overlap, and dual-in-line package (DIP) images are displayed. In practice, the polygon approximation processing includes initializing a tolerance, setting a point range, and increasing the tolerance when the number of polygon vertices in the mask exceeds the point range, and decreasing the tolerance when it falls below the range. After multiple iterations, a simplified polygon mask with the number of polygon vertices within the point range is generated. For example, the tolerance can initially be 0.1, increasing by 0.1 each time and decreasing by 0.1 each time. The point range can be 20 to 30, meaning the number of polygon vertices is between 20 and 30. It should be further explained that when performing polygon approximation, boundary points can be used to generate polygons, and insignificant boundary vertices can be removed based on the set tolerance, making the polygon presentation simpler. For example, assuming there are four boundary points: "(0,0), (0,1), (1,0), and (1,1)", "(0,1) and (1,0)" can be removed, leaving only "(0,0) and (1,1)" to form a quadrilateral with minimal boundaries. That is, only the two diagonal points need to be retained to reconstruct a complete rectangular shape through calculation, without having to retain all four points. In this way, the computational load of image processing and the resources used for storage can be effectively reduced. In addition, in the generated polygon, it is possible to check whether the vertices meet preset conditions, such as whether they are within the tolerance range and whether they form a closed polygon. Assuming the tolerance range is a value of 0.1, and vertex "(1,1)" deviates too much from the boundary, it is necessary to adjust the vertex or add other vertices to ensure that the generated polygon fits the true boundary of defects or occlusions.
[0017] In particular, in practical embodiment, the modules of the invention may be implemented, in part or entirely, based on hardware (e.g., a hardware processor) that may be implemented via an integrated circuit chip, System on Chip (SoC), Complex Programmable Logic Device (CPLD), Field Programmable Gate Array (FPGA). Various data described in the invention may be stored in non-transient computer-readable storage media, which may also be loaded with computer-readable instructions (or referred to as computer program instructions) for using a hardware processor to realize various aspects of the invention, which may be, but are not limited to, electrical storage equipment, magnetic storage equipment, optical storage equipment, electromagnetic storage equipment, semiconductor storage equipment, or any suitable combination of the foregoing. More specific examples of non-transient computer-readable storage media (a nonexhaustive list) include: hard disks, random access memory, read-only memory, flash memory, optical discs, floppy disks, and any suitable combination of the above. The non-transient computer-readable storage media used here are not interpreted as instantaneous signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagated through waveguides or other transmission media (e.g., optical signals via fiber optic cables), or electrical signals transmitted through wires. In addition, the computer-readable commands described here can be downloaded to various computing / processing equipment from non-transient computer-readable storage media or to external computer equipment or external storage equipment via a network such as: an Internet, a LAN, a WAN and / or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, hubs and / or gateways. The network card or network interface in each computing / processing equipment receives computer-readable instructions from the network and forwards these computer-readable instructions for storage in the non-transient computer-readable storage media in the respective computing / processing equipment. In practical implementation, the invention can be executed in an environment in which a computer host is connected to a database, the computer host comprising: a non-transient computer-readable storage media and a hardware processor. Among them, non-transient computer-readable storage media is used to store multiple computer-readable instructions, as well as to store multi-temporal models containing multiple timing models.The computer-readable instructions are executed by the computer host. These instructions can be assembly language instructions, instruction set architecture instructions, machine instructions, machine-dependent instructions, microinstructions, firmware instructions, or source code or object code written in any combination of one or more programming languages. The programming languages include object-oriented programming languages such as Common Lisp, Python, C++, Objective-C, Smalltalk, Delphi, Java, Swift, C#, Perl, Ruby, and PHP, as well as conventional procedural programming languages such as C or similar languages. Additionally, the hardware processor is electrically connected to a non-transitory computer-readable storage medium to execute the plurality of computer-readable instructions.
[0018] Please refer to Figures 2A and 2B. Figures 2A and 2B are flowcharts of the post-processing method for dual-in-line package defect images combining dual-layer occlusion perception and soft nonmaximum suppression according to the present invention. The steps include: receiving a dual-in-line package image and inputting the dual-in-line package image into a dual-layer convolutional network model to model the defect region of the dual-in-line package image as an overlapping top layer and bottom layer; then, the dual-layer convolutional network model detects the occluded part based on the top layer and infers the occluded part based on the bottom layer, so that the dual-layer convolutional network model outputs multiple masks and multiple detection boxes (step 210); calculating the area of each mask and each detection box respectively, and deleting masks and detection boxes whose areas do not meet the area filtering threshold (step 220). ); Perform soft nonmaximum suppression operation to calculate the overlap rate between each detection box and another detection box, and smoothly decay the confidence of the overlapping detection boxes according to the overlap rate (step 230); Sort all detection boxes according to their confidence, and select the detection box with the highest confidence as the base box. Then compare the base box with the remaining detection boxes one by one and calculate the overlap rate. At the same time, dynamically adjust the confidence according to the calculated overlap rate, and output the detection boxes with high confidence and low overlap rate. The overlap rate and the decay of confidence are negatively correlated (step 240); Perform polygon approximation processing on the output mask to obtain a polygon simplified mask, and display the polygon simplified mask, the detection boxes with high confidence and low overlap rate and the dual in-line package image together (step 250). Through the above steps, the defect region of the dual in-line package (DIP) image can be modeled as an overlapping top and bottom layer using a two-layer convolutional network model. This layer is used to detect occluded parts and infer the occluded parts, so as to output multiple masks and detection boxes. Then, the masks and detection boxes are filtered according to the area size. Soft nonmaximum suppression is then performed to output detection boxes with high confidence and low overlap. Polygon approximation is then performed to obtain a polygon simplified mask. Finally, the polygon simplified mask, the detection boxes with high confidence and low overlap, and the DIP image are displayed together.
[0019] The following description, in conjunction with Figures 3 and 4, illustrates an embodiment of this invention. Figure 3 is a schematic diagram of post-processing an image of a defective dual in-line package (DIP) using this invention. Assume there is a DIP package image 300 containing a defective region 311 (represented as black dots) on component 310. This DIP package image 300 can be input into a BCNet model. The BCNet model models the top and bottom layers, detects occluded portions, and infers the occluded portions, outputting corresponding masks and detection boxes. Next, based on a preset area filtering threshold, such as 200 pixels, masks and detection boxes whose area size does not meet this threshold are deleted. Then, a Soft NMS operation is performed to calculate the overlap rate between each detection box that was not deleted, and the confidence of the overlapping detection boxes is smoothly decayed based on this overlap rate. In practice, the confidence can be decayed using linear decay, Gaussian decay, exponential decay, or similar formulas. Next, the confidence scores of all detection boxes are sorted to select the detection box with the highest confidence score as the base box. This base box is then compared with each of the remaining detection boxes, and the overlap rate is calculated. Simultaneously, the confidence score is dynamically adjusted based on the calculated overlap rate, similar to the method described above for smoothly decreasing the confidence score of overlapping detection boxes based on the overlap rate. Afterward, detection boxes 321 with high confidence and low overlap rate are output. In addition, the corresponding mask output by the aforementioned BCNet model is approximated using polygons to obtain a simplified polygon mask 322 (shown as dashed lines) as shown in Figure 3. Finally, as shown in Figure 3, the detection box 321 and the simplified polygon mask 322 are displayed at the corresponding defect region 311 on the component 310 of the dual in-line package image 300. This completes the application of the BCNet model to DIP defect segmentation, replacing the traditional bounding box detection method. It can accurately segment defect regions even in complex backgrounds and with multiple targets, and provides accurate area and shape feature analysis, which helps reduce false positives or missed inspections, improves detection efficiency and reliability, and can be applied to automated quality inspection of large-scale production lines, meeting the industrial requirements for high precision and low maintenance costs.
[0020] As shown in Figure 4, Figure 4 is a schematic diagram illustrating the application of this invention to perform polygon approximation processing. In actual implementation, the polygon approximation processing flow 400 may include reading the mask coordinates, initializing the tolerance, simplifying the mask vertices, determining whether the vertices meet the point range, and if so, completing the polygon approximation processing; otherwise, adjusting the tolerance and returning to the steps of simplifying the mask vertices. Assume there is a 3x3 mask matrix: In this matrix, each element represents the occlusion status of a pixel; a value of 1 indicates that the pixel is occluded and part of the mask, while a value of 0 indicates that it is not part of the mask. Therefore, when reading the mask coordinates, four coordinate points can be identified: "(0,0), (0,1), (1,0), and (1,1)", representing the areas identified as targets (e.g., defects). Next, when initializing the tolerance, it can be set to 0.1, meaning that the vertex offset at the edge is allowed to not exceed 0.1 units for a smoother approximation of the boundary. When simplifying mask vertices, insignificant boundary vertices can be deleted based on the set tolerance, making the polygon simpler. Taking the four coordinate points mentioned above as an example, "(0,1) and (1,0)" can be deleted, retaining only the two diagonal coordinate points to form a quadrilateral with the smallest boundary. After simplifying the number of mask vertices, it is determined whether the number of vertices meets the preset range, such as 20 to 30 vertices. If so, the polygon approximation process is complete. If not, adjust the tolerance. For example, if the number of simplified vertices is greater than the number of vertices, increase the tolerance (by 0.1 each time); conversely, if the number of simplified vertices is less than the number of vertices, decrease the tolerance (by 0.1 each time). Then, based on the adjusted tolerance, return to the step of simplifying the masking vertices until the number of simplified masking vertices is within the number of vertices.
[0021] In summary, the difference between this invention and prior art lies in the fact that the defect region of a dual-in-line package image is modeled as an overlapping top and bottom layer using a two-layer convolutional network model. This is used to detect occluded parts and infer the occluded parts, so as to output multiple masks and detection boxes. Then, the masks and detection boxes are filtered according to their area size. Soft nonmaximum suppression is then performed to output detection boxes with high confidence and low overlap. Polygon approximation processing is then performed to obtain a polygon simplified mask. Finally, the polygon simplified mask, the detection boxes with high confidence and low overlap, and the dual-in-line package image are displayed together. This technical means can solve the problems existing in prior art, thereby achieving the technical effect of improving the flexibility and accuracy of defect detection.
[0022] Although the present invention has been disclosed above with reference to the foregoing embodiments, it is not intended to limit the present invention. Anyone skilled in the art can make some modifications and refinements without departing from the spirit and scope of the present invention. Therefore, the scope of patent protection of the present invention shall be determined by the scope of the patent application attached to this specification.
[0023] 110: Occlusion Detection Module 120: Filtering Module 130: Computing Module 140: Adjust module 150: Output Module 300: Dual In-line Package Image 310: Components 311: Defect Area 321: Detection box 322: Polygonal Simplified Mask 400: Process Step 210: Receive a Dual In-line Package (DIP) image and input the DIP image into a Bilayer Convolutional Network (BCNet) model to model the defect region of the DIP image as an overlapping top layer and a bottom layer. Then, the BCNet model detects the occluded part based on the top layer and infers the occluded part based on the bottom layer, so that the BCNet model outputs multiple masks and multiple detection boxes. Step 220: Calculate the area of each mask and each detection box, and delete the masks and detection boxes whose areas do not meet an area filtering threshold. Step 230: Perform soft non-maximum suppression (Soft NMS) to calculate the intersection over union (IoU) between each detection box and another detection box, and smoothly decay the confidence of the overlapping detection boxes based on the intersection over union. Step 240: Sort all the detection boxes according to the confidence level, and select the detection box with the highest confidence level as a base box. Then, compare the base box with the remaining detection boxes one by one and calculate the overlap rate. At the same time, dynamically adjust the confidence level according to the calculated overlap rate, and output the detection boxes with high confidence level and low overlap rate. The overlap rate is negatively correlated with the decrease in confidence level. Step 250: Perform a polygon approximation process on the output mask to obtain a polygon simplified mask, and simultaneously display the polygon simplified mask, the detection bounding box with high confidence and low overlap, and the dual in-line package image.
Claims
1. A post-processing system for dual in-line package (DIP) defect images combining dual-layer occlusion detection and soft non-maximum suppression, the system comprising: an occlusion detection module for receiving a DIP image and inputting the DIP image into a bilayer convolutional network (BCNet) model to model the defect region of the DIP image as an overlapping top layer and a bottom layer; the BCNet model then detects occluded portions based on the top layer and infers occluded portions based on the bottom layer, causing the BCNet model to output multiple masks and multiple detection boxes; a filtering module connected to the occlusion detection module for calculating the area of each mask and each detection box, and deleting masks and detection boxes whose areas do not meet an area filtering threshold; and a computation module connected to the filtering module for performing soft non-maximum suppression (Soft Non-Maximum Suppression). The system employs NMS (Non-Maximum Segmentation) operations to calculate the Intersection Over Union (IoU) ratio between each detection box and another detection box, and smoothly decays the confidence level of the overlapping detection boxes based on the IoU ratio. An adjustment module, connected to the computation module, sorts all detection boxes according to their confidence levels, selects the detection box with the highest confidence level as a base box, compares the base box with each of the remaining detection boxes, calculates the IoU ratio, dynamically adjusts the confidence level based on the calculated IoU ratio, and outputs the detection boxes with high confidence levels and low IoU ratios. The overlap rate is negatively correlated with the decrease in confidence; and an output module connected to the adjustment module is used to perform a polygon approximation process on the output mask to obtain a polygon simplified mask, and simultaneously display the polygon simplified mask, the detection box with high confidence and low overlap rate, and the dual in-line package image.
2. A post-processing system for images of dual in-line package defects combining dual-layer occlusion perception and soft nonmaximum suppression, as described in claim 1, wherein the area filtering threshold is initially set to a pixel value, and the pixel value is dynamically adjusted based on a total number of detection boxes with high confidence and low overlap, the total number being positively correlated with the pixel value.
3. A post-processing system for images of defects in dual in-line package (DIP) packages, as described in claim 1, wherein the polygon approximation processing includes initializing a tolerance, setting a range of point counts, and increasing the tolerance when the number of polygon vertices in the mask exceeds the range of point counts, and decreasing the tolerance otherwise. After multiple iterations, a simplified polygon mask with the number of polygon vertices within the range of point counts is generated.
4. The dual in-line package defect image post-processing system combining dual-layer occlusion perception and soft nonmaximum suppression as described in claim 3, wherein the tolerance is initially 0.1, and increases by 0.1 each time it increases, and decreases by 0.1 each time it decreases, and the number of points ranges from 20 to 30.
5. A post-processing system for images of dual in-line package defects combining dual-layer occlusion sensing and soft nonmaximum suppression, as described in claim 1, wherein the confidence level is calculated using the formula "", where, The confidence level of the adjusted detection frame, the confidence level before adjustment, the IoU is the overlap rate between the detection frame and the base frame, and the adjustment coefficient is used to control the attenuation intensity.
6. A post-processing method for dual in-line package defect images combining dual-layer occlusion sensing and soft nonmaximum suppression, executed by a hardware processor, comprising the following steps: The system receives a Dual In-line Package (DIP) image and inputs it into a Bilayer Convolutional Network (BCNet) model to model the defect region of the DIP image as an overlapping top layer and a bottom layer. The BCNet model then detects occluded parts based on the top layer and infers occluded parts based on the bottom layer, outputting multiple masks and multiple detection boxes. The area of each mask and each detection box is calculated, and masks and detection boxes whose areas do not meet an area filtering threshold are deleted. Soft Non-Maximum Suppression (Soft NMS) is performed to calculate the Intersection Over Union (IoU) ratio between each detection box and another detection box, and the confidence of the overlapping detection boxes is smoothly reduced based on the IoU ratio. All the detection boxes are sorted according to their confidence levels, and the detection box with the highest confidence level is selected as a base box. The base box is then compared with the remaining detection boxes one by one, and the overlap rate is calculated. At the same time, the confidence level is dynamically adjusted according to the calculated overlap rate, and the detection boxes with high confidence and low overlap rate are output. The overlap rate is negatively correlated with the decrease in confidence. A polygon approximation process is performed on the output mask to obtain a polygon simplified mask, and the polygon simplified mask, the detection boxes with high confidence and low overlap rate, and the dual in-line package image are displayed together.
7. A post-processing method for dual in-line package defect images combining dual-layer occlusion perception and soft nonmaximum suppression, as described in claim 6, wherein the area filtering threshold is initially set to a pixel value, and the pixel value is dynamically adjusted based on a total number of detection boxes with high confidence and low overlap, wherein the total number is positively correlated with the pixel value.
8. A post-processing method for dual in-line package defect images combining dual-layer occlusion perception and soft nonmaximum suppression, as described in claim 6, wherein the polygon approximation processing includes initializing a tolerance, setting a point count range, and increasing the tolerance when the number of polygon vertices of the mask exceeds the point count range, and decreasing the tolerance otherwise. After multiple iterations, a simplified polygon mask with the number of polygon vertices within the point count range is generated.
9. The post-processing method for dual in-line package defect images combining dual-layer occlusion perception and soft nonmaximum suppression as described in claim 8, wherein the tolerance is initially 0.1, and increases by 0.1 each time it increases, and decreases by 0.1 each time it decreases, and the number of points ranges from 20 to 30.
10. A post-processing method for dual in-line package defect images combining dual-layer occlusion perception and soft nonmaximum suppression, as described in claim 6, wherein the confidence level is calculated using the formula "", where, The confidence level of the adjusted detection frame, the confidence level before adjustment, the IoU is the overlap rate between the detection frame and the base frame, and the adjustment coefficient is used to control the attenuation intensity.
Citation Information
Patent Citations
Self-inspection method for camera mechanism of robot, electronic equipment and storage medium
CN112836711A
Circuit board component defect detection method based on deep learning
CN113077453A
Defect detection methods and devices in industrial inspection
CN113469299B
