Model training method, image processing method, device, and computer program product
By obtaining image and object category information from the source and target domains, determining mask images, and performing model training, the problem of poor generalization of image processing models during domain migration is solved, and the processing quality and effect of the target task model are improved.
Patent Information
- Application Number
- PCT/IB2025/051460
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-21
- Filing Date
- 2025-02-12
- Publication Date
- 2025-09-25
AI Technical Summary
Due to the large differences in images in different fields or scenes, the image processing models in existing technologies have poor generalization during domain migration, resulting in decreased processing performance.
By obtaining images of the source domain and target domain as well as object category information, determining the mask image of the target domain, and performing model training based on this information, a target task model for processing source domain and target domain images is obtained.
The processing quality and effect of the target task model after domain migration are improved, which improves the practicality of the model.
Smart Images

Figure IB2025051460_25092025_PF_FP_ABST
Abstract
Description
[0001]TECHNICAL FIELD The present disclosure relates to the field of network technology, and more particularly to a model training method, image processing method, device, and computer program product. Background: Domain transfer (Domain Adaptation) is a concept in machine learning that refers to the process of adapting an image processing model trained in a certain domain (source image domain) so that it can also function effectively in a different but related domain (target image domain). However, due to the significant differences between images in different domains or scenes (such as inspection scenes, drones, and mobile phone images), image processing models trained in a specific domain have poor generalization when applied to new domains, which can easily lead to a decrease in the image processing model's processing performance. SUMMARY OF THE INVENTION Embodiments of the present disclosure provide a model training method, image processing method, device, and computer program product that can ensure the model processing performance of the target task model after domain transfer, further improving the practicality of the method. In a first aspect, embodiments of the present disclosure provide a model training method, comprising: obtaining a source domain image, a target domain image, and object category information to be identified in the target domain image, wherein a source domain corresponding to the source domain image is different from a target domain corresponding to the target domain image; determining a mask image corresponding to the target domain image based on the object category information; and performing a model training operation based on the source domain image, the target domain image, the object category information, and the mask image to obtain a target task model for processing images in the source domain and the target domain. In a second aspect, embodiments of the present disclosure provide a model training apparatus, comprising: a first acquisition module for acquiring a source domain image, a target domain image, and object category information to be recognized in the target domain image, wherein the source domain corresponding to the source domain image is different from the target domain corresponding to the target domain image; a first determination module for determining a mask image corresponding to the target domain image based on the object category information; and a first processing module for performing a model training operation based on the source domain image, the target domain image, the object category information, and the mask image to obtain a target task model for processing images in the source and target domains. In a third aspect, embodiments of the present disclosure provide an electronic device, comprising: a memory and a processor; wherein the memory is configured to store one or more computer instructions, wherein when executed by the processor, the one or more computer instructions implement the model training method described in the first aspect.In a fourth aspect, embodiments of the present invention provide a computer storage medium for storing a computer program, wherein the computer program, when executed by a computer, implements the model training method described in the first aspect. In a fifth aspect, embodiments of the present invention provide a computer program product, comprising: a computer program, which, when executed by a processor of an electronic device, causes the processor to perform the steps of the model training method described in the first aspect. In a sixth aspect, embodiments of the present invention provide an image processing method, comprising: obtaining an image to be processed, wherein the image to be processed corresponds to a target domain; determining a target task model for processing the image to be processed, wherein the target task model is determined by model training based on a source domain image, a target domain image, object category information, and a mask image corresponding to the target domain image, wherein the source domain corresponding to the source domain image is different from the target domain corresponding to the target domain image, and the mask image is determined based on object category information to be recognized in the target domain image; and processing the image to be processed using the target task model to obtain an image processing result. In a seventh aspect, embodiments of the present invention provide an image processing apparatus, comprising: a second acquisition module for acquiring an image to be processed, the image to be processed corresponding to a target domain; a second determination module for determining a target task model for processing the image to be processed, the target task model determined by model training using a source domain image, a target domain image, object category information, and a mask image corresponding to the target domain image, wherein the source domain corresponding to the source domain image is different from the target domain corresponding to the target domain image, and the mask image is determined based on object category information to be identified in the target domain image; and a second processing module for processing the image to be processed using the target task model to obtain an image processing result. In an eighth aspect, embodiments of the present invention provide an electronic device, comprising: a memory and a processor; wherein the memory is configured to store one or more computer instructions, wherein when executed by the processor, the one or more computer instructions implement the image processing method described in the sixth aspect. In a ninth aspect, embodiments of the present invention provide a computer storage medium for storing a computer program, wherein when executed by a computer, the computer program causes a computer to implement the image processing method described in the sixth aspect. In a tenth aspect, an embodiment of the present invention provides a computer program product, comprising: a computer program, which, when executed by a processor of an electronic device, causes the processor to execute the steps of the image processing method shown in the sixth aspect above.In an eleventh aspect, embodiments of the present disclosure provide a method for training an image detection model, comprising: obtaining object category information to be identified from a first detection image, a second detection image, and the second detection image, wherein a first scene corresponding to the first detection image is different from a second scene corresponding to the second detection image; determining a mask image corresponding to the second detection image based on the object category information; and performing model training based on the first detection image, the second detection image, the object category information, and the mask image to obtain an object detection model for performing detection operations on images obtained from the first and second scenes. In a twelfth aspect, embodiments of the present disclosure provide an apparatus for training an image detection model, comprising: a third acquisition module for obtaining object category information to be identified from a first detection image, a second detection image, and the second detection image, wherein a first scene corresponding to the first detection image is different from a second scene corresponding to the second detection image; a third determination module for determining a mask image corresponding to the second detection image based on the object category information; and a third processing module for performing model training based on the first detection image, the second detection image, the object category information, and the mask image to obtain an object detection model for performing detection operations on images obtained from the first and second scenes. In a thirteenth aspect, embodiments of the present disclosure provide an electronic device, comprising: a memory and a processor; wherein the memory is configured to store one or more computer instructions, wherein when executed by the processor, the one or more computer instructions implement the image detection model training method described in the eleventh aspect. In a fourteenth aspect, embodiments of the present disclosure provide a computer storage medium, configured to store a computer program, wherein when executed by a computer, the computer program causes the computer to implement the image detection model training method described in the eleventh aspect. In a fifteenth aspect, embodiments of the present disclosure provide a computer program product, comprising: a computer program, which, when executed by a processor of an electronic device, causes the processor to perform the steps of the image detection model training method described in the eleventh aspect.The model training method, image processing method, device, and computer program product provided by the embodiments of the present disclosure obtain a source domain image, a target domain image, and object category information to be identified in the target domain image, and then determine a mask image corresponding to the target domain image based on the object category information. The model training operation is performed based on the source domain image, the target domain image, the object category information, and the mask image, thereby obtaining a target task model for processing images in the source domain and the target domain. This effectively implements the domain transfer training operation of the task model, that is, the task model learns relevant knowledge of the source domain through the source domain image, and then transfers the learned source domain-related knowledge to the target domain, thereby learning relevant knowledge for analyzing and processing the target domain image. The quality and effect of the target task model's processing of the target domain image are guaranteed, further improving the practicality of the method. BRIEF DESCRIPTION OF THE DRAWINGS To more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. Those skilled in the art can derive other drawings based on these drawings without inventive effort.Figure 1 is a schematic diagram of the principle of a model training method provided by an embodiment of the present disclosure; Figure 2 is a schematic diagram of the flow of a model training method provided by an embodiment of the present disclosure; Figure 3 is a schematic diagram of the flow of determining a mask image corresponding to the target domain image based on the task type and the object category information provided by an embodiment of the present disclosure; Figure 4 is a schematic diagram of the principle of determining a mask image corresponding to the target domain image provided by an embodiment of the present disclosure; Figure 5 is a schematic diagram of the flow of obtaining a target task model by using the alignment unit to perform supervised learning on the annotation information of the source domain image, the source domain image features, the target domain image features, the pseudo-annotation information, and the object category information provided by an embodiment of the present disclosure; Figure 6 is a schematic diagram of the principle of a model training method based on open vocabulary recognition provided by an application embodiment of the present disclosure; Figure 7 is a schematic diagram of the structure of a model training device provided by an embodiment of the present disclosure; Figure 8 is a schematic diagram of the structure of an electronic device corresponding to the model training device provided by the embodiment of Figure 7; Figure 9 is a schematic diagram of the flow of an image processing method provided by an embodiment of the present disclosure; Figure 10 is a schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure; Figure 11 is a schematic diagram of the structure of an electronic device corresponding to the image processing device provided by the embodiment of Figure 10; Figure 12 is a schematic diagram of a scenario for a method for training an image detection model provided in an embodiment of the present disclosure; Figure 13 is a schematic diagram of the structure of an apparatus for training an image detection model provided in an embodiment of the present disclosure; and Figure 14 is a schematic diagram of the structure of an electronic device corresponding to the apparatus for training an image detection model provided in the embodiment of Figure 13. DETAILED DESCRIPTION OF THE EMBODIMENTS To further clarify the objectives, technical solutions, and advantages of the embodiments of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only a portion of the embodiments of the present disclosure, but not all of them. All other embodiments derived by persons of ordinary skill in the art without inventive effort based on the embodiments of the present disclosure are within the scope of protection of the present disclosure. The terms used in the embodiments of the present disclosure are intended solely to describe specific embodiments and are not intended to limit the present disclosure. The singular forms "a," "an," "the," and "the" used in the embodiments of the present disclosure and the appended claims are intended to include the plural forms, unless the context clearly indicates otherwise. "A plurality" generally includes at least two, but does not exclude the inclusion of at least one. It should be understood that the term "and / or" used in this document is merely a description of an association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone.Additionally, the character " / " herein generally indicates an "or" relationship between the preceding and following objects. Depending on the context, the phrases "if" and "if" as used herein can be interpreted as "upon..." or "when..." or "in response to determining..." or "in response to detecting." Similarly, depending on the context, the phrases "if it is determined" or "if (a stated condition or event) is detected" can be interpreted as "upon determination," "in response to determining," "upon detecting (a stated condition or event)," or "in response to detecting (a stated condition or event)." It should also be noted that the terms "comprise," "comprising," or any other variations thereof are intended to encompass a non-exclusive inclusion, such that a product or system comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such product or system. Without further limitation, the phrase "comprising a..." does not preclude the presence of additional identical elements in the product or system comprising the elements. In addition, the sequence of steps in the following method embodiments is provided for illustrative purposes only and is not a strict limitation. Terminology Definitions: Domain Adaptation: A concept in machine learning, it refers to the process of adapting a model trained in one domain (the source image domain) to enable it to function effectively in a different but related domain (the target image domain). This adaptation typically occurs because of distribution differences between the source and target image domains. Directly applying an image processing model from the source domain to analyze and process images in the target domain may result in decreased network processing performance. Open Vocabulary Recognition: In fields such as computer vision and natural language processing, this technology enables models to recognize and understand new words or concepts not encountered during training. Such image processing models are not restricted to a fixed vocabulary but can adapt to and understand new, unknown words. To understand the specific implementation process and principles of the technical solution in this embodiment, the following briefly describes the relevant technologies: With the rapid development of machine learning technology, machine learning models are applicable to more and more application scenarios. Due to the huge differences between images in different application scenarios, different images may correspond to different image domains. For example, there are huge differences between the image domains of images taken by drones, the image domains of images taken by mobile terminals, and the image domains of images taken by detectors; there are also huge differences between the image domains of images taken during the day and those taken at night.Domain transfer (Domain Adaptation) is a concept in machine learning that refers to the process of adapting a machine learning model trained in one domain (the source image domain) to effectively operate in a different but related domain (the target image domain). However, due to the significant differences between images in different domains or scenarios (such as inspection scenes, drones, and mobile phone images), machine learning models trained in a specific domain often have poor generalization capabilities when applied to new domains, which can easily lead to a decrease in the processing performance of the machine learning model. To address the aforementioned technical issues, this embodiment provides a model training method, device, and computer program product. Referring to FIG. 1 , the model training method is performed by a model training device 200, which can communicate with a client 100 to perform model training operations. Specifically, the model training device 200 can be any programmable computing device with certain model training capabilities. Furthermore, the basic structure of the model training device 200 may include at least one processor. The number of processors depends on the configuration and type of the model training device 200. The model training device 200 may also include memory. This memory may be volatile, such as RAM, or non-volatile, such as read-only memory (ROM), flash memory, or both. The memory typically stores an operating system (OS), one or more application programs, and may also store program data. In addition to the processing unit and memory, the model training device 200 also includes some basic configurations, such as a network card chip, an I / O bus, a display component, and some peripheral devices. Optionally, some peripheral devices may include, for example, a keyboard, a mouse, a stylus, a printer, and the like. Other peripheral devices are well known in the art and are not described in detail here. In addition, the client 100 can be implemented as at least one of the following: a VR client, a video client, an in-vehicle terminal, a smart wearable device, a handheld terminal, a tablet computer, a personal computer, etc. A network connection can be established between the client 100 and the model training device 200. The network connection can be a wireless or wired network connection. If the client 100 and the model training device 200 are in communication connection, the network standard of the mobile network can be any one of 4G (LTE), 4G+ (LTE+), 5G, 5.5G, 6G, etc.In an embodiment of the present disclosure, the client 100 is configured to be used by a user to implement model training operations. Specifically, the client 100 may display an interactive interface through which a source domain image, a target domain image, and object category information to be identified in the target domain image can be generated. Alternatively, the client 100 may be communicatively connected to an image acquisition device, which can actively or passively acquire source domain images and target domain images. To accurately implement domain transfer operations, after acquiring the target domain image, the object category information to be identified in the target domain image can be acquired. After acquiring the source domain image, the target domain image, and the object category information to be identified in the target domain image, the source domain image, the target domain image, and the object category information to be identified in the target domain image can be sent to the model training apparatus 200. oThe model training device 200 is configured to obtain object category information to be recognized from the source domain image, the target domain image, and the image domain image sent by the client 100. The source domain corresponding to the source domain image is different from the target domain corresponding to the target domain image. To transfer the task model applicable to the source domain image to the target domain image and ensure the quality and effectiveness of the task model after the domain transfer operation, after obtaining the object category information to be recognized from the target domain image, the target domain image can be analyzed and processed based on the object category information to obtain a mask image corresponding to the target domain image. The mask image corresponds to at least one masked region. The obtained mask image and target domain image can not only increase the task model's attention to learning objects in the image, but also reduce the task model's attention to learning the image background. Therefore, after the source domain image, the target domain image, the object category information, and the mask image are used, a model training operation can be performed based on the source domain image, the target domain image, the object category information, and the mask image, thereby obtaining a target task model for processing images in the source and target domains. In some other examples, to improve the training quality and effectiveness of the target task model, the obtained source domain images may have corresponding labeling information, while the obtained target domain images may not have corresponding labeling information. Model training operations can then be performed based on the source domain images with corresponding labeling information, the target domain images, object category information, and the mask image, thereby obtaining a target task model for processing the source and target domains, thereby achieving domain transfer operations of the task model and ensuring the model processing quality and effectiveness of the target task model.In the above embodiment, by obtaining a source domain image, a target domain image, and information about the object category to be recognized in the target domain image, then determining a mask image corresponding to the target domain image based on the object category information, and performing a model training operation based on the source domain image, the target domain image, the object category information, and the mask image, the task model can learn source domain-related knowledge based on the source domain image, and use the source domain-related knowledge to learn target domain-related knowledge, thereby achieving a model training operation for domain transfer of the task model. Thus, a target task model for analyzing and processing images in the source and target domains can be obtained. During the model training operation, the mask image and the target domain image can increase the task model's attention to learning objects in the target domain image and reduce its attention to learning background in the target domain image. This effectively ensures the quality and effectiveness of the target task model's processing of the target domain image. Furthermore, when the source domain image has corresponding annotation information but the target domain image does not, the task model's domain transfer effect is higher. Therefore, it is preferred to use source domain images with corresponding annotation information for model training, further improving the practicality of the method. Some embodiments of the present invention are described in detail below with reference to the accompanying drawings. Unless there is a conflict between the embodiments, the following embodiments and their features may be combined. Furthermore, the sequence of steps in the following method embodiments is provided as an example and is not a strict limitation. Figure 2 is a flow chart illustrating a model training method provided in an embodiment of the present disclosure. Referring to Figure 2 , this embodiment provides a model training method, which is performed by a model training device. It is understood that the model training device can be implemented as software or a combination of software and hardware. Specifically, when the model training device is implemented as hardware, it can be various electronic devices with model training capabilities. When the model training device is implemented as software, it can be installed in the aforementioned electronic devices. Model training operations can be performed based on the aforementioned model training device. Specifically, the model training method may include the following steps: Step S201: Obtain a source domain image, a target domain image, and object category information to be identified in the target domain image, wherein the source domain corresponding to the source domain image is different from the target domain corresponding to the target domain image. Step S202: Determine a mask image corresponding to the target domain image based on the object category information. Step S203: Perform a model training operation based on the source domain image, the target domain image, the object category information, and the mask image to obtain a target task model for processing the source domain and target domain images.The specific implementation process and results of each of the above steps are described in detail below: Step S201: Obtain a source domain image, a target domain image, and object category information to be identified in the target domain image. The source domain corresponding to the source domain image is different from the target domain corresponding to the target domain image. In image processing application scenarios, images from different application scenarios may correspond to different image domains. Images of different styles may correspond to different image domains. For example, cartoons and line drawings may correspond to different image domains, and color images and grayscale images may correspond to different image domains. Images captured by different shooting devices may correspond to different image domains. For example, images captured by a mobile phone and a camera may correspond to different image domains, and images captured by an in-vehicle shooting device and a video capture device may correspond to different image domains. Images captured at different shooting time periods may correspond to different image domains. For example, images captured during the day and at night may correspond to different image domains, and images captured on a sunny day and on a cloudy day may correspond to different image domains. Images obtained by different image generation methods may correspond to different image domains. For example, images obtained by actual acquisition and virtual images generated by a machine may correspond to different image domains; digital images generated by a machine may correspond to different image domains than collected analog images. A task model for analyzing and processing a source domain image is pre-trained, and the image processing performance of the task model meets preset requirements. When a user has a domain transfer requirement for the task model, that is, the user pre-transfers the task model suitable for processing source domain images to process target domain images. Since different image domains correspond to different image features or image styles, to ensure the quality and effect of the task model's analysis and processing of target domain images, the task model can be trained for domain transfer. In this case, a model training device can obtain source domain images and target domain images. The source domain corresponding to the obtained source domain images is different from the target domain corresponding to the target domain images. In addition, for the obtained source domain images and target domain images, the number of source domain images can be one or more. If the number of source domain images is multiple, the multiple source domain images can correspond to one or more source domains. Similarly, the number of target domain images can be one or more. If the number of target domain images is multiple, the multiple target domain images can correspond to one or more target domains.In some instances, source domain images have corresponding annotation information used for model training. This annotation information may include at least one of the following: object category information, object region, object outline, etc. It is understood that the specific content of the annotation information can be flexibly adjusted based on the type of model training task. The source domain images and the corresponding annotation information are used to enable the target task model to learn relevant knowledge about the source domain during model training. The target domain images do not have corresponding annotation information. The lack of corresponding annotation information for target domain images indicates that the target domain to which the target domain images correspond is new to the target task model. Furthermore, this embodiment does not limit the method for acquiring source and target domain images. In some instances, the model training device does not have an image acquisition function. In this case, the model training device is communicatively connected to an image acquisition device, and the source and target domain images can be acquired via the image acquisition device. Specifically, acquiring the source and target domain images may include: acquiring an image acquisition device communicatively connected to the model training device; and obtaining the source and target domain images through an image acquisition operation by the image acquisition device. The source and target domain images may be acquired actively or passively by the image acquisition device. In other instances, the model training device has an image acquisition function. In this case, acquiring the source and target domain images may include: performing an image acquisition operation using an image acquisition module in the model training device to obtain the source and target domain images. Furthermore, the source and target domain images may be acquired synchronously or asynchronously, and those skilled in the art may flexibly configure or adjust these methods based on specific application scenarios or requirements. It should be noted that since the target domain image does not have corresponding labeled information, in order to enable the task model to learn the ability to analyze and process the target domain image, during the model training process, not only the source domain image and the target domain image can be obtained, but also the object category information to be recognized in the target domain image can be obtained. For example, in a certain target domain image, the object category information to be recognized may be "cat", "puppy", "vehicle", "person", etc.Furthermore, this embodiment does not limit the method for obtaining the object category information to be recognized in the target domain image. In some instances, the object category information to be recognized in the target domain image can be obtained through human-computer interaction. In this case, obtaining the object category information to be recognized in the target domain image can include: displaying a human-computer interaction interface; displaying the target domain image in the human-computer interaction interface; obtaining an execution operation input by a user with respect to the target domain image; and obtaining the object category information to be recognized in the target domain image based on the execution operation. This effectively ensures the accuracy and reliability of obtaining the object category information to be recognized in the target domain image. In other instances, the object category information to be recognized in the target domain image can be obtained not only through human-computer interaction but also through analysis and processing of the target domain image in other ways. For example, the object category information to be recognized in the target domain image can be obtained by analyzing and processing the target domain image using a pre-trained machine learning model, or can be obtained using a preset mapping relationship. As long as the accuracy and reliability of obtaining the object category information to be recognized in the target domain image can be guaranteed, no further details will be given. Step S202: Determine a mask image corresponding to the target domain image based on the object category information. To enable the trained task model to accurately process the target domain image, after obtaining the object category information and the target domain image, the target domain image can be analyzed and processed based on the object category information to determine a mask image corresponding to the target domain image. At least a portion of the determined mask image is covered by the mask, thereby facilitating increased focus on identifying objects in the target domain image during model training. In some instances, the mask image can be determined using a preset algorithm or a pre-trained machine learning model. In this case, determining the mask image corresponding to the target domain image based on the object category information can include: obtaining a preset algorithm or a pre-trained machine learning model for analyzing the target domain image; and analyzing and processing the object category information and the target domain image using the preset algorithm or machine learning model to obtain a mask image corresponding to the target domain image.In other examples, the mask image corresponding to the target domain image can be determined not only based on the object category information to be identified in the target domain image, but also in combination with the task type corresponding to the target domain image. In this case, determining the mask image corresponding to the target domain image based on the object category information may include: obtaining the task type corresponding to the target domain image; and processing the task type and object category information using the main processing unit of the to-be-trained model to determine the mask image corresponding to the target domain image. Because target domain images correspond to different image processing tasks, different image processing tasks may have different task focuses, such as object detection and object recognition tasks. The task detection results corresponding to the object detection task may include: the detected object type and a detection box of the area where the detected object is located; the task recognition results corresponding to the object recognition task may include: the detected object type and contour information corresponding to the detected object, etc. To ensure the quality and efficiency of mask image generation, the task type corresponding to the target domain image can be obtained. The task type can be obtained through human-computer interaction. Obtaining the task type corresponding to the target domain image may include: obtaining a human-computer interaction interface corresponding to the target domain image; determining an execution operation input by a user in the human-computer interaction interface; and determining the task type corresponding to the target domain image based on the execution operation. After obtaining the task type corresponding to the target domain image, the main processing unit of the model to be trained can analyze and process the task type and object category information to determine the mask image corresponding to the target domain image. This effectively ensures the accuracy and reliability of the determination of the mask image corresponding to the target domain image. Step S203: Perform a model training operation based on the source domain image, the target domain image, the object category information, and the mask image to obtain a target task model for processing images in the source and target domains. After obtaining the source domain image, the target domain image, the object category information to be identified in the target domain image, and the mask image, a model training operation can be performed based on the source domain image, the target domain image, the object category information, and the mask image, thereby obtaining a target task model for processing images in the source domain and the target domain, thereby effectively implementing a domain transfer training operation for the task model.In some instances, the model training operation can be implemented by training a basic task model for analyzing and processing images in the source domain. In this case, performing the model training operation based on the source domain image, the target domain image, the object category information, and the mask image to obtain the target task model for processing images in the source and target domains may include: determining the annotation information corresponding to the source domain image; performing the model training operation based on the source domain image and the annotation information corresponding to the source domain image to obtain the basic task model for analyzing and processing images in the source domain; and performing the model training operation on the basic task model based on the target domain image, the object category information, and the mask image to obtain the target task model for processing images in the source and target domains. In this way, the training operation for domain transfer of the task model is completed, and the quality and effect of the target task model's analysis and processing of the target domain image are effectively guaranteed. Unlike the above embodiment, the source domain image may be an image with pre-assigned labeling information, and the target domain image may be an image without pre-assigned labeling information. In this case, performing a model training operation based on the source domain image, the target domain image, the object category information, and the mask image to obtain a target task model for processing images in the source and target domains may include: performing a model training operation based on the source domain image and the labeling information corresponding to the source domain image to obtain a basic task model for analyzing and processing images in the source domain; and performing a model training operation on the basic task model based on the target domain image, the object category information, and the mask image to obtain a target task model for processing images in the source and target domains. In this way, the training operation for the task model for domain transfer is completed, and the quality and effect of the target task model's analysis and processing of the target domain image are effectively guaranteed.In other examples, the model training operation can be implemented not only by training a basic task model for analyzing and processing source domain images, but also directly based on source domain images, target domain images, object category information, and mask images. In this case, performing the model training operation based on the source domain images, target domain images, object category information, and mask images to obtain a target task model for processing images in the source and target domains may include: obtaining a to-be-trained model, the to-be-trained model including a main processing unit, a domain migration unit communicatively connected to the main processing unit, and an alignment unit communicatively connected to the main processing unit and the domain migration unit; processing the source domain images, target domain images, object category information, and mask images using the main processing unit to obtain source domain object features corresponding to the source domain images and target domain object features corresponding to the target domain images; processing the mask images based on the domain migration unit to obtain pseudo-annotation information corresponding to the mask images; and performing supervised learning on the annotation information corresponding to the source domain images, the source domain object features, the target domain object features, the pseudo-annotation information, and the object category information using the alignment unit. Obtain a target task model. Specifically, to implement model training, a model to be trained can be first obtained. The obtained model to be trained can include a main processing unit, a domain transfer unit communicatively connected to the main processing unit, and an alignment unit communicatively connected to both the main processing unit and the domain transfer unit. The main processing unit is used to extract image features and text features, and can process the extracted image features based on the extracted text features to obtain image object features. The domain transfer unit is used to generate pseudo-annotation information for the mask image. In some instances, the network architecture of the main processing unit and the domain transfer unit are the same, and the network coefficients of the domain transfer unit can be determined by the network coefficients of the main processing unit. That is, the domain transfer unit can obtain the network parameters learned by the main processing unit. The alignment unit is used to determine the loss function generated during the model training process, and to implement the model training operation based on the loss function. After obtaining the model to be trained, the main processing unit in the model to be trained can be used to process the source domain image, the target domain image, the object category information, and the mask image. Specifically, source domain image features corresponding to the source domain image and target domain image features corresponding to the target domain image can be first obtained. Then, the source domain image features and the target domain image features can be processed separately to obtain source domain object features and target domain object features.In some examples, obtaining source-domain object features corresponding to the source-domain image may include: performing an image feature extraction operation on the source-domain image using a main processing unit to obtain source-domain image features corresponding to the source-domain image; and processing the source-domain image features using the main processing unit to obtain source-domain object features. Similarly, obtaining target-domain object features corresponding to the target-domain image may include: performing an image feature extraction operation on the target-domain image, object category information, and a mask image using the main processing unit to obtain target-domain image features corresponding to the target-domain image; and processing the target-domain image features using the main processing unit to obtain target-domain object features. In other instances, source domain object features and target domain object features may be determined not only by object category information but also in combination with a task type. In this case, using the main processing unit to process the source domain image, the target domain image, the object category information, and the mask image to obtain source domain object features corresponding to the source domain image and target domain object features corresponding to the target domain image may include: obtaining the task type corresponding to the target domain image; using the main processing unit in the to-be-trained model to perform a feature extraction operation on the task type and the object category information to obtain text feature information; processing the source domain image based on the text feature information by the main processing unit to obtain source domain object features corresponding to the source domain image; and processing the target domain image based on the text feature information and the mask image by the main processing unit to obtain target domain object features corresponding to the target domain image. Specifically, in order to improve the accuracy and reliability of extracting mask object features, a task type corresponding to the target domain image can be first obtained. The task type can be determined through human-computer interaction. Then, the main processing unit can be used to perform a feature extraction operation on the task type and object category information to obtain text feature information. The text feature information can be obtained by performing a fusion operation (e.g., a splicing operation) on the task feature information and the object feature information. The above-mentioned task feature information is obtained by performing a feature extraction operation on the task type, and the object feature information is obtained by performing a feature extraction operation on the object category information.After acquiring the text feature information, the main processing unit can perform feature extraction on the source domain image based on the text feature information to obtain source domain image features corresponding to the source domain image. The source domain image features are then analyzed and processed to obtain source domain object features, effectively ensuring the accuracy and reliability of the source domain object feature determination. Similarly, after acquiring the text feature information, the main processing unit can perform feature extraction on the target domain image based on the text feature information and the mask image to stably obtain target domain object features corresponding to the target domain image. The target domain image features are then analyzed and processed to obtain target domain object features, effectively ensuring the accuracy and reliability of the target domain object feature determination. To enable domain transfer of the task model, not only can the main processing unit and the mask image be used to analyze and process the target domain image to obtain target domain object features corresponding to the target domain image, but the mask image can also be processed by the domain transfer unit to obtain pseudo-annotation information corresponding to the mask image. Pseudo-annotation information is the predicted annotation information obtained by processing the mask image by the domain transfer unit. Since the mask image is obtained by performing a masking operation on the target domain image, this indicates a correlation between the pseudo-annotation information obtained above and the target domain object features. Therefore, after obtaining the annotation information, source domain object features, pseudo-annotation information, and object category information corresponding to the source domain image, supervised learning can be performed to stably obtain the target task model, effectively ensuring the quality and effectiveness of training the target task model. After obtaining the target task model for processing images in the source and target domains, image processing operations can be performed based on the target task model. In this case, the method in this embodiment may further include: obtaining an image to be processed, where the image domain to which the image to be processed belongs is the target domain; and processing the image to be processed using the target task model to obtain an image processing result. The accuracy of the image processing result meets preset requirements, effectively ensuring the practicality of the method. Example 1: When a user has an image recognition task to process, the target task model obtained is the target image recognition model. The image to be processed corresponding to the image detection task can be obtained. At this time, the image domain to which the image to be processed belongs can be the target domain. Then, the trained target image recognition model can be used to detect and process the image to be processed to obtain an image detection result. The image detection result at this time can include the image object type and the identification box of the area where the image object is located, thereby meeting the user's image recognition needs.Example 2: When a user has an image segmentation task to process, the target task model obtained is the target image segmentation model. The image to be processed corresponding to the image segmentation task can be obtained. In this case, the image domain to which the image to be processed belongs can be the target domain. The trained target image segmentation model can then be used to detect and process the image to be processed, obtaining an image segmentation result. This image segmentation result can include image object types and image object contours, thereby meeting the user's image segmentation requirements. In other examples, before obtaining the source domain image, the target domain image, and the object category information to be identified in the target domain image, to improve the quality and effectiveness of model training, the model to be trained can be initialized based on text prompt information used to implement the image processing operation. In this case, the method in this embodiment can further include: obtaining an initial task model for implementing the image processing operation; determining text prompt information for implementing the image processing operation, the text prompt information including at least one of the following: object category information to be identified in the target domain image, and the task type corresponding to the target domain image; and initializing the initial task model using the text prompt information to obtain the model to be trained. To improve the quality and effectiveness of model training, before performing model training or using a task model for image processing, an initial task model for implementing the image processing operation can be obtained. The initial task model can be a pre-trained image processing model for analyzing and processing source domain images. It can be pre-stored in a preset area or device. In this case, the initial task model for implementing the image processing operation can be obtained by accessing the preset area or device. After obtaining the initial task model, to improve the quality and effectiveness of the model training operation, text prompt information for implementing the image processing operation can be determined. This text prompt information can include at least one of the following: object category information to be recognized for the target domain image, or the task type corresponding to the target domain image. The initial task model can then be initialized using the text prompt information. This completes the initialization of the model to be trained, thereby obtaining the model to be trained. When performing model training based on the model to be trained, the quality and effectiveness of model training can be effectively guaranteed, further improving the quality and effectiveness of image processing by the trained target task model.The model training method provided in this embodiment obtains a source domain image, a target domain image, and object category information to be identified in the target domain image, then determines a mask image corresponding to the target domain image based on the object category information, and performs a model training operation based on the source domain image, the target domain image, the object category information, and the mask image. In this way, a target task model for processing images in the source domain and the target domain can be obtained. This effectively implements the domain transfer training operation of the target task model, that is, the target task model transfers the relevant knowledge learned in the source domain to the target domain, and further learns the relevant knowledge for analyzing and processing the target domain images. This ensures the quality and effect of the target task model's processing of the target domain images, further improving the practicality of the method. FIG3 is a schematic diagram of a process for determining a mask image corresponding to a target domain image based on task type and object category information according to an embodiment of the present disclosure. Based on the above embodiment, and with reference to FIG3 , when determining the mask image corresponding to the target domain image based on the task type and object category information, the mask image can be determined not only using a preset algorithm or machine learning model, but also by analyzing and processing the task type, object category information, and target domain image using the main processing unit of the model to be trained. In this case, processing the task type and object category information using the main processing unit of the model to be trained to determine the mask image corresponding to the target domain image may include the following: Step S301: Processing the task type and object category information using the main processing unit of the model to be trained to obtain a category vector representation of the object category information, a task vector representation of the task type, and target domain image features of the target domain image. After obtaining the object category information, task type, and target domain image, text feature extraction operations may be performed on the object type information and task type, respectively, to obtain a category vector representation of the object category information and a task vector representation of the task type. Similarly, after acquiring the target domain image, an image feature extraction operation may be performed on the target domain image, thereby obtaining the target domain image features of the target domain image.In some instances, obtaining a category vector representation of object category information, a task vector representation of a task type, and image features of a target domain image may include: obtaining a main processing unit and a domain transfer unit communicatively connected to the main processing unit; performing a feature extraction operation on the object category information and the task type using the main processing unit to obtain a category vector representation of the object category information and a task vector representation of the task type; and performing a feature extraction operation on the target domain image using the domain transfer unit to obtain target domain image features. This effectively ensures the accuracy and reliability of obtaining the category vector representation, the task vector representation, and the target domain image features. Step S302: Determine a mask image corresponding to the target domain image based on the category vector representation, the task vector representation, and the target domain image features. After obtaining the category vector representation, the task vector representation, and the target domain image, the category vector representation, the task vector representation, and the target domain image features may be analyzed and processed to determine a mask image corresponding to the target domain image. In some instances, the mask image can be obtained by analyzing and processing the category vector representation, the task vector representation, and the target domain image features using a pre-trained machine learning model. In this case, determining the mask image corresponding to the target domain image based on the category vector representation, the task vector representation, and the target domain image features may include: obtaining a machine learning model for determining the mask image, inputting the category vector representation, the task vector representation, and the target domain image features into the machine learning model, and obtaining the mask image corresponding to the target domain image output by the machine learning model. This effectively ensures the accuracy and reliability of determining the mask image. In some instances, the mask image can be obtained using a mask region and the target domain image. In this case, determining the mask image corresponding to the target domain image based on the category vector representation, the task vector representation, and the target domain image features may include: determining at least one mask region corresponding to the target domain image based on the category vector representation, the task vector representation, and the target domain image features; and determining the mask image corresponding to the target domain image based on the at least one mask region. Specifically, as shown in FIG4 , after obtaining the category vector representation, the task vector representation, and the target domain image features, these can be analyzed and processed to determine at least one mask region corresponding to the target domain image. Specifically, the number of mask regions can be one or more. When there are multiple mask regions, different mask regions can correspond to the same or different size and shape features. After obtaining the at least one mask region, a mask image corresponding to the target domain image can be directly determined based on the at least one mask region, thereby effectively ensuring the accuracy and reliability of the determination of the mask image.In some other examples, different mask regions may correspond to different probability information, and a mask image corresponding to the target domain image may be determined based on the probability information of the mask regions. In this case, determining the mask image corresponding to the target domain image based on at least one mask region may include: obtaining probability information corresponding to each of the at least one mask regions; determining at least one target mask region within the at least one mask region based on the probability information; and fusing the at least one target mask region with the target domain image to obtain a mask image corresponding to the target domain image. Specifically, after obtaining the at least one mask image corresponding to the target domain image, the at least one mask image may be analyzed and processed to obtain probability information corresponding to each of the at least one mask regions. In some examples, the probability information may be determined simultaneously when determining the mask region based on the category vector representation, the task vector representation, and the target domain image features. That is, when determining the mask image corresponding to the target domain image based on the category vector representation, the task vector representation, and the target domain image features, the probability information corresponding to the mask image may be determined based on the category vector representation, the task vector representation, and the target domain image features. Alternatively, in some other examples, the probability information can be determined by analyzing and processing the mask region and the target domain image. Specifically, the probability information can be determined by analyzing and processing the mask region and the target domain image using a preset algorithm or a pre-trained machine learning model. The probability information can be used to represent or reflect the confidence level of the mask region. Since different mask regions may correspond to different probability information, after obtaining the probability information corresponding to at least one mask region, at least one target mask region can be determined within the at least one mask region based on the probability information. In some examples, determining at least one target mask region within the at least one mask region based on the probability information may include: obtaining a probability threshold for analyzing and processing the probability information; analyzing and comparing the probability information with the probability threshold; if the probability information is less than the preset threshold, determining the mask region corresponding to the probability information as a non-target mask region; and if the probability information is greater than or equal to the probability threshold, determining the mask region corresponding to the probability information as a target mask region. The number of obtained target mask regions is at least one, thereby effectively ensuring the accuracy and reliability of determining the target mask region.In other examples, the target mask region can be determined not only by a preset threshold but also by preset sorting information. In this case, determining at least one target mask region from at least one mask region based on the probability information may include: sorting the at least one mask region from largest to smallest according to the probability information to obtain sorting information for the mask regions; determining a number of regions used to determine the target mask region; and determining, based on the sorting information, a mask region from the at least one mask region that satisfies the specified number of regions. The mask region that satisfies the specified number of regions may then be determined as the target mask region. This effectively ensures the accuracy and reliability of determining the target mask region. In this embodiment, by obtaining a category vector representation of object category information, a task vector representation of a task type, and target domain image features of the target domain image, and then determining a mask image corresponding to the target domain image based on the category vector representation, the task vector representation, and the target domain image features, the accuracy and reliability of determining the mask image is effectively ensured, further improving the quality and effectiveness of model training operations based on the mask image. FIG5 is a flow chart illustrating a method for obtaining a target task model by using an alignment unit to perform supervised learning on the annotation information, source object features, target object features, pseudo-annotation information, and object category information of a source image, according to an embodiment of the present disclosure. Based on the above embodiment, with reference to FIG5 , this embodiment provides an implementation method for obtaining a target task model by obtaining a loss function based on an alignment unit and performing a model training operation based on the loss function. Specifically, in this embodiment, obtaining the target task model by using the alignment unit to perform supervised learning on the annotation information, source object features, target object features, pseudo-annotation information, and object category information of a source image may include the following: Step S501: Using the alignment unit, aligning the annotation information and source object features corresponding to the source image to obtain a source loss function for analyzing and processing the source image.Since the source object features are based on the prediction information obtained by the main processing unit through analysis and processing of the source image, the accuracy of the source object features is closely related to the network processing performance of the main processing unit for analyzing and processing the source image. Therefore, to improve the quality and effectiveness of model training, after obtaining the source object features, an alignment unit can be used to align the annotation information corresponding to the source image and the source object features. Specifically, the annotation information and source object features corresponding to the source image are input into the alignment unit for alignment processing, thereby obtaining a source loss function for analyzing and processing the source image. The obtained source loss function is used to optimize and adjust the performance of the main processing unit's analysis and processing of the source image. In some examples, the source loss function can be any one of the following: a cross-beam loss function, a square loss function, an exponential loss function, a hinge SVM loss function, a perceptual loss function, etc. Step S502: The alignment unit is used to align the annotation information and source object features of the source image with the target object features to obtain a migration loss function for migrating from the source image to the target image. Since the target domain object features are the predicted information obtained by the main processing unit through analysis and processing of the target domain image based on the knowledge learned from the source domain image, the accuracy of the target domain object features is closely related to the network processing performance of the main processing unit for analyzing and processing cross-domain images. Therefore, to improve the quality and effectiveness of model training, after obtaining the target domain object features, an alignment unit can be used to align the source domain image's annotation information, source domain object features, and target domain object features. Specifically, the annotation information, source domain object features, and target domain object features corresponding to the source domain image are input into the alignment unit for alignment. This allows a transfer loss function to be obtained for transferring the source domain image to the target domain image. This transfer loss function is used to optimize the performance of the main processing unit in analyzing and processing the target domain image based on the knowledge learned from the source domain image.For example, if the source image is an image of a "walking kitten," source image features and source image annotation information ("cat" and "corresponding cat outline information") can be obtained by analyzing and processing the source image. If the target image is an image of a "running kitten," target object features can be obtained by analyzing and processing the target image. Because the source image annotation information and source object features are of the same type as the object in the target image, to enable the task model to accurately analyze and process the target image based on the learned source image knowledge, the source image annotation information ("cat" and "corresponding cat outline information"), source image features, and target object features can be aligned to obtain a transfer loss function. Step S503: An alignment unit is used to align the pseudo-annotation information with the target object features to obtain a target loss function corresponding to the target image. Since the target domain image lacks corresponding annotation information, the pseudo-annotation information is predicted based on the domain transfer unit's analysis and processing of the mask image. The accuracy of the pseudo-annotation information is closely related to the accuracy of the domain transfer unit's analysis and processing of the mask image. The mask image is obtained by masking the target domain image. To improve the quality and effectiveness of model training, after obtaining the pseudo-annotation information and target domain object features corresponding to the mask image, an alignment unit can be used to align the pseudo-annotation information and target domain object features. Specifically, the pseudo-annotation information and target domain object features corresponding to the mask image are input into the alignment unit for alignment, thereby obtaining a target domain loss function corresponding to the target domain network. Step S504: The alignment unit aligns the object category information, source domain object features, and target domain object features to obtain a cross-modal loss function between text information and image features. Since object category information is text-type information, and source domain object features and target domain object features are image-type information, text-type information and image-type information are two different modalities. In order to improve the task model's accuracy in processing cross-modal information, after obtaining the object category information, source domain object features, and target domain object features, an alignment unit can be used to align the object category information, source domain object features, and target domain object features. That is, the object category information, source domain object features, and target domain object features are input into the alignment unit for processing, thereby obtaining a cross-modal loss function corresponding to the alignment operation between text information and image features.Step S505: Supervised training is performed on the training model based on the source domain loss function, the transfer loss function, the target domain loss function, and the cross-modal loss function to obtain the target task model. After obtaining the source domain loss function, the transfer loss function, the target domain loss function, and the cross-modal loss function, supervised training can be performed on the training model based on the source domain loss function, the transfer loss function, the target domain loss function, and the cross-modal loss function. In some instances, supervised training is performed on the training model based on the source domain loss function, the transfer loss function, the target domain loss function, and the cross-modal loss function, either separately or sequentially, to obtain the target task model. Alternatively, a unified supervised training operation can be performed on the training model based on the source domain loss function, the transfer loss function, the target domain loss function, and the cross-modal loss function to obtain the target task model. This effectively achieves the image processing quality and effect of the target task model. When performing a unified supervised training operation on the to-be-trained model based on the source-domain loss function, the transfer loss function, the target-domain loss function, and the cross-modal loss function, a total loss function may be first obtained, and then supervised training may be performed on the to-be-trained model based on the total loss function to obtain the target task model. In some instances, supervised training of the to-be-trained model based on the source-domain loss function, the transfer loss function, the target-domain loss function, and the cross-modal loss function to obtain the target task model may include: determining the total loss function based on the source-domain loss function, the transfer loss function, the target-domain loss function, and the cross-modal loss function; and performing supervised training on the to-be-trained model based on the total loss function to obtain the target task model. Specifically, after obtaining the source-domain loss function, the transfer loss function, the target-domain loss function, and the cross-modal loss function, the source-domain loss function, the transfer loss function, the target-domain loss function, and the cross-modal loss function may be analyzed and processed to obtain the total loss function. In some instances, the total loss function can be obtained by directly summing the source domain loss function, the transfer loss function, the target domain loss function, and the cross-modal loss function. Alternatively, the total loss function can be obtained by weighted summing the source domain loss function, the transfer loss function, the target domain loss function, and the cross-modal loss function. This allows for a stable total loss function. After obtaining the total loss function, supervised training can be performed on the training model based on the total loss function, thereby stably obtaining the target task model and effectively ensuring the image processing quality and effect of the target task model.In this embodiment, an alignment unit is used to align the annotation information and source object features corresponding to the source domain image to obtain a source domain loss function for analyzing and processing the source domain image. The alignment unit is also used to align the annotation information and source domain object features of the source domain image with the target domain object features to obtain a transfer loss function for transferring the source domain image to the target domain image. The alignment unit is also used to align the pseudo-annotation information and the target domain object features to obtain a target domain loss function corresponding to the target domain image. The alignment unit is also used to align object category information with the corresponding source domain object features and target domain object features to obtain a cross-modal loss function between text information and image features. The to-be-trained model is then supervised and trained based on the source domain loss function, the transfer loss function, the target domain loss function, and the cross-modal loss function to obtain a target task model. This effectively implements the model training operation and ensures the quality and effectiveness of the target task model. In specific applications, referring to FIG6 , this application embodiment provides a domain transfer training method for a task model. The domain transfer training method for the task model may be performed by a visual pre-training network framework, which may be a unified multi-task learning framework. The multi-task learning framework solves the problem of understanding different tasks in unified task domain transfer, i.e., enables the visual pre-training network framework to have the ability to recognize open vocabulary. Specifically, in order to implement the domain migration operation of the task model and ensure the processing quality and effect of the migrated task model, the visual pre-training network framework may include: a main processing unit, a domain migration unit, and an alignment unit. The above-mentioned domain migration unit is communicatively connected to the main processing unit, and the alignment unit is communicatively connected to the main processing unit and the domain migration unit. The above-mentioned main processing unit, domain migration unit, and alignment unit are respectively used to perform the following steps: The main processing unit is used to: extract visual features of the input image to obtain image features, and perform object recognition operations based on the image features to obtain image object labels; and perform feature extraction operations on input text to obtain text features, and perform object recognition operations based on the text features to obtain text object labels.The input images may include: a source domain image 1, a source domain image 2, a target domain image 1, a target domain image 2, a mask image 1, and a mask image 2. The source domain 1 corresponding to the source domain image 1 and the source domain 2 corresponding to the source domain image 2 may be the same image domain or different image domains. Similarly, the target domain 1 corresponding to the target domain image 1 and the target domain 2 corresponding to the target domain image 2 may be the same target image domain or different target image domains. The mask image 1 may be obtained by performing masking processing on the target domain image 1, and the mask image 2 may be obtained by performing masking processing on the target domain image 2. By batch-inputting the above input images into the main processing unit, each source domain image, the source domain object label corresponding to each target domain image, and the target domain object label may be obtained. The input text may include the object category information to be recognized in the target domain image and the task type corresponding to the target domain image. Text feature extraction operations can then be performed on the object category information and the task type, respectively, to obtain category features corresponding to the object category information and task features corresponding to the task type. The category features and task features can then be used to assist in the domain transfer training of the task model, thereby ensuring the quality and effectiveness of the domain transfer training of the task model. Specifically, the main processing unit primarily includes the following modules: a text feature extraction module, configured to obtain input text and perform feature extraction operations on the input text to obtain text extraction features (which may be vector representation information). The input text may include the object category to be recognized in the target domain image and the task type corresponding to the target domain image. The text extraction features may include category features corresponding to the object category and task features corresponding to the task type. The category features and task features can then be concatenated and fused to obtain text fusion features, which can be input into the image processing module for decoding. It should be noted that the task processing types may include target detection tasks, target classification tasks, target recognition tasks, target detection tasks and other types of tasks. The task processing results corresponding to the above-mentioned target detection tasks may include: category information of the target object and information about the area frame where the target object is located; the task processing results corresponding to the target classification task or the target recognition task may include: category information of the target object; the task processing results corresponding to the target detection task may include: category information of the target object and object contour information corresponding to the target object.The image processing module includes an image encoding submodule for performing image feature extraction, an image decoding submodule for performing image decoding, and an image detection submodule for performing image detection. Specifically, each of these submodules can be used to perform the following steps: The image encoding submodule is used to obtain at least one source domain image, at least one target domain image, and at least one mask image corresponding to each target domain image. The at least one source domain image, at least one target domain image, and at least one mask image can then be batch-inputted into the image encoding submodule to obtain source domain image features and target domain image features, respectively. The image decoding submodule is used to obtain the source domain image features and target domain image features output by the image encoding submodule, and to obtain input text (i.e., text prompt information corresponding to the task model operation) through the text feature extraction module. The source domain image features and target domain image features can then be decoded based on the input text to obtain target domain decoding information and source domain decoding information corresponding to the target domain image. The image prediction submodule is used to obtain the source domain decoding information and target domain decoding information output by the image decoding submodule, and perform image prediction operations based on the source domain decoding information to obtain source domain object features; and perform image prediction operations based on the target domain decoding information to obtain target domain object features. The initialization submodule is used to initialize the main processing unit before learning and training the main processing unit or performing image processing operations using the backbone network. To reduce confusion about task types, network initialization can be combined with input text. In some instances, the input text can include the object category and task category to be recognized in the target image. Initialization can then be performed based on these object and task categories. Compared to existing network initialization implementations, the addition of object and task categories to the initialization information effectively increases the impact and effectiveness of task types and object categories on network training and processing operations, thereby improving the quality and effectiveness of task model training. Domain Transfer Unit: To improve the task model's attention to the main object in the image and reduce its attention to the background, text input can be used to generate a mask image for task model training. Specifically, the domain transfer unit can include a teacher network module and a mask generation module. These modules are configured to perform the following steps: The teacher network module is communicatively connected to the main processing unit to obtain the task model parameters learned by the main processing unit and analyze and process the target domain image based on the task model parameters to obtain target domain image features.The mask generation module, in communication with the teacher network module, receives input text from the main processing unit and analyzes the target domain image based on the text prompt information to generate at least one mask region. The mask region is then fused with the target domain image to obtain a mask image. Using language information (i.e., input text) to guide mask region generation, rather than random generation, effectively ensures the quality and effectiveness of mask image generation. Specifically, processing the target domain image based on the input text to generate at least one mask region may include: processing the target domain image based on the text prompt information to generate at least one original mask region; determining probability information corresponding to each of the at least one original mask region; and determining the original mask region having probability information greater than or equal to a preset probability as the at least one mask region. This ensures that the determined mask region is not a fixed region, thereby improving the quality and effectiveness of mask region generation. When performing model training based on the mask image, the generalization capability of the task model can be increased. Furthermore, the preset probability can be appropriately increased in different application scenarios, thereby further reducing redundant information in the image and improving the quality and effectiveness of domain transfer operations for the task model. Furthermore, the domain transfer unit can not only generate the mask image but also analyze and process the mask image based on the target domain image and the text prompt information to generate pseudo-label information corresponding to the mask image, and then input the pseudo-label information into the alignment unit. The alignment unit is configured to obtain source domain object features corresponding to the source domain image and target domain object features corresponding to the target domain image output by the main processing unit, and obtain pseudo-label information output by the domain transfer unit, and obtain a source domain loss function by aligning the source domain object features with the annotation information corresponding to the source domain image; obtain a transfer loss function by aligning the source domain object features with the target domain object features; obtain a target domain loss function by aligning the pseudo-label information with the target domain object features; and obtain a cross-modal loss function between text information and image features by aligning object category information, source domain object features, and target domain object features. A total loss function can then be determined based on the source domain loss function, the target domain loss function, the transfer loss function, and the cross-modal loss function. A learning and training operation can then be performed on the visual pre-training network framework based on the total loss function to obtain a target task model for processing images in the source and target domains, thereby effectively ensuring the image processing quality and effect of the target task model.The technical solution provided by this application embodiment uses input text (i.e., text prompt information) to guide the domain transfer training of the task model, since source domain images have corresponding annotation information, while target domain images do not. This not only enhances the model's open vocabulary recognition capabilities but also achieves superior training results under multiple domain transfer task settings. This significantly taps into the potential of domain transfer operations and ensures the quality and effectiveness of the task model's analysis and processing of source and target domain images. Furthermore, by analyzing and processing the target domain image using the input text to obtain a mask image, and training the task model using both the target domain image and the mask image, the task model's focus on the object in the image is increased, while its focus on the background is reduced. This effectively improves the model processing performance of the task model after the domain transfer operation, further enhancing the practicality of this technical solution. FIG7 is a schematic structural diagram of a model training device provided in an embodiment of the present disclosure. Referring to FIG7 , this embodiment provides a model training device for executing the model training method shown in FIG2 . Specifically, the model training device may include: a first acquisition module 11 for acquiring a source domain image, a target domain image, and object category information to be identified in the target domain image, wherein the source domain corresponding to the source domain image is different from the target domain corresponding to the target domain image; a first determination module 12 for determining a mask image corresponding to the target domain image based on the object category information; and a first processing module 13 for performing a model training operation based on the source domain image, the target domain image, the object category information, and the mask image to obtain a target task model for processing images in the source and target domains. In some instances, when the first determination module 12 determines the mask image corresponding to the target domain image based on the object category information, the first determination module 12 is configured to: acquire a task type corresponding to the target domain image; and determine a mask image corresponding to the target domain image based on the task type and the object category information. In some instances, when the first determination module 12 determines the mask image corresponding to the target domain image based on the task type and the object category information, the first determination module 12 is configured to: obtain a category vector representation of the object category information, a task vector representation of the task type, and target domain image features of the target domain image; and determine the mask image corresponding to the target domain image based on the category vector representation, the task vector representation, and the target domain image features.In some instances, when the first determination module 12 determines a mask image corresponding to the target domain image based on the category vector representation, the task vector representation, and the target domain image features, the first determination module 12 is configured to: determine at least one mask region corresponding to the target domain image based on the category vector representation, the task vector representation, and the target domain image features; and determine the mask image corresponding to the target domain image based on the at least one mask region. In some instances, when the first determination module 12 determines the mask image corresponding to the target domain image based on the at least one mask region, the first determination module 12 is configured to: obtain probability information corresponding to each of the at least one mask regions; determine at least one target mask region within the at least one mask region based on the probability information; and fuse the at least one target mask region with the target domain image to obtain a mask image corresponding to the target domain image. In some instances, when the first processing module 13 performs a model training operation based on the source domain image, the target domain image, the object category information, and the mask image to obtain a target task model for processing images in the source domain and the target domain, the first processing module 13 is configured to: obtain a to-be-trained model, where the to-be-trained model includes a main processing unit, a domain migration unit communicatively connected to the main processing unit, and an alignment unit communicatively connected to the main processing unit and the domain migration unit; process the source domain image, the target domain image, the object category information, and the mask image using the main processing unit to obtain source domain object features corresponding to the source domain image and target domain object features corresponding to the target domain image; process the mask image based on the domain migration unit to obtain pseudo-annotation information corresponding to the mask image; and perform supervised learning on the annotation information corresponding to the source domain image, the source domain object features, the target domain object features, the pseudo-annotation information, and the object category information using the alignment unit to obtain the target task model. In some instances, when the first processing module 13 uses the main processing unit to process the source domain image, the target domain image, the object category information, and the mask image to obtain source domain object features corresponding to the source domain image and target domain object features corresponding to the target domain image, the first processing module 13 is configured to execute the following steps: obtaining a task type corresponding to the target domain image; performing a feature extraction operation on the task type and the object category information using the main processing unit to obtain text feature information; processing the source domain image based on the text feature information by the main processing unit to obtain source domain object features corresponding to the source domain image; and processing the target domain image based on the text feature information and the mask image by the main processing unit to obtain target domain object features corresponding to the target domain image.In some instances, when the first processing module 13 uses the alignment unit to perform supervised learning on the annotation information, source domain object features, target domain object features, pseudo-annotation information, and object category information of the source domain image to obtain the target task model, the first processing module 13 is configured to: use the alignment unit to align the annotation information and source domain object features corresponding to the source domain image to obtain a source domain loss function for analyzing and processing the source domain image; use the alignment unit to align the annotation information and source domain object features of the source domain image with the target domain object features to obtain a migration loss function for migrating from the source domain to the target domain; use the alignment unit to align the pseudo-annotation information and target domain object features to obtain a target domain loss function corresponding to the target domain image; use the alignment unit to align the object category information, source domain object features, and target domain object features to obtain a cross-modal loss function between text information and image features; and perform supervised training on the to-be-trained model based on the source domain loss function, the migration loss function, the target domain loss function, and the cross-modal loss function to obtain the target task model. In some instances, when the first processing module 13 performs supervised training on the to-be-trained model based on the source domain loss function, the transfer loss function, the target domain loss function, and the cross-modal loss function to obtain the target task model, the first processing module 13 is configured to: determine a total loss function based on the source domain loss function, the transfer loss function, the target domain loss function, and the cross-modal loss function; and perform supervised training on the to-be-trained model based on the total loss function to obtain the target task model. In some instances, before obtaining the source domain image, the target domain image, and the object category information to be recognized in the target domain image, the first acquisition module 11, the first determination module 12, and the first processing module 13 in this embodiment are configured to perform the following steps: the first acquisition module 11 is configured to obtain an initial task model for implementing the image processing operation; the first determination module 12 is configured to determine text prompt information for implementing the image processing operation, the text prompt information including at least one of the following: object category information to be recognized in the target domain image, and the task type corresponding to the target domain image; and the first processing module 13 is configured to initialize the initial task model using the text prompt information to obtain the to-be-trained model. The model training device shown in FIG7 can execute the method of the embodiments shown in FIG1-FIG6 . For portions not described in detail in this embodiment, reference can be made to the relevant description of the embodiments shown in FIG1-FIG6 . The implementation process and technical effects of this technical solution are described in the embodiments shown in FIG1-FIG6 and will not be repeated here. In one possible design, the structure of the model training device shown in FIG7 can be implemented as an electronic device.As shown in FIG8 , the model training apparatus in this embodiment can be implemented as an electronic device. Specifically, the electronic device may include a first processor 21 and a first memory 22. The first memory 22 is configured to store a program for executing the model training method provided in the embodiment shown in FIG2 on the corresponding electronic device. The first processor 21 is configured to execute the program stored in the first memory 22. The program includes one or more computer instructions. When executed by the first processor 21, the one or more computer instructions can implement the following steps: obtaining a source domain image, a target domain image, and object category information to be recognized in the target domain image, wherein the source domain corresponding to the source domain image is different from the target domain corresponding to the target domain image; determining a mask image corresponding to the target domain image based on the object category information; and performing a model training operation based on the source domain image, the target domain image, the object category information, and the mask image to obtain a target task model for processing images in the source and target domains. Furthermore, the first processor 21 is further configured to execute all or part of the steps in the embodiment shown in FIG2 . The electronic device may also include a first communication interface 23 for communicating with other devices or a communication network. Furthermore, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the electronic device, including a program for executing the model training method in the method embodiment shown in FIG. 2 . Furthermore, an embodiment of the present invention provides a computer program product, comprising: a computer program. When executed by a processor of the electronic device, the computer program causes the processor to execute the model training method in the method embodiment shown in FIG. 2 . FIG. 9 is a flow chart of an image processing method provided by an embodiment of the present disclosure. Referring to FIG. 9 , this embodiment provides an image processing method, the method being performed by an image processing device. It is understood that the image processing device can be implemented as software or a combination of software and hardware. Specifically, when implemented as hardware, it can be various electronic devices with image processing capabilities. When implemented as software, the image processing device can be installed in the electronic device described above. Based on the image processing device described above, image processing operations can be performed. Specifically, the image processing method can include the following steps: Step S901: Acquire an image to be processed, where the image to be processed corresponds to a target domain.When a user requests image processing, the image processing device can acquire an image to be processed. In some instances, the image to be processed can be acquired through human-computer interaction. In this case, acquiring the image to be processed can include: determining multiple candidate images located in the image processing device and displaying the multiple candidate images on a display interface; acquiring a selection operation input by the user in the human-computer interaction interface for at least one candidate image; and acquiring the image to be processed based on the selection operation, thereby ensuring accurate and reliable acquisition of the image to be processed. In other instances, the image to be processed can be acquired not only through human-computer interaction but also through a client or a preset device. In this case, acquiring the image to be processed can include: determining a client or a preset device in communication with the image processing device; storing the image to be processed on the client or the preset device, and the image processing device actively or passively acquiring the image to be processed through the client or the preset device. This also ensures flexible and reliable acquisition of the image to be processed. It should be noted that the image domain corresponding to the image to be processed can be a target domain, i.e., an image domain that can be accurately processed by the target task model. Step S902: Determine a target task model for processing the image to be processed. The target task model is determined by model training based on a source domain image, a target domain image, object category information, and a mask image corresponding to the target domain image. The source domain corresponding to the source domain image is different from the target domain corresponding to the target domain image, and the mask image is determined based on the object category information to be identified in the target domain image. To ensure the quality and efficiency of image processing, after acquiring the image to be processed, a target task model for processing the image to be processed can be determined. Different image processing tasks correspond to different target task models. For example, an image detection task may correspond to an image detection model; an image segmentation task may correspond to an image segmentation model; and so on. Those skilled in the art can determine the target task model for processing the image to be processed based on specific application requirements. It should be noted that the target task model in this embodiment is determined by model training based on the source domain image, the target domain image, object category information, and the mask image corresponding to the target domain image. The specific model training process and implementation results can be found in the description of the embodiments shown in Figures 2 to 6 above and will not be repeated here. Step S903: Process the image to be processed using the target task model to obtain an image processing result.After obtaining the target task model and the image to be processed, the target task model can be used to process the image to be processed, thereby obtaining an image processing result. Different image processing tasks correspond to different image processing results. For example, the image processing result corresponding to an image detection task is an image detection result; the image processing result corresponding to an image segmentation task is an image segmentation result. This effectively improves the flexibility and reliability of the method. The image processing method provided in this embodiment obtains an image to be processed, determines a target task model for processing the image to be processed, and then processes the image to be processed using the target task model to obtain an image processing result. Because the target task model is determined through model training based on a source domain image, a target domain image, object category information, and a mask image corresponding to the target domain image, this effectively improves the quality and efficiency of image processing. Furthermore, different target task models correspond to different image processing tasks, which helps meet the personalized needs of different users and further enhances the practicality of the method. FIG10 is a schematic structural diagram of an image processing device provided in an embodiment of the present disclosure. Referring to FIG10 , this embodiment provides an image processing device configured to perform the image processing method shown in FIG9 . Specifically, the image processing device may include: a second acquisition module 31 configured to acquire an image to be processed, wherein the image to be processed corresponds to a target domain; a second determination module 32 configured to determine a target task model for processing the image to be processed, wherein the target task model is determined by model training using a source domain image, a target domain image, object category information, and a mask image corresponding to the target domain image, wherein the source domain corresponding to the source domain image is different from the target domain corresponding to the target domain image, and the mask image is determined based on the object category information to be identified in the target domain image; and a second processing module 33 configured to process the image to be processed using the target task model to obtain an image processing result. The image processing device shown in FIG10 can perform the method of the embodiment shown in FIG9 . For portions not described in detail in this embodiment, reference is made to the relevant description of the embodiment shown in FIG9 . The execution process and technical effects of this technical solution are described in the embodiment shown in FIG9 and will not be repeated here. In one possible design, the structure of the image processing device shown in FIG10 can be implemented as an electronic device.As shown in FIG. 11 , the image processing apparatus in this embodiment can be implemented as an electronic device. Specifically, the electronic device may include: a second processor 41 and a second memory 42. The second memory 42 is used to store a program for the electronic device to execute the image processing method provided in the embodiment shown in FIG. 9 . The second processor 41 is configured to execute the program stored in the second memory 42. The program includes one or more computer instructions. When executed by the second processor 41, the one or more computer instructions can implement the following steps: obtaining an image to be processed, where the image to be processed corresponds to a target domain; determining a target task model for processing the image to be processed, where the target task model is determined by model training based on a source domain image, a target domain image, object category information, and a mask image corresponding to the target domain image, where the source domain corresponding to the source domain image is different from the target domain corresponding to the target domain image, and the mask image is determined based on object category information to be recognized in the target domain image; and processing the image to be processed using the target task model to obtain an image processing result. Furthermore, the second processor 41 is also configured to execute all or part of the steps in the embodiment shown in FIG. 9 . The electronic device may also include a second communication interface 43 for communicating with other devices or a communication network. Furthermore, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by an electronic device, including a program for executing the image processing method in the method embodiment shown in FIG. Furthermore, an embodiment of the present invention provides a computer program product comprising: a computer program that, when executed by a processor of an electronic device, causes the processor to execute the image processing method in the method embodiment shown in FIG. FIG. 12 is a schematic diagram of a scenario for an image detection model training method provided in an embodiment of the present disclosure. Referring to FIG. 12 , this embodiment provides an image detection model training method, the method being executed by an image detection model training device. It is understood that the image detection model training device can be implemented as software or a combination of software and hardware. Specifically, when the image detection model training device is implemented as hardware, it can be any electronic device capable of training an image detection model.When the image detection model training device is implemented as software, it can be installed in the aforementioned electronic device. The training device based on the aforementioned image detection model can implement image detection model training operations. Specifically, the image detection model training method can include the following steps: Step S1201: Obtaining object category information to be identified in a first detection image, a second detection image, and the second detection image, wherein the first scene corresponding to the first detection image and the second scene corresponding to the second detection image are different. When a user requires image detection model training, the first detection image, the second detection image, and the second detection image can be obtained. The first scene corresponding to the first detection image and the second scene corresponding to the second detection image are different. For example, the first scene corresponding to the first detection image can be a conference room scene, and the second scene corresponding to the second detection image can be an outdoor scene corresponding to a handheld terminal. The first scene corresponding to the first detection image and the second scene corresponding to the second detection image are different scenes. Alternatively, the first scene corresponding to the first detection image can be a drone detection scene, and the second scene corresponding to the second detection image can be a road detection scene, etc. In addition, the method for acquiring the first and second detection images in this embodiment is similar to the method for acquiring the source and target domain images in step S201 in the above embodiment. For details, please refer to the above description and will not be repeated here. Step S1202: Based on the object category information, a mask image corresponding to the second detection image is determined. Step S1203: Model training is performed based on the first and second detection images, the object category information, and the mask image to obtain an object detection model for performing detection operations on the images obtained for the first and second scenes.In some instances, performing model training based on the first detection image, the second detection image, the object category information, and the mask image to obtain a target detection model for performing detection operations on images obtained from the first scene and the second scene may include: acquiring a to-be-trained model, where the to-be-trained model includes a main processing unit, a domain migration unit communicatively connected to the main processing unit, and an alignment unit communicatively connected to the main processing unit and the domain migration unit; processing, using the main processing unit, the first detection image, the second detection image, the object category information, and the mask image to obtain first object features corresponding to the first detection image and second object features corresponding to the second detection image; processing the mask image based on the domain migration unit to obtain pseudo-annotation information corresponding to the mask image; and performing supervised learning, using the alignment unit, on the annotation information corresponding to the source domain image, the first object features, the second object features, the pseudo-annotation information, and the object category information to obtain the target detection model. Specifically, the specific implementation principles and effects of the above-mentioned steps in this embodiment are similar to the specific implementation principles and effects of the method steps in the embodiments corresponding to Figures 2-6 . For details, please refer to the above description and will not be repeated here. In some other examples, after obtaining a target detection model for performing detection operations on images obtained from the first scene and the second scene, this embodiment can use the target detection model to perform object detection operations on the images. In this case, the method may include: obtaining an image to be detected in a preset scene; processing the image to be detected using the target detection model to determine an object detection result; and then performing corresponding processing operations based on the object detection result. For example, a meeting sign-in operation can be performed based on the object detection result, and a scene control operation can be performed based on the object detection result. This further improves the practicality of the method.The image detection model training method provided in this embodiment obtains a first detection image, a second detection image, and object category information to be identified in the second detection image, then determines a mask image corresponding to the second detection image based on the object category information, and performs model training based on the first detection image, the second detection image, the object category information, and the mask image to obtain a target detection model for performing detection operations on images obtained from the first scene and the second scene. This effectively implements domain transfer training operations for the target detection model, i.e., enables the target detection model to transfer relevant knowledge learned in the source domain to the target domain, and further learns relevant knowledge for analyzing and processing target domain images. This ensures the quality and effect of the target detection model's processing of target domain images, further improving the practicality of the method. FIG13 is a schematic structural diagram of an image detection model training device provided in an embodiment of the present disclosure. Referring to FIG13 , this embodiment provides an image detection model training device for executing the image detection model training method shown in FIG12 . Specifically, the training device may include: a third acquisition module 51 for acquiring object category information to be identified from a first detection image, a second detection image, and the second detection image, wherein the first scene corresponding to the first detection image is different from the second scene corresponding to the second detection image; a third determination module 52 for determining a mask image corresponding to the second detection image based on the object category information; and a third processing module 53 for performing model training based on the first detection image, the second detection image, the object category information, and the mask image to obtain an object detection model for performing detection operations on images obtained from the first and second scenes. The image detection model training device shown in FIG13 can execute the method shown in the embodiment of FIG12 . For portions not described in detail in this embodiment, reference is made to the relevant description of the embodiment shown in FIG12 . The implementation process and technical effects of this technical solution are described in the embodiment shown in FIG12 and are not further elaborated here. In one possible design, the structure of the image detection model training device shown in FIG. 13 can be implemented as an electronic device. Referring to FIG. 14 , the image detection model training device in this embodiment can be implemented as an electronic device. Specifically, the electronic device may include a third processor 61 and a third memory 62. The third memory 62 is used to store a program for the electronic device to execute the image processing method provided in the embodiment shown in FIG. 9 . The third processor 61 is configured to execute the program stored in the third memory 62.The program includes one or more computer instructions, wherein when executed by the third processor 61, the one or more computer instructions can implement the following steps: obtaining object category information to be identified in a first detection image, a second detection image, and the second detection image, wherein the first scene corresponding to the first detection image is different from the second scene corresponding to the second detection image; determining a mask image corresponding to the second detection image based on the object category information; and performing model training based on the first detection image, the second detection image, the object category information, and the mask image to obtain an object detection model for performing detection operations on images obtained from the first and second scenes. Furthermore, the third processor 61 is further configured to execute all or part of the steps in the embodiment shown in FIG. 12 . The electronic device may also include a third communication interface 63 for communicating with other devices or a communication network. Furthermore, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the electronic device, which includes a program for executing the image detection model training method in the method embodiment shown in FIG. 12 . In addition, an embodiment of the present invention provides a computer program product, including: a computer program. When executed by a processor of an electronic device, the computer program causes the processor to perform the image detection model training method of the method embodiment shown in FIG12 . It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. The collection, use, and processing of relevant data must comply with relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or reject. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one location or distributed across multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of this embodiment. Those of ordinary skill in the art can understand and implement them without inventive effort. Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software.Based on this understanding, the above technical solutions, or the portions that contribute to the prior art, can essentially be embodied in the form of computer products. The present disclosure can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code. The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, such that the instructions, executed by the processor of the computer or other programmable device, generate means for implementing the functions specified in one or more processes in the flowcharts and / or one or more blocks in the block diagrams. These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more blocks in a block diagram. These computer program instructions may also be loaded onto a computer or other programmable device, causing the computer or other programmable device to execute a series of operational steps to produce a computer-implemented process, such that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flowcharts and / or one or more blocks in a block diagram. In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-volatile memory in a computer-readable medium, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash memory. Memory is an example of a computer-readable medium. Computer-readable media, including both permanent and non-permanent, removable and non-removable media, may implement data storage using any method or technology. The data may be computer-readable instructions, data structures, program modules, or other data.Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store data that can be accessed by a computing device. As defined herein, computer-readable media does not include transient computer-readable media. ? Such as modulated data signals and carrier waves. Finally, it should be noted that the above embodiments are intended only to illustrate the technical solutions of the present disclosure, and not to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art will appreciate that the technical solutions described in the aforementioned embodiments may be modified, or some or all of the technical features thereof may be replaced with equivalents. Such modifications or replacements do not deviate from the essence of the corresponding technical solutions within the scope of the various embodiments of the present disclosure.
Claims
28 Claims 1. A model training method, comprising: A source domain image, a target domain image, and object category information to be identified in the target domain image are obtained, wherein a source domain corresponding to the source domain image is different from a target domain corresponding to the target domain image; a mask image corresponding to the target domain image is determined based on the object category information; and a model is trained based on the source domain image, the target domain image, the object category information, and the mask image to obtain a target task model for processing images in the source domain and the target domain.
2. The method according to claim 1, wherein: Performing a model training operation based on the source domain image, the target domain image, the object category information, and the mask image to obtain a target task model for processing images in the source domain and the target domain includes: obtaining a to-be-trained model, where the to-be-trained model includes a main processing unit, a domain migration unit communicatively connected to the main processing unit, and an alignment unit communicatively connected to the main processing unit and the domain migration unit; processing the source domain image, the target domain image, the object category information, and the mask image using the main processing unit to obtain source domain object features corresponding to the source domain image and target domain object features corresponding to the target domain image; processing the mask image based on the domain migration unit to obtain pseudo-annotation information corresponding to the mask image; and performing supervised learning on the annotation information corresponding to the source domain image, the source domain object features, the target domain object features, the pseudo-annotation information, and the object category information using the alignment unit to obtain the target task model.
3. The method according to claim 2, wherein: The main processing unit is used to process the source domain image, the target domain image, the object category information, and the mask image to obtain source domain object features corresponding to the source domain image and target domain object features corresponding to the target domain image, including: obtaining a task type corresponding to the target domain image; using the main processing unit to perform a feature extraction operation on the task type and the object category information to obtain text feature information; processing the source domain image based on the text feature information by the main processing unit to obtain source domain object features corresponding to the source domain image; processing the target domain image based on the text feature information and the mask image by the main processing unit to obtain target domain object features corresponding to the target domain image.
4. The method according to claim 2, wherein: The alignment unit is used to perform alignment on the labeling information of the source domain image, the source domain object features, the target domain object features, the pseudo labeling information, and the object category information. The method comprises performing supervised learning to obtain a target task model, comprising: aligning, using the alignment unit, the annotation information corresponding to the source domain image and the source domain object features to obtain a source domain loss function for analyzing and processing the source domain image; aligning, using the alignment unit, the annotation information of the source domain image, the source domain object features, and the target domain object features to obtain a migration loss function for migrating from the source domain to the target domain; aligning, using the alignment unit, the pseudo-annotation information and the target domain object features to obtain a target domain loss function corresponding to the target domain image; aligning, using the alignment unit, the object category information, the source domain object features, and the target domain object features to obtain a cross-modal loss function between text information and image features; and performing supervised training on the to-be-trained model based on the source domain loss function, the migration loss function, the target domain loss function, and the cross-modal loss function to obtain a target task model.
5. The method according to claim 4, wherein: Performing supervised training on the model to be trained based on the source domain loss function, the transfer loss function, the target domain loss function, and the cross-modal loss function to obtain a target task model includes: determining a total loss function based on the source domain loss function, the transfer loss function, the target domain loss function, and the cross-modal loss function; and performing supervised training on the model to be trained based on the total loss function to obtain a target task model.
6. The method according to claim 2, wherein: Determining, based on the object category information, a mask image corresponding to the target domain image, includes: obtaining a task type corresponding to the target domain image; and processing, using a main processing unit in a to-be-trained model, the task type and the object category information to determine the mask image corresponding to the target domain image.
7. The method according to claim 6, wherein: Utilizing a main processing unit in a model to be trained to process the task type and the object category information to determine a mask image corresponding to the target domain image, including: utilizing the main processing unit in the model to be trained to process the task type and the object category information to obtain a category vector representation of the object category information, a task vector representation of the task type, and target domain image features of the target domain image; and determining a mask image corresponding to the target domain image based on the category vector representation, the task vector representation, and the target domain image features.
8. The method according to claim 7, wherein: Determining a mask image corresponding to the target domain image based on the category vector representation, the task vector representation, and the target domain image feature includes: Determining at least one mask region corresponding to the target domain image based on the category vector representation, the task vector representation, and the target domain image feature; and determining a mask image corresponding to the target domain image based on the at least one mask region.
9. The method according to claim 8, wherein: Determining, based on the at least one mask region, a mask image corresponding to the target domain image includes: obtaining probability information corresponding to each of the at least one mask region; determining, based on the probability information, at least one target mask region in the at least one mask region; and fusing the at least one target mask region with the target domain image to obtain a mask image corresponding to the target domain image.
10. The method according to any one of claims 1 to 9, wherein: Before obtaining a source domain image, a target domain image, and information on object categories to be identified in the target domain image, the method further includes: obtaining an initial task model for implementing an image processing operation; determining text prompt information for implementing the image processing operation, the text prompt information including at least one of the following: object category information to be identified in the target domain image, and a task type corresponding to the target domain image; and initializing the initial task model using the text prompt information to obtain a model to be trained.
11. An image processing method, comprising: Acquire an image to be processed, where the image to be processed corresponds to a target domain; Determining a target task model for processing the image to be processed, the target task model being determined by model training based on a source domain image, a target domain image, object category information, and a mask image corresponding to the target domain image, wherein a source domain corresponding to the source domain image is different from a target domain corresponding to the target domain image, and the mask image is determined based on object category information to be identified in the target domain image; and processing the image to be processed using the target task model to obtain an image processing result.
12. A method for training an image detection model, comprising: Obtaining a first detection image, a second detection image, and object category information to be identified in the second detection image, wherein a first scene corresponding to the first detection image is different from a second scene corresponding to the second detection image; determining a mask image corresponding to the second detection image based on the object category information; and performing model training based on the first detection image, the second detection image, the object category information, and the mask image to obtain a target detection model for performing detection operations on images obtained from the first scene and the second scene.
13. The method according to claim 12, wherein: Performing model training based on the first detection image, the second detection image, the object category information, and the mask image to obtain an object detection model for performing detection operations on images obtained from the first scene and the second scene includes: Acquire a to-be-trained model, where the to-be-trained model includes a main processing unit, a domain migration unit communicatively connected to the main processing unit, and an alignment unit communicatively connected to the main processing unit and the domain migration unit; use the main processing unit to process the first detection image, the second detection image, the object category information, and the mask image to obtain a first object feature corresponding to the first detection image and a second object feature corresponding to the second detection image; process the mask image based on the domain migration unit to obtain pseudo-annotation information corresponding to the mask image; and use the alignment unit to perform supervised learning on the annotation information corresponding to the first detection image, the first object feature, the second object feature, the pseudo-annotation information, and the object category information to obtain a target detection model.
14. An electronic device, comprising: A memory, a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method according to any one of claims 1 to 13.
15. A computer program product comprising: A computer program, which, when executed by a processor of an electronic device, causes the processor to perform the steps of the method of any one of claims 1 to 13.
Citation Information
Patent Citations
Feature extraction network training method, apparatus and device, and image processing method, apparatus and device
CN110399856A
Unsupervised image classification model training method and device and electronic equipment
CN111832605A
Unsupervised domain adaptive segmentation method based on wavelet transform and context relation
CN117392387A
Domain Adaptation for Machine Learning Models
US20220391768A1