Training method and system of LED lamp strip defect detection model

By performing image acquisition, visual feature enhancement and environmental error filtering on LED light strips, combined with pixel point semantic segmentation and Monte Carlo random defect generation, defect detection model is constructed and trained, and the problems of unstable accuracy and inefficiency of LED light strip defect detection in the prior art are solved, and efficient and accurate defect detection is achieved.

CN120107197AInactive Publication Date: 2025-06-06SHENZHEN ANSEN LIGHTING TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510170949.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2025-06-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to detect defects of LED light strips efficiently and accurately, especially under long lengths and complex lighting conditions, resulting in unstable detection accuracy and low efficiency.

Method used

A training method of LED light strip defect detection model is adopted, and the LED light strip image is obtained through image acquisition equipment, visual feature enhancement and environmental error filtering are carried out, and defect detection model is constructed and trained in combination with pixel point semantic segmentation and Monte Carlo random defect generation.

Benefits of technology

It significantly improves the accuracy and efficiency of LED light strip defect detection, can accurately identify different types of defects in complex environments, meet the needs of large-scale production lines, and reduces the cost and error of manual inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107197A_ABST
    Figure CN120107197A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition, in particular to a training method and system for an LED lamp strip defect detection model. The method comprises the following steps: obtaining an LED lamp strip shot image, and carrying out LED lamp strip visual feature enhancement to obtain an LED lamp strip visual enhancement image; lED lamp strip production sensing data are obtained, environmental error filtering is carried out, and therefore an LED lamp strip visual image is obtained; carrying out LED lamp strip defect identification on the LED lamp strip visual image so as to obtain an LED lamp strip defect area image set; performing Monte Carlo random defect generation based on the LED lamp strip defect area image set to obtain a random defect data set; and performing simulation synthesis according to the random defect data set and the LED lamp strip defect area image set to obtain an LED lamp strip simulation synthesis defect set, and constructing an LED lamp strip defect detection model according to the LED lamp strip simulation synthesis defect set. According to the invention, the detection efficiency of the defects of the LED lamp strip is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition technology, and in particular to a training method and system for an LED light strip defect detection model. Background Art

[0002] As an important part of modern lighting products, LED light strips are widely used in indoor and outdoor decoration, commercial advertising, smart home and other fields. With the continuous increase in market demand, the production and quality control of LED light strips are facing increasing challenges. Since LED light strips may have defects such as poor contact, component damage, and unstable current during the production process, how to efficiently and accurately detect the defects of LED light strips has become a technical problem that needs to be solved urgently. Traditionally, defect detection of LED light strips mainly relies on manual inspection and some rule-based automated inspection methods. Manual inspection usually relies on experienced operators to visually inspect the LED light strips, but due to the long length of LED light strips and the fact that defects may be hidden inside or on the surface, manual inspection has great limitations. In addition, manual inspection is easily affected by subjective factors, resulting in unstable detection accuracy and low efficiency, which cannot meet the needs of large-scale production lines. Summary of the invention

[0003] Based on this, it is necessary for the present invention to provide a training method and system for an LED light strip defect detection model to solve at least one of the above technical problems.

[0004] To achieve the above purpose, a training method for an LED light strip defect detection model includes the following steps:

[0005] Step S1: acquiring an image captured by the LED light strip through a preset image acquisition device, and enhancing the visual features of the LED light strip on the image captured by the LED light strip, thereby obtaining a visually enhanced image of the LED light strip;

[0006] Step S2: obtaining LED light strip production sensor data, and performing LED light strip production environment analysis based on the LED light strip production sensor data, thereby obtaining LED light strip production environment data; performing environmental error filtering on the LED light strip visual enhancement image based on the LED light strip production environment data, thereby obtaining the LED light strip visual image;

[0007] Step S3: performing pixel semantic segmentation on the LED light strip visual image to obtain an LED light strip area division image set, and performing LED light strip defect recognition based on the LED light strip area division image set to obtain an LED light strip defect area image set;

[0008] Step S4: performing LED light strip defect pattern recognition based on the LED light strip defect area image set to obtain LED light strip defect pattern data, and performing Monte Carlo random defect generation based on the LED light strip defect pattern data to obtain a random defect data set;

[0009] Step S5: Perform LED light strip random defect simulation synthesis on the random defect data set and the LED light strip defect area image set to obtain the LED light strip simulation synthesis defect set, and construct and train the LED light strip defect detection model based on the LED light strip simulation synthesis defect set to obtain the LED light strip defect detection model.

[0010] The present invention uses an image acquisition device to obtain an image of an LED light strip, and through visual feature enhancement technology, improves the recognizability of the image, so that hidden minor defects can be more clearly identified in the subsequent processing process. This step can significantly improve the accuracy of detection, especially in scenes with complex lighting conditions and minor defects, and can avoid missed detection. Then, by acquiring the production sensor data of the LED light strip, the production environment is analyzed, and environmental error filtering is performed based on these data. In this way, the impact of environmental factors (such as temperature and humidity, light, current fluctuations, etc.) on image quality can be effectively eliminated, thereby obtaining a purer visual image, making the subsequent defect recognition process more accurate. With the refined processing of the image, the subsequent pixel semantic segmentation process can efficiently divide the different areas of the LED light strip and accurately identify the areas where defects may exist, ensuring the efficiency and accuracy of defect detection. By further analyzing the regional division image set, when performing defect pattern recognition, different types of defect patterns in the LED light strip can be fully identified, and high-quality defect pattern data can be obtained. This data provides a solid foundation for subsequent defect simulation synthesis. Through the Monte Carlo random defect generation method, more defect types and their combinations can be simulated in the data set, which not only enhances the diversity of the data, but also enables the training set to cover a wider range of defect scenarios, thereby effectively avoiding the problem of insufficient data when training the model. Based on these simulation data, further defect simulation synthesis is performed, which not only improves the richness of the data set, but also helps the model to be trained under a variety of defect combinations and changes, ensuring that the model has strong generalization ability and can adapt to different production scenarios and environmental conditions. The LED light strip defect detection model trained by the synthetic data set can accurately and efficiently identify different types of defects in practical applications, greatly improving the detection efficiency of the production line and reducing the cost and error of manual detection. At the same time, the model can realize automated and real-time defect detection to meet the needs of large-scale production. Overall, this technical solution integrates advanced image processing, data analysis and deep learning technologies, which not only improves the detection accuracy, but also greatly improves the level of automation in the production process, and promotes the development of intelligent manufacturing.

[0011] Optionally, step S1 specifically includes:

[0012] Step S11: acquiring the LED light strip captured image through a preset image acquisition device, and performing data cleaning on the LED light strip captured image, thereby obtaining the LED light strip captured image to be analyzed;

[0013] Step S12: performing background noise denoising on the image of the LED light strip to be analyzed, thereby obtaining a denoised image of the LED light strip;

[0014] Step S13: focusing the LED light strip details on the LED light strip denoised image, thereby obtaining a LED light strip zoomed image;

[0015] Step S14: performing image edge detection on the scaled image of the LED light strip to obtain image edge information, and performing Laplacian operator image sharpening processing on the scaled image of the LED light strip according to the image edge information to obtain an edge detail enhanced image;

[0016] Step S15: performing color space conversion on the edge detail enhanced image to obtain a LED light strip visually enhanced image.

[0017] The present invention effectively improves the defect detection accuracy and reliability of LED light strips through a multi-stage image processing method. The LED light strip captured by the preset image acquisition device is cleared of redundant information and noise in the image in the data cleaning stage, providing cleaner and more accurate image data for subsequent processing. This stage ensures the reliability of image quality, so that the subsequent analysis steps will not be disturbed by irrelevant information, and improves processing efficiency and accuracy. After denoising, further detail focusing can effectively enhance the details of the LED light strip, especially the details of the tiny defect parts, avoid missed detection or unclear recognition in areas with more complex details, and ensure the high accuracy of the image processing process. Then, through scaling processing, the details of the LED light strip can be analyzed more accurately, so that the detection results are clearer. This stage makes the performance of each pixel in the image clearer, laying a good foundation for subsequent defect analysis and identification. When performing image edge detection, the outline of the LED light strip and the potential defect area can be identified. By obtaining the edge information of the image, the location where the defect may exist can be more clearly delineated, thereby improving the accuracy of defect detection. The sharpening process combined with the Laplace operator further enhances the details of the image edge. In particular, for some tiny defects, the sharpening process can better highlight their features and avoid missing defects due to image blur. Finally, the color space conversion can effectively adjust the brightness and contrast of the image, further improve the image performance under different lighting conditions, and ensure the visibility and recognition of the LED light strip in various environments. This series of processing not only improves the image quality, but also provides more stable and reliable data support for subsequent defect detection, thereby greatly improving the accuracy and efficiency of the defect detection system.

[0018] Optionally, step S2 specifically includes:

[0019] Step S21: acquiring LED light strip production sensor data, and performing data preprocessing on the LED light strip production sensor data, thereby obtaining the LED light strip production sensor data to be analyzed;

[0020] Step S22: performing environmental sensor data fusion according to the LED light strip production sensor data to be analyzed, thereby obtaining LED light strip production environment data;

[0021] Step S23: quantifying the impact of the production environment based on the LED light strip production environment data and the LED light strip visual enhancement image, thereby obtaining an image quality impact factor;

[0022] Step S24: constructing an environmental deviation model according to the image quality influencing factors, and generating environmental deviation values ​​for the production sensor data of the LED light strip to be analyzed through the environmental deviation model, thereby obtaining environmental deviation value data, wherein the environmental deviation value data includes temperature and humidity environmental deviation value data, lighting environmental deviation value data, and current fluctuation environmental deviation value data;

[0023] Step S25: performing environmental error filtering on the LED light strip visual enhancement image based on the environmental deviation value data, so as to obtain the LED light strip visual image.

[0024] The present invention can eliminate noise and abnormal values ​​in sensor reading by performing data preprocessing on the production sensor data of LED light strips, thereby obtaining reliable production environment data. This process ensures the accuracy and reliability of subsequent data analysis and provides a good foundation for the fusion and processing of environmental data. On this basis, by performing environmental sensor data fusion on the production sensor data, the production environment of the LED light strip can be comprehensively analyzed, and the data of multiple sensors can be effectively integrated to provide more accurate environmental parameter data for subsequent environmental impact quantification and image processing. Based on the fused production environment data and visual enhanced images, the production environment impact quantification can clearly reveal the specific influencing factors of the production environment on the image quality of the LED light strip, and help identify the specific effects of environmental factors such as temperature, humidity, light, and current fluctuations on image quality. This analysis provides strong data support for subsequent error filtering. Construct an environmental deviation model to further accurately quantify the impact of the production environment on image quality, so that the production environment deviation of the LED light strip can be systematically identified and quantified. By generating environmental deviation value data such as temperature, humidity, light, and current fluctuations, a specific correction basis is provided for subsequent error filtering, making image processing more accurate. Finally, by filtering the environmental error of the LED light strip visual enhancement image, the image noise and inaccuracy caused by environmental factors can be effectively removed, thereby ensuring the image quality. This series of steps not only improves the image quality by efficiently quantifying the impact of the production environment and combining it with an accurate deviation model, but also ensures the accuracy and reliability of subsequent defect detection, providing stable data support for defect identification in the production process of LED light strips.

[0025] Optionally, step S25 is specifically:

[0026] According to the temperature and humidity environmental deviation value data, the LED light strip visual enhancement image is corrected for the image temperature and humidity, so as to obtain an environmental temperature and humidity corrected image;

[0027] According to the illumination environment deviation value data, the illumination non-uniformity correction is performed on the LED light strip visual enhancement image, so as to obtain an ambient illumination correction image;

[0028] According to the current fluctuation environment deviation value data, the LED light strip visual enhancement image is corrected for the current fluctuation brightness change, so as to obtain an environment current correction image;

[0029] Perform image correction feature stitching on the environmental temperature and humidity correction image, the environmental illumination correction image, and the environmental current correction image, so as to obtain environmental error feature data;

[0030] The error bilateral filtering is performed on the LED light strip visual enhancement image according to the environmental error feature data to obtain the LED light strip visual image.

[0031] The present invention greatly improves the image quality and the reliability of subsequent defect detection by accurately correcting the influence of factors such as temperature and humidity, light and current fluctuations in the production environment on the visual image of the LED light strip. By correcting the image according to the temperature and humidity environmental deviation value data, the influence of temperature and humidity changes can be effectively eliminated, and image blur, distortion or color deviation can be avoided, so as to obtain a more realistic and stable visual image, and ensure the consistency of image quality under different environmental conditions. Then, for the problem of uneven illumination, correction is performed through the illumination environment deviation value data, which can effectively balance the illumination changes in the image, eliminate the visual errors caused by light source fluctuations or uneven illumination, and make the details and defects in the image clearer and more discernible. The brightness change caused by current fluctuations is also an important factor affecting image quality. Brightness correction is performed through the current fluctuation environment deviation value data, which further improves the stability of the image, avoids the uneven brightness caused by current fluctuations, and thus enhances the expressiveness and accuracy of each pixel in the image. The image correction feature splicing process can effectively integrate the correction information from different environmental factors, and provide comprehensive environmental error feature data for subsequent image processing, which provides more accurate basic data for subsequent error filtering. By performing error bilateral filtering based on environmental error feature data, it is possible to remove noise and irregularities caused by environmental fluctuations while retaining important image details, ensuring image purity and detail accuracy. This series of steps can not only effectively eliminate the impact of environmental factors on image quality, but also provide clearer and more stable image support for subsequent LED light strip defect detection, ensuring the efficiency and accuracy of detection, and ultimately improving the quality control level in the LED light strip production process.

[0032] Optionally, step S3 specifically includes:

[0033] Step S31: acquiring LED light strip structure data, and extracting LED light strip structure description features from the LED light strip structure data, thereby obtaining LED light strip structure description data;

[0034] Step S32: performing a light strip structure semantic analysis on the LED light strip structure description data, thereby obtaining light strip structure semantic data;

[0035] Step S33: performing light strip structure semantic space mapping on the LED light strip visual image and the light strip structure semantic data, thereby obtaining a structure semantic mapping image;

[0036] Step S34: performing image pixel category assignment according to the structural semantic space mapping to obtain the light strip image pixel category data, and performing pixel point segmentation based on the light strip image pixel category data to obtain the LED light strip area division image set;

[0037] Step S35: performing LED light strip defect recognition according to the LED light strip area division image set, thereby obtaining an LED light strip defect area image set.

[0038] The present invention obtains and extracts the structural description features of the LED light strip, and can understand the physical layout and composition of the light strip in detail, which is crucial for the subsequent analysis of defects in the image. By performing semantic analysis on the structural description data of the LED light strip, the key structural elements of the light strip can be identified, thereby providing a structured understanding for image analysis. The acquisition of structural semantic data helps to clarify the functions and positions of each part of the light strip in the image, thereby achieving more accurate subsequent analysis. Further, the semantic space mapping of the LED light strip visual image and the light strip structural semantic data can combine the image information with the structural information, providing a more accurate reference basis for subsequent pixel classification and regional division. This mapping technology can make each part of the image clearly distinguished according to its position and characteristics in the structure, avoiding the fuzzy areas and classification errors that may exist in traditional methods. Through image pixel category allocation and pixel segmentation, the regional division of the LED light strip visual image is further refined to ensure that the features of each area can be effectively extracted and further processed. This process can make subsequent defect identification more accurate, not only effectively locate the defect area, but also improve the sensitivity and accuracy of identification. Finally, by dividing the image set according to the region for defect identification, not only the efficiency of identification is improved, but also more powerful support can be provided through structural semantic mapping, so that different types of defects can be accurately identified in the complex LED light strip structure, ensuring that the final defect area image set has higher quality. This series of steps not only improves the accuracy of LED light strip defect detection through structured data analysis and precise image processing, but also provides technical support for large-scale and efficient automated quality inspection on the production line.

[0039] Optionally, step S35 is specifically:

[0040] Step S351: performing image pyramid area screening on the LED light strip area division image set, so as to obtain an LED light strip candidate frame image;

[0041] Step S352: performing candidate frame edge detection on the LED light strip candidate frame image to obtain candidate frame contour data, and performing low-frequency contour statistics on the candidate frame contour data to obtain a defect candidate frame image;

[0042] Step S353: extracting features from the defect candidate frame image, thereby obtaining color feature data of the defect candidate frame, brightness feature data of the defect candidate frame, and shape feature data of the defect candidate frame;

[0043] Step S354: performing defect feature correlation analysis based on the defect candidate frame color feature data, the defect candidate frame brightness feature data, and the defect candidate frame shape feature data, thereby obtaining defect feature correlation data;

[0044] Step S355: constructing a convolutional light strip defect recognition model according to the defect feature correlation data, and performing defect frame recognition on the LED light strip candidate frame image through the convolutional light strip defect recognition model to obtain a defect frame image;

[0045] Step S356: performing bounding box regression on the defect frame image to obtain a set of LED light strip defect area images.

[0046] The present invention can extract potential defect areas of LED light strips at different scales through image pyramid area screening technology, which provides a multi-level perspective for subsequent defect detection. The pyramid processing method enables the system to effectively deal with defects of different sizes and complexities, thereby ensuring the comprehensiveness of detection. Then, edge detection is performed on the candidate frame image, and the edges of objects in the image can be accurately identified, which is crucial for the positioning of defect areas. Through low-frequency contour statistics, more representative candidate frames can be further filtered out, making the final defect candidate frame more accurate and reducing the interference of redundant areas. Feature extraction is performed on the defect candidate frame image, covering multiple aspects such as color, brightness and shape, so that the feature information of the defect is fully characterized. These features provide a solid foundation for subsequent defect identification, help distinguish different types of defects, and further improve the accuracy of detection. Defect feature correlation analysis based on these extracted feature data can reveal the potential connection between defect features, help the model better understand the essential characteristics of defects, and thus enhance the model's ability to recognize various defect patterns. By constructing a convolutional light strip defect recognition model and combining defect feature correlation data, the system can accurately identify defect areas in the candidate frame image. This process not only improves the accuracy of recognition, but also ensures that the model can adapt to different light strip defect modes, with strong versatility and stability. Through the bounding box regression technology, the identified defect box is further refined to ensure more accurate positioning of the defect area and avoid false detection or missed detection. This series of steps forms an efficient and accurate LED light strip defect detection system, which greatly improves the quality and automation level of defect detection and provides important technical support for the production and quality control of LED light strips.

[0047] Optionally, step S4 is specifically:

[0048] Step S41: extracting defect area features and image time series features from the LED light strip defect area image set, thereby obtaining light strip defect area feature data and light strip image time series data;

[0049] Step S42: performing defect feature time series analysis on the feature data of the defective area of ​​the light strip according to the time series data of the light strip image, so as to obtain the time series data of the defect feature of the light strip;

[0050] Step S43: integrating the light strip defect feature dependency relationship based on the light strip defect feature time series data, thereby obtaining the light strip defect feature dependency relationship data;

[0051] Step S44: classifying the defect patterns of the light strips according to the defect feature dependency data of the light strips, thereby obtaining defect pattern data of the LED light strips;

[0052] Step S45: performing Monte Carlo random defect generation according to the LED light strip defect pattern data, thereby obtaining a random defect data set.

[0053] The present invention performs deep feature extraction and time series analysis on the defective area image set of LED light strips, which can effectively capture and understand the changing trend of defect features, thereby improving the accuracy and generalization ability of defect detection. First, through defect area feature extraction and image time series feature extraction, the system can extract fine defect feature data from the image, and at the same time, take into account the temporal dynamic changes of the image and capture the time series information. This multi-dimensional feature extraction method can more comprehensively describe the evolution process of LED light strip defects and provide richer input data for subsequent analysis. Performing defect feature time series analysis on the defective area feature data of the light strip can dig out the potential change law of defects in the time series dimension, providing strong support for subsequent fault prediction and quality control. This time series analysis can reveal the occurrence and development trend of defects, thereby helping to identify potential quality problems and improve the predictability of detection. Based on this, the time series data of defect features are further integrated to form defect feature dependency data, thereby providing more accurate basic data for the classification of defect patterns. The dependency integration of defect features helps to distinguish different types of defects, enabling the system to handle more complex scenarios and have higher adaptability. Defect pattern classification of defect feature dependency data can accurately classify and identify various defects in LED light strips, improving the accuracy of defect detection. Monte Carlo random defect generation based on defect pattern data can simulate different types of defects in different environments and scenarios. This process generates a diverse random defect data set, which can not only be used to train defect detection models and improve the robustness of the models, but also help identify rare defect patterns that are difficult to capture, providing more comprehensive protection for the quality control of LED light strips.

[0054] Optionally, step S45 is specifically:

[0055] Step S451: performing defect feature statistical analysis according to the defect mode data of the LED light strip, thereby obtaining defect feature statistical data, and determining the defect mode parameter range according to the defect feature statistical data, thereby obtaining defect mode parameter range data;

[0056] Step S452: performing defect feature correlation classification based on the light strip defect feature dependency data, thereby obtaining dependent defect feature data and independent defect feature data;

[0057] Step S453: performing dependent defect feature Monte Carlo random sampling on the dependent defect feature data according to the defect mode parameter range data, thereby obtaining random dependent defect feature data; performing independent defect feature Monte Carlo random sampling on the independent defect feature data according to the defect mode parameter range data, thereby obtaining random independent defect feature data;

[0058] Step S454: performing diversity verification on the random dependent defect feature data and the random independent defect feature data to obtain a random defect data set.

[0059] The present invention significantly improves the accuracy and robustness of the defect detection system through in-depth analysis of the defect pattern of the LED light strip. First, through the statistical analysis of defect features, the specific features of different types of defects can be identified and quantified to form defect feature statistical data. This step provides data support for subsequent defect pattern recognition and parameter optimization. Further, determining the range of defect pattern parameters based on these statistical data helps to build an accurate defect parameter space, provides clear standards for defect detection and diagnosis, and enables the detection system to have higher discrimination and recognition capabilities when facing different defects. Through defect feature correlation classification, it is possible to distinguish which defect features are associated and which defect features are independent. This process not only improves the analysis ability of complex defect types, but also enhances the adaptability in various environments. By separating dependent and independent defect feature data, subsequent analysis can focus more on the key features of various defects, laying the foundation for more accurate defect recognition. Based on the defect pattern parameter range data, Monte Carlo random sampling is performed on dependent and independent defect features to generate random defect feature data with diversity. This method can simulate a variety of possible defect scenarios, so that the detection model can be trained to have more robust and comprehensive feature recognition capabilities. This diverse simulation data provides the detection system with a wider range of learning materials and improves the system's performance in practical applications, especially when dealing with atypical defects. By verifying the diversity of random dependent defect feature data and independent defect feature data, it is ensured that the generated random defect data set is representative in both quality and quantity. This process ensures the diversity and comprehensiveness of the training data set, thereby improving the generalization ability of the detection model, enabling it to cope with defect detection tasks of different types and complexities. Through these steps, the defect characteristics of LED light strips can be captured and simulated more efficiently and accurately, providing more accurate data support for defect detection, greatly improving the quality and adaptability of the detection model, and thus promoting the level of automation and intelligence in the production process of LED light strips.

[0060] Optionally, step S5 specifically includes:

[0061] Step S51: performing defect type matching on the random defect data set and the LED light strip defect area image set, thereby obtaining defect type matching data;

[0062] Step S52: selecting a background image based on the LED light strip area division image set, thereby obtaining a background image to be synthesized;

[0063] Step S53: superimposing the defect area on the background image to be synthesized and the defect type matching data, so as to obtain a defect superimposed image;

[0064] Step S54: combining independent defect features of the defect superposition image according to the random defect data set, thereby obtaining a defect superposition random image;

[0065] Step S55: performing image enhancement processing on the defect superimposed random image to obtain a defect superimposed enhanced image, and annotating the defect type on the defect superimposed enhanced image to obtain a simulated synthetic defect set of the LED light strip;

[0066] Step S56: constructing and training an LED light strip defect detection model according to the LED light strip simulation synthetic defect set, thereby obtaining an LED light strip defect detection model.

[0067] The present invention provides highly realistic and diverse training data for the LED light strip defect detection model through a series of sophisticated image processing and defect synthesis steps, significantly improving the accuracy and robustness of the detection system. Through defect type matching, the generated random defect data can be accurately matched with the actual defect area image. This process ensures the one-to-one correspondence between the defect type and the image feature, and provides a high-quality data basis for subsequent defect synthesis. This matching step not only improves the accuracy of the data, but also lays a solid foundation for the subsequent synthesis step. Based on the LED light strip area division image set for background image selection, the most suitable background for synthesizing defect images can be effectively selected from a variety of backgrounds to ensure that the generated synthetic image can meet the common scenes in the actual production environment. The naturalness of image synthesis is optimized through background selection, so that the synthesized image is closer to the image sample in the real detection, thereby improving the performance of the detection model in the actual scene. Through defect area superposition, the random defect data is synthesized with the selected background image. This process simulates the appearance of different defect types in the real environment and enhances the diversity of the data set. The defect superposition image generated at this time has rich defect features, providing more diverse samples for training defect detection models. By combining the defect superposition images with independent defect features through random defect data sets, different types of defect features can be flexibly combined, further expanding the coverage of training data and helping the model to identify various possible defect patterns. The adaptability of the model is enhanced, enabling it to handle defects of different types and intensities. Image enhancement processing is performed on the defect superposition random images to make the synthetic images clearer and richer in details, which helps the training model to more accurately identify and distinguish subtle defects. In addition, the introduction of defect type annotation provides accurate defect labels for each synthetic image, making the training data more standardized and improving the recognition accuracy of the detection model. Based on these enhanced and annotated LED light strip simulation synthetic defect sets, the LED light strip defect detection model is constructed and trained. This step not only helps to build an efficient defect detection model, but also through rich training data and optimization algorithms, the model can show strong robustness and accuracy in a changing production environment, and can effectively deal with various types of defects in the production process.

[0068] Optionally, the present specification further provides a training system for an LED light strip defect detection model, which is used to execute the training method for the LED light strip defect detection model as described above, and the training system for the LED light strip defect detection model includes:

[0069] An image visual enhancement module is used to obtain an image captured by the LED light strip through a preset image acquisition device, and enhance the visual features of the LED light strip on the image captured by the LED light strip, thereby obtaining a visually enhanced image of the LED light strip;

[0070] An environmental error filtering module is used to obtain the LED light strip production sensor data, and perform LED light strip production environment analysis based on the LED light strip production sensor data, so as to obtain the LED light strip production environment data; perform environmental error filtering on the LED light strip visual enhancement image based on the LED light strip production environment data, so as to obtain the LED light strip visual image;

[0071] A light strip defect recognition module is used to perform pixel semantic segmentation on the LED light strip visual image to obtain an LED light strip area division image set, and perform LED light strip defect recognition based on the LED light strip area division image set to obtain an LED light strip defect area image set;

[0072] A random defect generation module is used to perform LED light strip defect pattern recognition based on the LED light strip defect area image set, thereby obtaining LED light strip defect pattern data, and perform Monte Carlo random defect generation based on the LED light strip defect pattern data, thereby obtaining a random defect data set;

[0073] The random defect simulation and synthesis module is used to perform random defect simulation and synthesis of LED light strips on the random defect data set and the LED light strip defect area image set, so as to obtain the LED light strip simulation synthesis defect set, and to construct and train the LED light strip defect detection model based on the LED light strip simulation synthesis defect set, so as to obtain the LED light strip defect detection model.

[0074] The training system of the LED light strip defect detection model of the present invention can implement any training method of the LED light strip defect detection model of the present invention, and is used to combine the operation and signal transmission medium between various modules to complete the training method of the LED light strip defect detection model. The internal modules of the system cooperate with each other, thereby improving the detection efficiency of production line defects and reducing the cost and error of manual inspection. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments thereof made with reference to the following drawings:

[0076] Figure 1 A schematic flow chart of the steps of a method for training a defect detection model for LED light strips according to the present invention;

[0077] Figure 2 Detailed step flow diagram of step S1 in the present invention;

[0078] Figure 3 Detailed step flow diagram of step S2 in the present invention;

[0079] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0080] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are 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 technicians in this field without creative work are within the scope of protection of the present invention.

[0081] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.

[0082] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.

[0083] To achieve this, please refer to Figures 1 to 3 The present invention provides a method for training an LED light strip defect detection model, the method comprising the following steps:

[0084] Step S1: acquiring an image captured by an LED light strip through a preset image acquisition device, and enhancing the visual features of the LED light strip on the image captured by the LED light strip, thereby obtaining a visually enhanced image of the LED light strip;

[0085] In this embodiment, the captured image of the LED light strip is obtained by a preset image acquisition device (for example, a high-definition camera with a resolution of 4096x2160), and the camera used can provide high frame rate and accurate image detail capture. After the image is acquired, a deep learning enhancement algorithm is applied to enhance the visual features of the image. The enhancement algorithm is based on a convolutional neural network (CNN), which focuses on optimizing image contrast and clarity, especially in low-light and strong-light environments, to improve the image quality of the LED light strip, making minor defects (such as poor contact, breakage, etc.) more clearly visible. Through these technologies, a visually enhanced image of the LED light strip is generated.

[0086] Step S2: obtaining LED light strip production sensor data, and performing LED light strip production environment analysis based on the LED light strip production sensor data, thereby obtaining LED light strip production environment data; performing environmental error filtering on the LED light strip visual enhancement image based on the LED light strip production environment data, thereby obtaining the LED light strip visual image;

[0087] In this embodiment, the sensor data of LED light strip production is obtained by deploying a sensor group in advance in the LED light strip production workshop, including sensor data such as temperature, humidity, and current fluctuations, and these data are transmitted in real time through embedded sensors. Then, by performing environmental analysis on these data, the impact of the production environment is evaluated using a machine learning algorithm (such as cluster analysis), and the main environmental error sources are extracted, such as the impact that excessive temperature and humidity or current fluctuations may have on the LED light strip. Based on this production environment data, the environmental error filtering is performed on the obtained LED light strip visual enhancement image, and a denoising technique based on statistical analysis (such as median filtering) is used to remove the noise caused by environmental interference, and finally the processed LED light strip visual image is obtained to ensure that the image quality is more realistic and convenient for subsequent analysis.

[0088] Step S3: performing pixel semantic segmentation on the LED light strip visual image to obtain an LED light strip area division image set, and performing LED light strip defect recognition based on the LED light strip area division image set to obtain an LED light strip defect area image set;

[0089] In this embodiment, pixel semantic segmentation is performed on the visual image of the LED light strip, and a deep convolutional neural network (such as U-Net or SegNet) is used to classify the image at the pixel level, and the image is divided into different regions (such as lamp beads, wires, contacts, etc.), and the category of each region is marked. Through this semantic segmentation method, the features of each region in the image are clearly divided. Then, based on the segmentation results, defect recognition is performed on the LED light strip area division image set, and a trained target detection model (such as YOLO or Faster R-CNN) is used to perform defect inspection on each region, successfully identifying possible defect areas, and finally obtaining a set of LED light strip defect area images.

[0090] Step S4: performing LED light strip defect pattern recognition based on the LED light strip defect area image set to obtain LED light strip defect pattern data, and performing Monte Carlo random defect generation based on the LED light strip defect pattern data to obtain a random defect data set;

[0091] In this embodiment, after obtaining the image set of defective areas of LED light strips, a deep learning model (such as a convolutional neural network) is used to identify defect patterns on these images. After being trained with a large number of defective images, the model can identify various types of defective patterns (such as poor contact, short circuit, uneven brightness, etc.). Based on the identified defective pattern data, the Monte Carlo method is used to generate random defects, and a large number of simulated defect samples are generated by simulating defects of different types and sizes. These defect data are generated according to the characteristics of the defect pattern (such as brightness, size, shape, etc.), and a random defect data set is obtained to enhance the data diversity of model training.

[0092] Step S5: Perform LED light strip random defect simulation synthesis on the random defect data set and the LED light strip defect area image set to obtain the LED light strip simulation synthesis defect set, and construct and train the LED light strip defect detection model based on the LED light strip simulation synthesis defect set to obtain the LED light strip defect detection model.

[0093] In this embodiment, based on the random defect data set and the LED light strip defect area image set, a data enhancement method is used to perform defect simulation synthesis. The random defect data is superimposed on the defect area with the real image in the image set, and the shape, size and distribution of the actual defect are simulated according to the different defect types and positions during superposition. Then, through the image enhancement algorithm (such as random rotation, scaling, brightness adjustment, etc.), defect images under different environmental conditions are further generated, and finally the LED light strip simulated synthetic defect set is obtained. Then, using these synthetic defect image sets, the LED light strip defect detection model is constructed and trained. During the training process, the model learns to identify various defect features (such as color, shape, edge, etc.), and optimizes them on the training set, and finally obtains a defect detection model with high precision and high robustness.

[0094] Optionally, step S1 specifically includes:

[0095] Step S11: acquiring the LED light strip captured image through a preset image acquisition device, and performing data cleaning on the LED light strip captured image, thereby obtaining the LED light strip captured image to be analyzed;

[0096] In this embodiment, a high-definition camera with a resolution of 1920x1080 is used to obtain the captured image of the LED light strip through the built-in autofocus function and precise exposure control of the camera. During the shooting process, various areas of the LED light strip (such as lamp beads, circuits, contacts, etc.) should be clearly visible. Afterwards, the acquired image is cleaned using image processing software (such as OpenCV) to remove the effects caused by factors such as light changes and motion blur. Data cleaning includes removing unnecessary background noise and interference, and finally obtaining the captured image of the LED light strip to be analyzed, ensuring that the image is clear, without significant distortion, and the information can be used for subsequent analysis.

[0097] Step S12: performing background noise denoising on the image of the LED light strip to be analyzed, thereby obtaining a denoised image of the LED light strip;

[0098] In this embodiment, the captured image of the LED light strip to be analyzed is introduced into the noise removal algorithm, and the background noise is denoised by using techniques such as adaptive median filtering or Gaussian filtering. By setting a suitable filter window size, interference such as salt and pepper noise and low-frequency noise in the image can be effectively removed, so that the background noise in the image is suppressed and the actual detail features of the LED light strip are retained. The purpose of this process is to improve the image quality and reduce the interference of noise on subsequent processing, so as to obtain a clearer and more realistic denoised image of the LED light strip, which is suitable for subsequent detail enhancement and feature extraction.

[0099] Step S13: focusing the LED light strip details on the LED light strip denoised image, thereby obtaining a LED light strip zoomed image;

[0100] In this embodiment, the denoised image of the LED light strip is subjected to detail focusing processing, and an image sharpening method is used to enhance the details of the LED light strip. In the specific operation, the Laplace operator or the Sobel operator can be used to perform convolution processing on the image to enhance the edge details of the image, so that the details such as the lamp beads and circuits in the image are clearer and more identifiable. The purpose of this process is to highlight the important features in the LED light strip image while ensuring the clarity of the details, thereby obtaining a scaled image of the LED light strip, ensuring that the important structure is not lost and the detail information is well reflected.

[0101] Step S14: performing image edge detection on the scaled image of the LED light strip to obtain image edge information, and performing Laplacian operator image sharpening processing on the scaled image of the LED light strip according to the image edge information to obtain an edge detail enhanced image;

[0102] In this embodiment, image edge detection is performed on the basis of the scaled image of the LED light strip, and the Canny edge detection algorithm is used to extract the edge information of the image. The Canny algorithm enhances edge details through multi-stage processing and has strong noise resistance and edge accuracy. After the edge information of the image is extracted, the Laplace operator is used to sharpen the image, and the edge clarity in the LED light strip image is improved by enhancing the high-frequency details in the image, so that the subtle defects or features in the image are more prominent, thereby obtaining an edge detail enhanced image, ensuring that the image details are more expressive and suitable for subsequent analysis and recognition.

[0103] Step S15: performing color space conversion on the edge detail enhanced image to obtain a LED light strip visually enhanced image.

[0104] In this embodiment, the obtained edge detail enhanced image is subjected to color space conversion. By converting the RGB color space into the HSV color space or the LAB color space, the image is processed in a separate manner of hue, saturation and brightness, so that the image is easier to process and analyze in different color components. The color space conversion in this process can enhance the visualization effect of the image without losing the image details, making the image of the LED light strip visually clearer and adapting to various subsequent image processing steps, so as to finally obtain the visually enhanced image of the LED light strip, ensuring that the image is rich in color and has prominent details.

[0105] Optionally, step S2 specifically includes:

[0106] Step S21: acquiring LED light strip production sensor data, and performing data preprocessing on the LED light strip production sensor data, thereby obtaining the LED light strip production sensor data to be analyzed;

[0107] In this embodiment, multiple sensors (such as temperature and humidity sensors, light sensors, current sensors, etc.) are installed on the LED light strip production line to collect data in real time during the production process. The collected data include environmental conditions, equipment operating status, temperature and humidity, light intensity, and current fluctuations during the production process. When preprocessing these sensor data, firstly, the data is denoised, and Kalman filtering or other smoothing algorithms are used to remove outliers; secondly, standardization is performed to unify the dimensions of different data, which is convenient for subsequent analysis, and finally the LED light strip production sensor data to be analyzed is obtained to ensure the accuracy and availability of the data.

[0108] Step S22: performing environmental sensor data fusion according to the LED light strip production sensor data to be analyzed, thereby obtaining LED light strip production environment data;

[0109] In this embodiment, based on the sensor data of the LED light strip production to be analyzed, the data of different sensors are integrated through a data fusion algorithm. For example, the data of multiple sensors can be fused using a weighted average method or a Kalman filter method to generate a comprehensive production environment data set. Through the fusion of environmental sensor data, the data error that may be caused by a single sensor can be effectively reduced, and the comprehensive understanding of environmental factors can be enhanced, thereby obtaining the production environment data of LED light strips and providing stable and reliable environmental analysis data support.

[0110] Step S23: quantifying the impact of the production environment based on the LED light strip production environment data and the LED light strip visual enhancement image, thereby obtaining an image quality impact factor;

[0111] In this embodiment, when quantifying the impact of the production environment based on the production environment data of the LED light strip and the visual enhancement image, the image processing algorithm is first used to pre-process the visual enhancement image of the LED light strip to extract the color features, texture features and brightness distribution features of the LED light strip. Then, through the correlation analysis between the environmental data and the image features, a convolutional neural network (CNN) based on deep learning is used to perform multi-level feature fusion. By training the CNN model, it is able to identify the deep correlation between production environment factors such as temperature, humidity, light and current fluctuations and image quality. Furthermore, using the joint regression analysis of environmental data and visual images, the specific impact of each environmental factor on the image quality of the LED light strip is quantitatively evaluated, and the values ​​of the image quality influencing factors are obtained. These factors represent the changes in image performance under different environmental conditions, which can help analyze the specific impact of environmental changes on image quality.

[0112] Step S24: constructing an environmental deviation model according to the image quality influencing factors, and generating environmental deviation values ​​for the production sensor data of the LED light strip to be analyzed through the environmental deviation model, thereby obtaining environmental deviation value data, wherein the environmental deviation value data includes temperature and humidity environmental deviation value data, lighting environmental deviation value data, and current fluctuation environmental deviation value data;

[0113] In the present embodiment, an environmental deviation model is constructed according to image quality influencing factors. The model uses machine learning algorithms, such as support vector machines (SVM) and regression trees (CART), and establishes a mapping relationship between environmental factors such as temperature and humidity, light and current fluctuations and the image quality of LED lights by training a large amount of historical data. For each influencing factor (such as temperature deviation, humidity deviation, light deviation, etc.), through regression analysis, quantify the degree of deviation of the features such as brightness, contrast, saturation, and color balance of the image. The deviation value data of each environmental factor is synthesized by weighted average method to form a multidimensional environmental deviation value data set. This data set can not only quantify the change of image quality, but also provide a basis for further image correction and optimization to ensure the stability of the image.

[0114] Step S25: performing environmental error filtering on the LED light strip visual enhancement image based on the environmental deviation value data, thereby obtaining the LED light strip visual image.

[0115] In this embodiment, the environmental error filtering is performed on the visual enhancement image of the LED light strip based on the environmental deviation value data. Adaptive filtering technology is used to adjust the image brightness, contrast, color balance and other characteristics by combining the environmental deviation value (such as temperature, humidity, light and current fluctuation) with the image quality influencing factors to perform accurate error correction. The filtering algorithm can be optimized by a convolutional neural network (CNN) or an image denoising algorithm, and ultimately achieves effective filtering of environmental errors, thereby obtaining a more stable and clear LED light strip visual image, and ensuring the stability and reliability of image quality.

[0116] Optionally, step S25 is specifically:

[0117] According to the temperature and humidity environmental deviation value data, the LED light strip visual enhancement image is corrected for the image temperature and humidity, so as to obtain an environmental temperature and humidity corrected image;

[0118] In this embodiment, the temperature and humidity effects of the LED light strip visual enhancement image are corrected according to the temperature and humidity environmental deviation value data. First, it is necessary to monitor the temperature and humidity fluctuations in the production or use environment of the LED light strip in real time through a high-precision sensor. A deep learning model, such as a convolutional neural network (CNN), is used to analyze the temperature and humidity effect characteristics in the image. By calculating the color deviation and brightness change caused by temperature and humidity changes in the image, the temperature and humidity deviation value is adaptively corrected with the pixel values ​​corresponding to each channel (such as RGB) of the image to eliminate the negative impact of the ambient temperature and humidity on the image, and obtain the image after temperature and humidity correction. In specific operations, bilinear interpolation is used for pixel-level adjustment to ensure the stability and accuracy of the image quality, and finally obtain an ambient temperature and humidity corrected image.

[0119] According to the illumination environment deviation value data, the illumination non-uniformity correction is performed on the LED light strip visual enhancement image, so as to obtain an ambient illumination correction image;

[0120] In this embodiment, when correcting the illumination unevenness of the LED light strip visual enhancement image according to the illumination environment deviation value data, firstly, the change data of the ambient illumination is collected by a high-precision illumination sensor. In view of the illumination changes in different environments, by analyzing the relationship between the illumination deviation data and the brightness distribution of the image, an illumination equalization algorithm, such as histogram equalization (HE) and local contrast enhancement technology, is used to correct the uneven illumination part in the LED light strip visual enhancement image. In terms of specific methods, the exposure of the image is adjusted according to the illumination environment deviation value, and optimized in combination with the edge information of the image to maintain the clarity of the image details. At the same time, the regional adaptive algorithm is used to locally adjust the illumination differences in different areas, so that the overall image brightness is balanced, and the visual deviation caused by uneven illumination is avoided, and finally the ambient illumination correction image is obtained.

[0121] According to the current fluctuation environment deviation value data, the LED light strip visual enhancement image is corrected for the current fluctuation brightness change, so as to obtain an environment current correction image;

[0122] In this embodiment, when correcting the current fluctuation brightness change of the LED light strip visual enhancement image according to the current fluctuation environmental deviation value data, the current fluctuation is first detected by the current sensor, and the current change amplitude is recorded. Then, the relationship between the current fluctuation deviation value and the image brightness is modeled using a regression analysis method, and adjustments are made in combination with the brightness distribution characteristics in the image. In order to accurately correct, an algorithm based on local brightness adjustment is used to perform pixel-level correction on the brightness of the image to ensure that the color of the image is truly restored. In particular, an adaptive brightness correction strategy is designed, which dynamically adjusts the image according to the current fluctuation data, so that the image brightness can remain stable even in an environment with large current fluctuations, and finally an environmental current correction image is obtained.

[0123] Perform image correction feature stitching on the environmental temperature and humidity correction image, the environmental illumination correction image, and the environmental current correction image, so as to obtain environmental error feature data;

[0124] In this embodiment, when image correction features are spliced ​​for the ambient temperature and humidity correction image, the ambient light correction image, and the ambient current correction image, the temperature and humidity, light, and current deviation features obtained after processing in each correction image are first extracted. By performing feature fusion on these features, the correction data of different images are spliced ​​in space. Specifically, a dimensionality reduction technique based on principal component analysis (PCA) is used to compress the eigenvalues ​​of each correction image into a unified eigenvector, and splice them together in sequence. Subsequently, a weighted average algorithm is used to weight different eigenvalues, and comprehensive environmental error feature data is calculated taking into account the degree of influence of each environmental deviation on the image. This process can effectively integrate multidimensional environmental data, thereby providing a more accurate set of environmental error features, laying the foundation for subsequent image processing.

[0125] The error bilateral filtering is performed on the LED light strip visual enhancement image according to the environmental error feature data to obtain the LED light strip visual image.

[0126] In this embodiment, when performing error bilateral filtering on the visual enhancement image of the LED light strip according to the environmental error feature data, the environmental error feature data is first combined with the visual enhancement image to construct an image restoration model based on bilateral filtering. This model combines the spatial distance and environmental error characteristics of the image, and effectively filters out image noise and errors by calculating the relationship between the similarity between pixels and the environmental deviation. In the specific operation, the color values ​​of adjacent pixels are weighted using a Gaussian kernel function to reduce the visual error caused by the environmental deviation while retaining important details in the image. In this process, the environmental error feature data serves as important guiding information to ensure that the error filtering process is more intelligent and accurate, and finally an optimized visual image of the LED light strip is obtained.

[0127] Optionally, step S3 specifically includes:

[0128] Step S31: acquiring LED light strip structure data, and extracting LED light strip structure description features from the LED light strip structure data, thereby obtaining LED light strip structure description data;

[0129] In this embodiment, when obtaining the structural data of the LED light strip, the structural data of the LED light strip is first obtained through the LED light strip production platform, scanning equipment or sensor array. These data include the arrangement, size, thickness and electrical parameters of each LED lamp bead of the light strip. In order to extract the structural description features of the LED light strip, computer vision technology, such as edge detection algorithm (such as Canny edge detection), is used to extract the physical structural features of the light strip from the collected image, and combined with the deep learning method, the light strip image is feature recognized to obtain the specific structural features of the light strip. These structural features include the spacing, arrangement form, connection method, etc. of each lamp bead, thereby obtaining the structural description data of the LED light strip.

[0130] Step S32: performing a light strip structure semantic analysis on the LED light strip structure description data, thereby obtaining light strip structure semantic data;

[0131] In this embodiment, when performing semantic analysis of the LED light strip structure description data, the obtained structure description data is first parsed to extract key elements related to the function and configuration of the light strip. Then, the structure description data is deeply analyzed through a semantic analysis model (such as a convolutional neural network or a graph neural network) to identify the semantic meaning of different light strip areas, such as whether the arrangement of the lamp beads is uniform, how the current distribution of the light strip is, etc. Through this step, the model can identify the semantic information of different parts of the light strip, including functional areas, connection parts, or possible fault points, etc., thereby obtaining the semantic data of the light strip structure.

[0132] Step S33: performing light strip structure semantic space mapping on the LED light strip visual image and the light strip structure semantic data, thereby obtaining a structure semantic mapping image;

[0133] In this embodiment, when performing a light strip structural semantic space mapping of the LED light strip visual image and the light strip structural semantic data, the visual image and the semantic data are first aligned in space. Through image registration technology (such as a registration algorithm based on feature point matching), the visual image of the LED light strip is matched one-to-one with the position information in the structural semantic data, and the structural description data is mapped to the spatial domain of the image. In this process, the structural semantic information is embedded in the visual image as additional data to form a structural semantic mapping image. The mapped image not only contains the visual features of the light strip, but also associates each structural unit (such as each LED lamp bead or module) with its semantic information to facilitate subsequent processing.

[0134] Step S34: performing image pixel category assignment according to the structural semantic space mapping to obtain the light strip image pixel category data, and performing pixel point segmentation based on the light strip image pixel category data to obtain the LED light strip area division image set;

[0135] In this embodiment, when assigning image pixel categories according to structural semantic space mapping, each pixel of the LED light strip image is first assigned to a different category through a pixel classification algorithm (such as K-means clustering or deep convolutional neural network). Based on the structural semantic mapping image, the model can identify which areas in the image belong to the light strip, which belong to the background, and which may be problematic areas. Then, pixel segmentation is performed according to the pixel category data, and the LED light strip area is clearly separated from other areas through an image segmentation algorithm (such as FCN or U-Net model) to obtain a set of LED light strip area division images. This process can efficiently separate different structural areas in the image from the background and highlight the key areas of the light strip.

[0136] Step S35: performing LED light strip defect recognition according to the LED light strip area division image set, thereby obtaining an LED light strip defect area image set.

[0137] In this embodiment, when the LED light strip defect identification is performed based on the image set divided according to the LED light strip area, the divided light strip area is first analyzed in detail to identify the possible defects therein. By applying a defect detection algorithm (such as a defect detection model based on a convolutional neural network), the LED light strip area is analyzed at the pixel level to identify possible defects such as scratches, lamp bead failures or poor connections. In this process, the model not only uses the visual features of the image, but also combines the previous structural description data to locate and classify defects. Finally, an image set of defective areas of the LED light strip is generated, which clearly marks the defective areas and provides a basis for subsequent repair and maintenance.

[0138] Optionally, step S35 is specifically:

[0139] Step S351: performing image pyramid area screening on the LED light strip area division image set, so as to obtain an LED light strip candidate frame image;

[0140] In this embodiment, when performing image pyramid region screening on the LED light strip region division image set, the image pyramid algorithm is first used to perform multi-scale decomposition on the LED light strip region division image to generate image levels with different resolutions. Specifically, by building a pyramid layer by layer from a high-resolution image, the resolution is reduced and multi-scale features are extracted. Next, a region extraction algorithm (such as a sliding window-based method) is used to screen out possible LED light strip regions at different resolutions, select the region, and generate a candidate frame image. In this way, the candidate regions of the LED light strip can be evaluated from multiple angles at different scales, thereby improving the ability to recognize small and low-contrast defects.

[0141] Step S352: performing candidate frame edge detection on the LED light strip candidate frame image to obtain candidate frame contour data, and performing low-frequency contour statistics on the candidate frame contour data to obtain a defect candidate frame image;

[0142] In this embodiment, when performing candidate frame edge detection on the candidate frame image of the LED light strip, the Canny edge detection algorithm is used to extract the edge information of the candidate frame. Specifically, by applying Gaussian filtering to the image for denoising, and using the gradient operator to calculate the edge strength and direction, the clarity of the edge area is further enhanced. Next, the edge detection results are used to identify the candidate frame area that may contain defects. Subsequently, a low-frequency contour statistical method is applied to the detected edge contour data to filter out high-frequency noise and details to obtain the main features of the contour, thereby obtaining a defect candidate frame image. This can efficiently eliminate background interference and highlight areas where defects may exist.

[0143] Step S353: extracting features from the defect candidate frame image, thereby obtaining color feature data of the defect candidate frame, brightness feature data of the defect candidate frame, and shape feature data of the defect candidate frame;

[0144] In this embodiment, when extracting features from defect candidate frame images, color space conversion (such as RGB to HSV conversion) is first applied to extract the color information of the candidate frame image. Color feature data is obtained by calculating the color distribution characteristics of each candidate frame area, such as the mean, variance, and relative intensity of the color. In addition, brightness feature data is extracted by calculating the average grayscale value of each candidate frame and its range of variation, while shape feature data is obtained by calculating the edge complexity of the region, geometric parameters of the shape (such as aspect ratio, roundness), etc. These features together describe the key visual attributes of each candidate frame and provide a comprehensive representation for subsequent defect recognition.

[0145] Step S354: performing defect feature correlation analysis based on the defect candidate frame color feature data, the defect candidate frame brightness feature data, and the defect candidate frame shape feature data, thereby obtaining defect feature correlation data;

[0146] In this embodiment, when performing defect feature correlation analysis based on the color feature data, brightness feature data, and shape feature data of the defect candidate frame, firstly, a statistical analysis method (such as the Pearson correlation coefficient or the Kendall rank correlation coefficient) is used to perform a correlation analysis on various types of feature data. By quantifying the correlation between different features, it is possible to reveal which features play a key role in the occurrence of defects. For example, color changes are closely related to brightness changes, while shape features are more representative of certain specific types of defects. Finally, the results of the correlation analysis are formed into defect feature correlation data to help subsequent defect recognition models accurately identify the feature combination of potential defects.

[0147] Step S355: constructing a convolutional light strip defect recognition model according to the defect feature correlation data, and performing defect frame recognition on the LED light strip candidate frame image through the convolutional light strip defect recognition model to obtain a defect frame image;

[0148] In this embodiment, when constructing a convolutional light strip defect recognition model based on defect feature correlation data, a deep convolutional neural network (CNN) is used as the basic framework, and a multi-layer convolutional network is trained by integrating multi-dimensional features such as color, brightness, and shape. In specific implementation, all candidate frame images are first input into the network. The network automatically extracts high-level features in the image through multiple convolutional layers, and performs feature compression through the pooling layer. Finally, a fully connected layer is used to output the prediction result of the defect frame. By optimizing the loss function of the model, the model weights are gradually adjusted to minimize the defect recognition error. After the training is completed, the model is used to perform defect frame recognition on the candidate frame images of the LED light strip, and the defect area in the image is successfully identified and marked as a defect frame image.

[0149] Step S356: performing bounding box regression on the defect frame image to obtain a set of LED light strip defect area images.

[0150] In this embodiment, when performing bounding box regression on the defect frame image, the precise boundary of the defect is first adjusted based on the existing defect frame position through a regression algorithm (such as a gradient regression tree or a regression layer in Faster R-CNN). Specifically, a new bounding box is regressed using the position, size and corresponding labels of the candidate box to correct the position or size of the original box to ensure more accurate positioning of the defect area. This step helps to improve the accuracy of detection and avoid inaccurate identification of defective areas due to excessively large or small bounding boxes. Finally, the set of defective area images of the LED light strip obtained by bounding box regression accurately marks the specific location of each defect, which is convenient for subsequent processing and analysis.

[0151] Optionally, step S4 is specifically:

[0152] Step S41: extracting defect area features and image time series features from the LED light strip defect area image set, thereby obtaining light strip defect area feature data and light strip image time series data;

[0153] In this embodiment, when extracting defect area features from a set of defect area images of LED light strips, a convolutional neural network (CNN) is used to extract spatial features in the image, such as the shape, size, and color of the defect, and local feature extraction algorithms (such as SIFT and HOG) are combined to identify subtle defect area features. In addition, image time series feature extraction extracts change trends and motion patterns by performing time series analysis on image sequences at different time points, such as using the optical flow method to analyze the dynamic changes of defect areas over time. Finally, by combining the above two features, the defect area feature data and image time series data of the light strip are obtained to form a multi-dimensional data set for subsequent analysis.

[0154] Step S42: performing defect feature time series analysis on the feature data of the defective area of ​​the light strip according to the time series data of the light strip image, so as to obtain the time series data of the defect feature of the light strip;

[0155] In this embodiment, when performing defect feature time series analysis on the feature data of the defective area of ​​the light strip according to the time series data of the light strip image, firstly, a time series analysis method, such as an autoregressive model (AR), a moving average model (MA) or a more complex long short-term memory network (LSTM), is used to model the time series data of the light strip image. In specific implementation, by performing trend analysis on the continuous feature data of the defective area of ​​the light strip, the change pattern of the defect features at different time points is identified, and the potential defect occurrence law is captured, such as the defect growth rate, disappearance rate, etc. The defect feature time series data of the light strip obtained through time series analysis can help accurately predict the future defect occurrence trend and provide a basis for subsequent defect pattern recognition.

[0156] Step S43: integrating the light strip defect feature dependency relationship based on the light strip defect feature time series data, thereby obtaining the light strip defect feature dependency relationship data;

[0157] In this embodiment, when integrating the dependency relationship of the defect features of the light strip based on the time series data of the defect features of the light strip, firstly, a correlation analysis method (such as Pearson correlation coefficient, mutual information method) is used to perform correlation analysis on the defect feature data at different time points. Then, machine learning methods such as random forest or support vector machine (SVM) are used to integrate the various features of the time series data and explore the dependency relationship between different features, such as the relationship between defect types and development trends. By constructing a multi-dimensional dependency graph, the influence and dependency between different defect features can be clearly displayed, thereby obtaining the dependency relationship data of the defect features of the light strip, and providing an in-depth understanding of complex defects.

[0158] Step S44: classifying the defect patterns of the light strips according to the defect feature dependency data of the light strips, thereby obtaining defect pattern data of the LED light strips;

[0159] In this embodiment, when classifying the defect patterns of the light strip according to the defect feature dependency data of the light strip, the defect feature data is firstly clustered using an unsupervised learning algorithm (such as K-means clustering or DBSCAN) to identify different defect patterns. Then, the pattern classification is performed in combination with a supervised learning method (such as a decision tree, KNN or a neural network), and the model is trained so that it can identify and classify different types of defects according to the input defect feature dependency data of the light strip. For example, different defect patterns such as uneven brightness and excessive color difference of LED light strips are identified and converted into corresponding defect pattern data. This process helps to provide more knowledge support for the defect detection system and improve the accuracy of classification.

[0160] Step S45: performing Monte Carlo random defect generation according to the LED light strip defect pattern data, thereby obtaining a random defect data set.

[0161] In this embodiment, when performing Monte Carlo random defect generation based on the defect pattern data of LED light strips, firstly, the distribution range and probability density function of the defect characteristics are analyzed based on the existing defect pattern data. Then, the Monte Carlo method is used to generate different types of defect data sets through multiple random sampling. Specifically, according to the statistical distribution of the defect characteristics, the parameters of each defect pattern (such as size, shape, position, etc.) are randomly generated to construct a diverse random defect data set. This process can simulate various different defect situations that may occur in actual use, and provide sufficient training data for subsequent defect detection and repair.

[0162] Optionally, step S45 is specifically:

[0163] Step S451: performing defect feature statistical analysis according to the defect mode data of the LED light strip, thereby obtaining defect feature statistical data, and determining the defect mode parameter range according to the defect feature statistical data, thereby obtaining defect mode parameter range data;

[0164] In this embodiment, when performing defect feature statistical analysis based on the defect pattern data of the LED light strip, the key features of each defect (such as brightness, color, shape, size, etc.) are first extracted from the historical defect data of the LED light strip. Then, the mean, standard deviation, minimum and maximum values ​​of each defect feature are calculated using statistical analysis tools (such as SPSS or the pandas library in Python), and a feature distribution diagram is drawn. These statistical data help to evaluate the frequency of occurrence of different defect features and their common range in practical applications. Based on these statistical data, the parameter range of each defect mode, such as the maximum brightness difference and the maximum shape deviation, can be further determined, thereby providing a parameter basis for the next step of defect generation.

[0165] Step S452: performing defect feature correlation classification based on the light strip defect feature dependency data, thereby obtaining dependent defect feature data and independent defect feature data;

[0166] In this embodiment, when classifying the correlation of defect features based on the dependency data of the defect features of the light strip, the dependency between the various defect features is first calculated by using a correlation analysis method (such as the Pearson correlation coefficient, the chi-square test). For example, the shape and brightness of the defect may have a certain correlation, while the position and shape may be independent. Then, a clustering algorithm (such as K-means clustering or hierarchical clustering) is used to classify these features to distinguish which features are interdependent (such as brightness and position) and which features are independent (such as color and shape). In this way, dependent defect feature data and independent defect feature data can be clearly identified, which helps to understand the relationship between defects and provides a basis for subsequent defect generation models.

[0167] Step S453: performing dependent defect feature Monte Carlo random sampling on the dependent defect feature data according to the defect mode parameter range data, thereby obtaining random dependent defect feature data; performing independent defect feature Monte Carlo random sampling on the independent defect feature data according to the defect mode parameter range data, thereby obtaining random independent defect feature data;

[0168] In this embodiment, when the dependent defect feature data is subjected to Monte Carlo random sampling of dependent defect features according to the defect mode parameter range data, the parameter range of Monte Carlo sampling is first set according to the distribution range of each dependent feature (through the statistical analysis data in step S451), such as the brightness range of 300 to 800, the shape size of 5mm to 20mm, etc. Then, Monte Carlo random sampling is performed using the NumPy library in Python, and different combinations of dependent defect features are generated through a large number of random samplings. The same Monte Carlo sampling process is performed on the independent defect feature data, and sampling is performed according to the independent distribution of its features. The two data sets will be stored separately for subsequent analysis. In this way, the generated random defect feature data can cover various possibilities in the actual environment and improve the diversity of the generated data set.

[0169] Step S454: performing diversity verification on the random dependent defect feature data and the random independent defect feature data to obtain a random defect data set.

[0170] In this embodiment, when the diversity of random dependent defect feature data and random independent defect feature data is verified, the diversity and coverage of the random data set are first evaluated by comparing the generated random data with the actual LED light strip defect data. The specific implementation method is to compare the similarity between the defect features (such as color, brightness, shape, etc.) in the random data set and the actual defect data, and use methods such as Kullback-Leibler divergence or JS divergence to calculate the difference between the two. If the difference is small, it means that the random defect data set can effectively represent the actual defect type in terms of feature distribution, verifying its diversity. Finally, the verified random dependent defect feature data and random independent defect feature data are merged again, and the obtained random defect data set can be used as a training set for the defect detection model to learn and optimize.

[0171] Optionally, step S5 specifically includes:

[0172] Step S51: performing defect type matching on the random defect data set and the LED light strip defect area image set, thereby obtaining defect type matching data;

[0173] In this embodiment, when matching the defect types of the random defect data set and the LED light strip defect area image set, each defect in the random defect data set is first classified, and the defect type is identified based on features such as color, shape, and brightness using classification algorithms such as KNN (k nearest neighbor) or SVM (support vector machine). For example, defects with low brightness and spot-like appearance are classified as "dark spots", and defects with regular shapes and sharp edges are classified as "cracks". Then, by calculating the similarity between the images in the LED light strip defect area image set and the defect features in the random defect data set, template matching or cosine similarity algorithm is used for matching, thereby obtaining accurate defect type matching data. This process can ensure that the random defect data set corresponds to the defect types in the real image one by one, providing a reliable data basis for subsequent image synthesis.

[0174] Step S52: selecting a background image based on the LED light strip area division image set, thereby obtaining a background image to be synthesized;

[0175] In this embodiment, when selecting a background image based on the area division image set of the LED light strip, the area division image set is first analyzed to identify which areas are suitable as background images. Specifically, an image segmentation algorithm (such as the Otsu algorithm or the K-means clustering algorithm) is used to divide the image into regions to separate the background part and the defect area. When selecting the background area, the uniformity and lighting conditions of the background are considered, and an area with a flat background and no obvious object interference is selected as the background image to be synthesized. Then, based on the texture features of the background area (such as texture complexity, edge strength, etc.), the background image is screened to ensure that the background image can form a sharp contrast with the defect area to highlight the visibility of the defect. The final selected background image can provide high-quality visual effects for subsequent defect superposition.

[0176] Step S53: superimposing the defect area on the background image to be synthesized and the defect type matching data, so as to obtain a defect superimposed image;

[0177] In this embodiment, when the defect area is superimposed on the background image to be synthesized and the defect type matching data, the defect area is first superimposed on the background image to be synthesized according to the precise position based on the position, size and shape information in the defect type matching data. The defect image is combined with the background image using an image superposition algorithm (such as transparency control or Alpha blending technology) to ensure that the edge of the defect blends smoothly with the background image to avoid visual unnatural phenomena. For example, for larger crack defects, a gradient superposition method can be used to make the edge of the crack transition naturally; for small point defects, a hard boundary superposition method is used to ensure that the outline of the defect is clearly visible. The superimposed defect area image can accurately present the spatial distribution of the defect and blend seamlessly with the background.

[0178] Step S54: combining independent defect features of the defect superposition image according to the random defect data set, thereby obtaining a defect superposition random image;

[0179] In this embodiment, when the defect superposition image is combined with independent defect features according to the random defect data set, different independent defect features, including color, shape, brightness, etc., are first extracted from the random defect data set. Then, the defects are recombined using image editing software or algorithms (such as image processing functions in OpenCV) in combination with the defect features in the defect superposition image. By modifying parameters such as the color saturation, shape angle or size of the defect, each generated defect image presents a different feature combination. Taking an example, the color in a crack defect image is adjusted from red to green, and its shape angle is changed to generate multiple different defect combination images. This process can increase the diversity of the defect data set, so that the defect detection model trained subsequently has stronger generalization ability.

[0180] Step S55: performing image enhancement processing on the defect superimposed random image to obtain a defect superimposed enhanced image, and annotating the defect type on the defect superimposed enhanced image to obtain a simulated synthetic defect set of the LED light strip;

[0181] In this embodiment, when performing image enhancement processing on the defect-superimposed random image, the defect-superimposed random image is first processed using an image enhancement algorithm (such as contrast enhancement, sharpening, noise removal, etc.). Specifically, the histogram equalization method can be used to enhance the contrast of the image so that the defect area is more prominent; a high-pass filter is used to enhance the details of the defect and highlight the edge of the defect; at the same time, a denoising algorithm (such as Gaussian blur or median filtering) is used to reduce the noise in the image and improve the visual clarity of the image. The processed image can be labeled with the defect type, and each defect area is classified and marked using pre-defined defect type labels (such as "cracks", "spots", etc.), thereby generating a simulated synthetic defect set for LED light strips. The type and location of the defect area in each image have been clearly marked for subsequent model training.

[0182] Step S56: constructing and training an LED light strip defect detection model according to the LED light strip simulation synthetic defect set, thereby obtaining an LED light strip defect detection model.

[0183] In this embodiment, when constructing and training the defect detection model for LED light strips according to the simulated synthetic defect set of LED light strips, the defect detection model is first constructed using a convolutional neural network (CNN) architecture. During the training process, the images in the synthetic defect set are input into the CNN model, the error is calculated using a loss function (such as cross entropy loss or mean square error), and the model parameters are adjusted through the back propagation algorithm. The defective areas in each image are marked as target categories. The model continuously optimizes the parameters by learning the mapping relationship between these marks and image features, and can eventually effectively identify and classify different types of LED light strip defects. For example, after multiple rounds of training, the model can accurately identify defects such as cracks, color spots, and abnormal brightness in the image. After sufficient training, the model can perform defect detection on LED light strip images during actual detection, thereby improving detection accuracy and efficiency.

[0184] Optionally, the present specification further provides a training system for an LED light strip defect detection model, which is used to execute the training method for the LED light strip defect detection model as described above, and the training system for the LED light strip defect detection model includes:

[0185] An image visual enhancement module is used to obtain an image captured by the LED light strip through a preset image acquisition device, and enhance the visual features of the LED light strip on the image captured by the LED light strip, thereby obtaining a visually enhanced image of the LED light strip;

[0186] An environmental error filtering module is used to obtain the LED light strip production sensor data, and perform LED light strip production environment analysis based on the LED light strip production sensor data, so as to obtain the LED light strip production environment data; perform environmental error filtering on the LED light strip visual enhancement image based on the LED light strip production environment data, so as to obtain the LED light strip visual image;

[0187] A light strip defect recognition module is used to perform pixel semantic segmentation on the LED light strip visual image to obtain an LED light strip area division image set, and perform LED light strip defect recognition based on the LED light strip area division image set to obtain an LED light strip defect area image set;

[0188] A random defect generation module is used to perform LED light strip defect pattern recognition based on the LED light strip defect area image set, thereby obtaining LED light strip defect pattern data, and perform Monte Carlo random defect generation based on the LED light strip defect pattern data, thereby obtaining a random defect data set;

[0189] The random defect simulation and synthesis module is used to perform random defect simulation and synthesis of LED light strips on the random defect data set and the LED light strip defect area image set, so as to obtain the LED light strip simulation synthesis defect set, and to construct and train the LED light strip defect detection model based on the LED light strip simulation synthesis defect set, so as to obtain the LED light strip defect detection model.

[0190] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.

[0191] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A training method for an LED light strip defect detection model, characterized in that: The following steps are involved: Step S1: acquiring an image captured by an LED light strip through a preset image acquisition device, and enhancing the visual features of the LED light strip on the image captured by the LED light strip, thereby obtaining a visually enhanced image of the LED light strip; Step S2: obtaining LED light strip production sensor data, and performing LED light strip production environment analysis based on the LED light strip production sensor data, thereby obtaining LED light strip production environment data; performing environmental error filtering on the LED light strip visual enhancement image based on the LED light strip production environment data, thereby obtaining the LED light strip visual image; Step S3: performing pixel semantic segmentation on the LED light strip visual image to obtain an LED light strip area division image set, and performing LED light strip defect recognition based on the LED light strip area division image set to obtain an LED light strip defect area image set; Step S4: performing LED light strip defect pattern recognition based on the LED light strip defect area image set to obtain LED light strip defect pattern data, and performing Monte Carlo random defect generation based on the LED light strip defect pattern data to obtain a random defect data set; Step S5: Perform LED light strip random defect simulation synthesis on the random defect data set and the LED light strip defect area image set to obtain the LED light strip simulation synthesis defect set, and construct and train the LED light strip defect detection model based on the LED light strip simulation synthesis defect set to obtain the LED light strip defect detection model.

2. The training method of the LED light strip defect detection model according to claim 1, characterized in that: Step S1 is specifically as follows: Step S11: acquiring the LED light strip captured image through a preset image acquisition device, and performing data cleaning on the LED light strip captured image, thereby obtaining the LED light strip captured image to be analyzed; Step S12: performing background noise denoising on the image of the LED light strip to be analyzed, thereby obtaining a denoised image of the LED light strip; Step S13: focusing the LED light strip details on the LED light strip denoised image, thereby obtaining a LED light strip zoomed image; Step S14: performing image edge detection on the scaled image of the LED light strip to obtain image edge information, and performing Laplacian operator image sharpening processing on the scaled image of the LED light strip according to the image edge information to obtain an edge detail enhanced image; Step S15: performing color space conversion on the edge detail enhanced image to obtain a LED light strip visually enhanced image.

3. The training method of the LED light strip defect detection model according to claim 1, characterized in that: Step S2 is specifically as follows: Step S21: acquiring LED light strip production sensor data, and performing data preprocessing on the LED light strip production sensor data, thereby obtaining the LED light strip production sensor data to be analyzed; Step S22: performing environmental sensor data fusion according to the LED light strip production sensor data to be analyzed, thereby obtaining LED light strip production environment data; Step S23: quantifying the impact of the production environment based on the LED light strip production environment data and the LED light strip visual enhancement image, thereby obtaining an image quality impact factor; Step S24: constructing an environmental deviation model according to the image quality influencing factors, and generating environmental deviation values ​​for the production sensor data of the LED light strip to be analyzed through the environmental deviation model, thereby obtaining environmental deviation value data, wherein the environmental deviation value data includes temperature and humidity environmental deviation value data, lighting environmental deviation value data, and current fluctuation environmental deviation value data; Step S25: performing environmental error filtering on the LED light strip visual enhancement image based on the environmental deviation value data, so as to obtain the LED light strip visual image.

4. The training method of the LED light strip defect detection model according to claim 3, characterized in that: Step S25 is specifically as follows: According to the temperature and humidity environmental deviation value data, the LED light strip visual enhancement image is corrected for the image temperature and humidity, so as to obtain an environmental temperature and humidity corrected image; According to the illumination environment deviation value data, the illumination non-uniformity correction is performed on the LED light strip visual enhancement image, so as to obtain an ambient illumination correction image; According to the current fluctuation environment deviation value data, the LED light strip visual enhancement image is corrected for the current fluctuation brightness change, so as to obtain an environment current correction image; Perform image correction feature stitching on the environmental temperature and humidity correction image, the environmental illumination correction image, and the environmental current correction image, so as to obtain environmental error feature data; The error bilateral filtering is performed on the LED light strip visual enhancement image according to the environmental error feature data to obtain the LED light strip visual image.

5. The training method of the LED light strip defect detection model according to claim 1, characterized in that: Step S3 is specifically as follows: Step S31: acquiring LED light strip structure data, and extracting LED light strip structure description features from the LED light strip structure data, thereby obtaining LED light strip structure description data; Step S32: performing a light strip structure semantic analysis on the LED light strip structure description data, thereby obtaining light strip structure semantic data; Step S33: performing light strip structure semantic space mapping on the LED light strip visual image and the light strip structure semantic data, thereby obtaining a structure semantic mapping image; Step S34: performing image pixel category assignment according to the structural semantic space mapping to obtain the light strip image pixel category data, and performing pixel point segmentation based on the light strip image pixel category data to obtain the LED light strip area division image set; Step S35: performing LED light strip defect recognition according to the LED light strip area division image set, thereby obtaining an LED light strip defect area image set.

6. The training method of the LED light strip defect detection model according to claim 5, characterized in that: Step S35 is specifically as follows: Step S351: performing image pyramid area screening on the LED light strip area division image set, so as to obtain an LED light strip candidate frame image; Step S352: performing candidate frame edge detection on the LED light strip candidate frame image to obtain candidate frame contour data, and performing low-frequency contour statistics on the candidate frame contour data to obtain a defect candidate frame image; Step S353: extracting features from the defect candidate frame image, thereby obtaining color feature data of the defect candidate frame, brightness feature data of the defect candidate frame, and shape feature data of the defect candidate frame; Step S354: performing defect feature correlation analysis based on the defect candidate frame color feature data, the defect candidate frame brightness feature data, and the defect candidate frame shape feature data, thereby obtaining defect feature correlation data; Step S355: constructing a convolutional light strip defect recognition model according to the defect feature correlation data, and performing defect frame recognition on the LED light strip candidate frame image through the convolutional light strip defect recognition model to obtain a defect frame image; Step S356: performing bounding box regression on the defect frame image to obtain a set of LED light strip defect area images.

7. The training method of the LED light strip defect detection model according to claim 1, characterized in that: Step S4 is specifically as follows: Step S41: extracting defect area features and image time series features from the LED light strip defect area image set, thereby obtaining light strip defect area feature data and light strip image time series data; Step S42: performing defect feature time series analysis on the feature data of the defective area of ​​the light strip according to the time series data of the light strip image, so as to obtain the time series data of the defect feature of the light strip; Step S43: integrating the light strip defect feature dependency relationship based on the light strip defect feature time series data, thereby obtaining the light strip defect feature dependency relationship data; Step S44: classifying the defect patterns of the light strips according to the defect feature dependency data of the light strips, thereby obtaining defect pattern data of the LED light strips; Step S45: performing Monte Carlo random defect generation according to the LED light strip defect pattern data, thereby obtaining a random defect data set.

8. The training method of the LED light strip defect detection model according to claim 1, characterized in that: Step S45 is specifically as follows: Step S451: performing defect feature statistical analysis according to the defect mode data of the LED light strip, thereby obtaining defect feature statistical data, and determining the defect mode parameter range according to the defect feature statistical data, thereby obtaining defect mode parameter range data; Step S452: performing defect feature correlation classification based on the light strip defect feature dependency data, thereby obtaining dependent defect feature data and independent defect feature data; Step S453: performing a dependent defect feature Monte Carlo random sampling on the dependent defect feature data according to the defect mode parameter range data, thereby obtaining random dependent defect feature data; Performing independent defect feature Monte Carlo random sampling on independent defect feature data according to defect mode parameter range data, thereby obtaining random independent defect feature data; Step S454: performing diversity verification on the random dependent defect feature data and the random independent defect feature data to obtain a random defect data set.

9. The training method of the LED light strip defect detection model according to claim 1, characterized in that: Step S5 is specifically as follows: Step S51: performing defect type matching on the random defect data set and the LED light strip defect area image set, thereby obtaining defect type matching data; Step S52: selecting a background image based on the LED light strip area division image set, thereby obtaining a background image to be synthesized; Step S53: superimposing the defect area on the background image to be synthesized and the defect type matching data, so as to obtain a defect superimposed image; Step S54: combining independent defect features of the defect superposition image according to the random defect data set, thereby obtaining a defect superposition random image; Step S55: performing image enhancement processing on the defect superimposed random image to obtain a defect superimposed enhanced image, and annotating the defect type on the defect superimposed enhanced image to obtain a simulated synthetic defect set of the LED light strip; Step S56: constructing and training an LED light strip defect detection model according to the LED light strip simulation synthetic defect set, thereby obtaining an LED light strip defect detection model.

10. A training system for a LED light strip defect detection model, characterized in that: A method for training a defect detection model for an LED light strip according to claim 1, wherein the training system for the defect detection model for an LED light strip comprises: An image visual enhancement module is used to obtain an image captured by the LED light strip through a preset image acquisition device, and enhance the visual features of the LED light strip on the image captured by the LED light strip, thereby obtaining a visually enhanced image of the LED light strip; An environmental error filtering module is used to obtain the LED light strip production sensor data, and perform LED light strip production environment analysis based on the LED light strip production sensor data, so as to obtain the LED light strip production environment data; perform environmental error filtering on the LED light strip visual enhancement image based on the LED light strip production environment data, so as to obtain the LED light strip visual image; A light strip defect recognition module is used to perform pixel semantic segmentation on the LED light strip visual image to obtain an LED light strip area division image set, and perform LED light strip defect recognition based on the LED light strip area division image set to obtain an LED light strip defect area image set; A random defect generation module is used to perform LED light strip defect pattern recognition based on the LED light strip defect area image set, thereby obtaining LED light strip defect pattern data, and perform Monte Carlo random defect generation based on the LED light strip defect pattern data, thereby obtaining a random defect data set; The random defect simulation and synthesis module is used to perform random defect simulation and synthesis of LED light strips on the random defect data set and the LED light strip defect area image set, so as to obtain the LED light strip simulation synthesis defect set, and to construct and train the LED light strip defect detection model based on the LED light strip simulation synthesis defect set, so as to obtain the LED light strip defect detection model.

Citation Information

Cited By

  • Defect detection method and system for atmosphere lamp

    CN120807473A

  • Method and system for detecting and correcting brightness and color difference of LED liquid crystal display screen

    CN120833763A