CN-121982474-A - Image processing method, device, equipment and medium
Abstract
The invention relates to the technical field of machine learning and discloses an image processing method, device, equipment and medium, which comprise the steps of extracting image characteristics of a target image, identifying coding vectors of task nodes in an image identification task flow, determining an image inference path of a preset image inference model according to the coding vectors, collecting corresponding image quality indexes of all task nodes in the image inference model, determining node weights of all task nodes according to performance indexes, carrying out target identification processing on the target image according to the image inference path to obtain node output of all nodes in the image inference path, calculating node loss values of all node output and preset real labels, weighting and summing to obtain a total loss value, determining parameters to be updated according to the image inference path, optimizing the parameters to be updated according to the total loss and the image characteristics, obtaining an updated image inference model, and using the updated image inference model in processing of a new image to output an identification result. The invention improves the efficiency and the accuracy of image processing.
Inventors
- ZHANG YIFAN
- SHAN JINXIAO
- CHEN XIANLI
Assignees
- 招商局金融科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251230
Claims (10)
- 1. An image processing method, comprising: Extracting image characteristics of a target image, and identifying coding vectors of different task nodes in a pre-acquired image identification task stream; determining an image reasoning path of a preset image reasoning model according to the coding vectors and the sequence of the task nodes corresponding to each coding vector in the image recognition task flow; Acquiring corresponding performance indexes of each task node in the image reasoning path in the image reasoning model, and determining node weights of each task node in the image reasoning model according to the performance indexes; performing target recognition processing comprising various image recognition operations on the target image according to the image reasoning path to obtain predicted value output of each node in the image reasoning path, respectively calculating difference values of each predicted value output and preset real labels of the target image to obtain node loss values, and performing weighted summation on the node loss values according to node weights to obtain total loss values; Collecting parameters to be updated of the image reasoning model according to the image reasoning path, and updating the parameters to be updated according to the total loss value and the image characteristics to obtain an updated image reasoning model; and carrying out target recognition processing on the preset image to be processed according to the image reasoning path by using the updated image reasoning model to obtain a recognition result.
- 2. The image processing method according to claim 1, wherein the extracting the image features of the target image includes: scaling the target image to a preset standard size to obtain a standardized image; Normalizing the pixel value of the normalized image to obtain a normalized image; Inputting the normalized image into a preset shared visual backbone network, and carrying out step-by-step feature extraction on the normalized image through a blocking processing mechanism and a layered attention mechanism in the shared visual backbone network to generate and output a multi-level feature map set consisting of shallow detail features, middle semantic features and deep global features; and converting the multi-level feature map set into a preset unified format to obtain image features.
- 3. The image processing method according to claim 1, wherein the identifying the previously acquired image identifies the encoding vectors of the different task nodes in the task stream, comprising: extracting task nodes according to the task processing sequence of the image recognition task flow to obtain a task node sequence; mapping each task node in the task node sequence into integer codes by using a preset task type mapping table; Taking the integer codes as indexes, and searching a dense vector of each integer code from a preset embedded layer weight matrix; and adding position codes for each dense vector to obtain the code vectors of different task nodes.
- 4. The image processing method according to claim 1, wherein determining the image inference path of the preset image inference model according to the coding vector and the sequence of the positions of the task nodes corresponding to each coding vector in the image recognition task stream includes: Splicing the image features with the coding vectors to obtain task state vectors; calculating probability scores of each path in different candidate path sets contained in a preset image reasoning model according to the task state vector by using a preset strategy network; converting the probability score into probability distribution to obtain a probability distribution sequence containing the selected probability of each path; Performing action sampling according to the probability distribution sequence to obtain a path identifier; And carrying out path mapping according to the path identifier to obtain an inference path.
- 5. The image processing method as claimed in claim 1, wherein said acquiring performance indexes corresponding to each task node in the image inference path in the image inference model includes: Acquiring historical processing data generated by the image reasoning model when tasks corresponding to task nodes in the image reasoning path are executed; Acquiring classification accuracy of classification nodes in the image reasoning path according to the historical processing data; acquiring detection accuracy of detection nodes in the image reasoning path according to the historical processing data; acquiring the intersection ratio of the segmentation nodes in the image reasoning path according to the historical processing data; Acquiring multi-target tracking accuracy of the tracking nodes in the image reasoning path according to the historical processing data; normalizing the classification accuracy, the detection accuracy, the cross-correlation ratio and the multi-target tracking accuracy to obtain normalized classification accuracy, normalized detection accuracy, normalized cross-correlation ratio and normalized multi-target tracking accuracy; Summarizing the normalized classification accuracy, the normalized detection accuracy, the normalized cross-over ratio and the normalized multi-target tracking accuracy to obtain a performance index.
- 6. The image processing method according to claim 1, wherein the collecting parameters to be updated of the image inference model according to the image inference path includes: Acquiring a path ID contained in the image reasoning path; Searching identifiers of all network layers and task heads in the image reasoning model in a preset path-parameter mapping table according to the path ID; extracting corresponding parameters in the image reasoning model according to the identifier to obtain a parameter set; Acquiring historical importance weights of each parameter in the parameter set; identifying protected parameters in the parameter set according to the historical importance weight of each parameter and the magnitude of a preset weight threshold; and screening out the protected parameters in the parameter set to obtain the parameters to be updated.
- 7. The image processing method according to claim 1, wherein the updating the parameter to be updated according to the total loss value and the image feature to obtain an updated image inference model includes: acquiring a forward propagation path of the image feature in the image reasoning model, and executing a backward propagation algorithm according to the forward propagation path to calculate gradient values of all parameters in the image reasoning model relative to the total loss value so as to obtain a gradient value set; calculating the updating quantity of each parameter to be updated according to the gradient value set and a preset learning rate; updating the numerical value of each parameter to be updated according to the updating quantity to obtain an updated parameter set; and integrating the updated parameter set into the image reasoning model to obtain an updated image reasoning model.
- 8. An image processing apparatus, comprising: The data processing module is used for extracting image characteristics of a target image and identifying coding vectors of different task nodes in a pre-acquired image identification task flow; The path reasoning module is used for determining an image reasoning path of a preset image reasoning model according to the coding vectors and the sequence of the task nodes corresponding to each coding vector in the image recognition task flow; The weight identification module is used for acquiring performance indexes corresponding to each task node in the image reasoning path in the image reasoning model and determining node weights of each task node in the image reasoning model according to the performance indexes; The parameter updating module is used for carrying out target recognition processing comprising various image recognition operations on the target image according to the image reasoning path to obtain predicted value output of each node in the image reasoning path, respectively calculating the difference value between each predicted value output and a preset real label of the target image to obtain a node loss value, carrying out weighted summation on the node loss value according to node weight to obtain a total loss value, collecting parameters to be updated of the image reasoning model according to the image reasoning path, and updating the parameters to be updated according to the total loss value and the image characteristics to obtain an updated image reasoning model; and the image recognition module is used for carrying out target recognition processing on the preset image to be processed according to the image reasoning path by utilizing the updated image reasoning model to obtain a recognition result.
- 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 processing method according to any 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 processing method according to any one of claims 1 to 7.
Description
Image processing method, device, equipment and medium Technical Field The present invention relates to the field of machine learning technologies, and in particular, to an image processing method, apparatus, device, and medium. Background In the existing image processing model, for core tasks such as image classification, target detection, semantic segmentation, target tracking and the like, the main stream method generally follows a proprietary design paradigm of 'a task-model'. Although the method has remarkable progress on each specific task, the inherent limitation is increasingly remarkable, firstly, a plurality of independent models coexist to cause a great amount of parameter redundancy and repeated consumption of computing resources, so that the training, deployment and maintenance costs are high, secondly, the models lack of effective knowledge sharing and migration mechanisms, the inherent relevance among different visual tasks is difficult to realize synergy, and the generalization capability and learning efficiency of the models are limited. To alleviate the above problems, multitasking learning was introduced, aimed at improving resource utilization by sharing the backbone network while optimizing multiple tasks. However, the existing method generally relies on manual experience or static heuristic rules to carry out weight distribution during loss function fusion, and the fixed strategy is difficult to adapt to the difference between learning states and difficulty of dynamic changes of different tasks in the training process, so that the training process is unstable, the optimization direction is unbalanced, and finally the overall performance upper limit is influenced. Furthermore, current vision models generally lack the ability to continue evolving, and in the face of incremental tasks or dynamic data flows, there is a severe "catastrophic forgetting" phenomenon-i.e., learning new knowledge while rapidly losing the ability of the old task that has been mastered. Although some studies have attempted to alleviate this problem by regularization, replaying buffers, etc., these methods often require storing historical data or introducing complex constraint mechanisms, which have problems of low efficiency and low accuracy. Disclosure of Invention The invention provides an image processing method, an image processing device, computer equipment and a medium, which are used for solving the problems of low efficiency and low precision of the existing image processing method in the market at present. In a first aspect, there is provided an image processing method including: Extracting image characteristics of a target image, and identifying coding vectors of different task nodes in a pre-acquired image identification task stream; determining an image reasoning path of a preset image reasoning model according to the coding vectors and the sequence of the task nodes corresponding to each coding vector in the image recognition task flow; Acquiring corresponding performance indexes of each task node in the image reasoning path in the image reasoning model, and determining node weights of each task node in the image reasoning model according to the performance indexes; performing target recognition processing comprising various image recognition operations on the target image according to the image reasoning path to obtain predicted value output of each node in the image reasoning path, respectively calculating difference values of each predicted value output and preset real labels of the target image to obtain node loss values, and performing weighted summation on the node loss values according to node weights to obtain total loss values; Collecting parameters to be updated of the image reasoning model according to the image reasoning path, and updating the parameters to be updated according to the total loss value and the image characteristics to obtain an updated image reasoning model; and carrying out target recognition processing on the preset image to be processed according to the image reasoning path by using the updated image reasoning model to obtain a recognition result. In a second aspect, there is provided an image processing apparatus including: The data processing module is used for extracting image characteristics of a target image and identifying coding vectors of different task nodes in a pre-acquired image identification task flow; The path reasoning module is used for determining an image reasoning path of a preset image reasoning model according to the coding vectors and the sequence of the task nodes corresponding to each coding vector in the image recognition task flow; The weight identification module is used for acquiring performance indexes corresponding to each task node in the image reasoning path in the image reasoning model and determining node weights of each task node in the image reasoning model according to the performance indexes; The parameter updating module is used for