Artificial intelligence image processing method and system

By constructing an artificial intelligence image processing method and system, using the generative adversarial network to synthesize new image data and convolutional neural network for model training, the problem of limited generalization ability and overfitting caused by insufficient training data in the existing technology is solved, and efficient and accurate image processing and automatic brightness adjustment are achieved.

CN119559431AInactive Publication Date: 2025-03-04ZHEJIANG FINANCIAL COLLEGE

Patent Information

Application Number
CN202411610395.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-04
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When the training data of existing artificial intelligence-based image processing systems are insufficient, the model generalization ability is limited, which may lead to overfitting and affect the accuracy and efficiency of the analysis results of the image processing system.

Method used

Through the steps of data screening, data augmentation and synthesis, brightness level division and label mapping, model construction and training, brightness level mapping and linear equation establishment, and brightness adjustment application, an artificial intelligence image processing method and system are constructed. The method includes synthesis of new image data using a generative adversarial network, increasing the diversity and scale of the data, and performing model training and brightness adjustment through a convolutional neural network.

Benefits of technology

It significantly improves the model's ability to generalize unknown data, avoids overfitting, enhances the accuracy and efficiency of the analysis results of the image processing system, and realizes automatic brightness adjustment, improving image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559431A_ABST
    Figure CN119559431A_ABST
Patent Text Reader

Abstract

The invention relates to an artificial intelligence image processing method. The method comprises the following steps: S1, data reading: reading historical image data and a to-be-processed image from a storage medium; s2, data screening: according to statistical analysis of historical image data, determining an image feature needing to be screened as a first image feature, obtaining an interval corresponding to the first image feature, if a first feature value of the preprocessed to-be-processed image data accords with the interval, carrying out screening, and otherwise, transmitting to the next step; s3, data enhancement and synthesis: performing data enhancement operation on the remaining images, and synthesizing new image data by using a generative adversarial network; and S4, brightness level division and label mapping: converting the color image into a gray level image, calculating an average gray level value of the gray level image, and dividing the image into low brightness, medium brightness and high brightness levels according to comparison between the gray level value of each pixel point and the average gray level value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an artificial intelligence image processing method and system. Background Art

[0002] With the continuous advancement of computer science and technology, image processing technology has gradually matured and has been widely used in many fields, such as visual inspection, medical image processing, machine vision, etc. Some image processing systems and algorithms based on artificial intelligence technology have also gradually received widespread attention and research, such as image recognition, target detection, classification and other technologies. The application of these technologies is becoming more and more extensive, bringing great convenience to people's production and life.

[0003] After searching, Chinese patent number CN116664431B discloses an image processing system and method based on artificial intelligence, which relates to the field of image processing technology and aims to solve some problems existing in traditional image processing methods, which are specifically manifested in that some images with low image quality after processing are not screened out during the image processing process, affecting the accuracy and efficiency of the analysis results of the image processing system; it is also manifested in that in terms of brightness adjustment, parameters need to be adjusted manually, and the brightness cannot be automatically adjusted according to historical image data or the reference data for adjusting the brightness is too single, and the problem of not being able to achieve the desired effect is that the system includes a data input module, a preprocessing module, a neural network training module, a brightness adjustment module and an image output module; the output end of the data input module is connected to the input end of the preprocessing module; the output end of the preprocessing module is connected to the input end of the neural network training module; the output end of the neural network training module is connected to the input end of the brightness adjustment module; the output end of the brightness adjustment module is connected to the input end of the image output module.

[0004] Compared with the prior art, this invention patent with Chinese patent number CN116664431B obtains the characteristics of the image to be screened out through historical data. Screening can be performed by capturing the characteristics, thereby improving the accuracy and efficiency of the analysis results of the image processing system, and being able to adjust the brightness of the image according to the brightness level of the image to improve the quality of the image.

[0005] However, during the use of the above patent, when the training data is insufficient, the model may only be able to learn limited data features, resulting in limited generalization ability, and the model may not perform well on unknown data. In addition, insufficient data may also cause overfitting of the model, that is, it performs well on training data but has poor generalization ability on test data.

[0006] Therefore, it is particularly important to propose an artificial intelligence image processing method and system. Summary of the invention

[0007] The purpose of the present invention is to provide an artificial intelligence image processing method and system to accurately simulate physical equipment and production processes, helping enterprises to conduct experiments and tests in a virtual environment.

[0008] In order to achieve the above object, the present invention adopts the following technical solutions:

[0009] An artificial intelligence image processing method comprises the following steps:

[0010] S1: Data reading: reading historical image data and images to be processed from storage media (such as databases, file systems);

[0011] S2: Data screening: According to the statistical analysis of historical image data, the image feature to be screened out is determined as the first image feature, and the interval corresponding to the first image feature (i.e., the minimum and maximum values ​​of the feature value) is obtained. If the first feature value of the pre-processed image data to be processed meets the above interval, it is screened out, otherwise, it is transmitted to the next step;

[0012] S3: Data enhancement and synthesis: Perform conventional data enhancement operations such as cropping, rotating, and scaling on the remaining images, and use generative adversarial networks (GANs) to synthesize new image data to increase the diversity and scale of the data;

[0013] S4: Brightness level division and label mapping: Convert the color image to a grayscale image, calculate the average grayscale value of the grayscale image, and divide the image into low brightness, medium brightness, and high brightness levels according to the comparison between the grayscale value of each pixel and the average grayscale value, and map them to the corresponding labels (0, 1, 2);

[0014] S5: Model construction and training: Select convolutional neural network as the basic architecture, input the historical image data with marked brightness levels into the neural network model for model training;

[0015] S6: Brightness level mapping and linear equation establishment: Use the trained model to predict the brightness level of the image to be processed, and calculate the slope k and intercept b based on the matching data of the old brightness value and the new brightness value of the corresponding brightness level in the historical image data;

[0016] S7: brightness adjustment application: for the pre-processed image to be processed, according to the predicted brightness level and the corresponding linear equation, a new brightness value of each pixel is calculated, and the new brightness value is applied to the image to achieve brightness adjustment;

[0017] S8: Result output: The image after brightness adjustment is output to a designated location or display interface for user viewing or further processing.

[0018] The above technical solution further includes:

[0019] Furthermore, in S3, the specific steps of synthesizing new image data using a generative adversarial network (GAN) are:

[0020] Data preparation:

[0021] Data collection: receiving filtered image data, enhanced image data, and historical image data;

[0022] Data preprocessing: Perform necessary preprocessing on the collected image data, such as normalization, denoising, and resizing, to ensure the consistency and applicability of the data;

[0023] Define the GAN network structure:

[0024] Generator: Responsible for generating new data samples similar to real data. During the training process, the goal of the generator is to generate data that is as real as possible to deceive the discriminator.

[0025] Input: Random noise vector z, used to introduce randomness so that each generated data sample is different and usually follows a certain distribution (such as Gaussian distribution);

[0026] Output: Synthesized image data G(z), generated through a series of nonlinear transformations (such as convolutional layers, activation layers, etc.);

[0027] Discriminator: Responsible for distinguishing whether the input data is real data or fake data generated by the generator. During the training process, the goal of the discriminator is to distinguish between real data and generated data as accurately as possible;

[0028] Input: real image data x or image data G(z) generated by the generator;

[0029] Output: A probability value D(x), indicating the probability that the input image is a real image;

[0030] Define the loss function:

[0031] The training goal of the generative adversarial network is to minimize the loss of the generator while maximizing the loss of the discriminator, which is expressed by the following formula:

[0032]

[0033] Among them, Pdata(x) is the distribution of real data, p z (z) is the distribution of noise, D(x) is the judgment of the discriminator on the real image x, and D(G(z)) is the judgment of the discriminator on the generated image G(z);

[0034] Training process:

[0035] Initialization: Randomly initialize the parameters of the generator and discriminator;

[0036] Iterative training:

[0037] Training the discriminator: fix the parameters of the generator and update the parameters of the discriminator by optimizing the loss function of the discriminator. Specifically, use the real image and the generated image as input, calculate the output of the discriminator for them respectively, and perform back propagation according to the loss function (such as binary cross entropy loss) to update the parameters of the discriminator.

[0038] Training the generator: fix the parameters of the discriminator, and update the parameters of the generator by optimizing the loss function of the generator (related to the discriminator's judgment on the generated image). Specifically, use random noise as input to generate images, and calculate the loss based on the discriminator's judgment on the generated images, perform back propagation, and update the parameters of the generator;

[0039] Repeated iteration: Repeat the above iterative training until the preset number of training rounds is reached or other stopping conditions are met (such as loss function convergence);

[0040] Synthetic image data:

[0041] Use the trained generator, input the random noise vector z, and generate new image data G(z);

[0042] Image data merging:

[0043] The synthesized image data G(z) is merged with other image data (such as real image data, other generated image data, etc.) to form the final image data.

[0044] Furthermore, in S5, a convolutional neural network is selected as the basic architecture, and the historical image data with marked brightness levels is input into the neural network model for model training, including the following steps:

[0045] initialization:

[0046] Build a model: Build a defined neural network model architecture, including the number of layers, the number of neurons in each layer, activation functions, etc.

[0047] Initialization parameters: The model's weights and biases are initialized to small random numbers based on a Gaussian distribution;

[0048] Set the optimizer: Select the Adam optimizer, which combines the advantages of RMSprop and Momentum to automatically adjust the learning rate;

[0049] Training loop:

[0050] Iterate training data: Divide the training data set into batches, each batch contains a fixed number of samples, and for each batch, perform the following steps:

[0051] Forward propagation: Calculate the predicted output for each sample, y pred =f(X,θ), where X is the input data, θ is the model parameters (weights and biases), f is the model function, and y pred is the predicted output;

[0052] Calculate loss: Use loss functions (such as cross entropy loss, mean square error, etc.) to calculate the error between the predicted output and the true label. Where N is the number of samples in the batch and l is the loss function;

[0053] Back propagation: Calculate the gradient of the loss function with respect to the model parameters through the chain rule, Among them, θ L is a vector containing the loss function L for all parameters θ i The partial derivative of

[0054] Update parameters: Use Adam optimizer to update model parameters according to gradient, θ new =θ old -α·AdamUpdate(▽ θ L), where α is the learning rate and AdamUpdate is the update rule of the Adam optimizer;

[0055] Apply early stopping:

[0056] Monitor validation set performance: At the end of each epoch (or after a certain number of iterations), use the validation dataset to evaluate the performance of the model.

[0057] Check performance improvement: If the verification performance (such as accuracy and loss value) of the current epoch fails to improve within the predetermined patience period, stop training.

[0058] Save the best model: During the training process, retain the model parameters that perform best on the validation set;

[0059] Output:

[0060] The final output is the model that performs best on the validation set, including its parameters and architecture.

[0061] Furthermore, in the update parameters, the update rule of the Adam optimizer is:

[0062] Adam uses two exponential moving averages (EMAs) to estimate the mean and uncentered variance of the gradient, and then updates the parameters based on these estimates:

[0063] m t =β1m t-1 +(1-β1)g t ;

[0064]

[0065] Among them, g t is the current gradient, β1 and β2 are the decay rates;

[0066] The adjusted update rule is:

[0067]

[0068] in, and is m t and t is a bias-corrected version of , where ψ is a small constant that prevents division by zero.

[0069] A system used in an artificial intelligence image processing method, comprising:

[0070] Data processing module: responsible for reading historical image data and images to be processed from the database or file system and pre-processing them;

[0071] Model training module: responsible for training the neural network model;

[0072] Brightness adjustment module: responsible for applying brightness adjustment linear equation to the pre-processed image to achieve brightness adjustment;

[0073] Output module: responsible for outputting the brightness-adjusted image to a specified location or display interface;

[0074] The data processing module passes the image data after preprocessing (including screening, enhancement, synthesis, etc.) to the model training module, and the model training module receives the image data after preprocessing (including screening, enhancement, synthesis, etc.) as a training set for training the neural network model. After the model training module completes the training, the trained neural network model and the brightness level mapping table are passed to the brightness adjustment module, and the brightness adjustment module uses the trained neural network model and the brightness level mapping table to predict and adjust the brightness level of the preprocessed image to be processed, and the brightness adjustment module passes the image data after brightness adjustment to the output module.

[0075] The above technical solution further includes:

[0076] Furthermore, the data processing module includes a data reading unit, an image screening unit, a data enhancement unit and a data synthesis unit. The data reading unit is responsible for reading historical image data and images to be processed from a database or a file system. The image screening unit is responsible for determining image features that need to be screened out based on historical data analysis, and screening out images that meet these features. The data enhancement unit is responsible for performing conventional data enhancement operations such as cropping, rotating, and scaling on the screened images to increase the diversity and scale of the data. The data synthesis unit synthesizes new image data using a generative adversarial network (GAN) to further increase the diversity and scale of the data. The data reading unit reads the image data and passes it to the image screening unit for preliminary screening. The image screening unit passes images that do not meet the screening conditions (i.e., the remaining images) to the data enhancement unit. The data enhancement unit passes the enhanced image data to the data synthesis unit. The data synthesis unit receives historical image data, screened image data, or enhanced image data (or a combination thereof) as input for generative adversarial network training to generate new image data. The data synthesis unit merges the synthesized image data with the existing image data and passes them to the model training module and the brightness adjustment module.

[0077] Furthermore, the model training module includes a neural network model construction unit, a data preparation unit and a model training unit. The neural network model construction unit is responsible for selecting a convolutional neural network as the basic architecture and applying regularization technology to prevent overfitting. The data preparation unit is responsible for receiving the preprocessed historical image data, dividing the image into levels according to the brightness value, and mapping them to corresponding labels, and dividing the data set into a training set, a validation set and a test set. The model training unit is responsible for training the neural network model using the training data set, adjusting the model parameters through the optimization algorithm, and at the same time, applying the early stopping method to monitor the model performance on the validation set. If the performance no longer improves, the training is stopped in advance. Although the data The preparation unit does not interact directly with the neural network model building unit, but the dataset it prepares is one of the important inputs that the neural network model building unit relies on when designing the model (although this dependence may be implicit in the model building stage). The data preparation unit passes the labeled training dataset and verification dataset to the model training unit, and the neural network model building unit passes the constructed neural network model to the model training unit. Within the model training unit, the training process is performed iteratively, and each iteration uses a part of the data in the training dataset to update the parameters of the model. At the same time, the verification dataset is used to monitor the performance of the model on unseen data in order to apply the early stopping method.

[0078] Further, the brightness adjustment module includes a brightness level prediction unit, a brightness adjustment strategy unit and a brightness adjustment execution unit. The brightness level prediction unit is responsible for using a trained neural network model to predict the brightness level of the image to be processed. The brightness adjustment strategy unit is responsible for defining three brightness levels of low, medium and high and their corresponding brightness value ranges, and establishing a linear equation for each brightness level so as to map the old brightness value to the new brightness value. The brightness adjustment execution unit is responsible for applying brightness adjustment to the preprocessed image to be processed according to the predicted brightness level and the linear equation or mapping table provided by the brightness adjustment strategy unit. The brightness level prediction unit receives the preprocessed image data to be processed and outputs the predicted brightness level. The prediction The brightness level is then passed to the brightness adjustment execution unit to adjust the brightness of the image as the basis for brightness adjustment. Although the brightness adjustment strategy unit does not directly receive external input (except for possible initialization settings), it defines the brightness adjustment strategy (i.e., the brightness level and the corresponding brightness value range and linear equation), which are referenced by the brightness adjustment execution unit when needed. It should be noted that the brightness adjustment strategy unit is usually set when the module is initialized and remains unchanged throughout the brightness adjustment process (unless there is an explicit reconfiguration requirement). Therefore, there may be no direct and dynamic data interaction between it and other units. The brightness adjustment execution unit passes the brightness-adjusted image data to the output module.

[0079] The present invention has the following beneficial effects:

[0080] 1. In the present invention, by using a generative adversarial network to synthesize new image data, the diversity and scale of training data are significantly increased. This helps the model learn richer feature representations and improves the model's generalization ability for unknown data.

[0081] 2. In the present invention, the early stopping method is used to monitor the performance of the model on the validation set to ensure that the model stops training at the optimal state, thus avoiding unnecessary training time and resource consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 A method step diagram of an artificial intelligence image processing method and system proposed by the present invention;

[0083] Figure 2 This is a system block diagram of an artificial intelligence image processing method and system proposed by the present invention. DETAILED DESCRIPTION

[0084] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0085] See also Figure 1 As shown, the present invention is an artificial intelligence image processing method, comprising the following steps:

[0086] S1: Data reading: reading historical image data and images to be processed from storage media (such as databases, file systems);

[0087] S2: Data screening: According to the statistical analysis of historical image data, the image feature to be screened out is determined as the first image feature, and the interval corresponding to the first image feature (i.e., the minimum and maximum values ​​of the feature value) is obtained. If the first feature value of the pre-processed image data to be processed meets the above interval, it is screened out, otherwise, it is transmitted to the next step;

[0088] S3: Data enhancement and synthesis: Perform conventional data enhancement operations such as cropping, rotating, and scaling on the remaining images, and use generative adversarial networks (GANs) to synthesize new image data to increase the diversity and scale of the data;

[0089] S4: Brightness level division and label mapping: Convert the color image to a grayscale image, calculate the average grayscale value of the grayscale image, and divide the image into low brightness, medium brightness, and high brightness levels according to the comparison between the grayscale value of each pixel and the average grayscale value, and map them to the corresponding labels (0, 1, 2);

[0090] S5: Model construction and training: Select convolutional neural network as the basic architecture, input the historical image data with marked brightness levels into the neural network model for model training;

[0091] S6: Brightness level mapping and linear equation establishment: Use the trained model to predict the brightness level of the image to be processed, and calculate the slope k and intercept b based on the matching data of the old brightness value and the new brightness value of the corresponding brightness level in the historical image data;

[0092] S7: brightness adjustment application: for the pre-processed image to be processed, according to the predicted brightness level and the corresponding linear equation, a new brightness value of each pixel is calculated, and the new brightness value is applied to the image to achieve brightness adjustment;

[0093] S8: Result output: The image after brightness adjustment is output to a designated location or display interface for user viewing or further processing.

[0094] In one embodiment, for the above S3, in S3, the specific steps of synthesizing new image data using a generative adversarial network (GAN) are:

[0095] Data preparation:

[0096] Data collection: receiving filtered image data, enhanced image data, and historical image data;

[0097] Data preprocessing: Perform necessary preprocessing on the collected image data, such as normalization, denoising, and resizing, to ensure the consistency and applicability of the data;

[0098] Define the GAN network structure:

[0099] Generator: Responsible for generating new data samples similar to real data. During the training process, the goal of the generator is to generate data that is as real as possible to deceive the discriminator.

[0100] Input: Random noise vector z, used to introduce randomness so that each generated data sample is different and usually follows a certain distribution (such as Gaussian distribution);

[0101] Output: Synthesized image data G(z), generated through a series of nonlinear transformations (such as convolutional layers, activation layers, etc.);

[0102] Discriminator: Responsible for distinguishing whether the input data is real data or fake data generated by the generator. During the training process, the goal of the discriminator is to distinguish between real data and generated data as accurately as possible;

[0103] Input: real image data x or image data G(z) generated by the generator;

[0104] Output: A probability value D(x), indicating the probability that the input image is a real image;

[0105] Define the loss function:

[0106] The training goal of the generative adversarial network is to minimize the loss of the generator while maximizing the loss of the discriminator, which is expressed by the following formula:

[0107]

[0108] Among them, Pdata(x) is the distribution of real data, p z (z) is the distribution of noise, D(x) is the judgment of the discriminator on the real image x, and D(G(z)) is the judgment of the discriminator on the generated image G(z);

[0109] Training process:

[0110] Initialization: Randomly initialize the parameters of the generator and discriminator;

[0111] Iterative training:

[0112] Training the discriminator: fix the parameters of the generator and update the parameters of the discriminator by optimizing the loss function of the discriminator. Specifically, use the real image and the generated image as input, calculate the output of the discriminator for them respectively, and perform back propagation according to the loss function (such as binary cross entropy loss) to update the parameters of the discriminator.

[0113] Training the generator: fix the parameters of the discriminator, and update the parameters of the generator by optimizing the loss function of the generator (related to the discriminator's judgment on the generated image). Specifically, use random noise as input to generate images, and calculate the loss based on the discriminator's judgment on the generated images, perform back propagation, and update the parameters of the generator;

[0114] Repeated iteration: Repeat the above iterative training until the preset number of training rounds is reached or other stopping conditions are met (such as loss function convergence);

[0115] Synthetic image data:

[0116] Use the trained generator, input the random noise vector z, and generate new image data G(z);

[0117] Image data merging:

[0118] The synthesized image data G(z) is merged with other image data (such as real image data, other generated image data, etc.) to form the final image data.

[0119] In one embodiment, for the above S5, in S5, a convolutional neural network is selected as the basic architecture, and historical image data with marked brightness levels are input into the neural network model for model training, including the following steps:

[0120] initialization:

[0121] Build a model: Build a defined neural network model architecture, including the number of layers, the number of neurons in each layer, activation functions, etc.

[0122] Initialization parameters: The model's weights and biases are initialized to small random numbers based on a Gaussian distribution;

[0123] Set the optimizer: Select the Adam optimizer, which combines the advantages of RMSprop and Momentum to automatically adjust the learning rate;

[0124] Training loop:

[0125] Iterate training data: Divide the training data set into batches, each batch contains a fixed number of samples, and for each batch, perform the following steps:

[0126] Forward propagation: Calculate the predicted output for each sample, y pred =f(X,θ), where X is the input data, θ is the model parameters (weights and biases), f is the model function, and y pre d is the predicted output;

[0127] Calculate loss: Use loss functions (such as cross entropy loss, mean square error, etc.) to calculate the error between the predicted output and the true label. Where N is the number of samples in the batch and l is the loss function;

[0128] Back propagation: Calculate the gradient of the loss function with respect to the model parameters through the chain rule, Among them, θ L is a vector containing the loss function L for all parameters θ i The partial derivative of

[0129] Update parameters: Use Adam optimizer to update model parameters according to gradient, θ new =θ old -α·AdamUpdate(▽ θ L), where α is the learning rate and AdamUpdate is the update rule of the Adam optimizer;

[0130] Apply early stopping:

[0131] Monitor validation set performance: At the end of each epoch (or after a certain number of iterations), use the validation dataset to evaluate the performance of the model.

[0132] Check performance improvement: If the verification performance (such as accuracy and loss value) of the current epoch fails to improve within the predetermined patience period, stop training.

[0133] Save the best model: During the training process, retain the model parameters that perform best on the validation set;

[0134] Output:

[0135] The final output is the model that performs best on the validation set, including its parameters and architecture.

[0136] In one embodiment, for the above update parameters, in the update parameters, the update rule of the Adam optimizer is:

[0137] Adam uses two exponential moving averages (EMAs) to estimate the mean and uncentered variance of the gradient, and then updates the parameters based on these estimates:

[0138] m t =β1m t-1 +(1-β1)g t ;

[0139]

[0140] Among them, g t is the current gradient, β1 and β2 are the decay rates;

[0141] The adjusted update rule is:

[0142]

[0143] in, and is m t and t is a bias-corrected version of , where ψ is a small constant that prevents division by zero.

[0144] See also Figure 2 As shown, a system used in an artificial intelligence image processing method includes:

[0145] Data processing module: responsible for reading historical image data and images to be processed from the database or file system and pre-processing them;

[0146] Model training module: responsible for training the neural network model;

[0147] Brightness adjustment module: responsible for applying brightness adjustment linear equation to the pre-processed image to achieve brightness adjustment;

[0148] Output module: responsible for outputting the brightness-adjusted image to a specified location or display interface;

[0149] The data processing module passes the image data after preprocessing (including screening, enhancement, synthesis, etc.) to the model training module. The model training module receives the image data after preprocessing (including screening, enhancement, synthesis, etc.) as a training set for training the neural network model. After the model training module completes the training, it passes the trained neural network model and the brightness level mapping table to the brightness adjustment module. The brightness adjustment module uses the trained neural network model and the brightness level mapping table to predict and adjust the brightness level of the preprocessed image to be processed. The brightness adjustment module passes the image data after brightness adjustment to the output module.

[0150] In one embodiment, for the above-mentioned data processing module, the data processing module includes a data reading unit, an image screening unit, a data enhancement unit and a data synthesis unit. The data reading unit is responsible for reading historical image data and images to be processed from a database or a file system. The image screening unit is responsible for determining the image features that need to be screened out based on historical data analysis, and screening out images that meet these features. The data enhancement unit is responsible for performing conventional data enhancement operations such as cropping, rotating, and scaling on the screened images to increase the diversity and scale of the data. The data synthesis unit synthesizes new image data using a generative adversarial network (GAN) to further increase the diversity and scale of the data. The data reading unit reads the image data and passes it to the image screening unit for preliminary screening. The image screening unit passes the images that do not meet the screening conditions (i.e., the remaining images) to the data enhancement unit. The data enhancement unit passes the enhanced image data to the data synthesis unit. The data synthesis unit receives the historical image data, the screened image data, or the enhanced image data (or a combination thereof) as input for generative adversarial network training to generate new image data. The data synthesis unit merges the synthesized image data with the existing image data and passes them to the model training module and the brightness adjustment module.

[0151] In one embodiment, for the above-mentioned model training module, the model training module includes a neural network model construction unit, a data preparation unit and a model training unit. The neural network model construction unit is responsible for selecting a convolutional neural network as the basic architecture and applying regularization technology to prevent overfitting. The data preparation unit is responsible for receiving the pre-processed historical image data, dividing the image into levels according to the brightness value, and mapping them to corresponding labels, and dividing the data set into a training set, a validation set and a test set. The model training unit is responsible for training the neural network model using the training data set, adjusting the model parameters through the optimization algorithm, and at the same time, applying the early stopping method to monitor the model performance on the validation set, and stopping the training in advance if the performance no longer improves. Although the data preparation unit does not directly interact with the neural network model building unit, the dataset it prepares is one of the important inputs that the neural network model building unit relies on when designing the model (although this dependence may be implicit in the model building stage). The data preparation unit passes the labeled training dataset and validation dataset to the model training unit. The neural network model building unit passes the constructed neural network model to the model training unit. Within the model training unit, the training process is carried out iteratively. Each iteration uses a part of the data in the training dataset to update the parameters of the model. At the same time, the validation dataset is used to monitor the performance of the model on unseen data in order to apply the early stopping method.

[0152] In one embodiment, for the above-mentioned brightness adjustment module, the brightness adjustment module includes a brightness level prediction unit, a brightness adjustment strategy unit and a brightness adjustment execution unit. The brightness level prediction unit is responsible for using the trained neural network model to predict the brightness level of the image to be processed. The brightness adjustment strategy unit is responsible for defining three brightness levels of low, medium and high and their corresponding brightness value ranges, and establishing a linear equation for each brightness level so as to map the old brightness value to the new brightness value. The brightness adjustment execution unit is responsible for applying brightness adjustment to the preprocessed image to be processed according to the predicted brightness level and the linear equation or mapping table provided by the brightness adjustment strategy unit. The brightness level prediction unit receives the preprocessed image data to be processed and outputs the predicted brightness level. ,The predicted brightness level is then passed to the brightness adjustment execution unit to adjust the brightness of the image, as the basis for brightness adjustment.,Although the brightness adjustment strategy unit does not directly receive external input (except for possible initialization settings), it defines the strategy for brightness adjustment (i.e., the brightness level and the corresponding brightness value range and linear equation), which are referenced by the brightness adjustment execution unit when needed.,It should be noted that the brightness adjustment strategy unit is usually set during module initialization and remains unchanged throughout the brightness adjustment process (unless there is an explicit reconfiguration requirement).,Therefore, there may be no direct and dynamic data interaction between it and other units.,The brightness adjustment execution unit passes the brightness adjusted image data to the output module.

[0153] The working principle of the system used in the artificial intelligence image processing method proposed in the present invention is: reading historical image data and images to be processed from a storage medium, determining the image features to be screened out as the first image features based on statistical analysis of the historical image data, obtaining the interval corresponding to the first image features (i.e., the minimum and maximum values ​​of the feature values), and if the first feature value of the pre-processed image data to be processed meets the above interval, then screening is performed; otherwise, the image data is transferred to the next step, and conventional data enhancement operations such as cropping, rotating, and scaling are performed on the remaining images, and new image data is synthesized using a generative adversarial network to increase the diversity and scale of the data;

[0154] Convert the color image to a grayscale image, calculate the average grayscale value of the grayscale image, and divide the image into low brightness, medium brightness, and high brightness levels according to the comparison between the grayscale value of each pixel and the average grayscale value, and map them to corresponding labels (0, 1, 2). Select the convolutional neural network as the basic architecture, input the historical image data with marked brightness levels into the neural network model for model training, use the trained model to predict the brightness level of the image to be processed, and calculate the slope k and intercept b according to the matching data of the old brightness value and the new brightness value of the corresponding brightness level in the historical image data;

[0155] For the preprocessed image to be processed, the new brightness value of each pixel is calculated according to the predicted brightness level and the corresponding linear equation, and the new brightness value is applied to the image to achieve brightness adjustment. The image after brightness adjustment is output to the specified location or display interface for user viewing or further processing.

[0156] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. An artificial intelligence image processing method, characterized in that: The following steps are involved: S1: Data reading: reading historical image data and images to be processed from the storage medium; S2: Data screening: According to the statistical analysis of historical image data, the image feature to be screened out is determined as the first image feature, and the interval corresponding to the first image feature is obtained. If the first feature value of the pre-processed image data to be processed meets the above interval, it is screened out, otherwise, it is transmitted to the next step; S3: Data enhancement and synthesis: Perform data enhancement operations on the remaining images and use the generative adversarial network to synthesize new image data; S4: Brightness level division and label mapping: Convert the color image into a grayscale image, calculate the average grayscale value of the grayscale image, and divide the image into low brightness, medium brightness, and high brightness levels based on the comparison between the grayscale value of each pixel and the average grayscale value; S5: Model construction and training: Select convolutional neural network as the basic architecture, input the historical image data with marked brightness levels into the neural network model for model training; S6: Brightness level mapping and linear equation establishment: Use the trained model to predict the brightness level of the image to be processed, and calculate the slope k and intercept b based on the matching data of the old brightness value and the new brightness value of the corresponding brightness level in the historical image data; S7: brightness adjustment application: for the pre-processed image to be processed, according to the predicted brightness level and the corresponding linear equation, a new brightness value of each pixel is calculated, and the new brightness value is applied to the image to achieve brightness adjustment; S8: Result output: output the image after brightness adjustment to a specified location or display interface.

2. The artificial intelligence image processing method according to claim 1, characterized in that: In S3, the specific steps of synthesizing new image data using the generative adversarial network are: Data preparation: Data collection: receiving filtered image data, enhanced image data, and historical image data; Data preprocessing: perform necessary preprocessing on the collected image data; Define the GAN network structure: Generator: responsible for generating new data samples similar to real data. During the training process, the goal of the generator is to generate real data to deceive the discriminator. Input: random noise vector z; Output: synthesized image data G(z); Discriminator: responsible for distinguishing whether the input data is real data or fake data generated by the generator. During the training process, the goal of the discriminator is to accurately distinguish between real data and generated data; Input: real image data x or image data G(z) generated by the generator; Output: A probability value D(x), indicating the probability that the input image is a real image; Define the loss function: The training goal of the generative adversarial network is to minimize the loss of the generator while maximizing the loss of the discriminator, which is expressed by the following formula: min C max D V(D,G)=E x~Pdata(x) [logD(x)]+E x~pz(z) [log(1-D(G(z)))]; Among them, Pdata(x) is the distribution of real data, p z (z) is the distribution of noise, D(x) is the judgment of the discriminator on the real image x, and D(G(z)) is the judgment of the discriminator on the generated image G(z); Training process: Initialization: Randomly initialize the parameters of the generator and discriminator; Iterative training: Training the discriminator: fix the parameters of the generator and update the parameters of the discriminator by optimizing the loss function of the discriminator; Train the generator: fix the parameters of the discriminator and update the parameters of the generator by optimizing the loss function of the generator; Repeat iteration: Repeat the above iterative training until the preset number of training rounds is reached or other stopping conditions are met; Synthetic image data: Use the trained generator, input the random noise vector z, and generate new image data G(z); Image data merging: The synthesized image data G(z) is merged with other image data to form a final image data set.

3. The artificial intelligence image processing method according to claim 1, characterized in that: In S5, a convolutional neural network is selected as the basic architecture, and the historical image data with labeled brightness levels is input into the neural network model for model training, which includes the following steps: initialization: Build a model: Build a defined neural network model architecture; Initialization parameters: The weights and biases of the model are initialized to small random numbers based on Gaussian distribution; Set the optimizer: Select the Adam optimizer to automatically adjust the learning rate; Training loop: Iterate over training data: Divide the training dataset into batches, each batch contains a fixed number of samples, and for each batch, perform the following steps: Forward propagation: Calculate the predicted output for each sample, y pred =f(X,θ), where X is the input data, θ is the model parameter, f is the model function, and y pred is the predicted output; Calculate loss: Use the loss function to calculate the error between the predicted output and the true label. Where N is the number of samples in the batch and l is the loss function; Back propagation: Calculate the gradient of the loss function with respect to the model parameters through the chain rule, in, is a vector containing the loss function L for all parameters θ i The partial derivative of Update parameters: Use the Adam optimizer to update model parameters according to the gradient. Among them, α is the learning rate, and AdamUpdate is the update rule of the Adam optimizer; Apply early stopping: Monitor validation set performance: At the end of each epoch, use the validation dataset to evaluate the performance of the model; Check performance improvement: If the validation performance of the current epoch fails to improve within the predetermined patience period, stop training; Save the best model: During the training process, retain the model parameters that perform best on the validation set; Output: The final output is the model that performs best on the validation set.

4. The artificial intelligence image processing method according to claim 3, characterized in that: In the update parameters, the update rule of the Adam optimizer is: Adam uses two exponential moving averages to estimate the mean and uncentered variance of the gradient, and then updates the parameters based on these estimates: m t =β1m t-1 +(1-β1)g t ; Among them, g t is the current gradient, β1 and β2 are the decay rates; The adjusted update rule is: in, and is m t and t is a bias-corrected version of , where ψ is a small constant that prevents division by zero.

5. The system used in the artificial intelligence image processing method according to claim 1, characterized in that: include: Data processing module: responsible for reading historical image data and images to be processed from the database or file system and pre-processing them; Model training module: responsible for training the neural network model; Brightness adjustment module: responsible for applying brightness adjustment linear equation to the pre-processed image to achieve brightness adjustment; Output module: responsible for outputting the brightness-adjusted image to a specified location or display interface; The data processing module passes the preprocessed image data to the model training module, and the model training module receives the preprocessed image data as a training set for training the neural network model. After the model training module completes the training, the trained neural network model and the brightness level mapping table are passed to the brightness adjustment module, and the brightness adjustment module uses the trained neural network model and the brightness level mapping table to predict and adjust the brightness level of the preprocessed image to be processed, and the brightness adjustment module passes the image data after brightness adjustment to the output module.

6. The system used in the artificial intelligence image processing method according to claim 5, characterized in that: The data processing module includes a data reading unit, an image screening unit, a data enhancement unit and a data synthesis unit. The data reading unit is responsible for reading historical image data and images to be processed from a database or a file system. The image screening unit is responsible for determining the image features that need to be screened out based on historical data analysis and screening out the images that meet the requirements. The data enhancement unit is responsible for performing data enhancement operations on the screened images. The data synthesis unit synthesizes new image data using a generative adversarial network. The data reading unit reads the image data and passes it to the image screening unit for preliminary screening. The image screening unit passes images that do not meet the screening conditions to the data enhancement unit. The data enhancement unit passes the enhanced image data to the data synthesis unit. The data synthesis unit receives historical image data, screened image data or enhanced image data as input for generative adversarial network training to generate new image data. The data synthesis unit merges the synthesized image data with the existing image data and passes them to the model training module and the brightness adjustment module.

7. The system used in the artificial intelligence image processing method according to claim 6, characterized in that: The model training module includes a neural network model construction unit, a data preparation unit and a model training unit. The neural network model construction unit is responsible for selecting a convolutional neural network as the basic architecture and applying regularization technology to prevent overfitting. The data preparation unit is responsible for receiving preprocessed historical image data, dividing the images into levels according to brightness values, and mapping them to corresponding labels, and dividing the data set into a training set, a verification set and a test set. The model training unit is responsible for training the neural network model using the training data set, adjusting the model parameters through an optimization algorithm, and at the same time, using the early stopping method to monitor the model performance on the verification set. If the performance no longer improves, the training is stopped in advance. The data preparation unit passes the labeled training data set and verification data set to the model training unit, and the neural network model construction unit passes the constructed neural network model to the model training unit.

8. The system used in the artificial intelligence image processing method according to claim 6, characterized in that: The brightness adjustment module includes a brightness level prediction unit, a brightness adjustment strategy unit and a brightness adjustment execution unit. The brightness level prediction unit is responsible for using a trained neural network model to predict the brightness level of the image to be processed. The brightness adjustment strategy unit is responsible for defining three brightness levels of low, medium and high and their corresponding brightness value ranges, and establishing a linear equation for each brightness level. The brightness adjustment execution unit is responsible for applying brightness adjustment to the preprocessed image to be processed according to the predicted brightness level and the linear equation or mapping table provided by the brightness adjustment strategy unit. The brightness level prediction unit receives the preprocessed image data to be processed and outputs the predicted brightness level. The predicted brightness level is then passed to the brightness adjustment execution unit, and the brightness adjustment execution unit passes the image data after brightness adjustment to the output module.

Citation Information

Patent Citations

  • An image processing system and method based on artificial intelligence

    CN116664431B

Cited By

  • Ultrasonic image processing method, ultrasonic equipment and storage medium

    CN122004923A