Image processing model training method, electronic device and storage medium

By obtaining and adjusting the parent and child models of the image processing model, and using the processing results of the first and second sample images, the compatibility problem after the image processing model is upgraded is solved, and the compatibility and applicability of the image processing results are achieved. improvement.

CN118552813BActive Publication Date: 2024-10-15ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411032131.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-10-15
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

The existing image processing model cannot be compatible with the model before the upgrade after the upgrade, which makes the application of image processing results more difficult and limits the scope of application of the image processing results.

Method used

By obtaining the parent model and the child model, use the first sample image and the second sample image to train the parent model, and adjust the child model to achieve the compatibility of the image processing model. The specific steps include obtaining the parent model and the child model. , train to obtain the image processing results of the advanced parent model and child model, and adjust the child model based on the differences to improve compatibility.

Benefits of technology

The compatibility between image processing models before and after the upgrade is realized, the compatibility of the image processing results of the descendant model and the image processing model is improved, the representation ability of the advanced parent model is learned, and the applicable scope of image processing is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552813B_ABST
    Figure CN118552813B_ABST
Patent Text Reader

Abstract

The present application discloses a training method, electronic device and storage medium for an image processing model. The training method for the image processing model includes: obtaining a parent model and a child model, the complexity of the child model is less than the complexity of the parent model; training the parent model using a first sample image and a second sample image to obtain an advanced parent model, the first sample image is different from the second sample image; obtaining a third image processing result of the advanced parent model on the first sample image and the second sample image and a fourth image processing result of the child model on the first sample image and the second sample image; based on the difference between the third image processing result and the fourth image processing result, adjusting the child model to obtain an image processing model. The above scheme can improve the compatibility between the image processing results of the child model and the image processing results of the image processing model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing, and in particular to a training method, electronic device and storage medium for an image processing model. Background Art

[0002] At present, with the development of deep learning methods, various image processing technologies have been successfully used in every corner of life. For example, feature recognition, feature comparison, or feature extraction in image processing has been widely used in scenarios where target recognition or target detection is required. However, the types of related image processing results obtained by different image processing models for the same data are not the same, and different types of features are not compatible. For example, the image processing results obtained by the image processing model A before the upgrade cannot be compared with the image processing results obtained by the image processing model B after the upgrade, so that the recognition function related to the image cannot be completed. Therefore, once the image processing model corresponding to the image processing result of a certain data (for example, the image processing model before the upgrade) is different from the image processing model in the target application scenario (for example, the image processing model after the upgrade), the image processing results of the same data in different image processing models are incompatible, which increases the difficulty of applying the image processing results and limits the scope of application of the image processing results.

[0003] In view of the existing technical defects, how to provide a solution to improve the compatibility between the image processing results of the image processing model before and after the upgrade is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0004] The present application at least provides a training method, electronic device and storage medium for an image processing model.

[0005] The present application provides a training method for an image processing model, including: obtaining a parent model and a child model, wherein the child model is obtained by adjusting the difference between a first image processing result of a first sample image by the parent model and a second image processing result of the first sample image by the child model before adjustment, and the complexity of the child model is less than the complexity of the parent model; training the parent model using the first sample image and the second sample image to obtain an advanced parent model, wherein the first sample image is different from the second sample image; obtaining a third image processing result of the first sample image and the second sample image by the advanced parent model and a fourth image processing result of the first sample image and the second sample image by the child model; adjusting the child model based on the difference between the third image processing result and the fourth image processing result to obtain an image processing model, wherein the image processing model can be used to perform image processing on the first sample image and the second sample image.

[0006] The present application provides a training device for an image processing model, comprising: a first acquisition module, a parent model training module, a second acquisition module and a child model adjustment module; the first acquisition module is used to acquire a parent model and a child model, the child model is adjusted based on the difference between a first image processing result of a first sample image by the parent model and a second image processing result of the first sample image by the child model before adjustment, and the complexity of the child model is less than the complexity of the parent model; the parent model training module is used to train the parent model using the first sample image and the second sample image to obtain an advanced parent model, the first sample image is different from the second sample image; the second acquisition module is used to acquire a third image processing result of the first sample image and the second sample image by the advanced parent model and a fourth image processing result of the first sample image and the second sample image by the child model; the child model adjustment module is used to adjust the child model based on the difference between the third image processing result and the fourth image processing result to obtain an image processing model, wherein the image processing model can be used to perform image processing on the first sample image and the second sample image.

[0007] The present application provides an electronic device, including a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the training method of the above-mentioned image processing model.

[0008] The present application provides a computer-readable storage medium on which program instructions are stored. When the program instructions are executed by a processor, the training method of the above-mentioned image processing model is implemented.

[0009] In the above scheme, the first sample image is used to adjust the offspring model, the first sample image and the second sample image are used to train the parent model to obtain an advanced parent model, the third image processing results and the fourth image processing results of the advanced parent model and the offspring model for the first sample image and the second sample image are obtained respectively, and the offspring model is adjusted based on the difference between the third image processing result and the fourth image processing result to obtain the image processing model. Compared with the prior art that cannot achieve compatibility between the image processing results of the model before and after the upgrade, the image processing model obtained by the present application based on the adjustment of the first sample image and the second sample image can learn the representation ability of the advanced parent model, thereby improving the compatibility between the image processing results of the offspring model and the image processing results of the image processing model.

[0010] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0012] Figure 1 This is a flow chart of an embodiment of a training method for an image processing model of the present application. Figure 1 ;

[0013] Figure 2 This is a flow chart of an embodiment of a training method for an image processing model of the present application. Figure 2 ;

[0014] Figure 3 This is a flow chart of an embodiment of a training method for an image processing model of the present application. Figure 3 ;

[0015] Figure 4 This is a flow chart of an embodiment of a training method for an image processing model of the present application. Figure 4 ;

[0016] Figure 5 This is a flow chart of an embodiment of a training method for an image processing model of the present application. Figure 5 ;

[0017] Figure 6 It is a structural schematic diagram of an embodiment of a training device for an image processing model of the present application;

[0018] Figure 7 It is a structural schematic diagram of an embodiment of the electronic device of the present application;

[0019] Figure 8 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0020] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0021] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0022] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.

[0023] The present application provides some training methods for image processing models and training devices for image processing models. The application scenarios of the training method for the image processing model include but are not limited to the upgrade of the offspring model that can realize target recognition, the requirement of feature compatibility between different offspring models, and. The executor of the training method for the image processing model may be the training device for the image processing model. For example, the training device for the image processing model may be set in a terminal device or a server or other processing device, wherein the terminal device may be a device for training the image processing model, a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, etc. In some possible implementations, the training method for the image processing model may be implemented by a processor calling computer-readable instructions stored in a memory.

[0024] See also Figure 1 , Figure 1 This is a flow chart of an embodiment of a training method for an image processing model of the present application. Figure 1 Specifically, the training method of the image processing model may include the following steps:

[0025] Step S11: Obtain the parent model and the child model.

[0026] The offspring model is obtained based on the difference between the first image processing result of the parent model on the first sample image and the second image processing result of the offspring model before adjustment on the first sample image, and the complexity of the offspring model is less than the complexity of the parent model.

[0027] The parent model may be a general basic large model related to target recognition. Specifically, the parent model may have functions related to target recognition. The functions related to target recognition may be image processing functions related to target objects in an image. In some application scenarios, the image processing functions may be functions such as feature extraction of target objects, feature matching of target objects, target detection of target objects, and feature recognition of target objects. The child model before adjustment may have the same function as the parent model. The complexity of the child model before adjustment is less than the complexity of the parent model. Exemplarily, the parent model may be a general basic large model capable of feature extraction. The child model before adjustment may be a feature extraction model having the same function as the parent model. Among them, the parameter amount of the child model before adjustment is less than the parameter amount of the parent model. In some application scenarios, the network structure or module structure in the child model before adjustment may be the same as the network structure or module structure in the parent model, and the parameter amount is different. In other application scenarios, the network structure or module structure in the offspring model before adjustment may be different or similar to the network structure or module structure in the parent model, and the number of parameters may be different. It is understandable that the offspring model before adjustment may inherit the model parameters of the parent model to obtain the offspring model. The parent model may guide the offspring model before adjustment to learn the knowledge of the parent model to obtain the offspring model. The parent model may transfer the knowledge learned about how to understand spatial relationships to the offspring model before adjustment to obtain the offspring model.

[0028] In some application scenarios, the parent model may be a fine-tuned general basic large model. Before obtaining the parent model, a general basic large model with a feature extraction function may be trained first. In some application scenarios, a general basic large model may be obtained by training unlabeled data related to the image processing function. Specifically, the unlabeled data may be obtained by web crawlers and collecting open source data. Among them, the unlabeled data may be image data related to the feature extraction function. Exemplarily, the unlabeled data may be data related to the target object that has not been labeled. The target object may be an organism or a physical building. The general basic large model is obtained by unsupervised or self-supervised training using the unlabeled data. In some application scenarios, after the general basic large model is obtained by training, the general basic large model is fine-tuned using at least part of the labeled data related to the image processing function to obtain the fine-tuned general basic large model. The fine-tuned general basic large model is used as the parent model. Specifically, the labeled data may be collected by an image acquisition device. Among them, the labeled data related to the image processing function may be image data related to the feature extraction function. It is understandable that the labeled data related to the image processing function can also be image data related to functions such as feature matching of the target object, target detection or target recognition of the target object, and feature recognition of the target object. This application takes the labeled data as image data related to the feature extraction function as an example, and will not be repeated below. Exemplarily, the labeled data can be data related to the target object after being annotated. It can be considered that the general basic large model after fine-tuning obtained with at least part of the labeled data can have preliminary image processing related functions.

[0029] The first sample image may be all the data in the labeled data after annotation. Exemplarily, the first sample image may be facial data related to the target object, or body data related to the target object. In some application scenarios, the first sample image may be image data originally existing in the database. It is understandable that the first sample image may be old sample data. The first sample image may be old version training data. The number of image data in the first sample image may be several. Several may be one or more.

[0030] The first image processing result of the parent model on the first sample image may be inputting the first sample image into the parent model to obtain the first image processing result output by the parent model. In some application scenarios, the first image processing result may be an object recognition result of the first sample image, or may be a feature extraction result of the first sample image. The first image processing result of the first sample image may include the first image processing result obtained from each image data in the first sample image.

[0031] The second image processing result of the first sample image by the offspring model before adjustment may be inputting the first sample image into the offspring model before adjustment to obtain the second image processing result output by the offspring model before adjustment. In some application scenarios, the second image processing result may be a target recognition result of the first sample image, or may be a feature extraction result of the first sample image.

[0032] It can be understood that the input order of the first sample images into the parent model may be the same as the input order of the first sample images into the child model before adjustment.

[0033] After obtaining the first image processing result and the second image processing result, the difference between the first image processing result output by the parent model and the second image processing result output by the child model before adjustment is determined. Based on the difference between the first image processing result output by the parent model and the second image processing result output by the child model before adjustment, the parameters of the child model before adjustment are adjusted to obtain the child model, thereby guiding the child model before adjustment to learn the knowledge of the parent model.

[0034] Step S12: Use the first sample image and the second sample image to train the parent model to obtain an advanced parent model.

[0035] The first sample image is different from the second sample image.

[0036] The second sample image may be newly labeled data obtained after annotating the image data newly acquired by the image acquisition device. Exemplarily, the second sample image may be facial data related to the target object, or may be body data related to the target object. In some application scenarios, the second sample image may be newly added image data in the database. The number of image data in the second sample image may be several. Several may be one or more. It is understandable that the second sample image may be new sample data. The first sample image and the second sample image may be combined to obtain a new version of training data. Because the second sample image is the image data newly acquired by the image acquisition device, the first sample image is different from the second sample image. Exemplarily, the first sample image and the second sample image are image data of different target objects.

[0037] The first sample image and the second sample image are used to train the parent model to obtain the advanced parent model, which may be inputting the new version of the training data into the parent model to determine the loss corresponding to the new version of the training data. The parent model is adjusted based on the loss corresponding to the new version of the training data to obtain the advanced parent model.

[0038] In some application scenarios, the parameters in the parent model can be adjusted by sequentially performing the steps of defining a loss function, initializing the parameters of the parent model, forward propagation of the parent model, calculating the loss, back propagation, and parameter updating. Specifically, the process of adjusting the parameters in the parent model can be defining a loss function or selecting an appropriate loss function to measure the difference between the predicted result output by the parent model and the true result. In some application scenarios, the predicted result output by the parent model can be a third image processing result obtained by inputting the new version of the training data into the parent model. The true result can include the first annotation information annotated by the first sample image and the second annotation information annotated by the second sample image. For classification tasks, loss functions such as cross-entropy can be used. Initializing the parameters of the parent model can be initializing the parameters of the parent model, such as weights and biases. Forward propagation can be calculating the predicted result output by the parent model through forward propagation. Calculating the loss can be comparing the predicted result output by the parent model with the true result and calculating the value of the loss function. Back propagation can be calculating the gradient of the parameter to the loss function through the back propagation algorithm, that is, the rate of change of the parent model parameter relative to the loss function. The parameter update may be based on the gradient descent algorithm, using the negative gradient direction of the parameter to update the parameters of the parent model. There are multiple options for updating the parameters, such as batch gradient descent, stochastic gradient descent, or mini-batch gradient descent. The training device of the parent model may be a process of iteratively executing forward propagation, loss calculation, back propagation, and parameter update until a predetermined stop condition is reached, such as reaching a certain number of iterations or the loss function is reduced to a certain threshold. Through this process of adjusting the parameters in the parent model to obtain the advanced parent model, the parameters of the parent model are gradually adjusted to minimize the loss function and make the prediction results output by the parent model consistent with the actual results. The key point is to calculate the loss and gradient before each parameter update, and use this information to adjust the parameters during the update process. In this way, the adjusted advanced parent model will more accurately predict the category of the target object corresponding to each new version of the training data and improve the performance of the parent model.

[0039] Step S13: Obtain the third image processing result of the advanced parent model on the first sample image and the second sample image and the fourth image processing result of the child model on the first sample image and the second sample image.

[0040] The third image processing result of the advanced parent model on the first sample image and the second sample image may be inputting the first sample image and the second sample image into the advanced parent model, and obtaining the third image processing result output by the advanced parent model. In some application scenarios, the third image processing result may be the target recognition result of the new version of the training data, and may also be the feature extraction result of the new version of the training data. The fourth image processing result of the child model on the first sample image and the second sample image may be inputting the first sample image and the second sample image into the child model, and obtaining the fourth image processing result output by the child model. In some application scenarios, the fourth image processing result may be the target recognition result of the new version of the training data, and may also be the feature extraction result of the new version of the training data. It can be understood that the input order of the new version of the training data into the parent model may be the same as the input order of the new version of the training data into the child model before the adjustment.

[0041] Step S14: Based on the difference between the third image processing result and the fourth image processing result, the offspring model is adjusted to obtain an image processing model.

[0042] The image processing model can be used to perform image processing on the first sample image and the second sample image.

[0043] After obtaining the third image processing result and the fourth image processing result, the difference between the third image processing result output by the advanced parent model and the child model is determined. Based on the difference between the third image processing result output by the advanced parent model and the child model, the child model is parameter adjusted to obtain an image processing model, thereby guiding the child model to learn the knowledge of the advanced parent model.

[0044] In some application scenarios, the parameters in the child model can be adjusted by sequentially performing the steps of defining a loss function, initializing child model parameters, forward propagation of the child model, calculating loss, back propagation, and parameter updating. Specifically, the process of adjusting the parameters in the child model can be defining a loss function or selecting an appropriate loss function to measure the difference between the predicted result output by the child model and the true result. In some application scenarios, the predicted result output by the child model can be a fourth image processing result obtained by inputting the new version of the training data into the child model. The true result can include the first annotation information annotated by the first sample image and the second annotation information annotated by the second sample image. For classification tasks, loss functions such as cross-entropy can be used. Initializing the child model parameters can be initializing the parameters of the child model, such as weights and biases. Forward propagation can be calculating the predicted result output by the child model through forward propagation. Calculating loss can be comparing the predicted result output by the child model with the true result and calculating the value of the loss function. Back propagation can be calculating the gradient of the parameter to the loss function through the back propagation algorithm, that is, the rate of change of the child model parameter relative to the loss function. The parameter update may be based on the gradient descent algorithm, using the negative gradient direction of the parameter to update the parameters of the child model. There are multiple options for updating the parameters, such as batch gradient descent, stochastic gradient descent, or mini-batch gradient descent. The training device of the child model may be a process of iteratively executing forward propagation, loss calculation, back propagation, and parameter update until a predetermined stop condition is reached, such as reaching a certain number of iterations or the loss function is reduced to a certain threshold. Through this process of adjusting the parameters in the child model to obtain the image processing model, the child model parameters will gradually adjust to minimize the loss function and make the prediction results output by the child model consistent with the true results. The key point is to calculate the loss and gradient before each parameter update, and use this information to adjust the parameters during the update process. In this way, the image processing model obtained after adjustment will more accurately predict the category of the target object corresponding to each new version of the training data and improve the performance of the child model.

[0045] In the above scheme, the first sample image is used to adjust the offspring model, the first sample image and the second sample image are used to train the parent model to obtain an advanced parent model, the third image processing results and the fourth image processing results of the advanced parent model and the offspring model for the first sample image and the second sample image are obtained respectively, and the offspring model is adjusted based on the difference between the third image processing result and the fourth image processing result to obtain the image processing model. Compared with the prior art that cannot achieve compatibility between the image processing results of the model before and after the upgrade, the image processing model obtained by the present application based on the adjustment of the first sample image and the second sample image can learn the representation ability of the advanced parent model, thereby improving the compatibility between the image processing results of the offspring model and the image processing results of the image processing model.

[0046] In some embodiments, the training method of the image processing model may further include the following steps:

[0047] Obtain the image data of the target to be identified and use the image processing model to perform image processing on the image data to obtain an image processing result.

[0048] The image data to be identified may be image data related to the target to be identified that is captured by an image acquisition device. The target to be identified may be the above-mentioned target object. Specifically, the target to be identified may be a biological body, or a physical building, or a vehicle. In some application scenarios, if the target to be identified is a biological body, the image data to be identified may be facial digital data or body data related to the target to be identified. In other application scenarios, if the target to be identified is a building, the image data to be identified may be contour data or structural data related to the target to be identified. In other application scenarios, if the target to be identified is a vehicle, the image data to be identified may be vehicle model data or body data related to the target to be identified.

[0049] The image data to be identified is input into the trained image processing model for image processing to obtain an image processing result. The image processing result may be an image recognition result of the image data to be identified, or a feature extraction result of the image data to be identified. In some application scenarios, the image processing performed by inputting the image data to be identified into the image processing model is target recognition processing, and the image processing result obtained is the recognition result of the image data to be identified. Among them, the recognition result may belong to the object to be identified or not belong to the object to be identified. The recognition result may also be whether it belongs to a certain motion pattern of the object to be identified. In other application scenarios, a child classification layer is connected to the child model, and the step of adjusting the child model based on the difference between the third image processing result and the fourth image processing result to obtain the image processing model may include: performing back propagation based on the difference between the third image processing result and the fourth image processing result, first updating the parameters of the child classification layer connected to the child model, obtaining the updated child classification layer, and using the updated child classification layer as the classification layer connected after the image processing model. Then updating the parameters of the child model to obtain the adjusted child model, and using the adjusted child model as the image processing model. Obtain the image data to be identified of the target to be identified. The image processing model is used to perform image processing on the image data to be identified, and an image processing result is obtained. The image processing result is a feature extraction result of the image data to be identified. The image processing performed on the image data to be identified by the image processing model is feature extraction, and the image processing result is a feature extraction result of the image data to be identified. The feature extraction result is input into the updated child classification layer to obtain the recognition result of the image data to be identified. Among them, the recognition result can be that it belongs to the object to be identified or does not belong to the object to be identified.

[0050] It can be considered that, compared with directly using the advanced parent model to process the image data to be identified, directly using the image processing model to perform relevant image processing on the image data to be identified can reduce model resource usage. In addition, the image processing model is obtained by iteratively upgrading and training the child model based on the new version of the training data, which can achieve more accurate image processing effects with less resource usage.

[0051] In some embodiments, the first image processing result includes first feature data obtained by extracting a first feature from the first sample image, and the second image processing result includes second feature data obtained by extracting a second feature from the first sample image. The training method of the image processing model may also include the following steps: obtaining a child model before adjustment. Then, using at least one similarity calculation method to determine at least one second similarity between the first feature data and the second feature data. Subsequently, based on the at least one second similarity, determining a second similarity loss. Then, based on the second similarity loss, adjusting the parameters of the child model before adjustment, to obtain the child model.

[0052] See also Figure 2 , Figure 2 This is a flow chart of an embodiment of a training method for an image processing model of the present application. Figure 2 .

[0053] The first sample image is the old version of training data. Obtain the parent model and the child model before adjustment. Input the first sample image into the parent model and the child model before adjustment respectively, and the input order of the first sample image into the parent model can be the same as the input order of the first sample image into the child model before adjustment. The first sample image is input into the parent model for image processing to obtain a first image processing result. Specifically, the first sample image is input into the parent model for first feature extraction, and the first image processing result is obtained as the first feature data. The first sample image is input into the child model before adjustment for image processing to obtain a second image processing result. Specifically, the first sample image is input into the child model before adjustment for second feature extraction, and the second image processing result is obtained as the second feature data. In the case where the first sample image contains multiple image data, the first feature data includes the same number of feature data as the image data in the first sample image. That is, the number of feature data included in the first feature data is multiple. Each feature data in the first feature data is each image data in the first sample image input into the parent model for image processing to obtain the first image processing result corresponding to each image data. In the case where the first sample image contains multiple image data, the second feature data includes the same number of feature data as the image data in the first sample image. That is, the number of feature data included in the second feature data is multiple. Each feature data in the first feature data is input into the child model before adjustment for each image data in the first sample image to perform image processing, and obtain the second image processing result corresponding to each image data.

[0054] After obtaining the first image processing result and the second image processing result, the difference between the first image processing result output by the parent model and the second image processing result output by the child model before adjustment is determined. The step of determining the difference between the first image processing result output by the parent model and the second image processing result output by the child model before adjustment includes: determining at least one second similarity between the first feature data and the second feature data using at least one similarity calculation method. Determine at least one second similarity between the first feature data corresponding to the same image data in the first sample image and the second feature data corresponding to the same image data in the first sample image using at least one similarity calculation method. Determine the similarity between the first feature data corresponding to the same image data in the first sample image and the second feature data corresponding to the same image data in the first sample image as the second similarity. It can be understood that the second similarity determined is different when the similarity calculation method used is different. For the same image data in the first sample image, the number of the second similarities determined is the same as the type of the similarity calculation method. Determine the second similarity loss based on the at least one second similarity. And use the second similarity loss as the difference between the first image processing result output by the parent model and the second image processing result output by the child model before adjustment. In some application scenarios, the similarity calculation method may be a similarity calculation related to a hash algorithm. The multiple similarity calculation methods may be different types of hash algorithms. The hash algorithm in the multiple similarity calculation methods may refer to a difference hash algorithm (DHash, Difference Hash), a wavelet hash algorithm (WHash, Wavelet Hash), a mean hash algorithm (aHash), and a perceptual hash algorithm (pHash), etc. In other application scenarios, the multiple similarity calculation methods may also include cosine similarity and Euclidean distance similarity. It is understandable that the above-mentioned similarity calculation method determines the similarity between the first feature data and the second feature data as the second similarity. Exemplarily, the similarity between the first feature data and the second feature data is determined as the second similarity based on a hash algorithm type method. The similarity between the first feature data and the second feature data is determined as the second similarity based on cosine similarity. The similarity between the first feature data and the second feature data is determined as the second similarity based on Euclidean distance similarity. In some application scenarios, when only one similarity calculation method is used to determine a similarity between the first feature data and the second feature data, the similarity is directly used as the second similarity, and the value of the second similarity is used as the second similarity loss. The second similarity loss is directly used to adjust the parameters of the offspring model before adjustment to obtain the offspring model.In some other application scenarios, in the case where at least two similarities between the first feature data and the second feature data are determined using at least two similarities calculation methods, the at least two similarities are directly used as at least two second similarities. The values ​​of the at least two second similarities are weighted and summed, and the value after the weighted sum is used as the second similarity loss. The second similarity loss is used to adjust the parameters of the offspring model before adjustment to obtain the offspring model. Exemplarily, the cosine similarity and the Euclidean distance similarity between the first feature data and the second feature data are determined respectively. The cosine similarity is multiplied by the cosine weight to obtain the cosine product. The Euclidean distance similarity is multiplied by the Euclidean distance weight to obtain the Euclidean distance product. Among them, the sum of the cosine weight and the Euclidean distance weight is one. The cosine product is added to the Euclidean distance product to obtain the second similarity loss. Specifically, the second similarity loss can refer to formula (1):.

[0055] Formula (1);

[0056] in, It can represent multiplication and it can represent the multiplication sign. The first characteristic data can be represented by It can represent the second feature data, wherein the first feature data and the second feature data are respectively the first image processing result and the second image processing result corresponding to the same image data in the first sample image. It can represent the cosine similarity, It can represent the Euclidean distance similarity, can represent the first weight, can represent the second weight, can be expressed as cosine product, can represent the Euclidean distance product, The second similarity loss may be represented by . Exemplarily, the first weight and the second weight may be set to 0.5, respectively.

[0057] In some embodiments, the training method of the image processing model may further include the following steps: first, classify the second feature data using the classification layer corresponding to the offspring model before adjustment to obtain an initial classification result. Then, determine the initial classification loss based on the difference between the initial classification result and the first sample label corresponding to the first sample image.

[0058] The classification layer corresponding to the offspring model before adjustment can be as follows Figure 2The initial classification layer shown. Each second feature data is input into the initial classification layer to obtain an initial classification result corresponding to each second feature data. A second image processing result included in the second feature data may correspond to an initial classification result. The initial classification result may be a prediction result of the initial classification layer for each second feature data. There may be multiple initial classification results. Any initial classification result may be a classification result obtained by inputting any second feature data into the initial classification layer. Among them, the initial classification result may indicate whether the first sample image belongs to the target object. The first sample label corresponding to the first sample image may be a sample label corresponding to any image data in the first sample image. Specifically, the first sample label corresponding to the first sample image may be a true result of annotating each second feature data. In some application scenarios, the initial classification layer may correspond to a multi-classification task. The initial classification loss may be determined using a cross-entropy loss function (Cross-Entropy Loss), and the specific calculation method is not specifically limited here. This loss function is particularly suitable for converting the initial classification results output by the initial classification layer into a probability form and calculating the difference between these probabilities and the true labels. The cross entropy loss function is designed to measure the difference between the predicted probability distribution and the true probability distribution. The smaller the value, the closer the two probability distributions are.

[0059] In other application scenarios, the training process of the offspring model before adjustment can be unsupervised training. The process of determining the initial classification loss in the case of unsupervised training can refer to formula (2):

[0060] Formula (2);

[0061] in, It can represent multiplication and it can represent the multiplication sign. It can represent the second feature data corresponding to any image data in the first sample image. It can represent the weight of the initial classification layer. It can represent the bias of the initial classification layer. It can represent the initial classification result obtained by processing any second feature data in the first sample image through the initial classification layer. It can represent the probability corresponding to the initial classification result. For example, It can represent the classification confidence of the output of the initial classification layer. can represent the initial classification loss.

[0062] In some embodiments, the step of obtaining the offspring model by adjusting the parameters of the offspring model before based on the second similarity loss may include the following steps: obtaining the offspring model by adjusting the parameters of the offspring model before based on the initial classification loss and the second similarity loss.

[0063] The initial classification loss and the second similarity loss are weighted summed to obtain Figure 2 The first total loss shown. The second similarity loss is multiplied by the second similarity weight to obtain a second similarity product. The initial classification loss is multiplied by the initial classification weight to obtain an initial classification product. The sum of the second similarity weight and the initial classification weight is one. The second similarity product is summed with the initial classification product to obtain the first total loss.

[0064] Specifically, the process of determining the first total loss can refer to formula (3):

[0065] Formula (3);

[0066] in, It can represent multiplication and it can represent the multiplication sign. can represent the second similarity weight, It can represent the initial classification weight. The second similarity loss can be represented by . can represent the initial classification loss. The second similarity product may be represented by . can represent the initial classification product. The first total loss may be represented by . Exemplarily, the second similarity weight may be set to 0.8.

[0067] It can be considered that the initial classification layer and the offspring model before adjustment are adjusted in reverse order based on the first total loss to obtain the offspring model, so that the offspring model learns knowledge related to the feature extraction function from the parent model.

[0068] In some embodiments, the first image processing result includes a first result obtained by extracting features from the first sample image. The above step S12 may include the following steps: first, classify the first result using the first classification layer corresponding to the parent model to obtain a first sample classification result, and classify the second result obtained by extracting features from the second sample image using the second classification layer corresponding to the parent model to obtain a second sample classification result. Next, determine the first classification loss based on the difference between the first sample classification result and the first sample label corresponding to the first sample image, and determine the second classification loss based on the difference between the second sample classification result and the second sample label corresponding to the second sample image. Subsequently, determine the gradient loss by combining the first classification loss and the second classification loss. Then, adjust the parameters of the parent model based on the gradient loss to obtain an advanced parent model.

[0069] See also Figure 3 , Figure 3 This is a flow chart of an embodiment of a training method for an image processing model of the present application. Figure 3 .

[0070] The first sample image and the second sample image are combined to obtain a new version of training data. The first sample image and the second sample image are respectively input into the parent model, and the input order of the first sample image into the parent model can be the same as the input order of the first sample image into the parent model in the step of training to obtain the child model. The first sample image is input into the parent model for image processing to obtain a first image processing result. Specifically, the first sample image is input into the parent model for feature extraction to obtain a first result. The second sample image is input into the parent model for feature extraction to obtain a second result. The first result is input into the first classification layer to obtain a first classification result. Based on the difference between the first sample classification result and the first sample label corresponding to the first sample image, a first classification loss is determined. The second result is input into the second classification layer to obtain a second classification result. Based on the difference between the second sample classification result and the second sample label corresponding to the second sample image, a second classification loss is determined. It can be understood that the process of determining the first classification loss and determining the second classification loss can refer to the above formula (2). The first classification loss and the second classification loss can be determined using the cross entropy loss function.

[0071] In some application scenarios, after determining the first classification loss and the second classification loss, such as Figure 3 As shown, the parameters of the first classification layer are reversely adjusted based on the first classification loss. And, the parameters of the second classification layer are reversely adjusted based on the first classification loss. The first classification loss and the second classification loss can be fused to obtain the gradient loss by combining the first classification loss and the second classification loss. In some application scenarios, the first classification loss and the second classification loss can be weighted summed to obtain the gradient loss. The parameters of the parent model are reversely adjusted based on the gradient loss to obtain the advanced parent model.

[0072] It can be considered that the process of adjusting the parent model based on the new training data to obtain the advanced parent model ensures that the advanced parent model does not forget the model accuracy determined by the old training data, and also has the model accuracy of the newly added data, thereby achieving rapid iterative upgrade of the parent model.

[0073] In some embodiments, before the step of classifying the second result obtained by extracting features from the second sample image using the second classification layer corresponding to the parent model to obtain the second sample classification result, the training method of the image processing model may further include the following steps: First, obtain a newly added classification layer corresponding to the parent model. Then, classify the second result using the newly added classification layer to obtain a newly added classification result. Then, based on the difference between the newly added classification result and the second sample label, determine the newly added classification loss. Subsequently, based on the newly added classification loss, adjust the parameters of the newly added classification layer to obtain the second classification layer.

[0074] See also Figure 4 , Figure 4 This is a flow chart of an embodiment of a training method for an image processing model of the present application. Figure 4 .

[0075] like Figure 4 As shown, the newly added classification layer corresponding to the parent model can be an initial blank classification layer, or it can be the first classification layer that has been trained with the old version of training data. In some application scenarios, when the parent model is obtained, the first classification layer corresponding to the parent model can be directly obtained. The parent model is a known model, and the parameters of the parent model are fixed. The parent model can extract features from the first sample image, and at this time the parent model can meet the accuracy requirements for feature extraction of the first sample image. After the parent model, a known first classification layer is connected. The parameters of the first classification layer are fixed.

[0076] like Figure 4 As shown, freeze the parameters of the parent model and obtain the newly added classification layer corresponding to the parent model. Input the second sample image into the parent model to obtain the second result. Input the second result into the newly added classification layer to classify the second result to obtain a newly added classification result. Based on the difference between the newly added classification result and the second sample label, determine the newly added classification loss. The process of determining the newly added classification loss can refer to the above formula (2). The newly added classification loss can be determined using the cross entropy loss function. In some application scenarios, after determining the newly added classification loss, such as Figure 3 As shown, the parameters of the newly added classification layer are reversely adjusted based on the newly added classification loss to obtain the adjusted newly added classification layer. The adjusted newly added classification layer is used as the second classification layer.

[0077] In some embodiments, the above step S14 may include the following steps: first, using at least one similarity calculation method to determine at least one first similarity between the third image processing result and the fourth image processing result. Secondly, based on the at least one first similarity, determine a first similarity loss. Then, based on the first similarity loss, adjust the parameters of the child model to obtain the image processing model.

[0078] See also Figure 5 , Figure 5 This is a flow chart of an embodiment of a training method for an image processing model of the present application. Figure 5 .

[0079] The first sample image and the second sample image are merged into a new version of training data. An advanced parent model and a child model are obtained. The first sample image and the second sample image are input into the advanced parent model and the child model respectively, and the input order of the first sample image and the second sample image into the advanced parent model can be the same as the input order of the first sample image and the second sample image into the child model. The first sample image and the second sample image are input into the advanced parent model for image processing to obtain a third image processing result. Specifically, the first sample image and the second sample image are input into the advanced parent model for third feature extraction, and the third image processing result is obtained as the third feature data. The total number of image data of the image data in the first sample image and the image data in the second sample image can be equal to the number of the third image processing results included in the third feature data. The first sample image and the second sample image are input into the child model for image processing to obtain a fourth image processing result. The total number of image data of the image data in the first sample image and the image data in the second sample image can be equal to the number of the fourth image processing results included in the fourth feature data. Specifically, the first sample image and the second sample image are input into the child model for fourth feature extraction, and the fourth image processing result is obtained as the fourth feature data. After obtaining the third image processing result and the fourth image processing result, determine the difference between the third image processing result output by the advanced parent model and the fourth image processing result output by the child model. The above step of determining the difference between the third image processing result output by the advanced parent model and the fourth image processing result output by the child model includes: using at least one similarity calculation method to determine at least one second similarity between the third feature data and the fourth feature data. Based on at least one second similarity, determine the second similarity loss. And use the second similarity loss as the difference between the third image processing result output by the advanced parent model and the fourth image processing result output by the child model. In some application scenarios, the similarity calculation method can be a similarity calculation related to a hash algorithm. Multiple similarity calculation methods can be different types of hash algorithms. The hash algorithm in the multiple similarity calculation methods can refer to a difference hash algorithm (DHash, DifferenceHash), a wavelet hash algorithm (WHash, Wavelet Hash), a mean hash algorithm (aHash), and a perceptual hash algorithm (pHash), etc. In other application scenarios, the multiple similarity calculation methods may also include cosine similarity and Euclidean distance similarity. It is understandable that the similarity between the third feature data and the fourth feature data is determined as the second similarity by a similarity calculation method. Exemplarily, the similarity between the third feature data and the fourth feature data is determined as the second similarity based on a hash algorithm type method. The similarity between the third feature data and the fourth feature data is determined as the second similarity based on cosine similarity.Based on the Euclidean distance similarity, the similarity between the third feature data and the fourth feature data is determined as the second similarity. In some application scenarios, for the case where only one similarity calculation method is used to determine a similarity between the third feature data and the fourth feature data, the similarity is directly used as the second similarity, and the value of the second similarity is used as the second similarity loss. The second similarity loss is directly used to adjust the parameters of the offspring model to obtain the offspring model. In other application scenarios, for the case where at least two similarities between the third feature data and the fourth feature data are determined using at least two similarities calculation methods, the at least two similarities are directly used as at least two second similarities. The values ​​of the at least two second similarities are weighted summed, and the value after the weighted sum is used as the second similarity loss. The offspring model is parameterized using the second similarity loss to obtain the offspring model. Exemplarily, the second cosine similarity and the second Euclidean distance similarity between the third feature data and the fourth feature data are respectively determined. The second cosine similarity is multiplied by the second cosine weight to obtain the second cosine product. The second Euclidean distance similarity is multiplied by the second Euclidean distance weight to obtain a second Euclidean distance product, wherein the sum of the second cosine weight and the second Euclidean distance weight is 1. The second cosine product is added to the second Euclidean distance product to obtain a first similarity loss.

[0080] In some embodiments, the fourth image processing result includes feature data obtained by extracting features from the first sample image and the second sample image. The image processing model training method may also include the following steps: first, classifying the feature data using the classification layer corresponding to the child model to obtain a target classification result. Second, determining the target classification loss based on the difference between the target classification result and the sample label.

[0081] The classification layer corresponding to the offspring model can be Figure 5 The target classification layer shown. The fourth image processing result is input into the target classification layer. The target classification result is obtained. The fourth feature data is input into the target classification layer to obtain the target classification result. The target classification result may be a prediction result of the target classification layer for the fourth feature data. Among them, the target classification result may indicate whether the first sample image belongs to the target object. In some application scenarios, the target classification layer may correspond to a multi-classification task. The target classification loss may utilize a cross-entropy loss function (Cross-Entropy Loss). The process of determining the target classification loss may refer to the above formula (2). The target classification loss may be determined using the cross-entropy loss function.

[0082] In some embodiments, the above-mentioned step of adjusting the parameters of the offspring model based on the first similarity loss to obtain the image processing model may include the following steps: adjusting the parameters of the offspring model based on the target classification loss and the first similarity loss to obtain the image processing model.

[0083] The target classification loss and the first similarity loss are weighted and summed to obtain Figure 5 The second total loss shown. The first similarity loss is multiplied by the first similarity weight to obtain a first similarity product. The target classification loss is multiplied by the target classification weight to obtain a target classification product. The sum of the first similarity weight and the target classification weight is one. The first similarity product and the target classification product are summed to obtain a second total loss.

[0084] It can be considered that the parameters of the target classification layer and the parameters of the child model are adjusted in reverse order based on the first total loss to obtain an image processing model, so that the image processing model learns knowledge related to the feature extraction function from the advanced parent model. At this time, by first iteratively upgrading the parent model to obtain the advanced parent model, the child model can be guided to learn the knowledge related to feature extraction in the advanced parent model, thereby completing the iterative upgrade of the child model to obtain the image processing model.

[0085] It can be considered that the use of the second similarity loss to upgrade the offspring model before adjustment to the offspring model can make the image processing result (new feature) corresponding to the first sample image in the fourth image processing result compatible with multiple old features, which are the second image processing results. If there are multiple offspring models obtained by upgrading, compatibility between the image processing results output by the multiple offspring models obtained by upgrading can be achieved. In addition, the present application can also avoid the loss of precision of new features in order to be compatible with old features, and give full play to the performance of new features. In addition, back propagation is performed according to the first total loss and the offspring model parameters before adjustment are updated, so that the representation ability of the parent model can be targetedly inherited or migrated to the offspring model before adjustment to obtain the offspring model. If there are multiple offspring models obtained by upgrading, and at the same time, since each offspring model is inherited or migrated to the same parent model, the relationship between each offspring model can be understood as the same clan blood relationship, so the image processing results or extracted features output by each offspring model are compatible with each other.

[0086] It can be considered that the use of the first similarity loss to upgrade the offspring model to an image processing model can make the image processing result (new feature) corresponding to the first sample image in the processing result output by the image processing model compatible with the image processing result corresponding to the first sample image in the fourth image processing result. If there are multiple upgraded image processing models, the image processing results output by the multiple upgraded image processing models can be compatible with each other. In addition, the present application can also avoid the loss of accuracy of new features in order to be compatible with old features, and give full play to the performance of new features. In addition, back propagation is performed and the offspring model parameters are updated according to the second total loss, so that the representation ability of the advanced parent model can be targetedly inherited or migrated to the offspring model to obtain an image processing model. If there are multiple upgraded image processing models, and at the same time, since each image processing model is inherited or migrated to the same advanced parent model, the relationship between the image processing models can be understood as the same clan, so the image processing results or extracted features output by each image processing model are compatible with each other.

[0087] In the above scheme, the first sample image is used to adjust the offspring model, the first sample image and the second sample image are used to train the parent model to obtain an advanced parent model, the third image processing results and the fourth image processing results of the advanced parent model and the offspring model for the first sample image and the second sample image are obtained respectively, and the offspring model is adjusted based on the difference between the third image processing result and the fourth image processing result to obtain the image processing model. Compared with the prior art that cannot achieve compatibility between the image processing results of the model before and after the upgrade, the image processing model obtained by the present application based on the adjustment of the first sample image and the second sample image can learn the representation ability of the advanced parent model, thereby improving the compatibility between the image processing results of the offspring model and the image processing results of the image processing model.

[0088] See also Figure 6 , Figure 6It is a structural diagram of an embodiment of a training device for an image processing model of the present application. The training device 60 of the image processing model includes a first acquisition module 61, a parent model training module 62, a second acquisition module 63 and a child model adjustment module 64; the first acquisition module 61 is used to acquire the parent model and the child model, the child model is adjusted based on the difference between the first image processing result of the parent model on the first sample image and the second image processing result of the child model on the first sample image before adjustment, and the complexity of the child model is less than the complexity of the parent model; the parent model training module 62 is used to train the parent model using the first sample image and the second sample image to obtain an advanced parent model, and the first sample image is different from the second sample image; the second acquisition module 63 is used to acquire the third image processing result of the advanced parent model on the first sample image and the second sample image and the fourth image processing result of the child model on the first sample image and the second sample image; the child model adjustment module 64 is used to adjust the child model based on the difference between the third image processing result and the fourth image processing result to obtain the image processing model, wherein the image processing model can be used to perform image processing on the first sample image and the second sample image.

[0089] In the above scheme, the first sample image is used to adjust the offspring model, the first sample image and the second sample image are used to train the parent model to obtain an advanced parent model, the third image processing results and the fourth image processing results of the advanced parent model and the offspring model for the first sample image and the second sample image are obtained respectively, and the offspring model is adjusted based on the difference between the third image processing result and the fourth image processing result to obtain the image processing model. Compared with the prior art that cannot achieve compatibility between the image processing results of the model before and after the upgrade, the image processing model obtained by the present application based on the adjustment of the first sample image and the second sample image can learn the representation ability of the advanced parent model, thereby improving the compatibility between the image processing results of the offspring model and the image processing results of the image processing model.

[0090] For the functions performed by each module, please refer to the training method of the image processing model, which will not be repeated here.

[0091] See also Figure 7 , Figure 7 : is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device 70 includes a memory 71 and a processor 72, and the processor 72 is used to execute program instructions stored in the memory 71 to implement the steps in the training method embodiment of the above-mentioned image processing model. In a specific implementation scenario, the electronic device 70 may include but is not limited to: a multi-camera device, a microcomputer, and a server. In addition, the electronic device 70 may also include mobile devices such as laptops and tablet computers, which are not limited here.

[0092] Specifically, the processor 72 is used to control itself and the memory 71 to implement the steps in the training method embodiment of the above-mentioned image processing model. The processor 72 can also be called a CPU (Central Processing Unit). The processor 72 may be an integrated circuit chip with signal processing capabilities. The processor 72 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 72 can be implemented by an integrated circuit chip.

[0093] In the above scheme, the first sample image is used to adjust the offspring model, the first sample image and the second sample image are used to train the parent model to obtain an advanced parent model, the third image processing results and the fourth image processing results of the advanced parent model and the offspring model for the first sample image and the second sample image are obtained respectively, and the offspring model is adjusted based on the difference between the third image processing result and the fourth image processing result to obtain the image processing model. Compared with the prior art that cannot achieve compatibility between the image processing results of the model before and after the upgrade, the image processing model obtained by the present application based on the adjustment of the first sample image and the second sample image can learn the representation ability of the advanced parent model, thereby improving the compatibility between the image processing results of the offspring model and the image processing results of the image processing model.

[0094] See also Figure 8 , Figure 8 The computer-readable storage medium 80 stores program instructions 801, which, when executed by a processor, implement the steps in any of the above-mentioned training methods for image processing models.

[0095] In the above scheme, the first sample image is used to adjust the offspring model, the first sample image and the second sample image are used to train the parent model to obtain an advanced parent model, the third image processing results and the fourth image processing results of the advanced parent model and the offspring model for the first sample image and the second sample image are obtained respectively, and the offspring model is adjusted based on the difference between the third image processing result and the fourth image processing result to obtain the image processing model. Compared with the prior art that cannot achieve compatibility between the image processing results of the model before and after the upgrade, the image processing model obtained by the present application based on the adjustment of the first sample image and the second sample image can learn the representation ability of the advanced parent model, thereby improving the compatibility between the image processing results of the offspring model and the image processing results of the image processing model.

[0096] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0097] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0098] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0099] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0100] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

Claims

1. A training method for an image processing model, characterized in that: The method comprises: Acquire a parent model and a child model, wherein the child model is obtained by adjusting the difference between a first image processing result of the parent model on the first sample image and a second image processing result of the child model before adjustment on the first sample image, and the complexity of the child model is less than the complexity of the parent model; The parent model is trained using the first sample image and the second sample image to obtain an advanced parent model, wherein the first sample image is different from the second sample image, and the second sample image is newly added image data; Obtaining a third image processing result of the advanced parent model on the first sample image and the second sample image and a fourth image processing result of the child model on the first sample image and the second sample image; Based on the difference between the third image processing result and the fourth image processing result, adjusting the child model to obtain an image processing model, wherein the image processing model can be used to perform image processing on the first sample image and the second sample image; The first image processing result includes a first result obtained by extracting features from the first sample image, and the training of the parent model using the first sample image and the second sample image to obtain the advanced parent model includes: Using the first classification layer corresponding to the parent model to classify the first result, to obtain a first sample classification result; and using the second classification layer corresponding to the parent model to classify the second result obtained by performing feature extraction on the second sample image, to obtain a second sample classification result; Determine a first classification loss based on a difference between the first sample classification result and a first sample label corresponding to the first sample image, and determine a second classification loss based on a difference between the second sample classification result and a second sample label corresponding to the second sample image; Determine a gradient loss by combining the first classification loss and the second classification loss; Based on the gradient loss, the parameters of the parent model are adjusted to obtain the advanced parent model.

2. The method according to claim 1, characterized in that The step of adjusting the child model based on the difference between the third image processing result and the fourth image processing result to obtain the image processing model comprises: Determine at least one first similarity between the third image processing result and the fourth image processing result by using at least one similarity calculation method; Based on the at least one first similarity, determining a first similarity loss; Based on the first similarity loss, the parameters of the child model are adjusted to obtain the image processing model.

3. The method according to claim 2, characterized in that The fourth image processing result includes feature data obtained by extracting features from the first sample image and the second sample image, and the method further includes: Using the classification layer corresponding to the offspring model to classify the feature data, to obtain a target classification result; Determining a target classification loss based on a difference between the target classification result and the sample label; The adjusting the parameters of the child model based on the first similarity loss to obtain the image processing model includes: Based on the target classification loss and the first similarity loss, the parameters of the child model are adjusted to obtain the image processing model.

4. The method according to claim 1, characterized in that: Before classifying the second result obtained by extracting features from the second sample image using the second classification layer corresponding to the parent model to obtain the second sample classification result, the method further includes: Obtain a newly added classification layer corresponding to the parent model; Using the newly added classification layer to classify the second result, to obtain a newly added classification result; Determining a new classification loss based on a difference between the new classification result and the second sample label; Based on the newly added classification loss, the parameters of the newly added classification layer are adjusted to obtain the second classification layer.

5. The method according to any one of claims 1 to 3, characterized in that: The first image processing result includes first feature data obtained by extracting a first feature from the first sample image, and the second image processing result includes second feature data obtained by extracting a second feature from the first sample image. The method further includes: Obtaining the offspring model before the adjustment; Determine at least one second similarity between the first feature data and the second feature data using at least one similarity calculation method; Based on the at least one second similarity, determining a second similarity loss; Based on the second similarity loss, the parameters of the offspring model before adjustment are adjusted to obtain the offspring model.

6. The method according to claim 5, characterized in that The method further comprises: Classifying the second feature data using the classification layer corresponding to the offspring model before adjustment to obtain an initial classification result; Determining an initial classification loss based on a difference between the initial classification result and a first sample label corresponding to the first sample image; The adjusting the parameters of the offspring model before adjustment based on the second similarity loss to obtain the offspring model includes: Based on the initial classification loss and the second similarity loss, the parameters of the offspring model before adjustment are adjusted to obtain the offspring model.

7. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Acquire image data of a target to be identified; The image processing model is used to perform image processing on the image data to be identified to obtain an image processing result.

8. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the training method of the image processing model as described in any one of claims 1-7.

9. A computer-readable storage medium, characterized in that: include: A program file is stored, and when the program file is executed by a processor, it is used to implement the training method of the image processing model as described in any one of claims 1-7.