CN116797446A - Data processing method, device and equipment - Google Patents

Data processing method, device and equipment Download PDF

Info

Publication number
CN116797446A
CN116797446A CN202210265514.4A CN202210265514A CN116797446A CN 116797446 A CN116797446 A CN 116797446A CN 202210265514 A CN202210265514 A CN 202210265514A CN 116797446 A CN116797446 A CN 116797446A
Authority
CN
China
Prior art keywords
image
color conversion
output information
processed
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210265514.4A
Other languages
Chinese (zh)
Inventor
孔德群
李杨
李小涛
牛亚文
郝镇齐
高滨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
Tsinghua University
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University, China Mobile Communications Group Co Ltd, China Mobile Communications Ltd Research Institute filed Critical Tsinghua University
Priority to CN202210265514.4A priority Critical patent/CN116797446A/en
Publication of CN116797446A publication Critical patent/CN116797446A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a data processing method, a device and equipment, wherein the data processing method comprises the following steps: performing color conversion on at least one reference image by using a target color conversion model to obtain output information corresponding to each reference image; setting image acquisition parameters according to the output information corresponding to the reference image; collecting a first image to be processed under the set image collection parameters; the output information of the target color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1. The scheme well solves the problems that a data processing scheme aiming at color conversion in the prior art has no interpretability and cannot effectively guide a subsequent scheme.

Description

Data processing method, device and equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method, apparatus, and device.
Background
With the development of artificial intelligence related technology, deep neural networks have mature applications in the fields of object recognition, semantic segmentation, natural language processing and the like, and in particular, computer vision technology based on convolutional neural networks has surpassed the recognition capability of human beings in a plurality of scenes in terms of recognition accuracy and reasoning time.
In smart industrial scenarios, computer vision techniques have a rich application, such as: detecting flaws; however, the models for color conversion involved in existing computer vision-based flaw detection schemes are not interpretable.
Specifically, the data processing scheme aiming at color conversion in the prior art has the defects of no interpretability, no effective guidance on the subsequent scheme and the like.
Disclosure of Invention
The invention aims to provide a data processing method, a device and equipment, which are used for solving the problems that a data processing scheme aiming at color conversion in the prior art has no interpretability and cannot effectively guide a subsequent scheme.
In order to solve the above technical problems, an embodiment of the present invention provides a data processing method, including:
performing color conversion on at least one reference image by using a target color conversion model to obtain output information corresponding to each reference image;
setting image acquisition parameters according to the output information corresponding to the reference image;
collecting a first image to be processed under the set image collection parameters;
the output information of the target color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
Optionally, the setting the image acquisition parameters according to the output information corresponding to the reference image includes:
and adjusting parameter values corresponding to image color conversion modes in the image acquisition parameters according to each dimension vector of the output information corresponding to the reference image.
Optionally, after the first image to be processed is acquired under the set image acquisition parameters, the method further includes:
obtaining a first image to be detected according to the first image to be processed;
and performing flaw detection on the first image to be detected.
Optionally, the obtaining a first image to be detected according to the first image to be processed includes:
taking the first image to be processed as a first image to be detected; or alternatively, the process may be performed,
performing color conversion on the first image to be processed by using the target color conversion model to obtain output information corresponding to the first image to be processed;
and 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.
Optionally, the obtaining the first to-be-detected image according to the first to-be-processed image and the output information corresponding to the first to-be-processed image includes:
And adjusting the parameter value of the corresponding image color conversion mode of the first image to be processed according to each dimension vector of the output information corresponding to the first image to be processed, so as to obtain the first image to be detected.
Optionally, before performing color conversion on at least one reference image by using the target color conversion model to obtain output information corresponding to each reference image, the method further includes:
acquiring an initial color conversion model;
and training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model.
Optionally, training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model, including:
performing color conversion on the first target image by using the initial color conversion model 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 flaw detection on the second target image to obtain a detection result;
updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain a target color conversion model;
The output information of the initial color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
Optionally, after training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model, the method further includes:
performing color conversion on a second image to be processed by using the target color conversion model 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;
and performing flaw detection on the second image to be detected.
Optionally, the N-dimensional vector includes at least one of:
vector elements representing color space and corresponding change amounts;
vector elements representing hue and corresponding change amounts;
vector elements representing brightness and corresponding change amounts;
vector elements representing saturation and corresponding change amounts;
vector elements representing lightness and corresponding change amounts;
representing the vector elements of the modified quantity relative to the original quantity operation.
The embodiment of the invention also provides a data processing device, which comprises:
the first processing module is used for carrying out color conversion on at least one reference image by utilizing a target color conversion model to obtain output information corresponding to each reference image;
the first setting module is used for setting image acquisition parameters according to the output information corresponding to the reference image;
the first acquisition module is used for acquiring 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, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
Optionally, the setting the image acquisition parameters according to the output information corresponding to the reference image includes:
and adjusting parameter values corresponding to image color conversion modes in the image acquisition parameters according to each dimension vector of the output information corresponding to the reference image.
Optionally, the method further comprises:
the second processing module is used for acquiring a first image to be processed under the set image acquisition parameters and then obtaining a first image to be detected according to the first image to be processed;
And the first detection module is used for carrying out flaw detection on the first image to be detected.
Optionally, the obtaining a first image to be detected according to the first image to be processed includes:
taking the first image to be processed as a first image to be detected; or alternatively, the process may be performed,
performing color conversion on the first image to be processed by using the target color conversion model to obtain output information corresponding to the first image to be processed;
and 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.
Optionally, the obtaining the first to-be-detected image according to the first to-be-processed image and the output information corresponding to the first to-be-processed image includes:
and adjusting the parameter value of the corresponding image color conversion mode of the first image to be processed according to each dimension vector of the output information corresponding to the first image to be processed, so as to obtain the first image to be detected.
Optionally, the method further comprises:
the first acquisition module is used for acquiring an initial color conversion model before performing color conversion on at least one reference image by utilizing a target color conversion model to obtain output information corresponding to each reference image;
And the first training module is used for training the initial color conversion model by utilizing at least one first target image with a label to obtain a target color conversion model.
Optionally, training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model, including:
performing color conversion on the first target image by using the initial color conversion model 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 flaw detection on the second target image to obtain a detection result;
updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain a target color conversion model;
the output information of the initial color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
Optionally, the method further comprises:
the third processing module is used for training the initial color conversion model by utilizing at least one first target image with a label to obtain a target color conversion model, and then performing color conversion on a second image to be processed by utilizing the target color conversion model to obtain output information corresponding to the second image to be processed;
The fourth processing module is used for 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;
and the second detection module is used for carrying out flaw detection on the second image to be detected.
Optionally, the N-dimensional vector includes at least one of:
vector elements representing color space and corresponding change amounts;
vector elements representing hue and corresponding change amounts;
vector elements representing brightness and corresponding change amounts;
vector elements representing saturation and corresponding change amounts;
vector elements representing lightness and corresponding change amounts;
representing the vector elements of the modified quantity relative to the original quantity operation.
The embodiment of the invention also provides a data processing device, which comprises: a processor;
the processor is used for performing color conversion on at least one reference image by utilizing a target color conversion model to obtain output information corresponding to each reference image;
setting image acquisition parameters according to the output information corresponding to the reference image;
collecting a first image to be processed under the set image collection parameters;
the output information of the target color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
Optionally, the setting the image acquisition parameters according to the output information corresponding to the reference image includes:
and adjusting parameter values corresponding to image color conversion modes in the image acquisition parameters according to each dimension vector of the output information corresponding to the reference image.
Optionally, the processor is further configured to:
acquiring a first image to be processed under the set image acquisition parameters, and obtaining a first image to be detected according to the first image to be processed;
and performing flaw detection on the first image to be detected.
Optionally, the obtaining a first image to be detected according to the first image to be processed includes:
collecting a first image to be processed under the set image collection parameters, and taking the first image to be processed as a first image to be detected; or alternatively, the process may be performed,
after a first image to be processed is acquired under the set image acquisition parameters, performing color conversion on the first image to be processed by using the target color conversion model to obtain output information corresponding to the first image to be processed;
and 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.
Optionally, the obtaining the first to-be-detected image according to the first to-be-processed image and the output information corresponding to the first to-be-processed image includes:
and adjusting the parameter value of the corresponding image color conversion mode of the first image to be processed according to each dimension vector of the output information corresponding to the first image to be processed, so as to obtain the first image to be detected.
Optionally, the processor is further configured to:
before performing color conversion on at least one reference image by utilizing a target color conversion model to obtain output information corresponding to each reference image, acquiring an initial color conversion model;
and training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model.
Optionally, training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model, including:
performing color conversion on the first target image by using the initial color conversion model 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 flaw detection on the second target image to obtain a detection result;
updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain a target color conversion model;
the output information of the initial color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
Optionally, the processor is further configured to:
training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model, and performing color conversion on a second image to be processed by using the target color conversion model 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;
and performing flaw detection on the second image to be detected.
Optionally, the N-dimensional vector includes at least one of:
vector elements representing color space and corresponding change amounts;
vector elements representing hue and corresponding change amounts;
Vector elements representing brightness and corresponding change amounts;
vector elements representing saturation and corresponding change amounts;
vector elements representing lightness and corresponding change amounts;
representing the vector elements of the modified quantity relative to the original quantity operation.
The embodiment of the invention also provides data processing equipment, which comprises a memory, a processor and a program which is stored in the memory and can run on the processor; the processor implements the data processing method described above when executing the program.
The embodiment of the invention also provides a readable storage medium, on which a program is stored, which when executed by a processor, implements the data processing method described above.
The technical scheme of the invention has the following beneficial effects:
in the above scheme, the data processing method performs color conversion on at least one reference image by using a target color conversion model to obtain output information corresponding to each reference image; setting image acquisition parameters according to the output information corresponding to the reference image; collecting a first image to be processed under the set image collection parameters; the output information of the target color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; the N is an integer greater than or equal to 1; the method has the advantages that the data processing aiming at color conversion can be interpretable, the subsequent image acquisition environment design can be effectively guided, the subsequent acquired image is applicable to a flaw detection model as much as possible, and the processing workload required by the acquired image is reduced; the intelligent industrial scene with high requirements on safety and controllability can be applied; in addition, the scheme is not strongly bound with the application scene, and can be applied to all application scenes; the method and the device well solve the problems that a data processing scheme aiming at color conversion in the prior art has no interpretability and cannot effectively guide a subsequent scheme.
Drawings
FIG. 1 is a flow chart of a data processing method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a data processing apparatus according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a data processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages to be solved more apparent, the following detailed description will be given with reference to the accompanying drawings and specific embodiments.
The invention provides a data processing method, as shown in fig. 1, aiming at the problem that a data processing scheme aiming at color conversion in the prior art has no interpretability and cannot effectively guide a subsequent scheme, and the method comprises the following steps:
step 11: performing color conversion on at least one reference image by using a target color conversion model to obtain output information corresponding to each reference image;
step 12: setting image acquisition parameters according to the output information corresponding to the reference image;
step 13: collecting a first image to be processed under the set image collection parameters; the output information of the target color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
Regarding the image acquisition parameters, it may include: collecting parameters of the device and/or arrangement (parameters) of the peripheral devices; the "image color conversion method" may also be referred to as "image color conversion parameter", and is not limited herein.
According to the data processing method provided by the embodiment of the invention, the color conversion is carried out on at least one reference image by utilizing the target color conversion model, so that the output information corresponding to each reference image is obtained; setting image acquisition parameters according to the output information corresponding to the reference image; collecting a first image to be processed under the set image collection parameters; the output information of the target color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; the N is an integer greater than or equal to 1; the method has the advantages that the data processing aiming at color conversion can be interpretable, the subsequent image acquisition environment design can be effectively guided, the subsequent acquired image is applicable to a flaw detection model as much as possible, and the processing workload required by the acquired image is reduced; the intelligent industrial scene with high requirements on safety and controllability can be applied; in addition, the scheme is not strongly bound with the application scene, and can be applied to all application scenes; the method and the device well solve the problems that a data processing scheme aiming at color conversion in the prior art has no interpretability and cannot effectively guide a subsequent scheme.
Wherein, setting image acquisition parameters according to the output information corresponding to the reference image includes: and adjusting parameter values corresponding to image color conversion modes in the image acquisition parameters according to each dimension vector of the output information corresponding to the reference image.
Further, under the set image acquisition parameters, after the first image to be processed is acquired, the method further comprises: obtaining a first image to be detected according to the first image to be processed; and performing flaw detection on the first image to be detected.
Thus, flaw detection with higher accuracy can be realized. Further, after performing flaw detection on the first image to be detected, the method may further include: updating the target color conversion model according to a loss function value corresponding to a detected result (also called a detection result); thereby further improving the accuracy of the model.
Wherein, according to the first image to be processed, a first image to be detected is obtained, including: taking the first image to be processed as a first image to be detected; or performing color conversion on the first image to be processed by using the target color conversion model to obtain output information corresponding to the first image to be processed; and 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.
Thus, the first image to be detected can be obtained more accurately and rapidly.
The obtaining a first to-be-detected image according to the first to-be-processed image and the output information corresponding to the first to-be-processed image includes: and adjusting the parameter value of the corresponding image color conversion mode of the first image to be processed according to each dimension vector of the output information corresponding to the first image to be processed, so as to obtain the first image to be detected.
Therefore, the first image to be detected can be accurately obtained, so that detection can be carried out by using the adjusted image in the follow-up process, and the detection accuracy is improved.
In the embodiment of the present invention, before performing color conversion on at least one reference image by using a target color conversion model to obtain output information corresponding to each reference image, the method further includes: acquiring an initial color conversion model; and training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model.
In this way, the target color conversion model can be accurately obtained.
The training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model comprises the following steps: performing color conversion on the first target image by using the initial color conversion model 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 flaw detection on the second target image to obtain a detection result; updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain a target color conversion model; the output information of the initial color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
The "obtaining the second target image according to the first target image and the output information corresponding to the first target image" may include: and adjusting the first target image according to the output information corresponding to the first target image to obtain a second target image (for example, more specifically, according to each dimension vector of the output information corresponding to the first target image, adjusting a parameter value of a corresponding image color conversion mode of the first target image to obtain the second target image), but the method is not limited thereto. The updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain a target color conversion model may include: obtaining a loss function value corresponding to the detection result according to the detection result and the corresponding label; and updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain a target color conversion model, but the method is not limited to the method.
In addition, the updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain the target color conversion model may include: and updating the initial color conversion model according to the loss function value corresponding to the detection result until the accuracy of the (model for flaw detection) reaches a threshold value or the upper limit of updating times is reached, and taking the color conversion model obtained by updating the initial color conversion model last time as a target color conversion model, but not limited to the target color conversion model.
In addition, the updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain the target color conversion model may include: and (3) back-propagating the loss function value corresponding to the detection result, and updating (optimizing) the initial color conversion model to obtain a target color conversion model, but the method is not limited to the method.
Further, after training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model, the method further includes: performing color conversion on a second image to be processed by using the target color conversion model 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; and performing flaw detection on the second image to be detected.
Thus, the detection accuracy of flaw detection can be improved by using the target color conversion model. The "obtaining the second image to be detected according to the second image to be processed and the output information corresponding to the second image to be processed" may include: and adjusting the second to-be-processed image according to the output information corresponding to the second to-be-processed image to obtain a second to-be-detected image (for example, more specifically, adjusting the parameter value of the corresponding image color conversion mode of the second to-be-processed image according to each dimension vector of the output information corresponding to the second to-be-processed image to obtain the second to-be-detected image), but the method is not limited thereto.
In an embodiment of the present invention, the N-dimensional vector includes at least one of: vector elements representing color space and corresponding change amounts; vector elements representing hue and corresponding change amounts; vector elements representing brightness and corresponding change amounts; vector elements representing saturation and corresponding change amounts; vector elements representing lightness and corresponding change amounts; representing the vector elements of the modified quantity relative to the original quantity operation.
The "N-dimensional vector" herein may be the output information of the target color conversion model or the output information of the initial color conversion model, which is not limited herein. With respect to "change amount", it may also be referred to as "adjustment data"; with respect to the "raw amount", it may also be referred to as "raw data", but is not limited thereto. Regarding "vector elements representing color space and corresponding change amounts", for example, a change amount of 0 corresponds to HSV (hue, saturation, brightness) color space, and a change amount of 1 corresponds to HIS (hue, saturation, brightness) color space; regarding "vector elements representing the manner of operation of the change amount with respect to the original amount", for example: a change of 0 corresponds to an addition of the operation modes, and a change of 1 corresponds to a multiplication of the operation modes.
In this description, the defect detection described above may be implemented by using a defect detection model, but is not limited thereto.
The following illustrates the data processing method provided in the embodiment of the present invention.
Aiming at the technical problems, and specifically considering: the existing flaw detection scheme based on computer vision generally needs to acquire a detection target, and then a machine learning model is applied to reasoning images to obtain a flaw detection result; the process can cause inapplicability of the flaw detection model due to the difference of the colors of the identification targets generated by shooting environments (such as illumination and equipment parameters) in the actual production environment; in this regard, a color conversion scheme is provided that is solved using an artificial intelligence model; but: because the artificial intelligent model is a nonlinear mapping obtained by learning from a large number of marked data centers, the training process is uncontrollable, and therefore, the artificial intelligent model obtained by training is usually of a black box structure, has no interpretability and is not suitable for intelligent industrial scenes with high requirements on safety and controllability; the embodiment of the invention is based on the following:
the data processing method can be specifically realized as an image color self-adaptive method (suitable for industrial flaw detection), and an optimal image preprocessing scheme can be obtained aiming at the performance of a follow-up flaw detection model so as to improve the application range of the flaw detection model; meanwhile, the method uses a vector transformation mode to describe the color space conversion process, has extremely strong interpretability, is more suitable for scenes such as industrial flaw detection, and can effectively guide the subsequent image acquisition environment design (corresponding to the image acquisition parameters). For example, in a scene of detecting defects of a PCB (printed circuit board) based on an image, parameters such as a background color of the PCB, illumination of a photographing environment, color temperature, etc. affect the color of the image, so that the accuracy of a subsequent defect detection algorithm (corresponding to a defect detection model) is reduced, and this problem can be avoided to a certain extent by applying the scheme. In this scheme, carry out the purpose that colour variation makes follow-up flaw detection process more accurate, and image colour adjustment's process and follow-up flaw detection process are an organic whole, and the purpose of image colour self-adaptation is the suitability that promotes flaw detection model, if detect through training that increase colour temperature can effectively improve flaw detection rate of accuracy, then follow-up can increase warm light source in image acquisition module to further promote flaw detection rate of accuracy.
Specifically, the scheme provided by the embodiment of the invention can comprise the following steps:
s1, an existing detection model M (corresponding to the flaw detection model) is obtained, the input of the existing detection model M is a picture, and the output of the existing detection model M is a flaw detection result (including the detection result). Here, it can be assumed that the input picture has a length W, a width L, and three layers of R (red), G (green), and B (blue), and thus is represented in a matrix form, and the input picture has a size w×l×3. The output detection result may be a mask picture, the size is w×l, and the value on each pixel is 0 or 1.
S2, initializing a color conversion model phi (which can be a neural network model and corresponds to the initial color conversion model), inputting an original image (corresponding to the first target image), outputting an N-dimensional vector (corresponding to output information corresponding to the first target image), wherein each dimension of the N-dimensional vector represents an image color conversion mode and a corresponding change variable (namely, the magnitude of the change quantity).
S3, acquiring a data set D to be detected, wherein the data set D to be detected comprises n unlabeled target pictures (corresponding to the second image to be processed); a marked dataset D' is acquired containing D tagged target pictures (corresponding to the first target image described above).
S4, training a color conversion model phi: for each image G i E, D', inputting a color conversion model phi, obtaining output Oi of the color conversion model phi, and inputting an image G i Performing color conversion according to Oi to obtain converted colorImage G i '. Performing color conversion on the first target image by using the initial color conversion model correspondingly to obtain output information corresponding to the first target image; and obtaining a second target image according to the first target image and output information corresponding to the first target image.
S5, converting the converted image G i ' input detection model M, calculate its detection result (corresponding to the loss function value) on the detection model. And performing flaw detection on the second target image by using the flaw detection model to obtain a detection result.
S6, back-propagating the loss function value obtained in the step S5, and optimizing the color conversion model phi by using an optimization algorithm such as gradient descent. And updating the initial color conversion model corresponding to the loss function value corresponding to the detection result.
S7, randomly selecting a new target picture (namely, replacing the target picture) from the data set D' for input, and repeating S4-S6 until G is reached i The' detection accuracy on the detection model reaches a set threshold value theta or reaches an initial set training frequency upper limit. Corresponding to the "get target color conversion model" described above.
S8, performing color conversion on the target picture in the data set D to be detected by applying a trained color conversion model (corresponding to the target color conversion model), and performing flaw detection on the processed picture. Performing color conversion on a second image to be processed by using the target color conversion model correspondingly 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; and performing flaw detection on the second image to be detected.
In step S2, the output of the color conversion model Φ is an N-dimensional vector, which can represent the color conversion mode and the change amount, and the following is specifically explained:
1. a color space;
(1) An RGB color space;
the image collected in the application scene is often in an RGB color space, RGB (red, green and blue) is a space defined according to colors recognized by human eyes, and can represent most colors, but the three quantities of hue, brightness and saturation are put together to represent, and details are difficult to digitally adjust.
(2) HSV (or HSB) color space;
HSV color space is proposed for better digitizing the colors. H is Hue (Hue), S is Saturation (Saturation), V represents Brightness (Value), or B represents Brightness (Brightness)). HSV is sometimes also referred to as HSB, according to abbreviations. In the HSV color space, the hue, saturation, and brightness of an image can be refined, respectively, for scenes where fine-tuning of the image is appropriate.
(3) HSI (or HSL) color space;
the HSI color space is also proposed for better digitizing the colors. H is hue, S is saturation, and I is brightness (Lightness, luminance or Intensity). HSI is sometimes also referred to as HLS or HSL, depending on the abbreviation.
Conversion of RGB to HSV color space;
the conversion from RGB color space to HSV color space may be performed by using an existing software package such as opencv, and will not be described herein. After the image is converted into the HSV color space, the parameters such as hue, brightness and the like of the image can be subjected to detail adjustment.
3. An image color adjustment mode;
in this scheme, the color adjustment of the image can be performed based on an N-dimensional vector (image color adjustment vector) output from the color conversion model Φ. The meaning of the image color adjustment vector in each dimension can be formulated according to the requirements, so that different image color adjustment vectors can be designed according to different scenes, but the meaning of the image color adjustment vector in each dimension is interpretable regardless of the design, so that uncertainty of a black box structure of an artificial neural network to the whole detection flow is effectively avoided, the interpretability of the flaw detection flow is improved, effective guidance can be carried out on arrangement of subsequent environments (for example, when an image is acquired, the arrangement of parameters or peripherals of an optical image acquisition device is changed according to the color conversion mode and the change amount represented in an N-dimensional vector, and then image acquisition is carried out for flaw detection), and the accuracy of flaw detection is improved from two aspects of an external environment and a detection model.
It should be noted that, the scheme may specifically be that an artificial neural network is trained to perform color transformation on an image, and the neural network of the scheme inputs target data (corresponding to a target picture) and outputs a transformation vector that can be interpreted for each dimension meaning. In the subsequent flaw detection process, the target picture can be subjected to interpretable color conversion by means of the conversion vector, and then flaw detection is performed. This procedure ensures that the color conversion of the image is understandable, so if the conversion applied to the image is obtained through training to increase the color temperature, increase the brightness, etc., the processing workload of the subsequently acquired picture can be reduced and the accuracy of the detection model can be improved subsequently by changing the parameters of the optical image acquisition device or the arrangement of peripheral devices (such as increasing the warm light, increasing the brightness of the light source, etc.), which corresponds to the above-mentioned image acquisition parameters. In addition, in an industrial scene, the problems of high cost and great difficulty exist in the acquisition and marking of training samples, and the production cost can be effectively reduced and the production efficiency can be improved by adjusting the accuracy of the existing detection model through the external environment (such as a light source).
On the other hand, when the color conversion process of the other conventional method is implemented, the input is a target image and the output is a target image after the color conversion. The color transformation process is determined by the parameters of the artificial intelligence model used, which do not have an understandable meaning. In particular, the hidden layer is involved, and the weight corresponding to each node in the hidden layer affects the color data on each pixel of the input data (image), and at the same time, the effect is repeatedly overlapped, that is, each pixel of the output image is obtained by overlapping each pixel of the input image and the corresponding parameter of each node of the hidden layer, so that the current color conversion method has no interpretation, which is not acceptable in an industrial application environment requiring higher confidence.
In this scheme, N can be made equal to 5, i.e., the adjustment of the image color is represented using a 5-dimensional vector, such as: the first dimension represents the color space, 0 is HSV, and 1 is HSI. The 2 nd to 4 th dimensions represent adjustment data (corresponding to the change amount) at each parameter (at least one of parameters such as hue, brightness, saturation, brightness, etc.), the 5 th dimension represents the influence manner (corresponding to the operation manner) of the adjustment data on the original data (corresponding to the original amount), 0 is addition, and 1 is multiplication. Specific color adjustment examples of the image color adjustment vector are as follows:
table 1 image color adjustment vector example
In step S5, the loss function value may be a cross entropy loss or a Dice Coefficient for detecting a difference between the mask and the label mask output by the model; the most suitable loss function may be specifically selected according to the actual training situation, which is not limited herein.
Furthermore, the image color change mode (corresponding to updating the target color conversion model according to the loss function value) can be optimized according to the subsequent detection condition, so as to improve the accuracy of the subsequent flaw detection, specifically for example: the method is suitable for detecting the color of an input picture of the model M, and the obtained detection result is clear in the edge of the part; but is not suitable for detecting the color of the input picture of the model M, and the edge of the part in the detection result obtained by the method is blurred.
For the input picture color which is not suitable for the detection model M, the target color conversion model can be utilized for color space self-adaption; through color space self-adaptation, the image which is not suitable for the detection model originally can be converted into a proper color expression, so that the image is suitable for the existing detection model M, retraining of the detection model and re-marking of data are avoided, and the flexibility level of the production line is improved while the consumption of manpower and material resources is reduced. Meanwhile, the method adopts a vector transformation mode (corresponding to the N-dimensional vector) to describe the conversion process of the color space, has extremely strong interpretability, is more suitable for scenes such as industrial flaw detection, and can effectively guide the subsequent image acquisition environment design.
Therefore, the embodiment of the invention particularly provides an image color self-adaption method suitable for industrial flaw detection, which can acquire an optimal image preprocessing scheme aiming at the performance of a follow-up flaw detection model, thereby improving the application range of the flaw detection model. For example, in the image-based PCB flaw detection scene, parameters such as the ground color of the PCB, illumination of a shooting environment, color temperature and the like can influence the color of the image, so that the accuracy of a subsequent flaw detection algorithm is reduced, and the problem can be avoided to a certain extent after the processing of the scheme is adopted. In addition, the purpose of carrying out color change on the image in the scheme is to enable the follow-up flaw detection process to be more accurate, the image color adjustment process and the follow-up flaw detection process are an organic whole, and the purpose of image color self-adaption comprises improving the applicability of a flaw detection model.
Specifically, the scheme relates to: 1) Training a color conversion model by combining the detection result; 2) The output of the color conversion model is an N-dimensional vector, the color conversion mode and the change amount are represented, and the parameters of the optical acquisition equipment can be adjusted according to the vector to acquire the image. More specifically, it includes: performing color conversion through a color conversion model, wherein the output of the color conversion model is an N-dimensional vector, and the color conversion mode and the change amount are represented; when an image is acquired, changing the parameters of the optical image acquisition equipment or the arrangement of peripheral equipment according to the color conversion mode and the change amount represented in the N-dimensional vector, and then acquiring the image; thereby improving the accuracy of subsequent detection.
In summary, the present solution specifically provides an image color adaptive method (may also be referred to as an image color correction method) suitable for industrial flaw detection, which may implement adaptive transformation of image colors based on reinforcement learning methods, reduce the inapplicable problem of a flaw detection model caused by (a) color differences of a shooting environment (such as illumination and equipment parameters) and an identification target, improve applicability and robustness of the flaw detection model, and simultaneously provide an interpretable color adaptive transformation coding method (corresponding to the color conversion model phi, outputting an N-dimensional vector, and meaning of each dimension is interpretable), which may effectively guide subsequent environmental adjustment and data acquisition.
The embodiment of the invention also provides a data processing device, as shown in fig. 2, including:
a first processing module 21, configured to perform color conversion on at least one reference image by using a target color conversion model, so as to obtain output information corresponding to each reference image;
a first setting module 22, configured to set an image acquisition parameter according to output information corresponding to the reference image;
a first acquisition module 23, configured 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, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
The data processing device provided by the embodiment of the 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; setting image acquisition parameters according to the output information corresponding to the reference image; collecting a first image to be processed under the set image collection parameters; the output information of the target color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; the N is an integer greater than or equal to 1; the method has the advantages that the data processing aiming at color conversion can be interpretable, the subsequent image acquisition environment design can be effectively guided, the subsequent acquired image is applicable to a flaw detection model as much as possible, and the processing workload required by the acquired image is reduced; the intelligent industrial scene with high requirements on safety and controllability can be applied; in addition, the scheme is not strongly bound with the application scene, and can be applied to all application scenes; the method and the device well solve the problems that a data processing scheme aiming at color conversion in the prior art has no interpretability and cannot effectively guide a subsequent scheme.
Wherein, setting image acquisition parameters according to the output information corresponding to the reference image includes: and adjusting parameter values corresponding to image color conversion modes in the image acquisition parameters according to each dimension vector of the output information corresponding to the reference image.
Further, the data processing device further includes: the second processing module is used for acquiring a first image to be processed under the set image acquisition parameters and then obtaining a first image to be detected according to the first image to be processed; and the first detection module is used for carrying out flaw detection on the first image to be detected.
Wherein, according to the first image to be processed, a first image to be detected is obtained, including: taking the first image to be processed as a first image to be detected; or performing color conversion on the first image to be processed by using the target color conversion model to obtain output information corresponding to the first image to be processed; and 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.
The obtaining a first to-be-detected image according to the first to-be-processed image and the output information corresponding to the first to-be-processed image includes: and adjusting the parameter value of the corresponding image color conversion mode of the first image to be processed according to each dimension vector of the output information corresponding to the first image to be processed, so as to obtain the first image to be detected.
In an embodiment of the present invention, the data processing apparatus further includes: the first acquisition module is used for acquiring an initial color conversion model before performing color conversion on at least one reference image by utilizing a target color conversion model to obtain output information corresponding to each reference image; and the first training module is used for training the initial color conversion model by utilizing at least one first target image with a label to obtain a target color conversion model.
The training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model comprises the following steps: performing color conversion on the first target image by using the initial color conversion model 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 flaw detection on the second target image to obtain a detection result; updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain a target color conversion model; the output information of the initial color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
Further, the data processing device further includes: the third processing module is used for training the initial color conversion model by utilizing at least one first target image with a label to obtain a target color conversion model, and then performing color conversion on a second image to be processed by utilizing the target color conversion model to obtain output information corresponding to the second image to be processed; the fourth processing module is used for 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; and the second detection module is used for carrying out flaw detection on the second image to be detected.
In an embodiment of the present invention, the N-dimensional vector includes at least one of: vector elements representing color space and corresponding change amounts; vector elements representing hue and corresponding change amounts; vector elements representing brightness and corresponding change amounts; vector elements representing saturation and corresponding change amounts; vector elements representing lightness and corresponding change amounts; representing the vector elements of the modified quantity relative to the original quantity operation.
The implementation embodiments of the data processing method are applicable to the embodiments of the data processing device, and the same technical effects can be achieved.
The embodiment of the invention also provides a data processing device, as shown in fig. 3, including: a processor 31;
the processor 31 is configured to perform color conversion on at least one reference image by using a target color conversion model, so as to obtain output information corresponding to each reference image;
setting image acquisition parameters according to the output information corresponding to the reference image;
collecting a first image to be processed under the set image collection parameters;
the output information of the target color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
In an embodiment of the present invention, as shown in fig. 3, the data processing apparatus may further include a transceiver 32 in communication with the processor 31, which is not limited herein. The "acquiring the first image to be processed under the set image acquisition parameters" may specifically include: the processor 31 controls the corresponding components (such as the collector) to collect the first image to be processed under the set image collection parameters, but not limited to this.
The data processing equipment provided by the embodiment of the 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; setting image acquisition parameters according to the output information corresponding to the reference image; collecting a first image to be processed under the set image collection parameters; the output information of the target color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; the N is an integer greater than or equal to 1; the method has the advantages that the data processing aiming at color conversion can be interpretable, the subsequent image acquisition environment design can be effectively guided, the subsequent acquired image is applicable to a flaw detection model as much as possible, and the processing workload required by the acquired image is reduced; the intelligent industrial scene with high requirements on safety and controllability can be applied; in addition, the scheme is not strongly bound with the application scene, and can be applied to all application scenes; the method and the device well solve the problems that a data processing scheme aiming at color conversion in the prior art has no interpretability and cannot effectively guide a subsequent scheme.
Wherein, setting image acquisition parameters according to the output information corresponding to the reference image includes: and adjusting parameter values corresponding to image color conversion modes in the image acquisition parameters according to each dimension vector of the output information corresponding to the reference image.
Further, the processor is further configured to: acquiring a first image to be processed under the set image acquisition parameters, and obtaining a first image to be detected according to the first image to be processed; and performing flaw detection on the first image to be detected.
Wherein, according to the first image to be processed, a first image to be detected is obtained, including: taking the first image to be processed as a first image to be detected; or performing color conversion on the first image to be processed by using the target color conversion model to obtain output information corresponding to the first image to be processed; and 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.
The obtaining a first to-be-detected image according to the first to-be-processed image and the output information corresponding to the first to-be-processed image includes: and adjusting the parameter value of the corresponding image color conversion mode of the first image to be processed according to each dimension vector of the output information corresponding to the first image to be processed, so as to obtain the first image to be detected.
In an embodiment of the present invention, the processor is further configured to: before performing color conversion on at least one reference image by utilizing a target color conversion model to obtain output information corresponding to each reference image, acquiring an initial color conversion model; and training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model.
The training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model comprises the following steps: performing color conversion on the first target image by using the initial color conversion model 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 flaw detection on the second target image to obtain a detection result; updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain a target color conversion model; the output information of the initial color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
Further, the processor is further configured to: training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model, and performing color conversion on a second image to be processed by using the target color conversion model 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; and performing flaw detection on the second image to be detected.
In an embodiment of the present invention, the N-dimensional vector includes at least one of: vector elements representing color space and corresponding change amounts; vector elements representing hue and corresponding change amounts; vector elements representing brightness and corresponding change amounts; vector elements representing saturation and corresponding change amounts; vector elements representing lightness and corresponding change amounts; representing the vector elements of the modified quantity relative to the original quantity operation.
The implementation embodiments of the data processing method are applicable to the embodiments of the data processing device, and the same technical effects can be achieved.
The embodiment of the invention also provides data processing equipment, which comprises a memory, a processor and a program which is stored in the memory and can run on the processor; the processor implements the data processing method described above when executing the program.
The implementation embodiments of the data processing method are applicable to the embodiments of the data processing device, and the same technical effects can be achieved.
The embodiment of the invention also provides a readable storage medium, on which a program is stored, which when executed by a processor, implements the data processing method described above.
The implementation embodiments of the data processing method are applicable to the embodiment of the readable storage medium, and the same technical effects can be achieved.
It should be noted that many of the functional components described in this specification have been referred to as modules, in order to more particularly emphasize their implementation independence.
In an embodiment of the invention, the modules may be implemented in software for execution by various types of processors. An identified module of executable code may, for instance, comprise one or more physical or logical blocks of computer instructions which may, for instance, be organized as an object, procedure, or function. Nevertheless, the executables of an identified module need not be physically located together, but may comprise disparate instructions stored in different bits which, when joined logically together, comprise the module and achieve the stated purpose for the module.
Indeed, a module of executable code may be a single instruction, or many instructions, and may even be distributed over several different code segments, among different programs, and across several memory devices. Likewise, operational data may be identified within modules and may be embodied in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed over different locations including over different storage devices.
Where a module may be implemented in software, taking into account the level of existing hardware technology, a module may be implemented in software, and one skilled in the art may, without regard to cost, build corresponding hardware circuitry, including conventional Very Large Scale Integration (VLSI) circuits or gate arrays, and existing semiconductors such as logic chips, transistors, or other discrete components, to achieve the corresponding functions. A module may also be implemented in programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices or the like.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that various modifications and changes can be made without departing from the principles of the present invention, and such modifications and changes should also be considered as being within the scope of the present invention.

Claims (17)

1. A method of data processing, comprising:
performing color conversion on at least one reference image by using a target color conversion model to obtain output information corresponding to each reference image;
setting image acquisition parameters according to the output information corresponding to the reference image;
collecting a first image to be processed under the set image collection parameters;
the output information of the target color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
2. The method according to claim 1, wherein setting the image acquisition parameters according to the output information corresponding to the reference image comprises:
and adjusting parameter values corresponding to image color conversion modes in the image acquisition parameters according to each dimension vector of the output information corresponding to the reference image.
3. The data processing method according to claim 1, wherein after the first image to be processed is acquired under the set image acquisition parameters, further comprising:
obtaining a first image to be detected according to the first image to be processed;
and performing flaw detection on the first image to be detected.
4. A data processing method according to claim 3, wherein said obtaining a first image to be detected from said first image to be processed comprises:
taking the first image to be processed as a first image to be detected; or alternatively, the process may be performed,
performing color conversion on the first image to be processed by using the target color conversion model to obtain output information corresponding to the first image to be processed;
and 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.
5. The method according to claim 4, wherein obtaining the first to-be-detected image according to the first to-be-processed image and the output information corresponding to the first to-be-processed image includes:
and adjusting the parameter value of the corresponding image color conversion mode of the first image to be processed according to each dimension vector of the output information corresponding to the first image to be processed, so as to obtain the first image to be detected.
6. The data processing method according to claim 1, wherein 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, further comprising:
acquiring an initial color conversion model;
and training the initial color conversion model by using at least one first target image with a label to obtain a target color conversion model.
7. The method of claim 6, wherein training the initial color conversion model using at least one tagged first target image to obtain a target color conversion model, comprises:
performing color conversion on the first target image by using the initial color conversion model 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 flaw detection on the second target image to obtain a detection result;
updating the initial color conversion model according to the loss function value corresponding to the detection result to obtain a target color conversion model;
The output information of the initial color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
8. The data processing method of claim 6, further comprising, after training the initial color conversion model with at least one tagged first target image to obtain a target color conversion model:
performing color conversion on a second image to be processed by using the target color conversion model 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;
and performing flaw detection on the second image to be detected.
9. The data processing method according to any one of claims 1 to 8, wherein the N-dimensional vector includes at least one of:
vector elements representing color space and corresponding change amounts;
vector elements representing hue and corresponding change amounts;
vector elements representing brightness and corresponding change amounts;
vector elements representing saturation and corresponding change amounts;
Vector elements representing lightness and corresponding change amounts;
representing the vector elements of the modified quantity relative to the original quantity operation.
10. A data processing apparatus, comprising:
the first processing module is used for carrying out color conversion on at least one reference image by utilizing a target color conversion model to obtain output information corresponding to each reference image;
the first setting module is used for setting image acquisition parameters according to the output information corresponding to the reference image;
the first acquisition module is used for acquiring 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, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
11. The data processing apparatus of claim 10, further comprising:
the second processing module is used for acquiring a first image to be processed under the set image acquisition parameters and then obtaining a first image to be detected according to the first image to be processed;
and the first detection module is used for carrying out flaw detection on the first image to be detected.
12. The data processing apparatus of claim 10, further comprising:
the first acquisition module is used for acquiring an initial color conversion model before performing color conversion on at least one reference image by utilizing a target color conversion model to obtain output information corresponding to each reference image;
and the first training module is used for training the initial color conversion model by utilizing at least one first target image with a label to obtain a target color conversion model.
13. The data processing apparatus of claim 12, further comprising:
the third processing module is used for training the initial color conversion model by utilizing at least one first target image with a label to obtain a target color conversion model, and then performing color conversion on a second image to be processed by utilizing the target color conversion model to obtain output information corresponding to the second image to be processed;
the fourth processing module is used for 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;
and the second detection module is used for carrying out flaw detection on the second image to be detected.
14. The data processing apparatus according to any one of claims 10 to 13, wherein the N-dimensional vector comprises at least one of:
vector elements representing color space and corresponding change amounts;
vector elements representing hue and corresponding change amounts;
vector elements representing brightness and corresponding change amounts;
vector elements representing saturation and corresponding change amounts;
vector elements representing lightness and corresponding change amounts;
representing the vector elements of the modified quantity relative to the original quantity operation.
15. A data processing apparatus, comprising: a processor;
the processor is used for performing color conversion on at least one reference image by utilizing a target color conversion model to obtain output information corresponding to each reference image;
setting image acquisition parameters according to the output information corresponding to the reference image;
collecting a first image to be processed under the set image collection parameters;
the output information of the target color conversion model is an N-dimensional vector, and each dimension vector represents an image color conversion mode and a corresponding change amount; and N is an integer greater than or equal to 1.
16. A data processing apparatus comprising a memory, a processor and a program stored on the memory and executable on the processor; the processor, when executing the program, implements the data processing method according to any one of claims 1 to 9.
17. A readable storage medium having stored thereon a program, which when executed by a processor implements a data processing method according to any of claims 1 to 9.
CN202210265514.4A 2022-03-17 2022-03-17 Data processing method, device and equipment Pending CN116797446A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210265514.4A CN116797446A (en) 2022-03-17 2022-03-17 Data processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210265514.4A CN116797446A (en) 2022-03-17 2022-03-17 Data processing method, device and equipment

Publications (1)

Publication Number Publication Date
CN116797446A true CN116797446A (en) 2023-09-22

Family

ID=88040483

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210265514.4A Pending CN116797446A (en) 2022-03-17 2022-03-17 Data processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN116797446A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1996041299A1 (en) * 1995-06-07 1996-12-19 Pressco Technology, Inc. Inspection system for exterior article surfaces
US20060197848A1 (en) * 2005-02-18 2006-09-07 Canon Kabushiki Kaisha Image recording apparatus and method
CN106447655A (en) * 2016-09-20 2017-02-22 上海极清慧视科技有限公司 Method for detecting the abnormal colors and the slight recession on the surface of a smooth object
CN107945184A (en) * 2017-11-21 2018-04-20 安徽工业大学 A kind of mount components detection method positioned based on color images and gradient projection
CN112001901A (en) * 2020-08-18 2020-11-27 济南大学 Apple defect detection method and system based on convolutional neural network
CN112446864A (en) * 2020-11-25 2021-03-05 创新奇智(合肥)科技有限公司 Flaw detection method, flaw detection device, flaw detection equipment and storage medium
CN113781318A (en) * 2021-08-02 2021-12-10 中国科学院深圳先进技术研究院 Image color mapping method and device, terminal equipment and storage medium
CN113870371A (en) * 2021-12-03 2021-12-31 浙江霖研精密科技有限公司 Picture color transformation device and method based on generation countermeasure network and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1996041299A1 (en) * 1995-06-07 1996-12-19 Pressco Technology, Inc. Inspection system for exterior article surfaces
US20060197848A1 (en) * 2005-02-18 2006-09-07 Canon Kabushiki Kaisha Image recording apparatus and method
CN106447655A (en) * 2016-09-20 2017-02-22 上海极清慧视科技有限公司 Method for detecting the abnormal colors and the slight recession on the surface of a smooth object
CN107945184A (en) * 2017-11-21 2018-04-20 安徽工业大学 A kind of mount components detection method positioned based on color images and gradient projection
CN112001901A (en) * 2020-08-18 2020-11-27 济南大学 Apple defect detection method and system based on convolutional neural network
CN112446864A (en) * 2020-11-25 2021-03-05 创新奇智(合肥)科技有限公司 Flaw detection method, flaw detection device, flaw detection equipment and storage medium
CN113781318A (en) * 2021-08-02 2021-12-10 中国科学院深圳先进技术研究院 Image color mapping method and device, terminal equipment and storage medium
CN113870371A (en) * 2021-12-03 2021-12-31 浙江霖研精密科技有限公司 Picture color transformation device and method based on generation countermeasure network and storage medium

Non-Patent Citations (11)

* Cited by examiner, † Cited by third party
Title
"【从零学习OpenCV 4】颜色模型与转换", pages 1 - 5, Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/101388046> *
H. WANG ET AL.: "A Simple Guidance Template-Based Defect Detection Method for Strip Steel Surfaces", 《IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS》, vol. 15, no. 5, 31 May 2019 (2019-05-31), pages 2798 - 2809, XP011722995, DOI: 10.1109/TII.2018.2887145 *
MOHAMMAD H. KARIMI ET AL.: "Surface defect detection in tiling Industries using digital image processing methods: Analysis and evaluation", 《ISA TRANSACTIONS》, vol. 53, no. 3, 31 May 2014 (2014-05-31), pages 834 - 844 *
冯太锐等: "基于深度学习的化妆品塑料瓶缺陷检测", 《东华大学学报(自然科学版)》, no. 02, 31 December 2020 (2020-12-31), pages 98 - 103 *
宋晓丽: "基于全画面的彩色印刷品质量检测系统研究", 《中国优秀硕士学位论文全文数据库工程科技Ⅰ辑》, no. 2, 15 February 2018 (2018-02-15), pages 024 - 815 *
於文欣: "基于机器视觉的FPC表面缺陷检测研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 5, 31 May 2017 (2017-05-31), pages 138 - 1104 *
汤锋等: "基于显著性检测和超像素分割的本色织物疵点检测系统", 《轻工机械》, vol. 39, no. 6, 31 December 2021 (2021-12-31), pages 65 - 69 *
马杰: "面向自动化生产与检测的三芯电源线机器视觉识别技术研究", 《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》, no. 2, 15 February 2020 (2020-02-15), pages 042 - 185 *
黄张祥等: "基于SoC软硬件协同设计的布匹瑕疵检测", 《光学技术》, no. 01, 15 January 2017 (2017-01-15), pages 53 - 58 *
黄艳: "基于机器视觉的马口铁金属罐盖缺陷检测研究", 《长春师范大学学报》, vol. 39, no. 4, 31 December 2020 (2020-12-31), pages 67 - 70 *
龚中良等: "基于机器视觉的柑橘表面缺陷检测", 《江苏农业科学》, no. 07, 7 May 2019 (2019-05-07), pages 244 - 247 *

Similar Documents

Publication Publication Date Title
CN106971152B (en) Method for detecting bird nest in power transmission line based on aerial images
CN111695633B (en) Low-illumination target detection method based on RPF-CAM
CN109753878B (en) Imaging identification method and system under severe weather
CN112116620B (en) Indoor image semantic segmentation and coating display method
WO2019011342A1 (en) Cloth identification method and device, electronic device and storage medium
AU2017443986B2 (en) Color adaptation using adversarial training networks
CN109389607A (en) Ship Target dividing method, system and medium based on full convolutional neural networks
CN115526803A (en) Non-uniform illumination image enhancement method, system, storage medium and device
CN115588237A (en) Three-dimensional hand posture estimation method based on monocular RGB image
Borbon et al. Coral health identification using image classification and convolutional neural networks
CN112489049A (en) Mature tomato fruit segmentation method and system based on superpixels and SVM
CN112991329A (en) Image shadow detection and elimination method based on GAN
CN116797446A (en) Data processing method, device and equipment
WO2022183321A1 (en) Image detection method, apparatus, and electronic device
CN111476731B (en) Image correction method, device, storage medium and electronic equipment
CN114708434A (en) Cross-domain remote sensing image semantic segmentation method based on adaptation and self-training in iterative domain
CN113052176A (en) Character recognition model training method, device and system
Yuzuguzel Learning colour constancy using convolutional neural networks
Kuo et al. Chroma Component Generation of Gray Images Using Multi-Scale Convolutional Neural Network
Fang et al. Low Light Image Enhancement for Color Images Combined with Sky Region Segmentation
Du et al. In color constancy: data mattered more than network
CN115409890B (en) Self-defined mark detection method and system based on MSR and generalized Hough transform
CN117726627B (en) Chip surface defect detection method and equipment
Melcherson Image Augmentation to Create Lower Quality Images for Training a YOLOv4 Object Detection Model
CN111461996B (en) Quick intelligent color matching method for image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination