Mobile phone card holder defect accurate detection method and system based on multispectral imaging
By combining a multispectral imaging system with a single-spectral defect recognition model, and using historical data analysis to assign differentiated weights to spectral images, intelligent and adaptive fusion detection of mobile phone SIM card tray defects is achieved. This solves the problem of insufficient information fusion in multispectral imaging methods and improves detection accuracy and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-11
- Publication Date
- 2026-03-10
AI Technical Summary
In the detection of defects in mobile phone SIM card trays, existing technologies using multispectral imaging methods have failed to effectively fuse different spectral information, resulting in limited ability to identify certain defects and making it difficult to meet the requirements for high-precision and high-reliability detection.
By acquiring spectral images of a mobile phone SIM card tray in multiple bands using a multispectral imaging system, a single-spectral defect recognition model is trained for preliminary identification. By combining historical data analysis, different confidence weights are assigned to different spectral image types, and weighted fusion decision-making is performed to achieve intelligent and adaptive fusion of multispectral information.
It significantly improves the ability to detect subtle defects, reduces the rate of missed detections and false detections, and provides a more efficient and accurate automated detection method.
Smart Images

Figure CN121640001A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection technology, specifically to a method and system for accurate detection of defects in mobile phone SIM card trays based on multispectral imaging. Background Technology
[0002] With the rapid development of mobile communication technology and the continuous increase in the penetration rate of smartphones, the manufacturing quality and reliability requirements for SIM card trays, one of the key components of mobile phones, are becoming increasingly stringent. SIM card trays are typically made by precision injection molding or metal stamping. They are small in size and have a delicate structure, making them highly susceptible to various minor defects during the production process, such as scratches, deformation, burrs, material shortages, color differences, and surface contamination. These defects not only affect the product's appearance but can also lead to difficulties in SIM card tray installation, poor contact, or even functional failure, seriously impacting user experience and brand reputation. Therefore, efficient and accurate defect detection of mobile phone SIM card trays before shipment is crucial. Currently, most mainstream industrial vision inspection methods rely on visible light imaging. However, limited by single-spectral information, their ability to identify certain defects with low contrast to the background and weak features, such as slight color differences, flaws in transparent areas, and scratches under specific angle reflection interference, is limited. This can easily lead to missed or false detections, making it difficult to meet the requirements of high-precision and high-reliability inspection.
[0003] Multispectral imaging technology, by acquiring reflection or transmission information of objects in multiple specific spectral bands, can reveal features beyond the visible light range, offering new possibilities for identifying defects that are difficult to detect using traditional methods. However, how to effectively fuse image information from different spectral channels and adaptively evaluate the confidence level of detection results in each band for different defect types, thereby making a more accurate and robust final defect determination, is a key technical challenge that urgently needs to be solved in the field of precision component defect detection using multispectral imaging. Existing technologies often simply average or vote on multispectral results, failing to fully consider the differences in sensitivity and recognition capabilities of different bands for different types of defects, thus limiting further improvements in detection accuracy. Therefore, there is an urgent need for a detection method that can intelligently fuse multispectral information and accurately identify various defects in mobile phone SIM card trays. Summary of the Invention
[0004] To address the aforementioned technical problems, this technical solution provides a method for accurate detection of defects in mobile phone SIM card trays based on multispectral imaging. This solution addresses at least one of the technical problems mentioned in the background section.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A precise detection method for mobile phone SIM card tray defects based on multispectral imaging includes: The target mobile phone SIM card tray was imaged using a multispectral imaging system to obtain spectral images of the mobile phone SIM card tray in multiple different spectral bands; Each of the acquired spectral images is preprocessed; Defect identification is performed on each of the preprocessed spectral images to obtain the candidate defect types identified under the spectral image and their corresponding first probability values; Based on the preset confidence level of each spectral image type for different defect types, determine the confidence weight of each identified candidate defect type under the corresponding spectral image; For each candidate defect type identified, the second probability value of the candidate defect type is calculated by combining its first probability value under all spectral images and the corresponding confidence weight. The second probability value is compared with a preset confidence threshold. If the second probability value is greater than or equal to the confidence threshold, it is determined that the SIM card tray has a defect of the candidate defect type.
[0006] Preferably, the step of performing defect identification on each preprocessed spectral image to obtain the candidate defect type and its corresponding first probability value identified under that spectral image specifically includes: Based on each spectral band, a single-spectral defect recognition model corresponding to each spectral band is trained. The single-spectral defect recognition model takes the spectral image as input and the probability of the presence of a defect type in the spectral image as output. For each preprocessed spectral image input device, a single-spectral defect identification model under the corresponding spectral band is used to obtain the probability of each type of defect existing under the spectral image. The defect types with a probability greater than the preset identification value are selected and recorded as candidate defect types identified under this spectral image; The candidate defect types and their probabilities identified under the spectral image are output as the candidate defect types and their corresponding first probability values identified under the spectral image.
[0007] Preferably, the step of training a single-spectral defect recognition model corresponding one-to-one with each spectral band specifically includes: Collect spectral images of mobile phone SIM card trays under different defect states to form a sample set, and divide it into a training set and a validation set according to a preset ratio; The training set is divided into a model training set and a model test set; Repeat the process of dividing the training set into a model training set and a model test set n times to obtain n distinct model training sets and model test sets. Based on the n sets of model training sets and model test sets, at least one preliminary single-spectral defect recognition model is trained. The performance of each preliminary single-spectral defect identification model is evaluated on the validation set, and the final single-spectral defect identification model is selected.
[0008] Preferably, the step of determining the confidence weight of each identified candidate defect type under each spectral image based on the preset confidence level for each defect type specifically includes: For each spectral band in the historical identification data, the single-spectral defect identification model is used to analyze the identification accuracy of defect types and the confidence level of each spectral image type for defect type identification. The ratio of the confidence score of a spectral image type in identifying a defect type to the sum of the confidence scores of all spectral image types in identifying a defect type is used as the confidence score weight of the candidate defect type in the spectral image.
[0009] Preferably, the analysis of the accuracy of defect type identification by the single-spectral defect identification model corresponding to each spectral band in the historical identification data, and the confidence level of each spectral image type for defect type identification, specifically includes: In the collected historical identification data, the ratio of the number of data where the single-spectral defect identification model for the corresponding spectral band has a defect type identification probability exceeding the preset identification value to the number of data where the defect type is finally determined to exist is used as the positive identification accuracy. In the collected historical identification data, the ratio of the number of data where the single-spectral defect identification model corresponding to the spectral band has a defect type identification probability less than the preset identification value to the number of data where the defect type is finally determined not to exist is used as the reverse identification accuracy. The forward recognition accuracy and the reverse recognition accuracy are respectively used as the confidence levels of forward recognition and reverse recognition of spectral image type for defect type.
[0010] Preferably, the ratio of the confidence score of the spectral image type for identifying the defect type to the sum of the confidence scores of all spectral image types for identifying the defect type, as the confidence weight of the candidate defect type in the spectral image, specifically includes: Summarize all candidate defect types identified from all spectral images; For each candidate defect type, the spectral image that identifies the candidate defect type is recorded as the identified spectral image, and the spectral image that does not identify the candidate defect type is recorded as the unidentified spectral image. The positive recognition accuracy of the spectral image for this candidate defect type is used as the verification recognition confidence level, and the negative recognition accuracy of the spectral image for this candidate defect type is used as the verification recognition confidence level. The ratio of the confidence score of the spectral image type for the defect type to the sum of the confidence scores of all spectral image types for the defect type is used as the confidence score weight of the candidate defect type under the spectral image.
[0011] Preferably, for each identified candidate defect type, calculating the second probability value of that candidate defect type by combining its first probability value across all spectral images and its corresponding confidence weight specifically includes: For each identified candidate defect type, its first probability value and corresponding confidence weight under all spectral images are weighted and summed to obtain the second probability value of that candidate defect type.
[0012] Furthermore, a precise detection system for mobile phone SIM card tray defects based on multispectral imaging is proposed to realize the aforementioned precise detection method for mobile phone SIM card tray defects based on multispectral imaging, including: A multispectral imaging unit is configured to image a target mobile phone SIM card tray and acquire spectral images of the mobile phone SIM card tray in multiple different bands; A preprocessing unit, connected to the multispectral imaging unit, is configured to preprocess each of the spectral images; A single-spectral defect identification unit, connected to the preprocessing unit, includes a single-spectral defect identification model corresponding to each spectral band, and is configured to identify defects in each preprocessed spectral image and output the candidate defect type identified in the spectral image and its corresponding first probability value. The confidence weight calculation unit is configured to determine the confidence weight of each identified candidate defect type under the corresponding spectral image based on the preset confidence of the identification of different defect types for each spectral image type. The multispectral decision fusion unit, connected to the single-spectral defect identification unit and the confidence weight calculation unit, is configured to: for each candidate defect type, combine its first probability value and corresponding confidence weight under all spectral images to calculate the second probability value of the candidate defect type; and compare the second probability value with a preset confidence threshold. If it is greater than or equal to the threshold, it is determined that there is a defect of the candidate defect type.
[0013] Optionally, the single-spectral defect identification unit includes: The model storage module stores single-spectrum defect identification models; The parallel inference engine is configured to input the preprocessed spectral images into the corresponding band of the single-spectral defect recognition model and output the probability values of all defect types under each spectral image. The candidate filtering module is configured to filter defect types with a probability value greater than the preset identification value as candidate defect types and output their first probability value.
[0014] Optionally, the confidence weight calculation unit includes: The historical database stores historical identification data for each single-spectral defect identification model. The confidence analysis module is configured to: calculate the forward recognition accuracy and reverse recognition accuracy for each spectral band of a specific defect type based on historical data, and use them as the forward recognition confidence and reverse recognition confidence, respectively. When the spectral image identifies a candidate defect type, the forward recognition confidence is used as the verification recognition confidence; when the spectral image does not identify a candidate defect type, the reverse recognition confidence is used as the verification recognition confidence. The weight calculation engine is configured to use the ratio of the verification and recognition confidence of a single spectral image type for a candidate defect type to the sum of the verification and recognition confidence of all spectral image types for that defect as the confidence weight of the candidate defect type in the current spectral image. The multispectral decision fusion unit is specifically configured as follows: for each candidate defect type, its first probability value under all spectral images is multiplied by the corresponding confidence weight and then summed to obtain the second probability value.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention acquires spectral images of the target SIM card tray in multiple different bands and utilizes a single-spectral defect recognition model trained for each band for preliminary defect identification and probability prediction. This significantly improves the ability to detect subtle defects that are difficult to detect with a single spectrum, such as scratches, slight color differences, and flaws in transparent areas under specific lighting conditions. Furthermore, by deeply analyzing historical data, differentiated confidence weights are assigned to the identification results of different defect types for different spectral image types. Based on this, a weighted fusion decision is made on the preliminary identification results from all spectral images, achieving intelligent and adaptive fusion of multi-source spectral information. This effectively overcomes the limitations of simple averaging or voting strategies in traditional multispectral detection. This method can significantly improve the overall accuracy and robustness of defect detection, greatly reduce the false negative and false positive rates, and provide a more efficient and accurate automated detection method for the quality control of mobile phone SIM card trays. Attached Figure Description
[0016] Figure 1 This is a flowchart of the precise detection method for mobile phone SIM card tray defects based on multispectral imaging proposed in this scheme; Figure 2 This is a flowchart of the method proposed in this scheme for defect identification of each of the preprocessed spectral images; Figure 3 This is a flowchart of the method for training a single-spectral defect recognition model proposed in this scheme; Figure 4 The flowchart of the method proposed in this scheme for determining the confidence weight of each identified candidate defect type in each spectral image is shown. Figure 5 This is a flowchart illustrating the method proposed in this scheme for analyzing the confidence level of defect type identification for each type of spectral image. Figure 6 This is a flowchart of the method proposed in this scheme for determining the confidence weight of defect types in spectral images. Detailed Implementation
[0017] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0018] Reference Figure 1 As shown, a method for accurate detection of mobile phone SIM card tray defects based on multispectral imaging includes: A multispectral imaging system is used to image the target mobile phone SIM card tray, acquiring spectral images of the SIM card tray in multiple different spectral bands. Multispectral imaging technology is used to acquire images of the SIM card tray in multiple specific, discrete spectral bands (such as visible light, near-infrared, and ultraviolet). This surpasses the limitations of traditional visible light imaging, enabling the capture of unique reflection, absorption, or emission characteristics of different material properties, surface states, or defects in specific spectral bands, providing a richer information basis for subsequent detection. The specific spectral band selection is based on the spectral response characteristics of the target defect. Each of the acquired spectral images is preprocessed. The preprocessing aims to eliminate or mitigate the effects of noise, distortion, uneven illumination, and other factors introduced during the imaging process, and to ensure comparability between images of different bands. Specifically, the preprocessing methods include denoising, image enhancement, geometric correction, image registration, and illumination normalization. Image preprocessing provides standardized and high-quality input data for subsequent defect identification algorithms. For each preprocessed spectral image, defect identification is performed to obtain the candidate defect types identified under that spectral image and their corresponding first probability values. For each preprocessed single-band spectral image, a trained defect identification model is applied for analysis. The model outputs the probability values of various preset defect types, such as scratches, deformations, burrs, missing materials, color differences, and contamination, in that specific band image. An initial identification threshold is set, and only defect types with probability values higher than this threshold are output as "candidate defects" under that image to reduce the computational load of subsequent processing and initially filter out low-confidence false positives. Based on the preset confidence levels for different defect types for each spectral image type, the system determines the confidence weight of each identified candidate defect type in the corresponding spectral image. Based on historical data analysis or prior knowledge, the system pre-establishes an assessment of the "ability" or "reliability" of different spectral band image types for identifying different types of defects. For example, a certain near-infrared band may be particularly sensitive and accurate in detecting surface contamination, but relatively weak in detecting color differences. When a candidate defect type is identified in a certain band image, the system assigns a confidence weight to the identification result based on the preset confidence level of that band for that type of defect. The higher the weight, the more reliable the judgment of the candidate defect by that band image. For each identified candidate defect type, its first probability value across all spectral images and its corresponding confidence weight are combined to calculate a second probability value for that candidate defect type. For the same candidate defect type, such as a "scratch," it may have different recognition probabilities in multiple different spectral band images. The first probability value of this candidate defect type across all spectral band images and its corresponding determined confidence weight are collected. Then, through weighted summation or other fusion algorithms, this information from different spectral bands is combined to calculate a new, more comprehensive, and more reliable global probability value, i.e., the second probability value. Higher probability values in high-confidence bands will have a greater impact on the final result. The second probability value is compared with a preset confidence threshold. If the second probability value is greater than or equal to the confidence threshold, the SIM card tray is determined to have a defect of that candidate defect type. The calculated second probability value represents the overall confidence level of the system after considering all available spectral information, indicating that the SIM card tray has a specific defect. This global confidence level is compared with a preset confidence threshold representing quality requirements. If the second probability value reaches or exceeds the threshold, a final determination of "the defect exists" is made; otherwise, the defect is considered non-existent or the confidence level is insufficient. This threshold can be adjusted according to the requirements for detection accuracy, false negative rate, and false positive rate in actual production.
[0019] Specifically, refer to Figure 2 As shown, defect identification is performed on each preprocessed spectral image to obtain the candidate defect type and its corresponding first probability value under that spectral image. Specifically, this includes: Based on each spectral band, a single-spectral defect recognition model corresponding to each spectral band is trained. The single-spectral defect recognition model takes the spectral image as input and the probability of the presence of a defect type in the spectral image as output. For each preprocessed spectral image input device, a single-spectral defect identification model under the corresponding spectral band is used to obtain the probability of each type of defect existing under the spectral image. The defect types with a probability greater than the preset identification value are selected and recorded as candidate defect types identified under this spectral image; The candidate defect types and their probabilities identified under the spectral image are output as the candidate defect types and their corresponding first probability values identified under the spectral image.
[0020] By independently training and deploying dedicated single-spectral defect recognition models for each specific spectral band, the accuracy and specificity of defect recognition are significantly improved. Each model is deeply adapted to the spectral characteristics of its corresponding band, enabling more effective extraction and identification of the most significant or discriminative defect features within that band. For example, specific bands are particularly sensitive to the reflective properties of scratches or the absorption properties of contaminants, thus generating more accurate probabilities of presence. Furthermore, by setting preset recognition values for screening, only defect types with high confidence are selected as candidate outputs. This mechanism effectively filters out low-confidence noise or false positives, significantly reducing the computational burden of subsequent multispectral fusion decisions and substantially lowering the false alarm rate. This strategy of "dedicated model for specific purposes" combined with "probability screening" lays a high-quality, high-reliability foundation for subsequent confidence-weighted multispectral fusion, and is a key element in improving the overall accuracy and efficiency of the detection system.
[0021] Reference Figure 3 As shown, training a single-spectral defect recognition model corresponding to each spectral band specifically includes the following steps: Collect spectral images of mobile phone SIM card trays under different defect states to form a sample set, and divide it into a training set and a validation set according to a preset ratio; The training set is divided into a model training set and a model test set; Repeat the process of dividing the training set into a model training set and a model test set n times to obtain n distinct model training sets and model test sets. Based on the n sets of model training sets and model test sets, at least one preliminary single-spectral defect recognition model is trained. The performance of each preliminary single-spectral defect identification model is evaluated on the validation set, and the final single-spectral defect identification model is selected.
[0022] By carefully constructing a sample set containing defect states and employing a rigorous data partitioning strategy to divide the data into training and validation sets, the representativeness of the training data and the objectivity of the model evaluation are ensured. Since some spectral images in practical applications are insensitive to certain defects, this scheme proposes a model training and selection mechanism to further improve the model's recognition accuracy in these areas: multiple preliminary models are trained by repeatedly partitioning the training set into a training set and a test set n times. This strategy effectively utilizes limited data, evaluating the model's performance on different data subsets through multiple training iterations, significantly improving the robustness and generalization ability of the final model, and reducing the model's performance dependence on the randomness of a single data partition. Finally, a unified and impartial performance evaluation of all preliminary models is conducted using an independent validation set, selecting the best-performing model as the final single-spectral defect recognition model. This entire process minimizes overfitting, ensuring that the model selected for each specific spectral band is the optimal solution for recognizing the defect types it excels at in that band. This lays a solid model foundation for subsequent high-precision single-spectral defect recognition and is a key guarantee for improving the reliability of the entire multispectral detection system.
[0023] Reference Figure 4 As shown, based on the preset confidence level for each type of spectral image for different defect types, the confidence weight of each identified candidate defect type under each spectral image is determined specifically as follows: For each spectral band in the historical identification data, the single-spectral defect identification model is used to analyze the identification accuracy of defect types and the confidence level of each spectral image type for defect type identification. The ratio of the confidence score of a spectral image type in identifying a defect type to the sum of the confidence scores of all spectral image types in identifying a defect type is used as the confidence score weight of the candidate defect type in the spectral image.
[0024] By deeply mining the rich empirical information contained in historical identification data, an objective quantitative analysis is conducted on the actual ability of each spectral image type to identify specific defect types, thereby scientifically determining its identification confidence level. The confidence weights calculated based on this confidence level can truly reflect the relative reliability of different band images for identifying different candidate defect types. Applying this weight to subsequent multispectral fusion decisions ensures that information with a greater impact on the final judgment comes from spectral channels that perform more stably and accurately in identifying that type of defect. This weight allocation mechanism, dynamically generated based on historical empirical data, significantly improves the targeting and scientific rigor of multispectral information fusion, effectively overcoming the blindness of traditional fixed-weight or average-weighted strategies, and providing a crucial guarantee for the high accuracy and reliability of the final defect determination.
[0025] Reference Figure 5As shown, the accuracy analysis of defect type identification by the single-spectral defect identification model for each spectral band in the historical identification data is performed. The confidence level of defect type identification for each spectral image type specifically includes: In the collected historical identification data, the ratio of the number of data where the single-spectral defect identification model for the corresponding spectral band has a defect type identification probability exceeding the preset identification value to the number of data where the defect type is finally determined to exist is used as the positive identification accuracy. In the collected historical identification data, the ratio of the number of data where the single-spectral defect identification model corresponding to the spectral band has a defect type identification probability less than the preset identification value to the number of data where the defect type is finally determined not to exist is used as the reverse identification accuracy. The forward recognition accuracy and the reverse recognition accuracy are respectively used as the confidence levels of forward recognition and reverse recognition of spectral image type for defect type.
[0026] Two key indicators—forward recognition accuracy and reverse recognition accuracy—were creatively proposed and calculated to precisely quantify the ability of a specific spectral band image to correctly identify the presence of a certain defect and the absence of a certain defect, respectively. These two indicators were directly used as the forward and reverse recognition confidence scores for that spectral image type regarding the defect type, achieving a comprehensive and objective two-way evaluation of the spectral image recognition capability. This evaluation method not only focuses on the spectral image's ability to successfully detect defects but also places equal emphasis on its ability to correctly exclude non-defective elements, thus more completely and realistically reflecting the overall reliability of that spectral image type in identifying specific defect types. This two-way confidence score definition based on historical empirical data lays a solid and comprehensive data foundation for subsequent calculations of scientifically sound and reasonable confidence score weights, ultimately significantly improving the accuracy and reliability of multispectral fusion decision-making.
[0027] Reference Figure 6 As shown, the ratio of the confidence score of a spectral image type for identifying a defect type to the sum of the confidence scores of all spectral image types for identifying a defect type is used as the confidence weight of the candidate defect type in the spectral image. Specifically, this includes: Summarize all candidate defect types identified from all spectral images; For each candidate defect type, the spectral image that identifies the candidate defect type is recorded as the identified spectral image, and the spectral image that does not identify the candidate defect type is recorded as the unidentified spectral image. The positive recognition accuracy of the spectral image for this candidate defect type is used as the verification recognition confidence level, and the negative recognition accuracy of the spectral image for this candidate defect type is used as the verification recognition confidence level. The ratio of the confidence score of the spectral image type for the defect type to the sum of the confidence scores of all spectral image types for the defect type is used as the confidence score weight of the candidate defect type under the spectral image.
[0028] The core advantage of this scheme lies in its high context adaptability and refinement. It first dynamically categorizes spectral images in the current detection instance into "identifiable spectral images" and "non-identifiable spectral images" based on whether a specific candidate defect type has been identified. For images that identify the defect, the scheme uses the positive identification accuracy of that image type—its ability to correctly identify the presence of the defect—as its contribution to the verification confidence score. For images that do not identify the defect, it uses the negative identification accuracy—its ability to correctly identify the absence of the defect—as the verification confidence score. This differentiated approach accurately captures the relative value and reliability of information provided by different spectral images under different decision results, whether detected or not. Finally, by normalizing the verification confidence score of a single image type to the sum of the confidence scores of all image types, the scheme scientifically determines the weight proportion that the image type identification result should occupy in the current multispectral fusion decision. This method significantly improves the rationality and relevance of weight allocation, ensuring that the final fusion result can optimally utilize the complementary and verification information provided by all spectral channels, thereby effectively improving the overall accuracy and reliability of defect determination.
[0029] Furthermore, based on the same inventive concept as the aforementioned method for accurate detection of mobile phone SIM card tray defects based on multispectral imaging, this solution proposes a system for accurate detection of mobile phone SIM card tray defects based on multispectral imaging, comprising: A multispectral imaging unit is configured to image a target mobile phone SIM card tray and acquire spectral images of the mobile phone SIM card tray in multiple different bands; A preprocessing unit, connected to the multispectral imaging unit, is configured to preprocess each of the spectral images; A single-spectral defect identification unit, connected to the preprocessing unit, includes a single-spectral defect identification model corresponding to each spectral band, and is configured to identify defects in each preprocessed spectral image and output the candidate defect type identified in the spectral image and its corresponding first probability value. The confidence weight calculation unit is configured to determine the confidence weight of each identified candidate defect type under the corresponding spectral image based on the preset confidence of the identification of different defect types for each spectral image type. The multispectral decision fusion unit, connected to the single-spectral defect identification unit and the confidence weight calculation unit, is configured to: for each candidate defect type, combine its first probability value and corresponding confidence weight under all spectral images to calculate the second probability value of the candidate defect type; and compare the second probability value with a preset confidence threshold. If it is greater than or equal to the threshold, it is determined that there is a defect of the candidate defect type.
[0030] The single-spectral defect identification unit includes: The model storage module stores single-spectrum defect identification models; The parallel inference engine is configured to input the preprocessed spectral images into the corresponding band of the single-spectral defect recognition model and output the probability values of all defect types under each spectral image. The candidate filtering module is configured to filter defect types with a probability value greater than the preset identification value as candidate defect types and output their first probability value.
[0031] The confidence weight calculation unit includes: The historical database stores historical identification data for each single-spectral defect identification model. The confidence analysis module is configured to: calculate the forward recognition accuracy and reverse recognition accuracy for each spectral band of a specific defect type based on historical data, and use them as the forward recognition confidence and reverse recognition confidence, respectively. When the spectral image identifies a candidate defect type, the forward recognition confidence is used as the verification recognition confidence; when the spectral image does not identify a candidate defect type, the reverse recognition confidence is used as the verification recognition confidence. The weight calculation engine is configured to use the ratio of the verification and recognition confidence of a single spectral image type for a candidate defect type to the sum of the verification and recognition confidence of all spectral image types for that defect as the confidence weight of the candidate defect type in the current spectral image. The multispectral decision fusion unit is specifically configured as follows: for each candidate defect type, its first probability value under all spectral images is multiplied by the corresponding confidence weight and then summed to obtain the second probability value.
[0032] In summary, the advantages of this invention are as follows: By acquiring spectral images of the target SIM card tray in multiple different bands and utilizing a single-spectral defect recognition model trained for each band for preliminary defect identification and probability prediction, the invention significantly improves the ability to detect subtle defects that are difficult to detect with a single spectrum, such as scratches, slight color differences, and transparent area flaws under specific lighting conditions. Furthermore, by deeply analyzing historical data, different confidence weights are assigned to the identification results of different defect types for different spectral image types, and a weighted fusion decision is made based on this weighted fusion of preliminary identification results from all spectral images. This achieves intelligent and adaptive fusion of multi-source spectral information, effectively overcoming the limitations of simple averaging or voting strategies in traditional multispectral detection. This method can significantly improve the overall accuracy and robustness of defect detection, greatly reduce the false negative and false positive rates, and provide a more efficient and accurate automated detection method for the quality control of mobile phone SIM card trays.
[0033] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A method for accurate detection of defects in a mobile phone card holder based on multi-spectral imaging, characterized in that, The method comprises the following steps: Imaging the target mobile card holder by using a multi-spectral imaging system to obtain spectral images of the mobile card holder under different wave bands; Pretreating each of the obtained spectral images; Identifying defects in each of the pretreated spectral images to obtain a candidate defect type and a corresponding first probability value identified under the spectral image; Determining a confidence weight of each candidate defect type identified under the corresponding spectral image according to a preset recognition confidence of each spectral image type for different defect types; For each candidate defect type identified, synthesizing the first probability value and the corresponding confidence weight under all spectral images to calculate a second probability value of the candidate defect type; Comparing the second probability value with a preset confidence threshold, and if the second probability value is greater than or equal to the confidence threshold, determining that the mobile card holder has a defect of the candidate defect type.
2. The multispectral imaging based precision detection method of defects in mobile phone card holder according to claim 1, characterized in that, The defect identification in each of the pretreated spectral images to obtain a candidate defect type and a corresponding first probability value identified under the spectral image specifically comprises: Training a single-spectral defect identification model corresponding to each spectral band based on each spectral band, wherein the single-spectral defect identification model takes a spectral image as input and outputs a probability of a defect type existing in the spectral image; Inputting each of the pretreated spectral images into the single-spectral defect identification model under the corresponding spectral band to obtain a probability of each defect type existing under the spectral image; Screening out defect types with a probability greater than a preset recognition value, and recording the defect types as candidate defect types identified under the spectral image; Outputting the candidate defect types and the probabilities as the candidate defect types and the corresponding first probability values identified under the spectral image.
3. The multispectral imaging based precision detection method of defects in mobile phone card holder according to claim 2, characterized in that, The training of the single-spectral defect identification model corresponding to each spectral band based on each spectral band specifically comprises: Collecting sample spectral images of the mobile card holder under different defect states to form a sample set, and dividing the sample set into a training set and a validation set according to a preset proportion; Dividing the training set into a model training set and a model test set; Repeating the division of the training set into the model training set and the model test set for n times to obtain n groups of different model training sets and model test sets; Training at least one preliminary single-spectral defect identification model based on the n groups of model training sets and model test sets; Evaluating the performance of each preliminary single-spectral defect identification model on the validation set to screen out a final single-spectral defect identification model.
4. The multispectral imaging based precision detection method of defects in mobile phone card holder according to claim 3, characterized in that, The determination of the confidence weight of each candidate defect type identified under each spectral image according to the preset recognition confidence of each spectral image type for different defect types specifically comprises: Analyzing the recognition confidence of each spectral image type for defect types according to the recognition accuracy of the single-spectral defect identification model corresponding to each spectral band in historical recognition data for defect types; Taking the ratio of the recognition confidence of the spectral image type for defect types to the sum of the recognition confidence of all spectral image types for defect types as the confidence weight of the candidate defect type under the spectral image.
5. The multispectral imaging based precision detection method of defects in mobile phone card holder according to claim 4, characterized in that, The analysis of the identification accuracy of the single-spectrum defect identification model corresponding to each spectral band in the historical identification data to the defect type includes: The ratio of the number of data whose identification probability of the single-spectrum defect identification model corresponding to the spectral band in the historical identification data to the defect type exceeds the preset identification value to the number of data finally determined to exist the defect type is taken as the positive identification accuracy; The ratio of the number of data whose identification probability of the single-spectrum defect identification model corresponding to the spectral band in the historical identification data to the defect type is less than the preset identification value to the number of data finally determined to not exist the defect type is taken as the negative identification accuracy; The positive identification accuracy and the negative identification accuracy are respectively taken as the positive identification confidence and the negative identification confidence of the spectral image type to the defect type.
6. The multispectral imaging based precision detection method of defects in mobile phone card holder as claimed in claim 5, wherein, The ratio of the identification confidence of the spectral image type to the defect type to the sum of the identification confidences of all the spectral image types to the defect type is taken as the confidence weight of the candidate defect type under the spectral image. All the candidate defect types identified under all the spectral images are summarized; For each candidate defect type, the spectral image in which the candidate defect type is identified is recorded as an identified spectral image, and the spectral image in which the candidate defect type is not identified is recorded as a non-identified spectral image; The positive identification accuracy of the identified spectral image to the candidate defect type is taken as the verification identification confidence, and the negative identification accuracy of the identified spectral image to the candidate defect type is taken as the verification identification confidence; The ratio of the verification identification confidence of the spectral image type to the defect type to the sum of the verification identification confidences of all the spectral image types to the defect type is taken as the confidence weight of the candidate defect type under the spectral image.
7. The multispectral imaging based precision detection method of defects in mobile phone card holder according to claim 6, characterized in that, The second probability value of each candidate defect type is calculated by weighting and summing the first probability value and the corresponding confidence weight of each candidate defect type under all the spectral images. The method for implementing the multi-spectral imaging-based precise detection of defects of a mobile phone card holder according to any one of claims 1-7 comprises:
8. A system for accurate detection of defects in a mobile card holder based on multispectral imaging, characterized by, A multi-spectral imaging unit configured to image a target mobile phone card holder and obtain spectral images of the mobile phone card holder under multiple different wave bands; A preprocessing unit connected to the multi-spectral imaging unit and configured to preprocess each of the spectral images; A single-spectrum defect identification unit connected to the preprocessing unit and comprising single-spectrum defect identification models corresponding to each spectral band, the single-spectrum defect identification unit being configured to identify defects in each of the preprocessed spectral images and output candidate defect types identified under the spectral image and corresponding first probability values; A confidence weight calculation unit configured to determine the confidence weight of each candidate defect type under the corresponding spectral image according to the preset identification confidence of each spectral image type to different defect types. The multispectral decision fusion unit is connected with the monochromatic spectrum defect identification unit and the confidence weight calculation unit, and is configured to: for each candidate defect type, integrate the first probability value and the corresponding confidence weight under all spectral images to calculate a second probability value of the candidate defect type; and compare the second probability value with a preset confidence threshold value, and if the second probability value is greater than or equal to the threshold value, it is determined that there is a defect of the candidate defect type.
9. The multispectral imaging based precision detection system for defects in mobile phone card holder as claimed in claim 8, wherein The monochromatic spectrum defect identification unit comprises: a model storage module that stores a monochromatic spectrum defect identification model; a parallel inference engine configured to input each preprocessed spectral image into the monochromatic spectrum defect identification model of the corresponding waveband, and output probability values of all defect types under each spectral image; a candidate screening module configured to screen defect types with probability values greater than a preset identification value as candidate defect types, and output the first probability values thereof.
10. The multispectral imaging based precision defect detection system for sim card to of claim 9, wherein, The confidence weight calculation unit comprises: a historical database that stores historical identification data of each monochromatic spectrum defect identification model; a confidence analysis module configured to: calculate, for the historical data, a forward recognition accuracy and a reverse recognition accuracy of each spectral waveband for a specific defect type, as a forward recognition confidence and a reverse recognition confidence, respectively; when the spectral image identifies a candidate defect type, use the forward recognition confidence as a verification recognition confidence; and when the spectral image does not identify a candidate defect type, use the reverse recognition confidence as the verification recognition confidence; a weight calculation engine configured to take, as a confidence weight of a candidate defect type under a current spectral image, a ratio of a verification recognition confidence of a monochromatic spectrum image type for the candidate defect type to a sum of verification recognition confidences of all spectral image types for the defect. The multispectral decision fusion unit is specifically configured to: for each candidate defect type, multiply the first probability value under all spectral images by the corresponding confidence weight, and sum the results to obtain a second probability value.
Citation Information
Patent Citations
Unbalanced text classification method and system combining SVM and semi-supervised clustering
CN110309302A
Solid waste identification method based on hyperspectral image spatial feature and spectral feature fusion
CN110717520A
Method and system for automatically detecting defects of semiconductor chip based on hyperspectral imaging
CN119417838A
Mobile phone rear cover defect identification and detection method based on multispectral image
CN119515790A
Seed detection method based on three-dimensional point cloud and hyperspectral feature fusion
CN120164073A