Image detection method and device for defects of organic light-emitting device
By collecting and analyzing light and historical data in organic electroluminescent device detection, adjusting defect judgment thresholds, and building an optimized Q-learning model, the problems of changes in light conditions and insufficient image analysis capabilities are solved, and more accurate and reliable defect detection is achieved.
Patent Information
- Application Number
- CN202510421745.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-06-27
AI Technical Summary
The existing defect detection methods of organic electroluminescent devices cannot adjust the defect judgment threshold according to different light conditions, and the model lacks image analysis capabilities, making it difficult to accurately identify various types of defects.
By collecting device surface, historical data and light data, extracting device defect image data, setting an initial defect judgment threshold, and adjusting it according to the light data to obtain the light adaptation defect threshold. At the same time, a Q-learning model is built to optimize the model to improve image analysis capabilities.
The accuracy and reliability of detection results under complex light conditions are achieved, the recognition ability of process residual images is improved, device defects can be detected more accurately, misjudgment and misjudgment are reduced, and production efficiency and product quality are improved.
Smart Images

Figure CN120219367A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image detection, and particularly to an image detection method and device for defects of organic electroluminescent devices. Background Art
[0002] Organic electroluminescent devices have been widely used in the fields of display and lighting due to their advantages such as self-luminescence, thinness, wide viewing angle, and fast response speed. With the rapid development of the industry, the requirements for product quality are also increasing day by day, and accurately detecting the defects of devices has become a key link to ensure product quality.
[0003] Currently, in the image detection of defects of organic electroluminescent devices, there are already some detection methods and techniques. For example, some methods collect the surface image data of the device and analyze the image based on a preset fixed threshold to determine whether there are defects in the device. However, these traditional methods have many deficiencies.
[0004] On the one hand, in the actual production environment, the light conditions in the workshop are complex and variable, including fluctuations in light intensity, differences in light uniformity, and differences in light spectral distribution. Existing detection methods often cannot adjust the defect judgment threshold according to different light conditions, resulting in a serious impact on the accuracy of the detection results when the light conditions change.
[0005] On the other hand, some models only make judgments based on the basic features of the image, unable to fully exploit the complex information hidden in the image, and it is difficult to accurately identify various types of defects. Moreover, these models lack adaptability and learning ability and cannot be optimized according to different devices and production conditions, resulting in poor detection effects when facing diverse organic electroluminescent devices.
[0006] In summary, the existing image detection methods for defects of organic electroluminescent devices have obvious defects in dealing with complex light conditions and improving the image analysis ability of the model. There is an urgent need for a new detection method to solve these problems to improve the accuracy and reliability of the defect detection of organic electroluminescent devices and meet the needs of industrial development. Summary of the Invention
[0007] The present invention provides an image detection method and device for defects of organic electroluminescent devices to solve the defects in the prior art that the defect judgment threshold cannot be adjusted according to different light conditions and the model has insufficient image analysis ability.
[0008] On the one hand, the present invention provides an image detection method for defects of organic electroluminescent devices, including: Collecting the surface image data, historical data of the organic electroluminescent device, and the light data in the workshop.
[0009] Device defect image data is extracted from historical data, a defect judgment threshold is set according to the device defect image data, and the defect judgment threshold is adjusted according to the light data to obtain a light-adapted defect threshold.
[0010] A Q-learning model is constructed, and the PSD algorithm is used to optimize the Q-learning model to obtain a reinforced Q-learning model. The surface image data is input, and the process residue image data is output.
[0011] It is judged whether the process residue image data reaches the light-adapted defect threshold. If so, the current organic electroluminescent device is marked as unqualified; otherwise, the current organic electroluminescent device is marked as qualified.
[0012] According to an image detection method for defects of an organic electroluminescent device provided by the present invention, the steps of extracting the device defect image data include: Device data is found from historical data according to the time range, production batch, and product model of the organic electroluminescent device, and the device image data containing the organic electroluminescent device image is located.
[0013] The annotation information about device defects in the device data is found, and the defect image data is screened from the device image data according to the annotation information.
[0014] Unqualified device data is found from the device data according to abnormal production parameters and unqualified quality inspection results, and the device defect image data is obtained by combining the defect image data.
[0015] According to an image detection method for defects of an organic electroluminescent device provided by the present invention, the steps of setting the defect judgment threshold include: The gray histogram is used to statistically analyze the gray value distribution of the defect area and the normal area in the device defect image data to obtain gray features.
[0016] Geometric feature analysis is performed on the image of the defect area to obtain the geometric feature ranges of different types of defects, and the texture features of the defect area are extracted by using the local binary pattern.
[0017] According to the gray features, geometric feature ranges, and texture features, the device defect image data is classified according to the defect type to obtain multiple defect types, and the eigenvalue distribution of each defect type is statistically analyzed.
[0018] The 3σ principle is used, and according to the eigenvalue distribution, the statistical distribution of each defect type is calculated, and an initial threshold is set for different features of each defect type to obtain the defect judgment threshold.
[0019] According to an image detection method for defects of an organic electroluminescent device provided by the present invention, the steps of adjusting to obtain a light adaptation defect threshold include: Analyze the relationship between the light data in terms of light intensity, light uniformity, and light spectral distribution and the image gray level to obtain an influence law, and judge the adjustment direction of the defect judgment threshold based on the influence law.
[0020] Use the region-based adjustment method to divide the surface of the organic electroluminescent device into multiple regions, calculate the corresponding threshold adjustment amount for each region according to the adjustment direction, and adjust the defect judgment threshold of the corresponding region according to the multiple threshold adjustment amounts to obtain the light adaptation defect threshold.
[0021] According to an image detection method for defects of an organic electroluminescent device provided by the present invention, the steps of constructing a Q-learning model include: According to the defect image data, define various features and other relevant information including the device image as the state space, and take the geometry of all actions taken in each state as the action space.
[0022] Construct a Q-table matrix with the size of the state space and the size of the action space, and set the immediate reward obtained after taking the corresponding action in different states as the reward function.
[0023] At different time steps, observe the corresponding state according to the corresponding action taken for the current state, and calculate the state reward according to the reward function for the corresponding state.
[0024] Update the Q-table matrix according to the corresponding state and state reward to obtain the Q-learning model.
[0025] According to an image detection method for defects of an organic electroluminescent device provided by the present invention, the steps of optimizing to obtain a reinforced Q-learning model include: Regard the corresponding probability distribution of actions taken in different states in the Q-table matrix as the policy parameters, and calculate the expectation of the cumulative reward obtained by executing actions according to the preset policy starting from the initial state.
[0026] Maximize the expectation and calculate the policy gradient using the PSD algorithm, and update each policy parameter according to the gradient direction.
[0027] After reaching the preset number of iterations, select the policy composed of the policy parameters with the smallest policy gradient as the reinforced Q-learning model.
[0028] According to an image detection method for defects of an organic electroluminescent device provided by the present invention, the steps of outputting to obtain the process residue image data include: Preprocess the input surface image data, extract grayscale features, texture features, and edge features from it, and transform them into feature states.
[0029] According to the policy of the reinforcement Q - learning model, select an action in the feature state to obtain a feature action, and perform the feature action on the surface image data to obtain new image data.
[0030] Extract features from the new image data to update the feature state to obtain an updated state, and combine with the Q - table matrix to determine whether the current image is a process residue. If so, output the current image as a process residue image; otherwise, judge other images.
[0031] Integrate all process residue images to obtain process residue image data.
[0032] According to an image detection method for defects of an organic electroluminescent device provided by the present invention, the steps of transforming into a feature state include: Use the weighted average method to convert the color image in the surface image data into a grayscale image, remove noise, and map the pixel values to a preset range to obtain image processing data.
[0033] Sum the grayscale values of all image pixels in the image processing data and divide by the total number of pixels to obtain the grayscale mean. Calculate the square of the difference between each pixel grayscale value and the grayscale mean to obtain multiple squared values, and calculate the average value based on the multiple squared values to obtain the grayscale variance. Analyze the grayscale variance to obtain the grayscale feature.
[0034] Construct a gray - level co - occurrence matrix based on the frequencies of pixels with two preset gray - level values at a preset direction and distance, and obtain different gray - level co - occurrence matrices by changing the direction and distance. Based on different gray - level co - occurrence matrices, calculate the texture feature.
[0035] Use the Canny operator to calculate the gradient magnitude and direction of the image processing data, perform non - maximum suppression to obtain the local maximum value in the gradient direction, and determine the edge image according to double - threshold processing, and extract the edge feature from it.
[0036] Combine the grayscale feature, texture feature, and edge feature into a feature vector and transform it into a feature state.
[0037] According to an image detection method for defects of an organic electroluminescent device provided by the present invention, the steps of obtaining new image data include: Define all operations that can be performed on the surface image data as an action set, and use the ∈ - greedy strategy to select an action from the action set corresponding to the feature state to obtain a feature action.
[0038] Define the corresponding image operations for each action according to the action set to obtain the mapping relationship, and perform corresponding operations on the surface image data according to the characteristic actions to obtain the new image data.
[0039] On the other hand, the present invention also provides an image detection device for organic electroluminescent device defects, including: A data acquisition module for acquiring the surface image data, historical data, and light data in the workshop of the organic electroluminescent device.
[0040] A threshold adjustment module for extracting device defect image data from the historical data, setting a defect judgment threshold according to the device defect image data, and adjusting the defect judgment threshold according to the light data to obtain a light-adapted defect threshold.
[0041] A model optimization and output module for constructing a Q-learning model, optimizing the Q-learning model using the PSD algorithm to obtain a reinforced Q-learning model, inputting the surface image data, and outputting the process residue image data.
[0042] A device detection module for determining whether the process residue image data reaches the light-adapted defect threshold. If so, mark the current organic electroluminescent device as unqualified; otherwise, mark the current organic electroluminescent device as qualified.
[0043] An image detection method and device for organic electroluminescent device defects provided by the present invention extract device defect image data from historical data, analyze these data, and set an initial defect judgment threshold. At the same time, combined with the light data in the workshop, according to the influence law of light on the image, the defect judgment threshold is adjusted to obtain a light-adapted defect threshold, which solves the problem that the defect judgment threshold is fixed in the traditional detection method and cannot adapt to different light conditions, and achieves the beneficial effect of enabling the detection method to adapt to different light conditions and improving the detection ability in complex environments.
[0044] An image detection method and device for organic electroluminescent device defects provided by the present invention construct a Q-learning model, define the state space and action space, and perform learning and updating through the Q-table and reward function. Then, use the PSD algorithm to optimize the Q-learning model to obtain a reinforced Q-learning model, which solves the problem of insufficient image analysis ability of the previous model, improves the recognition ability of the process residue image, can more accurately detect the defects of the device, timely discover problems in the production process, help enterprises take corresponding measures for improvement, reduce the production of defective products, and thus improve production efficiency. Description of the Drawings
[0045] To more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0046] Figure 1 It is one of the schematic flowcharts of a method for image detection of defects in an organic electroluminescent device provided by an embodiment of the present invention; Figure 2 It is another schematic flowchart of a method for image detection of defects in an organic electroluminescent device provided by an embodiment of the present invention; Figure 3 It is the schematic structural diagram of a device for image detection of defects in an organic electroluminescent device provided by an embodiment of the present invention. Detailed implementation manners
[0047] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention with reference to the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
[0048] The following combines Figures 1 - 3 to describe a method and a device for image detection of defects in an organic electroluminescent device of the present invention.
[0049] As Figure 1 and Figure 2 shown, a device for image detection of defects in an organic electroluminescent device provided by an embodiment of the present invention, the execution subject can be a method for image detection of defects in an organic electroluminescent device, including: Collect surface image data, historical data, and light data in the workshop of the organic electroluminescent device. A high-resolution industrial camera can be used and installed in a suitable position to ensure that the surface of the organic electroluminescent device can be clearly photographed. And a high-precision scanning device, such as a line-scanning camera or a surface-scanning camera, is used to scan the organic electroluminescent device row by row or surface by surface, so as to obtain a complete surface image. The image acquisition device is integrated into the automated production line to realize the real-time acquisition of the surface image of the organic electroluminescent device. By combining with the control system of the production line, it can be ensured that surface image data can be obtained in a timely manner in all links of device production. The surface image data can include grayscale information, color information, texture information, and geometric information.
[0050] The acquisition of historical data can extract production parameter records from the equipment control system on the production line, including production time, production batch, process conditions (such as temperature, pressure, voltage, etc.), raw material information, etc. Collect reports on the quality inspection of organic electroluminescent devices in the past, including information such as inspection results, defect types, and defect locations. Data generated from various experiments conducted during research and development or process improvement, such as device performance test data under different process parameters, application test data of new materials, etc.
[0051] The acquisition of light data can install multiple light sensors in the workshop, distributed at different positions, to monitor parameters such as light intensity and uniformity in the workshop in real time. The light sensors can convert light signals into electrical signals, and transmit the data to a computer for storage and analysis through data acquisition equipment. And use a spectrometer to perform spectral analysis on the light sources in the workshop to obtain the spectral distribution information of the light, understand the color characteristics and energy distribution of the light sources. The spectrometer can measure the light intensity within different wavelength ranges, thereby determining the spectral characteristics of the light source. The light data can include light intensity, light uniformity, spectral distribution, and illumination direction, etc.
[0052] Extract device defect image data from the historical data, set a defect judgment threshold according to the device defect image data, and adjust the defect judgment threshold according to the light data to obtain a light-adapted defect threshold.
[0053] The steps for extracting device defect image data include: Find device data from the historical data according to the time range, production batch, and product model of the organic electroluminescent device, and locate the device image data containing the image of the organic electroluminescent device.
[0054] Find the annotation information about device defects in the device data, and screen out the defect image data from the device image data according to the annotation information.
[0055] Find unqualified device data from the device data according to abnormal production parameters and unqualified quality inspection results, and combine with the defect image data to obtain the device defect image data.
[0056] The steps for setting the defect judgment threshold include: Use a grayscale histogram to statistically analyze the grayscale value distribution of the defect area and the normal area in the device defect image data to obtain grayscale features.
[0057] Perform geometric feature analysis on the images of the defect areas to obtain the geometric feature ranges of different types of defects, and use local binary patterns to extract the texture features of the defect areas.
[0058] Classify the device defect image data according to the gray feature, geometric feature range, and texture feature by defect type to obtain multiple defect types, and count the eigenvalue distribution of each defect type.
[0059] Use the 3σ principle and calculate the statistical distribution of each defect type according to the eigenvalue distribution, and set initial thresholds for different features of each defect type to obtain defect judgment thresholds.
[0060] The steps to adjust and obtain the light adaptation defect threshold include: Analyze the relationship between the light data in terms of light intensity, light uniformity, and light spectral distribution and the image gray level to obtain the influence law, and judge the adjustment direction of the defect judgment threshold based on the influence law.
[0061] Use the region-based adjustment method to divide the surface of the organic light-emitting device into multiple regions, calculate the corresponding threshold adjustment amount for each region according to the adjustment direction, and adjust the defect judgment threshold of the corresponding region according to multiple threshold adjustment amounts to obtain the light adaptation defect threshold.
[0062] Construct a Q-learning model, optimize the Q-learning model using the PSD algorithm to obtain a reinforced Q-learning model, input the surface image data, and output the process residue image data.
[0063] The steps to construct a Q-learning model include: According to the defect image data, define various features of the device image and other relevant information as the state space, and take the geometry of all actions taken in each state as the action space.
[0064] Construct a Q-table matrix with the size of the state space and the size of the action space, and set the immediate reward obtained after taking the corresponding actions in different states as the reward function.
[0065] At different time steps, observe the corresponding state according to the corresponding action taken for the current state, and calculate the state reward according to the reward function for the corresponding state.
[0066] Update the Q-table matrix according to the corresponding state and state reward to obtain the Q-learning model, and the formula is expressed as:
[0067] In the formula, is the learning rate, is the discount factor, is the current state, is the corresponding action, is the state reward, is the time step, is the new state transferred to after performing the corresponding action at the time step, is all actions, is the Q-table matrix, is the maximum long-term cumulative reward obtained in the new state.
[0068] The steps to optimize and obtain the enhanced Q-learning model include: Regarding the corresponding probability distributions of taking actions in different states in the Q-table matrix as policy parameters, and calculating the expectation of the cumulative reward obtained by executing actions according to the preset policy starting from the initial state. The formula is expressed as:
[0069] In the formula, is the time range, is the reward obtained at the time step, is the expectation, is the expectation operator, is the discount factor at the time step.
[0070] By maximizing the expectation and using the PSD algorithm to calculate the policy gradient, and updating each policy parameter according to the gradient direction. The formula is expressed as:
[0071] In the formula, is the step size for each update, is the number of iterations, is the policy gradient, is the value of the policy parameter at the th iteration, is the value of the policy parameter at the th iteration.
[0072] After reaching the preset number of iterations, select the policy composed of the policy parameters with the smallest policy gradient as the enhanced Q-learning model.
[0073] The steps to output the process residue image data include: Preprocess the input surface image data, and extract gray-scale features, texture features, and edge features from it, and convert them into feature states.
[0074] The steps to convert into feature states include: Use the weighted average method to convert the color image in the surface image data into a gray-scale image, remove noise, and map the pixel values to a preset range to obtain the image processing data.
[0075] The sum of the grayscale values of all image pixels in the image processing data is divided by the total number of pixels to obtain the grayscale mean. The square of the difference between the grayscale value of each pixel and the grayscale mean is calculated to obtain a plurality of squared values, and the average value is calculated based on the plurality of squared values to obtain the grayscale variance. The grayscale variance is analyzed to obtain the grayscale feature. The larger the grayscale variance, the more dispersed the distribution of grayscale values in the image, that is, the higher the contrast of the image. The smaller the grayscale variance, the more concentrated the grayscale values of the image, and the lower the contrast.
[0076] A gray-level co-occurrence matrix is constructed based on the frequencies of pixels with two preset gray-level values in a preset direction and distance, and different gray-level co-occurrence matrices are obtained by changing the direction and distance. Based on different gray-level co-occurrence matrices, texture features are calculated.
[0077] The Canny operator is used to calculate the gradient magnitude and direction of the image processing data. Through non-maximum suppression, the local maximum values in the gradient direction are obtained, and based on double-threshold processing, the edge image is determined, and edge features are extracted from it.
[0078] The grayscale feature, texture feature, and edge feature are combined into a feature vector and transformed into a feature state.
[0079] According to the strategy of the reinforcement Q-learning model, an action is selected in the feature state to obtain a feature action, and the feature action is executed on the surface image data to obtain new image data.
[0080] The steps to obtain the new image data include: All operations that can be performed on the surface image data are defined as an action set, and the ∈-greedy strategy is used to select an action from the action set corresponding to the feature state to obtain a feature action.
[0081] Corresponding image operations are defined for each action according to the action set to obtain a mapping relationship, and the corresponding operations are performed on the surface image data according to the feature action to obtain new image data. When the feature action is Gaussian filtering, a Gaussian filter is used to smooth the surface image, removing noise and retaining the edge information of the image. If the feature action is threshold segmentation, the image pixels are divided into two categories according to the set threshold, which is used to separate the target object from the background. If the feature action is dilation operation, the object boundary in the image will expand outward. If it is an erosion operation, the object boundary will shrink inward. These operations can be used to remove small noise points, connect disconnected objects, etc.
[0082] Features are extracted from the new image data to update the feature state to obtain an updated state, and combined with the Q-table matrix to determine whether the current image is a process residue. If so, the current image is output as a process residue image, otherwise other images are judged.
[0083] Integrate all process residue images to obtain process residue image data.
[0084] Determine whether the process residue image data reaches the light adaptation defect threshold. If so, mark the current organic electroluminescent device as unqualified; otherwise, mark the current organic electroluminescent device as qualified.
[0085] An image detection method for defects of an organic electroluminescent device provided in this embodiment can more accurately determine whether there are defects in the device, reduce false positives and false negatives, and improve detection accuracy by comprehensively considering various image features to set a defect judgment threshold, adjusting the threshold according to the light conditions, and using a reinforcement Q-learning model for accurate image recognition. It also enables the detection method to adapt to different light conditions in the workshop and improves the detection ability in complex lighting environments through the analysis of light data and the region-based threshold adjustment method. Moreover, through continuous learning and optimization, the reinforcement Q-learning model can adapt to different types of organic electroluminescent devices and various possible defect situations, has strong self-adaptability and generalization ability, helps to timely discover problems in the production process, take corresponding measures for improvement, thereby improving the production efficiency and product quality of organic electroluminescent devices and reducing production costs.
[0086] Example 1: I. Data collection: Surface image data: Use a high-resolution industrial camera to collect the surface image of a certain model of organic electroluminescent device. The image resolution is 1000×1000 pixels, and the color image format is RGB. Historical data: Obtain the historical data of this model of device in the past month with production batches P001 - P010 from the production database, including production time, production parameters (such as temperature: 25°C - 30°C, voltage V: 5V - 7V), quality inspection results, device defect annotation information (such as scratches, bright spots, etc.), and the corresponding device image data. Light data in the workshop: Install light sensors at different positions in the workshop. The collected light intensity of the current workshop is 500 Lux, the light uniformity is 80%, and the light spectral distribution is in the visible light range, mainly concentrated in 400nm - 700nm.
[0087] II. Extracting Device Defect Image Data Find the corresponding device data from historical data according to the time range (the past month), production batches P001 - P010, and product models. A total of 500 records containing device images are located. Among them, 100 records with device defect annotation information are found. According to the annotation information, defect image data is screened out from the device image data, obtaining 100 defect images. Find unqualified device data from the device data based on abnormal production parameters (such as temperature exceeding the range of 25°C - 30°C, voltage exceeding the range of 5V - 7V) and unqualified quality inspection results (a total of 30 records), and combine it with the previous defect image data to finally obtain 120 pieces of device defect image data.
[0088] III. Setting Defect Judgment Thresholds Use the gray - level histogram to statistically analyze the gray - level value distributions of the defect areas and normal areas in 120 pieces of device defect image data to obtain gray - level features. For example, the average gray - level value of the defect area is 50, the average gray - level value of the normal area is 150, and the gray - level variances are 20 and 10 respectively. Conduct geometric feature analysis on the images of the defect areas to obtain the geometric feature ranges of different types of defects (such as the length range of scratches is 10 - 50 pixels, the width range is 1 - 3 pixels; the diameter range of bright spots is 2 - 5 pixels), and use the local binary pattern to extract the texture features of the defect areas, such as the contrast is 0.3 and the correlation is 0.6. According to the gray - level features, geometric feature ranges, and texture features, classify the device defect image data according to defect types (scratches, bright spots, dark spots, etc.). A total of 5 defect types are obtained, and the eigenvalue distribution of each defect type is statistically analyzed. Use the 3σ principle and, according to the eigenvalue distribution, calculate the statistical distribution of each defect type.
[0089] IV. Adjusting to Obtain the Light - Adapted Defect Threshold Analyze the relationship between the light data in terms of light intensity, light uniformity, and light spectral distribution and the image gray - level. It is found that there is a positive correlation between light intensity and image gray - level, and the higher the light uniformity, the more uniform the image gray - level distribution. Based on this influence law, judge the adjustment direction of the defect judgment threshold. For example, when the light intensity increases, appropriately increase the gray - level threshold. Use the region - based adjustment method to divide the surface of the organic electroluminescent device into 10×10 = 100 regions, and calculate the corresponding threshold adjustment amount for each region according to the adjustment direction. For example, in the region with strong light intensity, increase the gray - level threshold by 10 units. Adjust the defect judgment thresholds of the corresponding regions according to multiple threshold adjustment amounts to obtain the light - adapted defect threshold.
[0090] V. Constructing a Q-learning Model Based on 120 defective image data, define various features including the grayscale features, geometric features, texture features, etc. of the device images and other relevant information (such as production parameters) as the state space, and set the size of the state space to 100 different states. Take the set of all actions (such as filtering, threshold segmentation, etc., a total of 10 actions) taken in each state as the action space. Construct a 100×10 Q-table matrix with the size of the state space and the size of the action space, and define the immediate reward obtained after taking the corresponding action in different states as the reward function.
[0091] VI. Optimizing to Obtain a Reinforced Q-learning Model Regard the corresponding probability distribution of the actions taken in different states in the Q-table matrix as the policy parameters, and calculate the expectation of the cumulative reward obtained by executing actions according to the preset policy starting from the initial state. Set the initial cumulative reward expectation to 100. Maximize the expectation and calculate the policy gradient using the PSD algorithm, and update each policy parameter according to the gradient direction. After 50 iterations, the cumulative reward expectation is increased to 200. After reaching the preset number of iterations, select the policy composed of the policy parameters with the smallest policy gradient as the reinforced Q-learning model.
[0092] VII. Outputting Process Residual Image Data Preprocess the input surface image data. Convert the color image to a grayscale image using the weighted average method, remove noise using median filtering, and map the pixel values to the range of 0 - 255 to obtain image processing data. Divide the sum of the grayscale values of all image pixels in the image processing data by the total number of pixels to get a grayscale mean value of 100. Calculate the square of the difference between the grayscale value of each pixel and the grayscale mean to obtain multiple squared values, and calculate the average of the multiple squared values to get a grayscale variance of 15. Analyze the grayscale variance to obtain grayscale features. Construct a gray-level co-occurrence matrix based on the frequencies of pixels with two preset grayscale values in a preset direction and distance, and obtain different gray-level co-occurrence matrices by changing the direction and distance. Based on different gray-level co-occurrence matrices, calculate texture features. Use the Canny operator to calculate the gradient magnitude and direction of the image processing data, perform non-maximum suppression to obtain local maxima in the gradient direction, and determine the edge image according to double-threshold processing, and extract edge features from it. Combine the grayscale features, texture features, and edge features into a feature vector and convert it into a feature state. According to the strategy of the enhanced Q-learning model, use the ε-greedy strategy to select an action in the feature state to obtain a feature action, and assume the selected action is Gaussian filtering. Perform the feature action on the surface image data to obtain new image data. Extract features from the new image data to update the feature state to obtain an updated state, and combine with the Q-table matrix to determine whether the current image is a process residue. If so, output the current image as process residue image data, otherwise judge other images. Assume the judgment result is a process residue image. Integrate all process residue images to obtain process residue image data, and a total of 5 process residue images are obtained this time.
[0093] VIII. Device Detection Judge whether the process residue image data reaches the light adaptation defect threshold. If so, mark the current organic electroluminescent device as unqualified, otherwise mark the current organic electroluminescent device as qualified. After judgment, the process residue image data of this device reaches the defect judgment threshold, and the current organic electroluminescent device is marked as unqualified.
[0094] Based on the same general inventive concept, the present invention also protects an image detection device for defects of an organic electroluminescent device. The following describes an image detection device for defects of an organic electroluminescent device provided by the present invention. The IoT-based park inspection device described below can be mutually corresponding and referred to with the image detection method for defects of an organic electroluminescent device described above.
[0095] As Figure 3 shown, an image detection device for defects of an organic electroluminescent device provided by an embodiment of the present invention includes: A data acquisition module, configured to acquire surface image data, historical data, and light data in the workshop of the organic electroluminescent device.
[0096] A threshold adjustment module, configured to extract device defect image data from historical data, set a defect judgment threshold according to the device defect image data, and adjust the defect judgment threshold according to the light data to obtain a light-adapted defect threshold.
[0097] A model optimization and output module, configured to construct a Q-learning model, optimize the Q-learning model using the PSD algorithm to obtain a reinforced Q-learning model, input surface image data, and output process residue image data.
[0098] A device detection module, configured to determine whether the process residue image data reaches the light-adapted defect threshold. If so, mark the current organic electroluminescent device as unqualified; otherwise, mark the current organic electroluminescent device as qualified.
[0099] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0100] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, also by hardware. Based on this understanding, the essence of the above technical solutions, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image detection method for defects of an organic electroluminescent device, characterized in that: include: Collect surface image data, historical data and light data in the workshop of organic electroluminescent devices; Extracting device defect image data from the historical data, setting a defect judgment threshold according to the device defect image data, and adjusting the defect judgment threshold according to the light data to obtain a light adaptation defect threshold; Constructing a Q-learning model, and optimizing the Q-learning model using a PSD algorithm to obtain an enhanced Q-learning model, inputting the surface image data, and outputting process residue image data; It is determined whether the process residual image data reaches the light adaptation defect threshold value, and if so, the current organic electroluminescent device is marked as unqualified, otherwise, the current organic electroluminescent device is marked as qualified.
2. The method for image detection of defects of an organic electroluminescent device according to claim 1, characterized in that: The step of extracting the device defect image data comprises: Finding device data from the historical data according to the time range, production batch and product model of the organic electroluminescent device, and locating device image data containing the image of the organic electroluminescent device; Finding out the annotation information about the device defects in the device data, and filtering out the defective image data from the device image data according to the annotation information; According to abnormal production parameters and unqualified quality inspection results, unqualified device data is found from the device data, and the device defect image data is obtained by combining the defect image data.
3. The method for image detection of defects of an organic electroluminescent device according to claim 1, characterized in that: The step of setting the defect judgment threshold comprises: Using a grayscale histogram to count the grayscale value distribution of the defective area and the normal area in the device defect image data to obtain a grayscale feature; Performing geometric feature analysis on the image of the defect area to obtain the geometric feature ranges of different types of defects, and extracting texture features of the defect area using local binary patterns; According to the grayscale feature, the geometric feature range and the texture feature, the device defect image data is classified according to defect type to obtain multiple defect types, and the characteristic value distribution of each defect type is statistically analyzed; The 3σ principle is used, and according to the characteristic value distribution, the statistical distribution of each defect type is calculated, and initial thresholds are set for different characteristics of each defect type to obtain the defect judgment threshold.
4. The method for image detection of defects of an organic electroluminescent device according to claim 1, characterized in that: The step of adjusting and obtaining the light adaptation defect threshold comprises: Analyzing the relationship between the light data and the image grayscale from the aspects of light intensity, light uniformity and light spectrum distribution to obtain an influencing rule, and determining the adjustment direction of the defect judgment threshold based on the influencing rule; Using a region-based adjustment method, the surface of the organic electroluminescent device is divided into multiple regions, and the corresponding threshold adjustment amount of each region is calculated according to the adjustment direction, and the defect judgment threshold of the corresponding region is adjusted according to the multiple threshold adjustment amounts to obtain the light adaptation defect threshold.
5. The method for image detection of defects of an organic electroluminescent device according to claim 1, characterized in that: The steps of constructing the Q-learning model include: Based on the defect image data, defining various features of the device image and other relevant information as a state space, and the geometry of all actions taken in each state as an action space; The size of the state space and the size of the action space are used to construct a Q table matrix, and the immediate rewards obtained after taking corresponding actions in different states are set as reward functions; At different time steps, a corresponding state is obtained by observing a corresponding action taken on the current state, and a state reward is obtained by calculating the corresponding state according to the reward function; The Q-learning model is obtained by updating the Q table matrix according to the corresponding state and the state reward.
6. The method for image detection of defects of an organic electroluminescent device according to claim 5, characterized in that: The steps of optimizing the enhanced Q-learning model include: The corresponding probability distribution of taking actions under different states in the Q table matrix is used as a strategy parameter, and the expectation of the cumulative reward obtained by executing actions according to the preset strategy starting from the initial state is calculated; Calculate the policy gradient by maximizing the expectation and using the PSD algorithm, and update each policy parameter according to the gradient direction; When the preset number of iterations is reached, the strategy consisting of the strategy parameters with the smallest strategy gradient is selected as the enhanced Q-learning model.
7. The method for image detection of defects of an organic electroluminescent device according to claim 6, characterized in that: The step of outputting the process residual image data comprises: Preprocessing the input surface image data, extracting grayscale features, texture features and edge features therefrom, and converting them into feature states; According to the strategy of the reinforced Q-learning model, an action is selected under the feature state to obtain a feature action, and the feature action is executed on the surface image data to obtain new image data; Extract features from the new image data to update the feature state to obtain an updated state, and determine whether the current image is a process residue in combination with the Q table matrix. If so, output the current image as a process residue image, otherwise, determine other images; All process residue images are integrated to obtain the process residue image data.
8. The method for image detection of defects of an organic electroluminescent device according to claim 7, characterized in that: The steps of converting to the characteristic state include: The color image in the surface image data is converted into a grayscale image by using a weighted average method, and noise is removed, and pixel values are mapped into a preset range to obtain image processing data; The grayscale mean is obtained by adding up the grayscale values of all image pixels in the image processing data and dividing it by the total number of pixels, the square of the difference between the grayscale value of each pixel and the grayscale mean is calculated to obtain a plurality of square values, the average value is calculated based on the plurality of square values to obtain the grayscale variance, and the grayscale variance is analyzed to obtain the grayscale feature; Constructing a gray level co-occurrence matrix according to the frequency of occurrence of pixels of two preset gray values in a preset direction and distance, and obtaining different gray level co-occurrence matrices by changing the direction and distance, and calculating the texture feature based on the different gray level co-occurrence matrices; Using the Canny operator to calculate the gradient amplitude and direction of the image processing data, obtaining the local maximum value in the gradient direction through non-maximum suppression, and determining the edge image according to double threshold processing, and extracting the edge feature from it; The grayscale feature, the texture feature and the edge feature are combined into a feature vector and converted into the feature state.
9. The method for image detection of defects of an organic electroluminescent device according to claim 7, characterized in that: The step of obtaining the new image data comprises: Define all operations that can be performed on the surface image data as an action set, and use an ∈-greedy strategy to select an action in the action set corresponding to the feature state to obtain the feature action; A corresponding image operation is defined for each action according to the action set to obtain a mapping relationship, and a corresponding operation is performed on the surface image data according to the characteristic action to obtain the new image data.
10. An image detection device for defects of an organic electroluminescent device, which adopts an image detection method for defects of an organic electroluminescent device as claimed in any one of claims 1 to 9, characterized in that: The detection device comprises: A data acquisition module, used to collect surface image data, historical data and light data in the workshop of the organic electroluminescent device; A threshold adjustment module, used for extracting device defect image data from the historical data, setting a defect judgment threshold according to the device defect image data, and adjusting the defect judgment threshold according to the light data to obtain a light adaptation defect threshold; A model optimization and output module is used to construct a Q-learning model, and use a PSD algorithm to optimize the Q-learning model to obtain an enhanced Q-learning model, input the surface image data, and output process residue image data; The device detection module is used to determine whether the process residual image data reaches the light adaptation defect threshold, and if so, mark the current organic electroluminescent device as unqualified, otherwise, mark the current organic electroluminescent device as qualified.
Citation Information
Cited By
Portable terminal appearance defect intelligent detection method based on image recognition
CN120635089A