CN-121981903-A - Image optimization method, device, equipment and medium
Abstract
The invention relates to the technical field of image processing and discloses an image optimization method, device, equipment and medium, which comprise the steps of identifying degradation information of a target image, carrying out image transformation processing on the target image according to the image degradation information and a preset image transformation process to obtain an optimized image, carrying out multi-type visual task detection on the optimized image to generate a quantized image quality index, judging whether the image meets a quality standard or not by comparing detection parameters with a preset threshold value, if the image does not meet the quality standard, calculating a reward signal of a reinforcement learning agent model according to a detection result, updating the image transformation process by utilizing the signal, returning to an optimization step to reprocess the image, and if the image meets the standard, indicating that the current strategy is effective, directly applying the updated strategy to process a subsequent image to be processed by an agent, and finally outputting a high-quality target optimized image. The invention improves the efficiency and the precision of image processing.
Inventors
- ZHANG YIFAN
- SHAN JINXIAO
- CHEN XIANLI
Assignees
- 招商局金融科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251230
Claims (10)
- 1. An image optimization method, comprising: Identifying image degradation information of a target image acquired in advance; performing image transformation processing on the target image according to the image degradation information and a preset image transformation process to obtain an optimized image; identifying a plurality of preset types of image quality indexes of the optimized image; Judging whether the optimized image reaches a preset quality standard or not according to the image quality index and a preset quality index threshold; If the optimized image does not reach the preset quality standard, calculating a reward signal of a preset reinforcement learning agent model according to the image quality index, updating the image transformation flow by using the reinforcement learning agent model according to the reward signal, and returning to the step of performing image transformation processing on the target image according to the image degradation information and the preset image transformation flow to obtain an optimized image; and if the optimized image reaches the preset quality standard, performing image transformation processing on the preset image to be processed by utilizing the reinforcement learning agent model according to the updated image transformation flow to obtain a target optimized image.
- 2. The image optimizing method according to claim 1, wherein the identifying image degradation information of the target image acquired in advance includes: performing size standardization processing on the target image to obtain a standardized image; Carrying out pixel value normalization processing on the standardized image to obtain a normalized image; Extracting image characteristics of the normalized image, and performing fuzzy analysis, noise analysis, reflection analysis and illumination analysis on the normalized image to obtain degradation sensitive characteristics; Performing degradation type analysis on the target image according to the degradation sensitive features and the image features to obtain a degradation type label set containing confidence scores; Performing degradation degree analysis on the target image according to the degradation sensitive features and the image features to obtain a degradation degree score set; and summarizing the degradation type label set and the degradation degree score set to obtain image degradation information.
- 3. The image optimization method of claim 2, wherein said performing a degradation type analysis on said target image based on said degradation sensitive features and said image features to obtain a set of degradation type labels comprising confidence scores comprises: Performing feature alignment on the degradation sensitive feature and the image feature to obtain an aligned degradation sensitive feature and an aligned image feature; Performing feature fusion on the aligned degradation sensitive feature and the aligned image feature to obtain a fusion feature; Outputting an original confidence score of each degradation type of the target image according to the fusion characteristics by utilizing a pre-trained classification network model to obtain a confidence score set; And outputting the degradation type corresponding to each confidence coefficient of the confidence coefficient score set to obtain a degradation type label set containing the confidence coefficient score.
- 4. The method for optimizing an image according to claim 1, wherein the performing image transformation processing on the target image according to the image degradation information and a preset image transformation procedure to obtain an optimized image includes: Extracting a degradation type with highest confidence in the image degradation information and a degradation degree score corresponding to the degradation type with highest confidence; Generating an operation decision instruction according to the image transformation flow, the degradation type and the degradation degree score; Generating an image operation sequence according to a preset image basic operation library and the operation decision instruction; And executing image operation on the target image based on the image operation sequence to obtain an optimized image.
- 5. The image optimization method according to claim 1, wherein the identifying a plurality of preset types of image quality indicators of the optimized image includes: converting the optimized image into a tensor format to obtain an image tensor; performing target detection on the optimized image according to the image tensor to obtain a target detection result; carrying out semantic segmentation on the optimized image according to the image tensor to obtain a semantic segmentation result; Performing text recognition on the optimized image according to the image tensor to obtain a text recognition result; Comparing the prediction segmentation mask map contained in the semantic segmentation result with a preset standard segmentation mask map to obtain a mask map comparison result, and calculating pixel accuracy and average cross-correlation ratio according to the mask map comparison result; Comparing the target prediction result contained in the target detection result with a preset real label to obtain a target comparison result, and calculating the correct number and average precision value of the targets according to the target comparison result; Comparing the character string recognition result contained in the text recognition result with preset real character string content to obtain a character string comparison result, and calculating the character accuracy and the word recognition rate according to the character string comparison result; And summarizing the correct number of the targets, the average precision value, the pixel accuracy, the average merging ratio, the character accuracy and the word recognition rate to obtain an image quality index.
- 6. The method for optimizing an image according to claim 1, wherein the determining whether the optimized image meets a preset quality standard according to the image quality index and a preset quality index threshold value comprises: Traversing the size relation between each parameter in the image quality index and the corresponding preset threshold value; judging whether each parameter in the image quality index is larger than or equal to a preset threshold value corresponding to each parameter; if each parameter in the image quality index is greater than or equal to a preset threshold value corresponding to each parameter, judging that the optimized image reaches a preset quality standard; If the parameters in the image quality indexes are smaller than the corresponding preset thresholds, judging that the optimized image does not reach the preset quality standard.
- 7. The image optimization method of claim 1, wherein calculating a reward signal of a preset reinforcement learning agent model according to the image quality index comprises: normalizing the performance indexes contained in the image quality indexes to obtain a normalized index set; Comparing each index in the normalized index set with a preset reference performance score to obtain a comparison result, and calculating a performance gain value according to the comparison result; calculating time penalty items of the image content detection of the multiple preset types based on a preset maximum processing time threshold; Calculating operation complexity penalty items of the image content detection of the multiple preset types based on a preset maximum operation quantity threshold; carrying out weighted summation on the time penalty item and the operation complexity penalty item to obtain a total penalty item; And subtracting the product of the total penalty term and a preset penalty scaling coefficient from the performance gain value to obtain a final bonus value, and carrying out normalization processing on the final bonus value to obtain the bonus signal.
- 8. An image optimizing apparatus, comprising: a degradation identification module for identifying image degradation information of a target image acquired in advance; The image optimization module is used for carrying out image transformation processing on the target image according to the image degradation information and a preset image transformation flow to obtain an optimized image; the image detection module is used for identifying various preset types of image quality indexes of the optimized image; The iterative optimization module is used for judging whether the optimized image reaches a preset quality standard according to the image quality index and a preset quality index threshold value, if the optimized image does not reach the preset quality standard, calculating a reward signal of a preset reinforcement learning agent model according to the image quality index, updating the image transformation flow according to the reward signal by using the reinforcement learning agent model, and returning the image transformation flow to the image optimization module, wherein the image transformation processing is carried out on the target image according to the image degradation information and the preset image transformation flow to obtain an optimized image; And the image processing module is used for carrying out image transformation processing on a preset image to be processed according to the updated image transformation flow by utilizing the reinforcement learning agent model to obtain a target optimized image.
- 9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the image optimization method according to any one of claims 1 to 7 when executing the computer program.
- 10. A computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the image optimization method according to any one of claims 1 to 7.
Description
Image optimization method, device, equipment and medium Technical Field The present invention relates to the field of image processing technologies, and in particular, to an image optimization method, apparatus, device, and medium. Background The existing large visual model has shown excellent performance in various visual tasks such as image classification, target detection, semantic segmentation and the like. However, these models, which are trained in a controlled laboratory environment and perform well, tend to experience significant degradation in performance when deployed to a complex scene of the real world. In real scenes, the image quality is severely limited by various uncontrollable factors, such as severe illumination changes (e.g., backlight, low illumination), partial or complete occlusion of the object, degradation due to severe weather conditions (rain, fog, snow, haze), motion blur and noise introduced by the imaging device, and resolution loss and artifacts due to compression, transmission, etc. To address the above challenges, a conventional solution commonly adopted in the industry is to introduce an image preprocessing link at the front end of a large visual model. However, these methods have inherent drawbacks, one of which is static and non-adaptive. Most preprocessing flows are based on fixed rules or expert experiences (such as global histogram equalization and fixed-parameter filtering denoising), cannot be dynamically adjusted according to specific degradation types and degrees of input images, and have unstable effects when processing variable scenes. And secondly, disjointing with the task target. Traditional preprocessing aims at improving human visual perception quality, but image enhancement (such as oversharpening or contrast stretching) optimized for human vision cannot always improve or even possibly damage the recognition accuracy of a machine vision model, and target conflict between 'perception quality' and 'task performance' exists. Thereby affecting the efficiency and accuracy of image optimization. Disclosure of Invention The invention provides an image optimization method, an image optimization device, computer equipment and a medium, which are used for solving the problems of low efficiency and low precision of the existing image optimization method in the current market. In a first aspect, an image optimization method is provided, including: Identifying image degradation information of a target image acquired in advance; performing image transformation processing on the target image according to the image degradation information and a preset image transformation process to obtain an optimized image; identifying a plurality of preset types of image quality indexes of the optimized image; Judging whether the optimized image reaches a preset quality standard or not according to the image quality index and a preset quality index threshold; If the optimized image does not reach the preset quality standard, calculating a reward signal of a preset reinforcement learning agent model according to the image quality index, updating the image transformation flow by using the reinforcement learning agent model according to the reward signal, and returning to the step of performing image transformation processing on the target image according to the image degradation information and the preset image transformation flow to obtain an optimized image; and if the optimized image reaches the preset quality standard, performing image transformation processing on the preset image to be processed by utilizing the reinforcement learning agent model according to the updated image transformation flow to obtain a target optimized image. In a second aspect, there is provided an image optimizing apparatus including: a degradation identification module for identifying image degradation information of a target image acquired in advance; The image optimization module is used for carrying out image transformation processing on the target image according to the image degradation information and a preset image transformation flow to obtain an optimized image; the image detection module is used for identifying various preset types of image quality indexes of the optimized image; The iterative optimization module is used for judging whether the optimized image reaches a preset quality standard according to the image quality index and a preset quality index threshold value, if the optimized image does not reach the preset quality standard, calculating a reward signal of a preset reinforcement learning agent model according to the image quality index, updating the image transformation flow according to the reward signal by using the reinforcement learning agent model, and returning the image transformation flow to the image optimization module, wherein the image transformation processing is carried out on the target image according to the image degradation information and the preset image transformati