A data processing method, device and equipment
The image color conversion vector with strong interpretability is generated through the target color conversion model, which solves the problem of uninterpretability of the color conversion model in the existing technology, improves the accuracy and applicability of defect detection, and is suitable for a variety of industrial scenarios.
Patent Information
- Application Number
- CN202210265514.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-17
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-03-17
AI Technical Summary
In existing computer vision-based defect detection solutions, the color conversion model lacks interpretability and cannot effectively guide subsequent solutions, resulting in reduced recognition accuracy in smart industrial scenarios.
The target color conversion model is used to perform color conversion on the reference image and generate N-dimensional vector output information, which is used to adjust the image acquisition parameters to ensure the interpretability of the image color conversion method and change amount, thereby being suitable for the defect detection model.
It improves the accuracy and applicability of defect detection, reduces image processing workload, is suitable for smart industrial scenarios with high safety and control requirements, and is suitable for a variety of application scenarios.
Smart Images

Figure CN116797446B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, device and equipment. Background Art
[0002] With the development of artificial intelligence-related technologies, deep neural networks have been maturely applied in fields such as object recognition, semantic segmentation, and natural language processing. In particular, computer vision technology based on convolutional neural networks has surpassed human recognition capabilities in multiple scenarios in terms of recognition accuracy and inference time.
[0003] Computer vision technology has a wide range of applications in smart industrial scenarios, such as defect detection. However, the color conversion models involved in existing computer vision-based defect detection solutions are not interpretable.
[0004] Specifically, the data processing solutions for color conversion in the prior art have defects such as lack of interpretability and inability to provide effective guidance for subsequent solutions. Summary of the Invention
[0005] The object of the present invention is to provide a data processing method, device and equipment to solve the problem that the data processing scheme for color conversion in the prior art is not interpretable and cannot effectively guide subsequent schemes.
[0006] In order to solve the above technical problems, an embodiment of the present invention provides a data processing method, including:
[0007] Performing color conversion on at least one reference image using a target color conversion model to obtain output information corresponding to each reference image;
[0008] Setting image acquisition parameters according to output information corresponding to the reference image;
[0009] Under the set image acquisition parameters, acquiring a first image to be processed;
[0010] The output information of the target color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and a corresponding change amount; and N is an integer greater than or equal to 1.
[0011] Optionally, setting image acquisition parameters according to output information corresponding to the reference image includes:
[0012] According to each dimensional vector of the output information corresponding to the reference image, the parameter value of the image acquisition parameter corresponding to the image color conversion mode is adjusted.
[0013] Optionally, after acquiring the first image to be processed under the set image acquisition parameters, the method further includes:
[0014] Obtaining a first image to be detected according to the first image to be processed;
[0015] Perform defect detection on the first image to be detected.
[0016] Optionally, obtaining a first image to be detected based on the first image to be processed includes:
[0017] Using the first image to be processed as the first image to be detected; or
[0018] Performing color conversion on the first image to be processed using the target color conversion model to obtain output information corresponding to the first image to be processed;
[0019] A first image to be detected is obtained according to the first image to be processed and the output information corresponding to the first image to be processed.
[0020] Optionally, obtaining the first image to be detected according to the first image to be processed and the output information corresponding to the first image to be processed includes:
[0021] According to each dimensional vector of the output information corresponding to the first image to be processed, the parameter value of the image color conversion method corresponding to the first image to be processed is adjusted to obtain the first image to be detected.
[0022] Optionally, before performing color conversion on at least one reference image using the target color conversion model to obtain output information corresponding to each reference image, the method further includes:
[0023] Get the initial color conversion model;
[0024] The initial color conversion model is trained using at least one labeled first target image to obtain a target color conversion model.
[0025] Optionally, the training of the initial color conversion model using at least one labeled first target image to obtain a target color conversion model includes:
[0026] Performing color conversion on the first target image using the initial color conversion model to obtain output information corresponding to the first target image;
[0027] Obtaining a second target image according to the first target image and output information corresponding to the first target image;
[0028] performing defect detection on the second target image to obtain a detection result;
[0029] updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain a target color conversion model;
[0030] The output information of the initial color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and a corresponding change amount; and N is an integer greater than or equal to 1.
[0031] Optionally, after the initial color conversion model is trained using at least one labeled first target image to obtain a target color conversion model, the method further includes:
[0032] Performing color conversion on the second image to be processed using the target color conversion model to obtain output information corresponding to the second image to be processed;
[0033] Obtaining a second image to be detected according to the second image to be processed and output information corresponding to the second image to be processed;
[0034] Perform defect detection on the second image to be detected.
[0035] Optionally, the N-dimensional vector includes at least one of the following:
[0036] Vector elements representing color spaces and corresponding changes;
[0037] Vector elements representing hue and corresponding change amount;
[0038] Vector elements representing brightness and corresponding change amount;
[0039] Vector elements representing saturation and corresponding change amounts;
[0040] Vector elements representing brightness and corresponding change amounts;
[0041] The vector elements representing how the modified amount is calculated relative to the original amount.
[0042] An embodiment of the present invention further provides a data processing device, including:
[0043] A first processing module is configured to perform color conversion on at least one reference image using a target color conversion model to obtain output information corresponding to each reference image;
[0044] A first setting module, configured to set image acquisition parameters according to output information corresponding to the reference image;
[0045] A first acquisition module, configured to acquire a first image to be processed under set image acquisition parameters;
[0046] The output information of the target color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and a corresponding change amount; and N is an integer greater than or equal to 1.
[0047] Optionally, setting image acquisition parameters according to output information corresponding to the reference image includes:
[0048] According to each dimensional vector of the output information corresponding to the reference image, the parameter value of the image acquisition parameter corresponding to the image color conversion mode is adjusted.
[0049] Optionally, also include:
[0050] A second processing module is configured to acquire a first image to be processed under the set image acquisition parameters, and then obtain a first image to be detected based on the first image to be processed;
[0051] The first detection module is used to perform defect detection on the first image to be detected.
[0052] Optionally, obtaining a first image to be detected based on the first image to be processed includes:
[0053] Using the first image to be processed as the first image to be detected; or
[0054] Performing color conversion on the first image to be processed using the target color conversion model to obtain output information corresponding to the first image to be processed;
[0055] A first image to be detected is obtained according to the first image to be processed and the output information corresponding to the first image to be processed.
[0056] Optionally, obtaining the first image to be detected according to the first image to be processed and the output information corresponding to the first image to be processed includes:
[0057] According to each dimensional vector of the output information corresponding to the first image to be processed, the parameter value of the image color conversion method corresponding to the first image to be processed is adjusted to obtain the first image to be detected.
[0058] Optionally, also include:
[0059] A first acquisition module is configured to acquire an initial color conversion model before performing color conversion on at least one reference image using a target color conversion model to obtain output information corresponding to each reference image;
[0060] The first training module is used to train the initial color conversion model using at least one labeled first target image to obtain a target color conversion model.
[0061] Optionally, the training of the initial color conversion model using at least one labeled first target image to obtain a target color conversion model includes:
[0062] Performing color conversion on the first target image using the initial color conversion model to obtain output information corresponding to the first target image;
[0063] Obtaining a second target image according to the first target image and output information corresponding to the first target image;
[0064] performing defect detection on the second target image to obtain a detection result;
[0065] updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain a target color conversion model;
[0066] The output information of the initial color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and a corresponding change amount; and N is an integer greater than or equal to 1.
[0067] Optionally, also include:
[0068] a third processing module, configured to train the initial color conversion model using at least one labeled first target image to obtain a target color conversion model, and then perform color conversion on a second image to be processed using the target color conversion model to obtain output information corresponding to the second image to be processed;
[0069] a fourth processing module, configured to obtain a second image to be detected based on the second image to be processed and output information corresponding to the second image to be processed;
[0070] The second detection module is used to perform defect detection on the second image to be detected.
[0071] Optionally, the N-dimensional vector includes at least one of the following:
[0072] Vector elements representing color spaces and corresponding changes;
[0073] Vector elements representing hue and corresponding change amount;
[0074] Vector elements representing brightness and corresponding change amount;
[0075] Vector elements representing saturation and corresponding change amounts;
[0076] Vector elements representing brightness and corresponding change amounts;
[0077] The vector elements representing how the modified amount is calculated relative to the original amount.
[0078] An embodiment of the present invention further provides a data processing device, comprising: a processor;
[0079] The processor is configured to perform color conversion on at least one reference image using a target color conversion model to obtain output information corresponding to each reference image;
[0080] Setting image acquisition parameters according to output information corresponding to the reference image;
[0081] Under the set image acquisition parameters, acquiring a first image to be processed;
[0082] The output information of the target color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and a corresponding change amount; and N is an integer greater than or equal to 1.
[0083] Optionally, setting image acquisition parameters according to output information corresponding to the reference image includes:
[0084] According to each dimensional vector of the output information corresponding to the reference image, the parameter value of the image acquisition parameter corresponding to the image color conversion mode is adjusted.
[0085] Optionally, the processor is further configured to:
[0086] Under the set image acquisition parameters, after acquiring a first image to be processed, a first image to be detected is obtained based on the first image to be processed;
[0087] Perform defect detection on the first image to be detected.
[0088] Optionally, obtaining a first image to be detected based on the first image to be processed includes:
[0089] Under the set image acquisition parameters, after acquiring the first image to be processed, the first image to be processed is used as the first image to be detected; or
[0090] Under the set image acquisition parameters, after acquiring a first image to be processed, perform color conversion on the first image to be processed using the target color conversion model to obtain output information corresponding to the first image to be processed;
[0091] A first image to be detected is obtained according to the first image to be processed and the output information corresponding to the first image to be processed.
[0092] Optionally, obtaining the first image to be detected according to the first image to be processed and the output information corresponding to the first image to be processed includes:
[0093] According to each dimensional vector of the output information corresponding to the first image to be processed, the parameter value of the image color conversion method corresponding to the first image to be processed is adjusted to obtain the first image to be detected.
[0094] Optionally, the processor is further configured to:
[0095] Before performing color conversion on at least one reference image using the target color conversion model to obtain output information corresponding to each reference image, obtaining an initial color conversion model;
[0096] The initial color conversion model is trained using at least one labeled first target image to obtain a target color conversion model.
[0097] Optionally, the training of the initial color conversion model using at least one labeled first target image to obtain a target color conversion model includes:
[0098] Performing color conversion on the first target image using the initial color conversion model to obtain output information corresponding to the first target image;
[0099] Obtaining a second target image according to the first target image and output information corresponding to the first target image;
[0100] performing defect detection on the second target image to obtain a detection result;
[0101] updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain a target color conversion model;
[0102] The output information of the initial color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and a corresponding change amount; and N is an integer greater than or equal to 1.
[0103] Optionally, the processor is further configured to:
[0104] After training the initial color conversion model using at least one labeled first target image to obtain a target color conversion model, performing color conversion on a second image to be processed using the target color conversion model to obtain output information corresponding to the second image to be processed;
[0105] Obtaining a second image to be detected according to the second image to be processed and output information corresponding to the second image to be processed;
[0106] Perform defect detection on the second image to be detected.
[0107] Optionally, the N-dimensional vector includes at least one of the following:
[0108] Vector elements representing color spaces and corresponding changes;
[0109] Vector elements representing hue and corresponding change amount;
[0110] Vector elements representing brightness and corresponding change amount;
[0111] Vector elements representing saturation and corresponding change amounts;
[0112] Vector elements representing brightness and corresponding change amounts;
[0113] The vector elements representing how the modified amount is calculated relative to the original amount.
[0114] An embodiment of the present invention further provides a data processing device, comprising a memory, a processor, and a program stored in the memory and executable on the processor; the processor implements the above-mentioned data processing method when executing the program.
[0115] An embodiment of the present invention further provides a readable storage medium on which a program is stored. When the program is executed by a processor, the above-mentioned data processing method is implemented.
[0116] The beneficial effects of the above technical solution of the present invention are as follows:
[0117] In the above scheme, the data processing method performs color conversion on at least one reference image by utilizing a target color conversion model to obtain output information corresponding to each reference image; sets image acquisition parameters according to the output information corresponding to the reference image; and acquires the first image to be processed under the set image acquisition parameters; wherein the output information of the target color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and a corresponding change amount; N is an integer greater than or equal to 1; it can make the data processing for color conversion interpretable, and thus can effectively guide the subsequent image acquisition environment design, so that the subsequently acquired images are as suitable as possible for the defect detection model, thereby reducing the processing workload required for the acquired images; it can be applicable to smart industrial scenarios with high requirements for safety and controllability; in addition, this scheme is not strongly bound to the application scenario and can be applicable to all application scenarios; it well solves the problem that the data processing scheme for color conversion in the existing technology is not interpretable and cannot effectively guide subsequent schemes. BRIEF DESCRIPTION OF THE DRAWINGS
[0118] Figure 1 Schematic diagram of a data processing method according to an embodiment of the present invention;
[0119] Figure 2Schematic diagram of the structure of a data processing device according to an embodiment of the present invention;
[0120] Figure 3 Schematic diagram of the structure of a data processing device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0121] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0122] The present invention aims to solve the problem that the data processing scheme for color conversion in the existing technology is not interpretable and cannot effectively guide the subsequent schemes. A data processing method is provided, such as Figure 1 Shown, including:
[0123] Step 11: Using the target color conversion model, perform color conversion on at least one reference image to obtain output information corresponding to each reference image;
[0124] Step 12: Setting image acquisition parameters according to the output information corresponding to the reference image;
[0125] Step 13: Under the set image acquisition parameters, the first image to be processed is acquired; wherein the output information of the target color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and a corresponding change amount; and N is an integer greater than or equal to 1.
[0126] Image acquisition parameters may include: parameters of the acquisition device and / or the layout (parameters) of the peripherals; the "image color conversion method" may also be referred to as "image color conversion parameters", which is not limited here.
[0127] The data processing method provided by the embodiment of the present invention performs color conversion on at least one reference image by utilizing a target color conversion model to obtain output information corresponding to each reference image; sets image acquisition parameters according to the output information corresponding to the reference image; acquires a first image to be processed under the set image acquisition parameters; wherein the output information of the target color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and a corresponding change amount; N is an integer greater than or equal to 1; it can make the data processing for color conversion interpretable, and thus can effectively guide the subsequent image acquisition environment design, so that the subsequently acquired images are as suitable as possible for the defect detection model, thereby reducing the processing workload required for the acquired images; it can be applicable to smart industrial scenarios with high requirements for safety and controllability; in addition, this solution is not strongly bound to the application scenario and can be applicable to all application scenarios; it well solves the problem that the data processing solution for color conversion in the existing technology is not interpretable and cannot effectively guide subsequent solutions.
[0128] The step of setting image acquisition parameters according to the output information corresponding to the reference image includes adjusting parameter values corresponding to the image color conversion mode in the image acquisition parameters according to each dimensional vector of the output information corresponding to the reference image.
[0129] Furthermore, under the set image acquisition parameters, after acquiring the first image to be processed, the method further includes: obtaining a first image to be detected based on the first image to be processed; and performing defect detection on the first image to be detected.
[0130] This can achieve high-precision defect detection. Furthermore, after performing defect detection on the first image to be detected, the method may also include: updating the target color conversion model based on the loss function value corresponding to the detection result (also referred to as the detection result); thereby further improving the accuracy of the model.
[0131] Among them, obtaining the first image to be detected based on the first image to be processed includes: using the first image to be processed as the first image to be detected; or using the target color conversion model to perform color conversion on the first image to be processed to obtain output information corresponding to the first image to be processed; obtaining the first image to be detected based on the first image to be processed and the output information corresponding to the first image to be processed.
[0132] In this way, the first image to be detected can be obtained more accurately and quickly.
[0133] Among them, obtaining the first image to be detected based on the first image to be processed and the output information corresponding to the first image to be processed includes: adjusting the parameter value of the corresponding image color conversion method of the first image to be processed according to each dimensional vector of the output information corresponding to the first image to be processed, so as to obtain the first image to be detected.
[0134] In this way, the first image to be detected can be accurately obtained, so that the adjusted image can be used for subsequent detection, thereby improving the detection accuracy.
[0135] In an embodiment of the present invention, before using a target color conversion model to perform color conversion on at least one reference image to obtain output information corresponding to each reference image, it also includes: obtaining an initial color conversion model; using at least one labeled first target image to train the initial color conversion model to obtain a target color conversion model.
[0136] This allows the target color conversion model to be accurately obtained.
[0137] Wherein, the use of at least one labeled first target image to train the initial color conversion model to obtain a target color conversion model includes: using the initial color conversion model to perform color conversion on the first target image to obtain output information corresponding to the first target image; obtaining a second target image based on the first target image and the output information corresponding to the first target image; performing defect detection on the second target image to obtain a detection result; updating the initial color conversion model based on the loss function value corresponding to the detection result to obtain a target color conversion model; wherein the output information of the initial color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and the corresponding change amount; and N is an integer greater than or equal to 1.
[0138] Regarding “obtaining a second target image based on the first target image and the output information corresponding to the first target image”, it may include: adjusting the first target image based on the output information corresponding to the first target image to obtain the second target image (for example, more specifically: adjusting the parameter value of the image color conversion method corresponding to the first target image based on each dimensional vector of the output information corresponding to the first target image to obtain the second target image), but is not limited thereto. Regarding “updating the initial color conversion model based on the loss function value corresponding to the detection result to obtain the target color conversion model”, it may include: obtaining the loss function value corresponding to the detection result based on the detection result and the corresponding label; updating the initial color conversion model based on the loss function value corresponding to the detection result to obtain the target color conversion model, but is not limited thereto.
[0139] In addition, regarding "updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain a target color conversion model", it may include: updating the initial color conversion model according to the loss function value corresponding to the detection result until the accuracy of the defect detection model reaches a threshold or reaches the upper limit of the number of updates, and using the color conversion model obtained by the last update of the "initial color conversion model" as the target color conversion model, but is not limited to this.
[0140] In addition, regarding “updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain the target color conversion model”, it may include: backpropagating the loss function value corresponding to the detection result, updating (optimizing) the initial color conversion model, and obtaining the target color conversion model, but is not limited to this.
[0141] Furthermore, after using at least one labeled first target image to train the initial color conversion model and obtain the target color conversion model, it also includes: using the target color conversion model to perform color conversion on the second image to be processed to obtain output information corresponding to the second image to be processed; obtaining a second image to be detected based on the second image to be processed and the output information corresponding to the second image to be processed; and performing defect detection on the second image to be detected.
[0142] In this way, the target color conversion model can be used to improve the detection accuracy of defect detection. The phrase "obtaining a second image to be detected based on the second image to be processed and the output information corresponding to the second image to be processed" may include: adjusting the second image to be processed based on the output information corresponding to the second image to be processed to obtain the second image to be detected (for example, more specifically: adjusting the parameter values of the image color conversion method corresponding to the second image to be processed based on each dimensional vector of the output information corresponding to the second image to be processed to obtain the second image to be detected), but is not limited to this.
[0143] In an embodiment of the present invention, the N-dimensional vector includes at least one of the following: a vector element representing the color space and the corresponding change amount; a vector element representing the hue and the corresponding change amount; a vector element representing the brightness and the corresponding change amount; a vector element representing the saturation and the corresponding change amount; a vector element representing the lightness and the corresponding change amount; and a vector element representing the calculation method of the change amount relative to the original amount.
[0144] The "N-dimensional vector" here can be the output information of the target color conversion model or the output information of the initial color conversion model, which is not limited here. Regarding the "change amount", it can also be called "adjustment data"; regarding the "original amount", it can also be called "original data", but it is not limited to this. Regarding the "vector element representing the color space and the corresponding change amount", for example, a change amount of 0 corresponds to the HSV (hue, saturation, brightness) color space, and a change amount of 1 corresponds to the HIS (hue, saturation, brightness) color space; regarding the "vector element representing the operation method of the change amount relative to the original amount", for example: a change amount of 0 corresponds to an operation method of addition, and a change amount of 1 corresponds to an operation method of multiplication.
[0145] It is noted here that the above-mentioned defect detection can be implemented by using a defect detection model, but is not limited thereto.
[0146] The data processing method provided by the embodiment of the present invention is described below with examples.
[0147] In response to the above technical problems, and specifically considering that: the current computer vision-based defect detection solution usually requires collecting the detection target and then applying the machine learning model to infer the image to obtain the defect detection result; this process causes the defect detection model to be unsuitable due to the color differences of the identification target caused by the shooting environment (such as lighting and equipment parameters) in the actual production environment; in this regard, a color conversion solution using an artificial intelligence model is provided; however: since the artificial intelligence model is a nonlinear mapping learned from a large number of labeled data centers, its training process is uncontrollable, so the trained artificial intelligence model is usually a black box structure, which is not interpretable and is not suitable for smart industrial scenarios with high requirements for safety and controllability; the embodiments of the present invention are based on this:
[0148] A data processing method is provided, which can be specifically implemented as an image color adaptation method (suitable for industrial defect detection). This method can obtain the optimal image preprocessing solution based on the performance of subsequent defect detection models to improve the applicability of the defect detection models. At the same time, this solution uses transformation vectors to describe the color space conversion process, which has strong interpretability and is more suitable for scenarios such as industrial defect detection. The color space conversion process of this solution can effectively guide the subsequent image acquisition environment design (corresponding to the above-mentioned image acquisition parameters). For example, in the image-based PCB (printed circuit board) defect detection scenario, parameters such as the PCB background color, the lighting of the shooting environment, and the color temperature can affect the color of the image, thereby reducing the accuracy of the subsequent defect detection algorithm (corresponding to the defect detection model). The application of this solution can avoid this problem to a certain extent. In this solution, the purpose of color change is to make the subsequent defect detection process more accurate. The image color adjustment process and the subsequent defect detection process are an organic whole. The purpose of image color adaptation is to improve the applicability of the defect detection model. If it is detected through training that increasing the color temperature can effectively improve the accuracy of defect detection, then a warm light source can be added to the image acquisition module to further improve the accuracy of defect detection.
[0149] Specifically, the solution provided by the embodiment of the present invention may include the following steps:
[0150] S1. Obtain an existing detection model M (corresponding to the above-mentioned defect detection model), whose input is an image and whose output is the defect detection result (including the above-mentioned detection result). It can be assumed that the input image has a length of W and a width of L, and has three layers: R (red), G (green), and B (blue). Therefore, the input image is represented in matrix form with a size of W × L × 3. The output detection result can be a mask image with a size of W × L, where each pixel has a value of 0 or 1.
[0151] S2. Initialize a color conversion model φ (which can be a neural network model, corresponding to the above-mentioned initial color conversion model), whose input is the original image (corresponding to the above-mentioned first target image), and output is an N-dimensional vector (corresponding to the output information corresponding to the above-mentioned first target image), each dimension of which represents an image color conversion method and its corresponding change variable (i.e., the size of the change amount).
[0152] S3. Obtain a dataset D to be detected, which contains n unlabeled target images (corresponding to the second image to be processed); obtain a labeled dataset D', which contains d labeled target images (corresponding to the first target image).
[0153] S4. Training color conversion model φ: For each image G i∈D′, input the color conversion model φ, obtain the output Oi of the color conversion model φ, and convert the image G i Perform color conversion according to Oi to obtain the converted image G i Corresponding to the above-mentioned use of the initial color conversion model, the first target image is subjected to color conversion to obtain output information corresponding to the first target image; and a second target image is obtained based on the first target image and the output information corresponding to the first target image.
[0154] S5. The converted image G i Input the detection model M and calculate its detection result on the detection model (corresponding to the loss function value). Corresponding to using the defect detection model, perform defect detection on the second target image to obtain the detection result.
[0155] S6. Backpropagate the loss function value obtained in S5 and optimize the color conversion model φ using an optimization algorithm such as gradient descent. Update the initial color conversion model according to the loss function value corresponding to the detection result.
[0156] S7. Randomly select a new target image (i.e., replace the target image) in the dataset D' and input it. Repeat S4-S6 until G i The detection accuracy of the detection model reaches the set threshold θ, or reaches the upper limit of the initially set number of training times. This corresponds to the above "obtaining the target color conversion model".
[0157] S8. Apply the trained color conversion model (corresponding to the target color conversion model) to perform color conversion on the target image in the detection dataset D, and use the processed image for defect detection. Corresponding to the above-described use of the target color conversion model, perform color conversion on a second image to be processed, obtaining output information corresponding to the second image to be processed; obtain a second image to be detected based on the second image to be processed and the output information corresponding to the second image to be processed; and perform defect detection on the second image to be detected.
[0158] In step S2, the output of the color conversion model φ is an N-dimensional vector, which can represent the color conversion method and the size of the change. The relevant content is explained in detail as follows:
[0159] 1. Color space;
[0160] (1) RGB color space;
[0161] The images collected in application scenarios are often in the RGB color space. RGB (red, green, and blue) is a space defined based on the colors recognized by the human eye. It can represent most colors, but it represents hue, brightness, and saturation together, making it difficult to adjust details digitally.
[0162] (2) HSV (or HSB) color space;
[0163] The HSV color space was developed to improve digital color processing. H stands for Hue, S for Saturation, and V for Value (or B for Brightness). Depending on the abbreviation, HSV is sometimes referred to as HSB. The HSV color space allows for fine-tuning of an image's hue, saturation, and value, making it suitable for fine-tuning images.
[0164] (3) HSI (or HSL) color space;
[0165] The HSI color space was also proposed for better digital color processing. H stands for hue, S stands for saturation, and I stands for lightness, luminance, or intensity. Depending on the abbreviation, HSI is sometimes also called HLS or HSL.
[0166] 2.Conversion from RGB to HSV color space;
[0167] The conversion from RGB color space to HSV color space can be calculated using existing software packages such as OpenCV, so I won't go into detail here. After converting an image to HSV color space, you can make detailed adjustments to parameters such as hue and brightness.
[0168] 3. Image color adjustment method;
[0169] In this solution, image color adjustment can be performed based on the N-dimensional vector (image color adjustment vector) output by the color conversion model φ. The meaning of each dimension of the image color adjustment vector can be customized according to requirements. Therefore, different image color adjustment vectors can be designed for different scenarios. However, regardless of the design, the meaning of each dimension of the image color adjustment vector is interpretable, effectively avoiding the uncertainty introduced by the black-box structure of artificial neural networks to the entire detection process. This improves the interpretability of the defect detection process and provides effective guidance for subsequent environmental layout (for example, when acquiring an image, the parameters of the optical image acquisition device or the layout of the peripherals can be changed based on the color conversion method and the amount of change represented in the N-dimensional vector, and then image acquisition is performed for defect detection). This improves the accuracy of defect detection from both the external environment and the detection model.
[0170] It should be noted that this solution can specifically transform the color of an image by training an artificial neural network, and the neural network input of this solution is the target data (corresponding to the target image), and the output is a transformation vector with an interpretable meaning in each dimension. In the subsequent defect detection process, the target image can first be subjected to an interpretable color transformation based on the transformation vector, and then defect detection can be performed on it. This process ensures that the color transformation method of the image is understandable. Therefore, if the transformation applicable to the image obtained through training is to increase the color temperature, increase the brightness, etc., then the processing workload of the subsequent collected images can be reduced by changing the parameters of the optical image acquisition device or the arrangement of the peripherals (such as adding warm light, increasing the brightness of the light source, etc.) (corresponding to the above-mentioned image acquisition parameters), and the accuracy of the detection model can be improved. In addition, in industrial scenarios, due to the high cost and difficulty of obtaining and marking training samples, improving the accuracy of existing detection models by adjusting the external environment (such as the light source) can effectively reduce production costs and improve production efficiency.
[0171] In contrast, when the color transformation process of other current methods is implemented, its input is the target image, and the output is the target image after color transformation. The color transformation process is determined by the parameters of the artificial intelligence model used, and the parameters of the artificial intelligence model do not have an understandable meaning. Specifically, it involves a hidden layer, and the weight corresponding to each node in the hidden layer will affect the color data on each pixel of the input data (image). At the same time, this influence is repeatedly superimposed, that is, each pixel of the output image is obtained by superimposing the corresponding parameters of each pixel of the input image and each node of the hidden layer. Therefore, the current method of color conversion is not interpretable, which is unacceptable in industrial application environments that require higher confidence.
[0172] In this solution, N can be set to 5, that is, a 5-dimensional vector is used to represent the adjustment of the image color. For example, the first dimension represents the color space, 0 is HSV, and 1 is HSI. The second to fourth dimensions represent the adjustment data (corresponding to the above-mentioned change amount) of each parameter (such as at least one of the parameters such as hue, brightness, saturation, and lightness). The fifth dimension represents the influence of the adjustment data on the original data (corresponding to the above-mentioned original amount) (corresponding to the above-mentioned operation method), 0 is addition, and 1 is multiplication. Specific color adjustment examples of image color adjustment vectors are shown in the following table:
[0173] Table 1 Examples of image color adjustment vectors
[0174]
[0175] In step S5, the loss function value may be the cross entropy loss or Dice Coefficient of the difference between the mask output by the detection model and the label mask; the most suitable loss function may be selected according to the actual training situation, and is not limited here.
[0176] Furthermore, this solution can optimize the image color change method according to subsequent detection situations (corresponding to updating the target color conversion model according to the loss function value) to improve the accuracy of subsequent defect detection. For example: when it is suitable for detecting the input image color of the detection model M, the component edges in the detection result are clear; but when it is not suitable for detecting the input image color of the detection model M, the component edges in the detection result are blurred.
[0177] For input image colors that are not suitable for detection model M, the target color conversion model described above can be used for color space adaptation. After color space adaptation, images that were originally unsuitable for the detection model can be converted to appropriate color expressions, making them suitable for the existing detection model M. This avoids the need to retrain the detection model and relabel the data, reducing manpower and material resources while improving production line flexibility. Furthermore, this solution uses transformation vectors (corresponding to the N-dimensional vectors described above) to describe the color space conversion process. This method is highly interpretable and is more suitable for scenarios such as industrial defect detection. The color space conversion process of this solution can effectively guide the design of subsequent image acquisition environments.
[0178] From the above, the embodiment of the present invention specifically provides an image color adaptation method suitable for industrial defect detection, which can obtain the optimal image preprocessing solution based on the performance of the subsequent defect detection model, thereby improving the applicability of the defect detection model. For example, in an image-based PCB defect detection scenario, parameters such as the background color of the PCB, the lighting of the shooting environment, and the color temperature will affect the color of the image, thereby causing the accuracy of the subsequent defect detection algorithm to decrease. This problem can be avoided to a certain extent after processing using this solution. In addition, the purpose of changing the color of the image in this solution is to make the subsequent defect detection process more accurate. The process of image color adjustment and the subsequent defect detection process are an organic whole. The purpose of image color adaptation includes improving the applicability of the defect detection model.
[0179] Specifically, this solution involves: 1) training a color conversion model based on detection results; 2) the output of the color conversion model is an N-dimensional vector representing the color conversion method and the amount of change, and the parameters of the optical acquisition device can be adjusted based on this vector before image acquisition. More specifically, it includes: performing color conversion using the color conversion model, the output of the color conversion model is an N-dimensional vector representing the color conversion method and the amount of change; when acquiring images, the parameters of the optical image acquisition device or the layout of the peripherals are changed based on the color conversion method and the amount of change represented in the N-dimensional vector, and then image acquisition is performed, thereby improving the accuracy of subsequent detection.
[0180] In summary, this solution specifically provides an image color adaptation method (also known as an image color correction method) suitable for industrial defect detection. It can realize adaptive transformation of image color based on reinforcement learning method, reduce the problem of defect detection model inapplicability caused by the color difference between the shooting environment (such as lighting, equipment parameters) and the recognition target, and improve the applicability and robustness of the defect detection model. At the same time, an interpretable color adaptive transformation encoding method is proposed (corresponding to the above-mentioned color conversion model φ output N-dimensional vector, and the meaning of each dimension is interpretable), which can provide effective guidance for subsequent environmental adjustment and data collection.
[0181] The embodiment of the present invention further provides a data processing device, such as Figure 2 Shown, including:
[0182] A first processing module 21 is configured to perform color conversion on at least one reference image using a target color conversion model to obtain output information corresponding to each reference image;
[0183] A first setting module 22 is used to set image acquisition parameters according to the output information corresponding to the reference image;
[0184] A first acquisition module 23 is configured to acquire a first image to be processed under the set image acquisition parameters;
[0185] The output information of the target color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and a corresponding change amount; and N is an integer greater than or equal to 1.
[0186] The data processing device provided by the embodiment of the present invention performs color conversion on at least one reference image by utilizing a target color conversion model to obtain output information corresponding to each reference image; sets image acquisition parameters according to the output information corresponding to the reference image; and acquires a first image to be processed under the set image acquisition parameters; wherein the output information of the target color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and a corresponding change amount; N is an integer greater than or equal to 1; it can make the data processing for color conversion interpretable, and thus can effectively guide the subsequent image acquisition environment design, so that the subsequently acquired images are as suitable as possible for the defect detection model, thereby reducing the processing workload required for the acquired images; it can be applicable to smart industrial scenarios with high requirements for safety and controllability; in addition, this solution is not strongly bound to the application scenario and can be applicable to all application scenarios; it well solves the problem that the data processing solution for color conversion in the existing technology is not interpretable and cannot effectively guide subsequent solutions.
[0187] The step of setting image acquisition parameters according to the output information corresponding to the reference image includes adjusting parameter values corresponding to the image color conversion mode in the image acquisition parameters according to each dimensional vector of the output information corresponding to the reference image.
[0188] Furthermore, the data processing device also includes: a second processing module, which is used to acquire a first image to be processed under the set image acquisition parameters, and then obtain a first image to be detected based on the first image to be processed; and a first detection module, which is used to perform defect detection on the first image to be detected.
[0189] Among them, obtaining the first image to be detected based on the first image to be processed includes: using the first image to be processed as the first image to be detected; or using the target color conversion model to perform color conversion on the first image to be processed to obtain output information corresponding to the first image to be processed; obtaining the first image to be detected based on the first image to be processed and the output information corresponding to the first image to be processed.
[0190] Among them, obtaining the first image to be detected based on the first image to be processed and the output information corresponding to the first image to be processed includes: adjusting the parameter value of the corresponding image color conversion method of the first image to be processed according to each dimensional vector of the output information corresponding to the first image to be processed, so as to obtain the first image to be detected.
[0191] In an embodiment of the present invention, the data processing device further includes: a first acquisition module, used to obtain an initial color conversion model before using the target color conversion model to perform color conversion on at least one reference image to obtain output information corresponding to each reference image; a first training module, used to train the initial color conversion model using at least one labeled first target image to obtain a target color conversion model.
[0192] Wherein, the use of at least one labeled first target image to train the initial color conversion model to obtain a target color conversion model includes: using the initial color conversion model to perform color conversion on the first target image to obtain output information corresponding to the first target image; obtaining a second target image based on the first target image and the output information corresponding to the first target image; performing defect detection on the second target image to obtain a detection result; updating the initial color conversion model based on the loss function value corresponding to the detection result to obtain a target color conversion model; wherein the output information of the initial color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and the corresponding change amount; and N is an integer greater than or equal to 1.
[0193] Furthermore, the data processing device also includes: a third processing module, which is used to train the initial color conversion model using at least one labeled first target image to obtain a target color conversion model, and then use the target color conversion model to perform color conversion on the second image to be processed to obtain output information corresponding to the second image to be processed; a fourth processing module, which is used to obtain a second image to be detected based on the second image to be processed and the output information corresponding to the second image to be processed; and a second detection module, which is used to perform defect detection on the second image to be detected.
[0194] In an embodiment of the present invention, the N-dimensional vector includes at least one of the following: a vector element representing the color space and the corresponding change amount; a vector element representing the hue and the corresponding change amount; a vector element representing the brightness and the corresponding change amount; a vector element representing the saturation and the corresponding change amount; a vector element representing the lightness and the corresponding change amount; and a vector element representing the calculation method of the change amount relative to the original amount.
[0195] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the data processing device and can achieve the same technical effects.
[0196] The embodiment of the present invention also provides a data processing device, such as Figure 3 As shown, it includes: a processor 31;
[0197] The processor 31 is configured to perform color conversion on at least one reference image using a target color conversion model to obtain output information corresponding to each reference image;
[0198] Setting image acquisition parameters according to output information corresponding to the reference image;
[0199] Under the set image acquisition parameters, acquiring a first image to be processed;
[0200] The output information of the target color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and a corresponding change amount; and N is an integer greater than or equal to 1.
[0201] In the embodiment of the present invention, Figure 3 As shown, the data processing device may further include a transceiver 32 for communicating with the processor 31, which is not limited here. Regarding "capturing the first image to be processed under the set image acquisition parameters," this may specifically include: the processor 31 controlling corresponding components (such as a collector) to capture the first image to be processed under the set image acquisition parameters, but is not limited thereto.
[0202] The data processing device provided by the embodiment of the present invention performs color conversion on at least one reference image by utilizing a target color conversion model to obtain output information corresponding to each reference image; sets image acquisition parameters according to the output information corresponding to the reference image; and acquires a first image to be processed under the set image acquisition parameters; wherein the output information of the target color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and a corresponding change amount; N is an integer greater than or equal to 1; it can make the data processing for color conversion interpretable, and thus can effectively guide the subsequent image acquisition environment design, so that the subsequently acquired images are as suitable as possible for the defect detection model, thereby reducing the processing workload required for the acquired images; it can be applicable to smart industrial scenarios with high requirements for safety and controllability; in addition, this solution is not strongly bound to the application scenario and can be applicable to all application scenarios; it well solves the problem that the data processing solution for color conversion in the existing technology is not interpretable and cannot effectively guide subsequent solutions.
[0203] The step of setting image acquisition parameters according to the output information corresponding to the reference image includes adjusting parameter values corresponding to the image color conversion mode in the image acquisition parameters according to each dimensional vector of the output information corresponding to the reference image.
[0204] Furthermore, the processor is further configured to: acquire a first image to be processed under the set image acquisition parameters, and then obtain a first image to be detected based on the first image to be processed; and perform defect detection on the first image to be detected.
[0205] Among them, obtaining the first image to be detected based on the first image to be processed includes: using the first image to be processed as the first image to be detected; or using the target color conversion model to perform color conversion on the first image to be processed to obtain output information corresponding to the first image to be processed; obtaining the first image to be detected based on the first image to be processed and the output information corresponding to the first image to be processed.
[0206] Among them, obtaining the first image to be detected based on the first image to be processed and the output information corresponding to the first image to be processed includes: adjusting the parameter value of the corresponding image color conversion method of the first image to be processed according to each dimensional vector of the output information corresponding to the first image to be processed, so as to obtain the first image to be detected.
[0207] In an embodiment of the present invention, the processor is further used to: obtain an initial color conversion model before using the target color conversion model to perform color conversion on at least one reference image to obtain output information corresponding to each reference image; and train the initial color conversion model using at least one labeled first target image to obtain a target color conversion model.
[0208] Wherein, the use of at least one labeled first target image to train the initial color conversion model to obtain a target color conversion model includes: using the initial color conversion model to perform color conversion on the first target image to obtain output information corresponding to the first target image; obtaining a second target image based on the first target image and the output information corresponding to the first target image; performing defect detection on the second target image to obtain a detection result; updating the initial color conversion model based on the loss function value corresponding to the detection result to obtain a target color conversion model; wherein the output information of the initial color conversion model is an N-dimensional vector, each dimensional vector represents an image color conversion method and the corresponding change amount; and N is an integer greater than or equal to 1.
[0209] Furthermore, the processor is also used to: after training the initial color conversion model using at least one labeled first target image to obtain a target color conversion model, use the target color conversion model to perform color conversion on a second image to be processed to obtain output information corresponding to the second image to be processed; obtain a second image to be detected based on the second image to be processed and the output information corresponding to the second image to be processed; and perform defect detection on the second image to be detected.
[0210] In an embodiment of the present invention, the N-dimensional vector includes at least one of the following: a vector element representing the color space and the corresponding change amount; a vector element representing the hue and the corresponding change amount; a vector element representing the brightness and the corresponding change amount; a vector element representing the saturation and the corresponding change amount; a vector element representing the lightness and the corresponding change amount; and a vector element representing the calculation method of the change amount relative to the original amount.
[0211] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the data processing device and can achieve the same technical effects.
[0212] An embodiment of the present invention further provides a data processing device, comprising a memory, a processor, and a program stored in the memory and executable on the processor; the processor implements the above-mentioned data processing method when executing the program.
[0213] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the data processing device and can achieve the same technical effects.
[0214] An embodiment of the present invention further provides a readable storage medium on which a program is stored. When the program is executed by a processor, the above-mentioned data processing method is implemented.
[0215] Among them, the implementation embodiments of the above-mentioned data processing method are all applicable to the embodiments of the readable storage medium and can achieve the same technical effects.
[0216] It should be noted that many functional components described in this specification are referred to as modules in order to more particularly emphasize the independence of their implementation methods.
[0217] In embodiments of the present invention, modules can be implemented in software so that they can be executed by various types of processors. For example, an identified executable code module can include one or more physical or logical blocks of computer instructions, for example, which can be constructed as objects, procedures, or functions. Nevertheless, the executable code of the identified module does not need to be physically located together, but can include different instructions stored in different locations, which, when logically combined together, constitute the module and achieve the specified purpose of the module.
[0218] In fact, executable code module can be a single instruction or many instructions, and can even be distributed on a plurality of different code segments, distributed in the middle of different programs, and distributed across a plurality of memory devices.Similarly, operating data can be identified in the module, and can be implemented and organized in the data structure of any appropriate type according to any appropriate form.Described operating data can be collected as a single data set, or can be distributed in different locations (including on different storage devices), and can only be present on a system or network as an electronic signal at least in part.
[0219] When a module can be implemented using software, given the current state of hardware technology, those skilled in the art can build corresponding hardware circuits to implement the corresponding functions of the module, regardless of cost. The hardware circuits may include conventional very large scale integration (VLSI) circuits or gate arrays, as well as existing semiconductors such as logic chips and transistors, or other discrete components. Modules may also be implemented using programmable hardware devices, such as field programmable gate arrays, programmable array logic, or programmable logic devices.
[0220] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary personnel in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A data processing method, characterized in that: include: Using a target color conversion model, performing color conversion on at least one reference image to obtain output information corresponding to each of the reference images; Setting image acquisition parameters according to output information corresponding to the reference image; Under the set image acquisition parameters, acquiring a first image to be processed; The output information of the target color conversion model is an N-dimensional vector, each of which represents an image color conversion method and a corresponding change amount; and N is an integer greater than or equal to 1.
2. The data processing method according to claim 1, characterized in that: The step of setting image acquisition parameters according to the output information corresponding to the reference image includes: According to each dimensional vector of the output information corresponding to the reference image, the parameter value of the image acquisition parameter corresponding to the image color conversion method is adjusted.
3. The data processing method according to claim 1, characterized in that: Under the set image acquisition parameters, after acquiring the first image to be processed, the method further includes: Obtaining a first image to be detected according to the first image to be processed; Perform defect detection on the first image to be detected.
4. The data processing method according to claim 3, characterized in that: The step of obtaining a first image to be detected according to the first image to be processed includes: using the first image to be processed as the first image to be detected; or, Using the target color conversion model, performing color conversion on the first image to be processed to obtain output information corresponding to the first image to be processed; A first image to be detected is obtained according to the first image to be processed and the output information corresponding to the first image to be processed.
5. The data processing method according to claim 4, characterized in that: The step of obtaining a first image to be detected according to the first image to be processed and the output information corresponding to the first image to be processed includes: According to each dimensional vector of the output information corresponding to the first image to be processed, the parameter value of the image color conversion method corresponding to the first image to be processed is adjusted to obtain the first image to be detected.
6. The data processing method according to claim 1, characterized in that: Before performing color conversion on at least one reference image using the target color conversion model to obtain output information corresponding to each reference image, the method further includes: Get the initial color conversion model; The initial color conversion model is trained using at least one labeled first target image to obtain a target color conversion model.
7. The data processing method according to claim 6, characterized in that: The method of training the initial color conversion model using at least one labeled first target image to obtain a target color conversion model includes: Using the initial color conversion model, performing color conversion on the first target image to obtain output information corresponding to the first target image; Obtaining a second target image according to the first target image and output information corresponding to the first target image; Performing defect detection on the second target image to obtain a detection result; According to the loss function value corresponding to the detection result, the initial color conversion model is updated to obtain a target color conversion model; The output information of the initial color conversion model is an N-dimensional vector, each of which represents an image color conversion method and a corresponding change amount; and N is an integer greater than or equal to 1.
8. The data processing method according to claim 6, characterized in that: After the initial color conversion model is trained using at least one labeled first target image to obtain a target color conversion model, the method further includes: Using the target color conversion model, performing color conversion on the second image to be processed to obtain output information corresponding to the second image to be processed; Obtaining a second image to be detected according to the second image to be processed and output information corresponding to the second image to be processed; Performing defect detection on the second image to be detected; The second image to be processed is an unlabeled target image.
9. The data processing method according to any one of claims 1 to 8, characterized in that: The N-dimensional vector includes at least one of the following: Vector elements representing color spaces and corresponding changes; Vector elements representing the hue and the corresponding change amount; Vector elements representing brightness and corresponding change amount; Vector elements representing saturation and corresponding change amount; Vector elements representing brightness and corresponding changes; The vector elements representing how the modified amount is calculated relative to the original amount.
10. A data processing device, characterized in that: include: A first processing module, configured to perform color conversion on at least one reference image using a target color conversion model to obtain output information corresponding to each of the reference images; A first setting module, used to set image acquisition parameters according to output information corresponding to the reference image; A first acquisition module, used to acquire a first image to be processed under the set image acquisition parameters; The output information of the target color conversion model is an N-dimensional vector, each of which represents an image color conversion method and a corresponding change amount; and N is an integer greater than or equal to 1.
11. The data processing device according to claim 10, characterized in that: Also includes: A second processing module is used to acquire a first image to be processed under the set image acquisition parameters, and then obtain a first image to be detected according to the first image to be processed; The first detection module is used to perform defect detection on the first image to be detected.
12. The data processing device according to claim 10, characterized in that: Also includes: A first acquisition module is used to acquire an initial color conversion model before performing color conversion on at least one reference image using a target color conversion model to obtain output information corresponding to each of the reference images; The first training module is used to train the initial color conversion model using at least one labeled first target image to obtain a target color conversion model.
13. The data processing device according to claim 12, characterized in that: Also includes: A third processing module is used to train the initial color conversion model using at least one labeled first target image to obtain a target color conversion model, and then use the target color conversion model to perform color conversion on a second image to be processed to obtain output information corresponding to the second image to be processed; a fourth processing module, configured to obtain a second image to be detected according to the second image to be processed and output information corresponding to the second image to be processed; A second detection module, used for performing defect detection on the second image to be detected; The second image to be processed is an unlabeled target image.
14. The data processing device according to any one of claims 10 to 13, characterized in that: The N-dimensional vector includes at least one of the following: Vector elements representing color spaces and corresponding changes; Vector elements representing the hue and the corresponding change amount; Vector elements representing brightness and corresponding change amount; Vector elements representing saturation and corresponding change amount; Vector elements representing brightness and corresponding changes; The vector elements representing how the modified amount is calculated relative to the original amount.
15. A data processing device, characterized in that: include: processor; The processor is used to perform color conversion on at least one reference image using a target color conversion model to obtain output information corresponding to each reference image; Setting image acquisition parameters according to output information corresponding to the reference image; Under the set image acquisition parameters, acquiring a first image to be processed; The output information of the target color conversion model is an N-dimensional vector, each of which represents an image color conversion method and a corresponding change amount; and N is an integer greater than or equal to 1.
16. A data processing device, characterized in that: The method comprises a memory, a processor and a program stored in the memory and executable on the processor; when the processor executes the program, the data processing method according to any one of claims 1 to 9 is implemented.
17. A readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the data processing method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Method for detecting the abnormal colors and the slight recession on the surface of a smooth object
CN106447655A
Mount element detection method based on color image segmentation and gradient projection positioning
CN107945184A
Image processing method and device, and storage medium
CN111079669A
Apple defect detection method and system based on convolutional neural network
CN112001901A
Defect detection method and device, equipment and storage medium
CN112446864A
