Ultrafine metal powder defect detection method and system
By clustering and recalculating the confidence of prediction frames on the training samples of ultrafine metal powder, combined with the screening of cross-border ratio and texture similarity, the high accuracy and reliability of the defect detection of ultrafine metal powder are achieved, and the solution is solved. The problems of high error detection rate and inaccurate defect detection in the prior art are caused.
Patent Information
- Application Number
- CN202411475988.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-10-22
AI Technical Summary
The existing ultra-fine metal powder defect detection methods are difficult to effectively distinguish overlapping particles and defect areas, resulting in high error detection rates and inaccurate defect detection.
By clustering the labeled boxes in the training samples, the average grayscale value of each cluster is calculated, and the confidence of the prediction box is recalculated in combination with the prediction box confidence in the scanning electron microscope image. Then, sort by confidence, calculate the interleaving ratio and texture similarity, determine whether the prediction box is retained, and finally label the defective particles on the image.
It improves the accuracy and reliability of defect detection, reduces the error detection rate and missed detection rate, and can more effectively separate each particle and defect area.
Smart Images

Figure CN119006453B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of defect detection, and in particular to an ultra-fine metal powder defect detection method and system. Background Art
[0002] Ultrafine metal powder is widely used in powder metallurgy, additive manufacturing, thermal spraying and other fields. It plays an important role in these high-precision processing fields due to its small particle size, good fluidity and excellent molding performance. In addition, ultrafine metal powder can significantly improve the mechanical properties and surface quality of parts, making the products perform better in terms of strength, wear resistance, corrosion resistance, etc., and is especially suitable for manufacturing parts with complex shapes and high performance requirements. In the fields of additive manufacturing, aerospace, medical equipment, automobile manufacturing, etc., ultrafine metal powder provides strong support for the realization of lightweight, high-precision, and high-performance parts manufacturing.
[0003] However, in the production process of ultra-fine metal powder, multiple processes are involved, and it is difficult for each process to always maintain the best state. This makes it impossible to completely avoid defects in the powder, such as uneven particles, impurity inclusions, voids, etc., and may eventually lead to a significant decline in the mechanical properties, corrosion resistance and wear resistance of the product. Existing scanning electron microscopes, laser particle size analysis, X-ray diffraction, etc., can help to promptly detect various defects generated in the production process. However, laser particle size analysis cannot fully inspect metal particles, and X-ray diffraction has limited ability to detect defects in metal powders with amorphous structures. Scanning electron microscopes can image to the nm level and are the only choice for ultra-fine metal powder defect detection. However, the image taken by a scanning electron microscope contains many metal powder particles at a time. The particles may block or stack each other, making it difficult to distinguish multiple overlapping particles and defect areas. In addition, the existing prediction box tends to cover the entire area and cannot effectively separate individual particles and defects. Summary of the invention
[0004] In order to solve the above problems, the present invention provides a method for detecting defects in ultra-fine metal powders, the method comprising the following steps:
[0005] Cluster the annotated boxes in the training samples and calculate the average grayscale value of the annotated boxes in each cluster;
[0006] Obtaining a metal particle image of an ultrafine metal powder taken by a scanning electron microscope, inputting the metal particle image into a target recognition model to obtain confidences of multiple prediction boxes, calculating an average grayscale value of each prediction box, and recalculating the confidence of the prediction box according to the average grayscale value and the original confidence;
[0007] The prediction frames are sorted according to their confidences, and the intersection-over-union ratio of the first prediction frame after sorting and the current prediction frame is calculated. If the intersection-over-union ratio is within a preset range, the texture similarity and confidence difference between the first prediction frame and the current prediction frame are calculated, and whether to retain the current prediction frame is determined according to the texture similarity; iterative execution is performed until the last prediction frame after sorting;
[0008] The metal powder particles with defects are marked on the metal particle image based on the remaining prediction boxes.
[0009] Preferably, the confidence of the prediction box is recalculated according to the average gray value and the original confidence, specifically:
[0010] Calculate the difference between the average gray value of the predicted box and the average gray value of the cluster to which the predicted box belongs;
[0011] Normalize the difference between the average grayscale value of the prediction box and the average grayscale value of the cluster to which the prediction box belongs;
[0012] The new confidence is calculated as the original confidence × (1-normalized difference value).
[0013] Preferably, the method further includes: if the intersection-and-union ratio is greater than an upper limit of a preset range, deleting the current prediction frame; if the intersection-and-union ratio is less than a lower limit of a preset range, retaining the current prediction frame; wherein the prediction frame is a non-first prediction frame after sorting.
[0014] Preferably, determining whether to retain the current prediction frame according to the texture similarity is specifically:
[0015] Calculate the texture similarity between the current prediction box and the first prediction box ;
[0016] Calculate the confidence difference ΔC between the first prediction box and the current prediction box;
[0017] According to the formula Calculate the fusion credibility of the current prediction box. If the fusion credibility is less than the preset value, keep the current prediction box, otherwise delete the current prediction box; where α and β are weight parameters.
[0018] Preferably, the step of marking defective metal powder particles on the metal particle image based on the remaining prediction frames is specifically as follows:
[0019] The center coordinates, height and width of the prediction box are obtained, a rectangular box is drawn on the metal particle image according to the center coordinates, height and width, and a label of the rectangular box is marked according to the prediction category probability of the prediction box.
[0020] In another aspect, the present invention provides an ultra-fine metal powder defect detection system, the system comprising the following modules:
[0021] The sample feature extraction module is used to cluster the annotated boxes in the training samples and calculate the average gray value of the annotated boxes in each cluster;
[0022] A confidence calculation module, used to obtain a metal particle image of an ultra-fine metal powder taken by a scanning electron microscope, input the metal particle image into a target recognition model to obtain the confidence of multiple prediction frames, calculate the average gray value of each prediction frame, and recalculate the confidence of the prediction frame according to the average gray value and the original confidence;
[0023] A prediction box screening module is used to sort the prediction boxes according to their confidence levels, calculate the intersection-and-union ratio of the first prediction box after sorting and the current prediction box, and if the intersection-and-union ratio is within a preset range, calculate the texture similarity and confidence difference between the first prediction box and the current prediction box, and determine whether to retain the current prediction box according to the texture similarity; iteratively execute until the last prediction box after sorting;
[0024] The defect marking module is used to mark the metal powder particles with defects on the metal particle image based on the remaining prediction frames.
[0025] Preferably, the confidence of the prediction box is recalculated according to the average gray value and the original confidence, specifically:
[0026] Calculate the difference between the average gray value of the predicted box and the average gray value of the cluster to which the predicted box belongs;
[0027] Normalize the difference between the average grayscale value of the prediction box and the average grayscale value of the cluster to which the prediction box belongs;
[0028] The new confidence is calculated as the original confidence × (1-normalized difference value).
[0029] Preferably, the system further includes: if the intersection-and-union ratio is greater than an upper limit of a preset range, deleting the current prediction frame; if the intersection-and-union ratio is less than a lower limit of a preset range, retaining the current prediction frame; wherein the prediction frame is a non-first prediction frame after sorting.
[0030] Preferably, determining whether to retain the current prediction frame according to the texture similarity is specifically:
[0031] Calculate the texture similarity between the current prediction box and the first prediction box ;
[0032] Calculate the confidence difference ΔC between the first prediction box and the current prediction box;
[0033] According to the formula Calculate the fusion credibility of the current prediction box. If the fusion credibility is less than the preset value, keep the current prediction box, otherwise delete the current prediction box; where α and β are weight parameters.
[0034] Preferably, the step of marking defective metal powder particles on the metal particle image based on the remaining prediction frames is specifically as follows:
[0035] The center coordinates, height and width of the prediction box are obtained, a rectangular box is drawn on the metal particle image according to the center coordinates, height and width, and a label of the rectangular box is marked according to the prediction category probability of the prediction box.
[0036] In addition, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.
[0037] The present invention combines the gray value with the confidence level to calculate the confidence level of the prediction frame more accurately, thereby reducing the false detection rate and improving the reliability of defective particle detection. Moreover, when screening the prediction frame, it is determined whether to retain the current prediction frame based on the texture similarity, thereby reducing the possibility of missed detection or false detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is a flow chart of Embodiment 1;
[0039] Figure 2 Schematic diagram of ultra-fine metal powder photographed by SEM;
[0040] Figure 3 It is a schematic diagram of IOU;
[0041] Figure 4 This is a structural diagram of the second embodiment. DETAILED DESCRIPTION
[0042] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0043] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] In a first embodiment of the present invention, the present invention provides a method for detecting defects in ultra-fine metal powders, such as Figure 1 As shown, the method comprises the following steps:
[0045] S1, cluster the annotated boxes in the training samples and calculate the average grayscale value of the annotated boxes in each cluster;
[0046] In the training samples, there will be many annotation boxes, each of which has a certain size. The position information of the annotation box includes the center position, height, and width of the annotation box. Due to the different types of particle defects in metal powders, the annotation boxes are also different. The particle defect types include but are not limited to non-spherical or non-circular, voids, cracks, oversized, undersized, etc. In one embodiment, classification is performed according to the particle defect type corresponding to the annotation box. Of course, clustering can also be performed based on area or based on height and width. After clustering, the average grayscale value of the annotation box in each cluster is calculated.
[0047] S2, obtaining a metal particle image of an ultrafine metal powder taken by a scanning electron microscope, inputting the metal particle image into a target recognition model to obtain confidences of multiple prediction boxes, and calculating an average gray value of each prediction box, and recalculating the confidence of the prediction box according to the average gray value and the original confidence;
[0048] The scale of ultra-fine metal powder is very small. In order to observe the condition of metal particles, a scanning electron microscope (SEM) is used to capture images of ultra-fine metal particles. The metal particle images include multiple particles in ultra-fine metal powders. The metal particle images are input into a target recognition model such as the YOLO series model such as yolov3. After passing through the target recognition model, multiple prediction boxes will be obtained. Each prediction box corresponds to a confidence level, which indicates the degree of certainty that the prediction box contains defective metal particles. Figure 2As shown, the scanning electron microscope has different magnifications and displays different densities of metal particles. If more metal particles need to be inspected for defects at one time, lowering the magnification can obtain an image containing more metal particles at one time. The metal particles in the metal particle image are obviously different from the background image. A good prediction box should contain a metal particle. The average grayscale value of the prediction box can further determine the degree of certainty that the prediction box contains metal particles.
[0049] In the present invention, the average grayscale value of each prediction box is calculated, and the confidence of the prediction box is recalculated according to the average grayscale value of the prediction box and the original confidence of the prediction box. Specifically, the difference between the average grayscale value of the prediction box and the average grayscale value of the cluster to which the prediction box belongs is calculated; the difference between the average grayscale value of the prediction box and the average grayscale value of the cluster to which the prediction box belongs is normalized; and the new confidence calculation method is original confidence × (1-normalized difference value).
[0050] Since the annotation boxes of different defect types are different, their average grayscale values are also different. The difference between the average grayscale value of the prediction box and the average grayscale value of the cluster to which the prediction box belongs is calculated, and then the difference is normalized, and the new confidence is obtained using the original confidence × (1-normalized difference value). In a specific embodiment, the normalized difference value is calculated as: |average grayscale value of the prediction box-average grayscale value of the cluster to which the prediction box belongs| / 255. If the difference between the average grayscale value of the prediction box and the average grayscale value of the cluster to which the prediction box belongs is greater, the recalculated confidence is smaller, indicating that the degree of certainty that the defective metal particles are contained in this prediction box is lower. In one embodiment, the cluster to which the prediction box belongs is determined based on the probability of the defect type predicted by the prediction box. Specifically, the defect type with the largest probability of the defect type is selected as the cluster to which the prediction box belongs. For example, the probability that the metal particle defect type corresponding to the prediction box is a void is 0.6, and the probability that the metal particle type is oversized is 0.2, then the cluster to which the prediction box belongs is determined to be the cluster corresponding to the void.
[0051] S3, sorting the prediction frames according to their confidences, calculating the intersection-over-union ratio of the first prediction frame after sorting and the current prediction frame, and if the intersection-over-union ratio is within a preset range, calculating the texture similarity and confidence difference between the first prediction frame and the current prediction frame, and determining whether to retain the current prediction frame according to the texture similarity; iteratively executing until the last prediction frame after sorting;
[0052] NMS (Non-Maximum Suppression) determines whether to keep the prediction box by setting the IOU (Intersection over Union) threshold. Figure 3The IOU is shown, but the IOU threshold is a value that is difficult to determine. If the IOU threshold is set too large, the two prediction frames will be considered to overlap only when they are very close to each other, which may lead to redundant frames. On the contrary, if it is set too small, it is easy to mistakenly delete valid prediction frames. In order to overcome the above problems, the scope of the intersection and union ratio is determined in the present invention. If the intersection and union ratio is within the preset range [t1, t2], the texture similarity and confidence difference between the first prediction frame and the current prediction frame are calculated, and whether to retain the current prediction frame is determined based on the texture similarity; if the intersection and union ratio is greater than the upper limit t2 of the preset range, the current prediction frame is deleted; if the intersection and union ratio is less than the lower limit t1 of the preset range, the current prediction frame is retained; wherein the prediction frame is a non-first prediction frame after sorting.
[0053] In one embodiment, determining whether to retain the current prediction frame according to the texture similarity is specifically:
[0054] Calculating the texture similarity between the current prediction box and the first prediction box; wherein the texture similarity calculation method includes but is not limited to using a gray level co-occurrence matrix or a local binary value (LBP) method;
[0055] If the texture similarity is less than the preset value, the current prediction box is retained, otherwise the current prediction box is deleted.
[0056] In another embodiment, determining whether to retain the current prediction frame according to the texture similarity is specifically:
[0057] Calculate the texture similarity between the current prediction box and the first prediction box ; Among them, the calculation method of texture similarity includes but is not limited to using gray level co-occurrence matrix or local binary (LBP) method.
[0058] Calculate the confidence difference ΔC between the first prediction box and the current prediction box;
[0059] According to the formula Calculate the fusion credibility of the current prediction box. If the fusion credibility is less than the preset value, keep the current prediction box, otherwise delete the current prediction box; where α and β are weight parameters.
[0060] If the texture similarity is small, it means that the metal particles in the two prediction frames are less likely to be the same particle. If the confidence difference is small, it means that the current prediction frame is also more reliable, and the reliability of its containing metal particles is greater. If the fusion credibility is less than the preset value, the current prediction frame is retained, otherwise it is deleted. The confidence difference is the confidence of the first prediction frame minus the confidence of the current prediction frame.
[0061] In a third embodiment, the probability similarity between the first prediction box and the current prediction box is further added in the above two embodiments. For example, the probabilities corresponding to the first prediction box are 0.6, 0.3, and 0.1, and the probabilities corresponding to the current prediction box are 0.5, 0.3, and 0.2. The distance between the two is calculated, and the distance between the two is used as the probability similarity, and then the probability similarity is weighted.
[0062] After performing the above operations on the first prediction box and other prediction boxes in the sorted prediction box queue, S3 is executed again for the remaining prediction boxes, and it is repeated until there is one prediction box left in the queue; wherein the remaining prediction boxes do not include the deleted prediction boxes and the first prediction box. In another embodiment, the iteration is performed until the last prediction box after sorting, specifically: the second prediction box in the sorted prediction box queue is used as the first prediction box, and then the above operations are repeated with the non-first and second prediction boxes in the queue, and this is continued until the last prediction box in the queue. Sorting the prediction boxes according to confidence is specifically to sort the prediction boxes in order from large to small confidence.
[0063] S4, marking metal powder particles with defects on the metal particle image based on the remaining prediction frames.
[0064] After screening the prediction boxes, the center coordinates, height, and width of the remaining prediction boxes are obtained, and then a rectangular box is drawn on the metal particle image, and the defect type of the metal powder particle is marked.
[0065] In another embodiment, for the prediction boxes remaining after S3, the prediction boxes are filtered again according to the probabilities corresponding to the prediction boxes, and if the maximum value of the probabilities corresponding to the prediction boxes is less than a fixed value, the prediction boxes are deleted. Then, the positions marked on the metal particle image are determined for the x, y, w, and h of the remaining prediction boxes, and the marking is performed.
[0066] In a second embodiment of the present invention, the present invention provides an ultra-fine metal powder defect detection system, such as Figure 4 As shown, the system includes the following modules:
[0067] The sample feature extraction module is used to cluster the annotated boxes in the training samples and calculate the average gray value of the annotated boxes in each cluster;
[0068] A confidence calculation module, used to obtain a metal particle image of an ultra-fine metal powder taken by a scanning electron microscope, input the metal particle image into a target recognition model to obtain the confidence of multiple prediction frames, calculate the average gray value of each prediction frame, and recalculate the confidence of the prediction frame according to the average gray value and the original confidence;
[0069] A prediction box screening module is used to sort the prediction boxes according to their confidence levels, calculate the intersection-and-union ratio of the first prediction box after sorting and the current prediction box, and if the intersection-and-union ratio is within a preset range, calculate the texture similarity and confidence difference between the first prediction box and the current prediction box, and determine whether to retain the current prediction box according to the texture similarity; iteratively execute until the last prediction box after sorting;
[0070] The defect marking module is used to mark the metal powder particles with defects on the metal particle image based on the remaining prediction frames.
[0071] Preferably, the confidence of the prediction box is recalculated according to the average gray value and the original confidence, specifically:
[0072] Calculate the difference between the average gray value of the predicted box and the average gray value of the cluster to which the predicted box belongs;
[0073] Normalize the difference between the average grayscale value of the prediction box and the average grayscale value of the cluster to which the prediction box belongs;
[0074] The new confidence is calculated as the original confidence × (1-normalized difference value).
[0075] Preferably, the system further includes: if the intersection-and-union ratio is greater than an upper limit of a preset range, deleting the current prediction frame; if the intersection-and-union ratio is less than a lower limit of a preset range, retaining the current prediction frame; wherein the prediction frame is a non-first prediction frame after sorting.
[0076] Preferably, determining whether to retain the current prediction frame according to the texture similarity is specifically:
[0077] Calculate the texture similarity between the current prediction box and the first prediction box ;
[0078] Calculate the confidence difference ΔC between the first prediction box and the current prediction box;
[0079] According to the formula Calculate the fusion credibility of the current prediction box. If the fusion credibility is less than the preset value, keep the current prediction box, otherwise delete the current prediction box; where α and β are weight parameters.
[0080] Preferably, the step of marking defective metal powder particles on the metal particle image based on the remaining prediction frames is specifically as follows:
[0081] The center coordinates, height and width of the prediction box are obtained, a rectangular box is drawn on the metal particle image according to the center coordinates, height and width, and a label of the rectangular box is marked according to the prediction category probability of the prediction box.
[0082] In a third embodiment of the present invention, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in the first embodiment is implemented.
[0083] In a fourth embodiment of the present invention, the present invention further provides a computer device, which includes at least a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method described in the first embodiment is implemented.
[0084] Through the description of the above implementation methods, technicians in this field can clearly understand that each implementation method can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present invention can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it, and other embodiments may also be used. Although the present invention has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting defects in ultra-fine metal powders, characterized in that: The method comprises the following steps: Cluster the annotated boxes in the training samples and calculate the average grayscale value of the annotated boxes in each cluster; Obtaining a metal particle image of an ultrafine metal powder taken by a scanning electron microscope, inputting the metal particle image into a target recognition model to obtain confidences of multiple prediction boxes, calculating an average grayscale value of each prediction box, and recalculating the confidence of the prediction box according to the average grayscale value and the original confidence; The prediction frames are sorted in descending order according to the confidence of the prediction frames, and the intersection-over-union ratio of the first prediction frame after sorting and the current prediction frame is calculated. If the intersection-over-union ratio is within a preset range, the texture similarity and confidence difference between the first prediction frame and the current prediction frame are calculated, and whether to retain the current prediction frame is determined according to the texture similarity; it is iterated until the last prediction frame after sorting; marking metal powder particles with defects on the metal particle image based on the remaining prediction boxes; The confidence of the prediction box is recalculated according to the average gray value and the original confidence, specifically: Calculate the difference between the average gray value of the predicted box and the average gray value of the cluster to which the predicted box belongs; Normalize the difference between the average grayscale value of the prediction box and the average grayscale value of the cluster to which the prediction box belongs; The new confidence is calculated as the original confidence × (1-normalized difference value).
2. The method according to claim 1, characterized in that The method further includes: if the intersection-over-union ratio is greater than an upper limit of a preset range, deleting the current prediction frame; if the intersection-over-union ratio is less than a lower limit of the preset range, retaining the current prediction frame; wherein the prediction frame is a non-first prediction frame after sorting.
3. The method according to claim 1, characterized in that The determining whether to retain the current prediction frame according to the texture similarity is specifically: Calculate the texture similarity between the current prediction box and the first prediction box ; Calculate the confidence difference ΔC between the first prediction box and the current prediction box; According to the formula Calculate the fusion credibility of the current prediction box. If the fusion credibility is less than the preset value, keep the current prediction box, otherwise delete the current prediction box; where α and β are weight parameters.
4. The method according to claim 1, characterized in that The method of marking defective metal powder particles on the metal particle image based on the remaining prediction frames is specifically as follows: The center coordinates, height and width of the prediction box are obtained, a rectangular box is drawn on the metal particle image according to the center coordinates, height and width, and a label of the rectangular box is marked according to the prediction category probability of the prediction box.
5. An ultra-fine metal powder defect detection system, characterized in that: The system includes the following modules: The sample feature extraction module is used to cluster the annotated boxes in the training samples and calculate the average gray value of the annotated boxes in each cluster; A confidence calculation module, used to obtain a metal particle image of an ultra-fine metal powder taken by a scanning electron microscope, input the metal particle image into a target recognition model to obtain the confidence of multiple prediction frames, calculate the average gray value of each prediction frame, and recalculate the confidence of the prediction frame according to the average gray value and the original confidence; A prediction box screening module is used to sort the prediction boxes in descending order according to the confidence of the prediction boxes, calculate the intersection and union ratio of the first prediction box after sorting and the current prediction box, and if the intersection and union ratio is within a preset range, calculate the texture similarity and confidence difference between the first prediction box and the current prediction box, and determine whether to retain the current prediction box according to the texture similarity; iteratively execute until the last prediction box after sorting; A defect marking module, used for marking metal powder particles with defects on the metal particle image based on the remaining prediction frames; The confidence of the prediction box is recalculated according to the average gray value and the original confidence, specifically: Calculate the difference between the average gray value of the predicted box and the average gray value of the cluster to which the predicted box belongs; Normalize the difference between the average grayscale value of the prediction box and the average grayscale value of the cluster to which the prediction box belongs; The new confidence is calculated as the original confidence × (1-normalized difference value).
6. The system according to claim 5, characterized in that The system also includes: if the intersection-and-union ratio is greater than an upper limit of a preset range, deleting the current prediction frame; if the intersection-and-union ratio is less than a lower limit of the preset range, retaining the current prediction frame; wherein the prediction frame is a non-first prediction frame after sorting.
7. The system according to claim 5, characterized in that The determining whether to retain the current prediction frame according to the texture similarity is specifically: Calculate the texture similarity between the current prediction box and the first prediction box ; Calculate the confidence difference ΔC between the first prediction box and the current prediction box; According to the formula Calculate the fusion credibility of the current prediction box. If the fusion credibility is less than the preset value, keep the current prediction box, otherwise delete the current prediction box; where α and β are weight parameters.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Mechanical part surface defect detection method based on image processing
CN113538429A
Textile surface defect detection method based on deep learning
CN116883333A