Target detection method
By screening the target domain labeled samples in the target domain and combining the training data of the source domain and the target domain, the target detection model is trained, which solves the problem of poor adaptability of the deep learning model during migration and improves the generalization and task performance of the model. Processing performance.
Patent Information
- Application Number
- PCT/CN2024/105248
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-17
- Filing Date
- 2024-07-12
- Publication Date
- 2025-01-23
AI Technical Summary
When deep learning models migrate from the source domain to the target domain, it is difficult to adapt to the image data characteristics of the target domain, resulting in a degradation of the generalization performance and task processing performance of the model.
By screened the target domain marking samples in the target domain, combined with the source domain marking sample and the initial sample of the target domain, the target detection model is trained to achieve the migration of the model from the source domain to the target domain.
It improves the applicability and generalization performance of the target detection model in the target domain and ensures the task processing performance of the model in various fields.
Smart Images

Figure CN2024105248_23012025_PF_FP_ABST
Abstract
Description
Target Detection Methods
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on July 17, 2023, with application number 202310879587.7 and application name “Target Detection Method”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of this specification relate to the field of Internet technology, and in particular to a target detection method. Background Art
[0003] Deep learning models, especially deep neural networks, can be applied to multiple fields to perform tasks such as image classification, image segmentation, and target detection. For example, in the medical field, deep learning models can often be used to detect lesions. In actual applications, trained deep learning models will be migrated to different medical centers for application. In other words, deep learning models trained in the source domain will be migrated to the target domain. Since image data from different medical centers often exhibit different characteristics and distributions, deep learning models trained in the source domain may be difficult to apply to the target domain, resulting in a decrease in the model's generalization performance and task processing performance. Therefore, an effective technical solution is urgently needed to solve the above problems.
[0004] Summary of the Invention
[0005] In view of this, the embodiments of this specification provide two target detection methods. One or more embodiments of this specification also relate to two target detection devices, a lesion detection method, a lesion detection device, a target detection model training method, a target detection model training device, a cancer computer-aided diagnosis method, a cancer computer-aided diagnosis system, a computing device, a computer-readable storage medium, a computer program product, and a computer program to address technical deficiencies in the prior art.
[0006] According to a first aspect of the embodiments of this specification, a target detection method is provided, including:
[0007] Determine the image to be detected in the target domain;
[0008] The image to be detected is input into the target detection model corresponding to the target domain to obtain a target object image corresponding to the image to be detected, wherein the target detection model is trained based on source domain labeled samples in a source domain training dataset, target domain initial samples and target domain labeled samples in a target domain training dataset, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training dataset and the source domain training dataset.
[0009] According to a second aspect of the embodiments of this specification, there is provided an object detection device, including:
[0010] a determination module, configured to determine an image to be detected in a target domain;
[0011] An input module is configured to input the image to be detected into a target detection model corresponding to the target domain to obtain a target object image corresponding to the image to be detected, wherein the target detection model is trained based on source domain labeled samples in a source domain training dataset, target domain initial samples and target domain labeled samples in a target domain training dataset, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training dataset and the source domain training dataset.
[0012] According to a third aspect of the embodiments of this specification, a target detection method is provided, which is applied to a cloud-side device, including:
[0013] An image processing request sent by a receiving end-side device, wherein the image processing request carries an image to be detected in a target domain;
[0014] Inputting the image to be detected into a target detection model corresponding to the target domain to obtain a target object image corresponding to the image to be detected, wherein the target detection model is trained based on source domain labeled samples in a source domain training dataset, target domain initial samples and target domain labeled samples in a target domain training dataset, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training dataset and the source domain training dataset;
[0015] The target object image is sent to the terminal side device.
[0016] According to a fourth aspect of the embodiments of this specification, there is provided a target detection device, which is applied to a cloud-side device, including:
[0017] a receiving module configured to receive an image processing request sent by an end-side device, wherein the image processing request carries an image to be detected in a target domain;
[0018] an input module configured to input the image to be detected into a target detection model corresponding to the target domain, and obtain a target object image corresponding to the image to be detected, wherein the target detection model is trained based on source domain labeled samples in a source domain training dataset, target domain initial samples in a target domain training dataset, and target domain labeled samples, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training dataset, and the source domain training dataset;
[0019] The sending module is configured to send the target object image to the terminal side device.
[0020] According to a fifth aspect of the embodiments of this specification, a lesion detection method is provided, which is applied to a cloud-side device, including:
[0021] An image processing request sent by a receiving device, wherein the image processing request carries a medical imaging scan image of a target domain;
[0022] Inputting the medical image scan image into a target detection model corresponding to the target domain to obtain a lesion image corresponding to the medical image scan image, wherein the target detection model is trained based on source domain labeled samples in a source domain training dataset, target domain initial samples in a target domain training dataset, and target domain labeled samples, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training dataset, and the source domain training dataset;
[0023] The lesion image is sent to the terminal-side device.
[0024] According to a sixth aspect of the embodiments of this specification, a lesion detection device is provided, which is applied to a cloud-side device, including:
[0025] a receiving module configured to receive an image processing request sent by an end-side device, wherein the image processing request carries a medical imaging scan image of a target domain;
[0026] an input module configured to input the medical image scan image into a target detection model corresponding to the target domain, and obtain a lesion image corresponding to the medical image scan image, wherein the target detection model is trained based on source domain labeled samples in a source domain training dataset, target domain initial samples in a target domain training dataset, and target domain labeled samples, and the target domain labeled samples are screened from the target domain initial samples based on a preset sample selection strategy, the target domain training dataset, and the source domain training dataset;
[0027] The sending module is configured to send the lesion image to the terminal side device.
[0028] According to a seventh aspect of the embodiments of this specification, a target detection model training method is provided, which is applied to a cloud-side device, including:
[0029] Determining a first model loss value according to source domain labeled samples in the source domain training dataset and first labels corresponding to the source domain labeled samples;
[0030] Determine the initial sample of the target domain based on the target domain training dataset;
[0031] According to a preset sample selection strategy, the target domain training dataset and the source domain training dataset, a target domain labeled sample is obtained from the target domain initial samples;
[0032] Determining a second model loss value and a third model loss value according to the source domain labeled sample, the target domain initial sample, and the target domain labeled sample;
[0033] The target detection model is adjusted according to the first model loss value, the second model loss value, and the third model loss value until a target detection model that meets the training stop condition is obtained.
[0034] According to an eighth aspect of the embodiments of this specification, a target detection model training device is provided, which is applied to a cloud-side device, including:
[0035] A first determining module is configured to determine a first model loss value based on source domain labeled samples in a source domain training dataset and first labels corresponding to the source domain labeled samples;
[0036] A second determination module is configured to determine a target domain initial sample based on the target domain training dataset;
[0037] a screening module configured to screen the target domain initial samples to obtain target domain labeled samples according to a preset sample selection strategy, the target domain training dataset, and the source domain training dataset;
[0038] a third determining module, configured to determine a second model loss value and a third model loss value according to the source domain labeled sample, the target domain initial sample, and the target domain labeled sample;
[0039] The training module is configured to adjust the target detection model according to the first model loss value, the second model loss value and the third model loss value until a target detection model that meets the training stop condition is obtained.
[0040] According to a ninth aspect of the embodiments of this specification, a method for computer-aided diagnosis of cancer is provided, comprising:
[0041] Obtain a medical imaging scan image of the target domain;
[0042] The medical image scan image is input into the target detection model corresponding to the target domain to obtain a lesion image corresponding to the medical image scan image, wherein the target detection model is trained based on the source domain labeled samples in the source domain training dataset, the target domain initial samples and the target domain labeled samples in the target domain training dataset, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training dataset and the source domain training dataset.
[0043] According to a tenth aspect of the embodiments of this specification, a computer-aided diagnosis system for cancer is provided, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to perform a computer-aided diagnosis method for cancer, the method comprising:
[0044] Obtain a medical imaging scan image of the target domain;
[0045] The medical image scan image is input into the target detection model corresponding to the target domain to obtain a lesion image corresponding to the medical image scan image, wherein the target detection model is trained based on the source domain labeled samples in the source domain training dataset, the target domain initial samples and the target domain labeled samples in the target domain training dataset, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training dataset and the source domain training dataset.
[0046] According to an eleventh aspect of the embodiments of this specification, there is provided a computing device, including:
[0047] Memory and processor;
[0048] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above method are implemented.
[0049] According to the twelfth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and the instructions implement the steps of the above method when executed by a processor.
[0050] According to a thirteenth aspect of the embodiments of this specification, a computer program product is provided, comprising computer-executable instructions, which implement the steps of the above method when executed by a processor.
[0051] According to a fourteenth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above method.
[0052] One embodiment of the present specification provides a target detection method, which determines an image to be detected in a target domain; inputs the image to be detected into a target detection model corresponding to the target domain, and obtains a target object image corresponding to the image to be detected, wherein the target detection model is trained based on source domain labeled samples in a source domain training dataset, target domain initial samples in a target domain training dataset, and target domain labeled samples, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training dataset, and the source domain training dataset.
[0053] In the above method, when processing the target domain image to be detected, the trained target detection model corresponding to the target domain can be used for processing. Moreover, in the process of training the target detection model, the target detection model can be trained based on the source domain labeled samples, the target domain initial samples and the target domain labeled samples. The target domain labeled samples can be screened from the target domain initial samples according to the preset sample selection strategy and the source domain labeled samples. That is to say, in the process of training the target detection model, the labeled training samples in the source domain (i.e., source domain labeled samples) and the unlabeled training samples in the target domain (i.e., target domain initial samples) are combined, and the target domain labeled samples screened from the target domain initial samples are also combined. The training samples of the source domain and the training samples of the target domain are considered in the training process, thereby realizing the migration of the model from the source domain to the target domain, so that the trained target detection model is also applicable in the target domain, further ensuring the generalization performance and task processing performance of the target detection model in various fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] FIG1 shows a schematic structural diagram of a target detection system according to an embodiment of this specification;
[0055] FIG2 is a flow chart of a target detection method provided by one embodiment of this specification;
[0056] FIG3 shows a schematic diagram of a training process of a target detection model in a target detection method provided according to an embodiment of this specification;
[0057] FIG4 is a flowchart of a processing process of a target detection method provided by one embodiment of this specification;
[0058] FIG5 is a schematic structural diagram of a target detection device provided by one embodiment of this specification;
[0059] FIG6 is a flowchart of another target detection method provided by an embodiment of this specification;
[0060] FIG7 is a schematic structural diagram of another target detection device provided by an embodiment of this specification;
[0061] FIG8 is a flow chart of a lesion detection method provided by one embodiment of this specification;
[0062] FIG9 is a schematic structural diagram of a lesion detection device provided by one embodiment of this specification;
[0063] FIG10 is a flowchart of a method for training a target detection model according to an embodiment of the present specification;
[0064] FIG11 is a schematic diagram of the structure of a target detection model training device provided by one embodiment of this specification;
[0065] FIG12 is a structural block diagram of a computing device provided in one embodiment of this specification. DETAILED DESCRIPTION
[0066] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0067] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0068] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0069] In addition, 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 one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0070] In this specification, two target detection methods are provided. This specification also involves two target detection devices, a lesion detection method, a lesion detection device, a target detection model training method, a target detection model training device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0071] 1 , which shows a schematic structural diagram of a target detection system according to an embodiment of the present specification, the target detection system 100 may include a client 102 and a server 104 ;
[0072] The client 102 is used to send the image to be detected to the server 104;
[0073] The server 104 inputs the image to be detected into a target detection model corresponding to the target domain, and obtains a target object image corresponding to the image to be detected, wherein the target detection model is trained based on source domain labeled samples in the source domain training dataset, target domain initial samples in the target domain training dataset, and target domain labeled samples, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training dataset, and the source domain training dataset. The target object image is sent to the client 102;
[0074] The client 102 is further configured to receive the target object image sent by the server 104 .
[0075] In the above system, when processing the target domain image to be detected, the trained target detection model corresponding to the target domain can be used for processing. Moreover, in the process of training the target detection model, the target detection model can be trained based on the source domain labeled samples, the target domain initial samples and the target domain labeled samples. The target domain labeled samples can be screened from the target domain initial samples based on the preset sample selection strategy and the source domain labeled samples. That is to say, in the process of training the target detection model, the labeled training samples in the source domain (i.e., source domain labeled samples) and the unlabeled training samples in the target domain (i.e., target domain initial samples) are combined, and the target domain labeled samples screened from the target domain initial samples are also combined. The training samples of the source domain and the training samples of the target domain are considered in the training process, thereby realizing the migration of the model from the source domain to the target domain, so that the trained target detection model is also applicable in the target domain, further ensuring the generalization performance and task processing performance of the target detection model in various fields.
[0076] In practical applications, the target detection system may include multiple clients 102 and a server 104. Multiple clients 102 may establish communication connections through the server 104. In target detection scenarios, the server 104 is used to provide target detection services between multiple clients 102. Multiple clients 102 may act as senders or receivers, respectively, and communicate through the server 104.
[0077] Users can interact with the server 104 through the client 102 to receive data sent by other clients 102, or send data to other clients 102. In the target detection scenario, the user can publish a data stream to the server 104 through the client 102, and the server 104 generates a target object image based on the data stream and pushes the target object image to other clients with which communication has been established.
[0078] The client 102 and the server 104 are connected via a network. The network provides a medium for the communication link between the client 102 and the server 104. The network can include various connection types, such as wired or wireless communication links or fiber optic cables. The data transmitted by the client 102 may need to be encoded, transcoded, compressed, and other processing before being released to the server 104.
[0079] The client 102 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5, Hypertext Markup Language 5) application, a light application (also known as a mini-program, a lightweight application), or a cloud application. The client 102 can be based on the software development kit (SDK) of the corresponding service provided by the server 104, such as developed based on the real-time communication (RTC) SDK. The client 102 can be deployed in an electronic device and needs to rely on the device to run or certain APPs in the device to run. For example, the electronic device can have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, tablet computer, personal computer, or other end-side device. Various other types of applications can also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0080] The server 104 may include servers that provide various services, such as servers that provide communication services to multiple clients, servers that support background training for models used on clients, and servers that process data sent by clients. It should be noted that the server 104 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server in a distributed system, or a server that is integrated with a blockchain. The server can also be a cloud server (cloud-side device) that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0081] It is worth noting that the target detection methods provided in the embodiments of this specification are generally executed by the server. However, in other embodiments of this specification, the client may also have similar functions to the server and thus execute the target detection methods provided in the embodiments of this specification. In other embodiments, the target detection methods provided in the embodiments of this specification may also be executed jointly by the client and the server.
[0082] Referring to FIG. 2 , FIG. 2 shows a flow chart of a target detection method provided according to an embodiment of the present specification, which specifically includes the following steps.
[0083] Step 202: Determine the image to be detected in the target domain.
[0084] Specifically, the target detection method provided in the embodiments of this specification can be applied to target detection tasks in any field. For example, in the medical field, the target detection method can be used to process medical imaging scans to detect lesions in the medical imaging scans. Alternatively, in the e-commerce field, the target detection method can be used to process product images to determine product information in the image. Alternatively, in the remote sensing field, the target detection method can be used to process remote sensing images to obtain information about points of interest, etc. The embodiments of this specification are not limited here.
[0085] For ease of understanding, the embodiments of this specification are described in detail using the target detection method applied to a medical scenario as an example, but this does not affect the implementation of the target detection method in other feasible scenarios.
[0086] Among them, the target domain can be understood as the domain to which the target detection model needs to be migrated, and the training samples in the target domain are unlabeled samples. The target domain is relative to the source domain, and the training samples in the source domain are labeled samples. Specifically, in the process of transfer learning of the target detection model, the target detection model can be supervised trained using labeled samples in the source domain, and the knowledge learned by the target detection model in the source domain can be transferred to the target domain, so that the target detection model can also be applied in the target domain. For example, the source domain is medical center A, and the training samples of medical center A are rich and labeled samples. After the target detection model is trained using the training samples of medical center A, the target detection model needs to be migrated to medical center B, and the training samples of medical center B are scarce and unlabeled samples. In the target detection method provided in the embodiment of this specification, it is necessary to realize the migration of the target detection model from medical center A to medical center B based on the training samples of medical center A and the training samples of medical center B, so as to further ensure the applicability of the target detection model in medical center B.
[0087] Step 204: Input the image to be detected into the target detection model corresponding to the target domain to obtain the target object image corresponding to the image to be detected, wherein the target detection model is trained based on the source domain labeled samples in the source domain training dataset, the target domain initial samples and the target domain labeled samples in the target domain training dataset, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training dataset and the source domain training dataset.
[0088] Specifically, after determining the image to be detected in the target domain, the image to be detected may be input into a target detection model corresponding to the target domain to obtain a target object image corresponding to the image to be detected.
[0089] The target domain object detection model can be understood as the object detection model transferred from the source domain to the target domain. The image to be detected may contain a target object, and the target detection model can be used to predict the location of the target object in the image to be detected. The target object image corresponding to the image to be detected can be understood as an image with the location of the target object marked in the image to be detected. The marking can be in the form of a box selection.
[0090] For example, when the image to be detected is a medical imaging scan image, the target object may be a lesion. Then the target detection model can be used to predict the location of the lesion in the medical imaging scan image, thereby obtaining a lesion image marked with the location.
[0091] In specific implementations, before inputting the image to be detected into the target domain's corresponding target detection model, the target domain's corresponding target detection model must be trained to achieve transfer from the source domain to the target domain. Referring to Figure 3 , Figure 3 illustrates a schematic diagram of the target detection model training process in a target detection method according to an embodiment of this specification. The specific training steps are described below in steps 302 through 310.
[0092] Step 302: Determine a first model loss value based on source domain labeled samples in the source domain training dataset and first labels corresponding to the source domain labeled samples.
[0093] The source domain labeled sample can be understood as a labeled sample in the source domain, and the first label corresponding to the source domain labeled sample can be understood as the label of the labeled sample. The first label can be, for example, the category of the source domain labeled sample or the location of the target object in the source domain labeled sample. It is understood that the source domain labeled sample is an image.
[0094] Specifically, the object detection model may include a feature extraction network, a region extraction network, a pooling network, and a classification network. A source domain labeled sample may be input into the object detection model. Within the object detection model, the sample passes through the feature extraction network, the region extraction network, the pooling network, and the classification network in sequence, thereby obtaining a prediction result output by the object detection model. Based on the prediction result and the first label, a first model loss value is calculated.
[0095] The feature extraction network extracts image features, while the region extraction network identifies multiple candidate prediction regions within these features. These regions can be considered areas where the target object may be located. The pooling network pools each candidate prediction region to produce feature vectors of the same size, and the classification network predicts the category and bounding box for each feature vector.
[0096] In practical applications, the region extraction network (RPN network) may be, for example, an FCOS network.
[0097] Step 304: Determine the target domain initial samples based on the target domain training dataset.
[0098] The target domain initial sample can be understood as an unlabeled sample in the target domain. It can be understood that the target domain initial sample is an image.
[0099] Step 306: According to a preset sample selection strategy, the target domain training dataset and the source domain training dataset, target domain labeled samples are screened from the target domain initial samples.
[0100] The preset sample selection strategy can be understood as a strategy for screening representative samples, uncertainty samples, and diversity samples from the initial samples in the target domain. The target domain labeled samples can be understood as valuable samples screened from the unlabeled samples in the target domain. These screened target domain labeled samples can then be manually labeled to further train the target detection model.
[0101] In specific implementation, active learning can be used to screen the target domain initial samples to obtain the target domain labeled samples. The specific implementation method is as follows:
[0102] The step of screening the target domain initial samples to obtain target domain labeled samples according to the preset sample selection strategy and the source domain training dataset includes:
[0103] sequentially determining each target domain initial sample in the target domain training data set as a first target domain initial sample;
[0104] Calculating the distribution probability density and classification probability of the initial samples of the first target domain according to a preset sample selection strategy;
[0105] When it is determined that the first target domain initial sample meets a first preset condition according to the distribution probability density, or when it is determined that the first target domain initial sample meets a second preset condition according to the classification probability, the first target domain initial sample is determined as a target domain labeled sample.
[0106] The distribution probability density of the initial samples of the first target domain can be used to indicate the representativeness of the initial samples of the first target domain, that is, whether the initial samples of the first target domain are common. The classification probability of the initial samples of the first target domain can be used to indicate the uncertainty of the initial samples of the first target domain. If the initial samples of the first target domain meet the first preset condition, it can be understood that the initial samples of the first target domain are representative samples. If the initial samples of the first target domain meet the second preset condition, it can be understood that the initial samples of the second target domain are uncertain samples.
[0107] Based on this, for each target domain initial sample in the target domain training dataset, the distribution probability density and classification probability of each target domain initial sample can be calculated, and whether the target domain initial sample is a representative sample can be determined according to the distribution probability density, and whether the target domain initial sample is an uncertain sample can be determined according to the classification probability.
[0108] In summary, by screening target domain labeled samples that meet the representativeness and uncertainty requirements in the target domain training dataset, the alignment between the target domain and the source domain can be achieved, thereby further refining the model and ensuring the migration of the object detection model from the source domain to the target domain.
[0109] In specific implementation, when calculating the distribution probability density of the initial sample of the first target domain, its distribution probability density in the target domain and the source domain can be calculated separately, so as to establish the association relationship between the target domain and the source domain. The specific implementation method is as follows:
[0110] The calculating the distribution probability density and classification probability of the initial samples of the first target domain according to the preset sample selection strategy includes:
[0111] Calculating, according to a preset sample selection strategy, a first distribution probability density of the first target domain initial samples in the target domain and a second distribution probability density of the first target domain initial samples in the source domain;
[0112] Calculating a first classification probability of a sample feature corresponding to an initial sample of the first target domain according to the first distribution probability density;
[0113] Predicting, according to the target detection model, a second classification probability of the sample feature corresponding to the initial sample of the first target domain.
[0114] Among them, the target domain distribution can be understood as the distribution of the target domain training data set under Gaussian, and the source domain distribution can be understood as the distribution of the source domain training data set under Gaussian. The sample features corresponding to the first target domain initial sample can be understood as the image features of the first target domain initial sample. The first distribution probability density of the first target domain initial sample in the target domain can be understood as the distribution probability density of the sample features corresponding to the first target domain initial sample in the target domain. The second distribution probability density of the first target domain initial sample in the source domain can be understood as the distribution probability density of the sample features corresponding to the first target domain initial sample in the source domain. The first classification probability of the sample features corresponding to the first target domain initial sample can be understood as the classification probability of the sample features corresponding to the first target domain initial sample in the feature space.
[0115] Based on this, we can calculate the first distribution probability density of the initial samples of the first target domain in the target domain, calculate the second distribution probability density of the initial samples of the first target domain in the source domain, calculate the first classification probability of the sample features corresponding to the initial samples of the first target domain in the feature space, and use the target detection model to predict the second classification probability of the sample features corresponding to the initial samples of the first target domain.
[0116] In summary, by calculating the distribution probability density and classification probability of the initial samples of the first target domain in the target domain and the source domain, a data basis is provided for the subsequent screening of representative samples and uncertainty samples, and the transfer training of the target detection model is further realized.
[0117] In practical applications, the distribution probability density and classification probability can be calculated based on the Gaussian model. The specific implementation method is as follows:
[0118] Before calculating the first distribution probability density of the first target domain initial samples in the target domain and the second distribution probability density of the first target domain initial samples in the source domain according to the preset sample selection strategy, the method further includes:
[0119] Determining a prediction result corresponding to the initial sample of the target domain;
[0120] Constructing a Gaussian model according to the source domain labeled sample, the first label corresponding to the source domain labeled sample, the target domain initial sample, and the prediction result corresponding to the target domain initial sample;
[0121] Accordingly, the calculating, according to the preset sample selection strategy, a first distribution probability density of the first target domain initial samples in the target domain and a second distribution probability density of the first target domain initial samples in the source domain includes:
[0122] Calculating, according to the Gaussian model, a first distribution probability density of the first target domain initial samples in the target domain and a second distribution probability density of the first target domain initial samples in the source domain;
[0123] Calculating a first classification probability of a sample feature corresponding to the initial sample of the first target domain according to the first distribution probability density includes:
[0124] According to the first distribution probability density, the Gaussian model is used to calculate a first classification probability in the target domain of the sample feature corresponding to the first target domain initial sample.
[0125] The prediction result corresponding to the initial sample of the target domain can be understood as the predicted position of the target object in the initial sample of the target domain, or it can also be the category information of the target object in the initial sample of the target domain. It can be understood that the prediction result corresponding to the initial sample of the target domain can be determined according to the processing task of the object detection model.
[0126] Specifically, the target detection model can be used to determine the prediction results corresponding to the initial samples in the target domain.
[0127] Based on this, the target domain initial sample can be input into the target detection model to obtain the prediction result corresponding to the target domain initial sample output by the target detection model. Then, a Gaussian model can be constructed based on the source domain labeled sample, the first label corresponding to the source domain labeled sample, the target domain initial sample, and the prediction result corresponding to the target domain initial sample (which can be understood as the pseudo label of the target domain initial sample). Accordingly, when calculating the first distribution probability density, the second distribution probability density, and the first classification probability of the first target domain initial sample, the Gaussian model can be used for calculation.
[0128] In practical applications, a Gaussian model corresponding to each type can be constructed based on the type information of the source domain labeled samples and the target domain initial samples.
[0129] Specifically, the calculation formula of the first distribution probability density is as follows: d T =p T (z|c).
[0130] Among them, d T It is used to represent the probability density of the first distribution, T is used to represent the target domain, z is used to represent the sample features corresponding to the initial samples of the first target domain, and c is used to represent the category. P is used to represent the probability density function.
[0131] The calculation formula for the second distribution probability density is as follows: S =p S (z|c).
[0132] Among them, S is used to represent the source domain, d S Used to represent the probability density of the second distribution.
[0133] Calculate the first classification probability p f The formula for (c|z) is as follows: f (c|z)=softmax(pr(z|c)).
[0134] In summary, by constructing a Gaussian model, the calculation of distribution probability density and classification probability is realized.
[0135] Furthermore, the target domain labeled samples include representative target domain labeled samples and uncertain target domain labeled samples;
[0136] Accordingly, when it is determined according to the distribution probability density that the first target domain initial sample meets a first preset condition, or when it is determined according to the classification probability that the first target domain initial sample meets a second preset condition, determining the first target domain initial sample as a target domain labeled sample includes:
[0137] Calculating a distribution probability density difference based on the first distribution probability density and the second distribution probability density;
[0138] If it is determined that the distribution probability density difference satisfies a preset difference threshold, determining the first target domain initial sample as a representative target domain labeled sample; or
[0139] Calculating a classification probability entropy value according to the first classification probability and the second classification probability;
[0140] When it is determined that the classification probability entropy value meets a preset entropy value threshold, the first target domain initial sample is determined as an uncertain target domain labeled sample.
[0141] Among them, representative target domain labeled samples can be understood as target domain labeled samples that are common in the target domain training dataset and uncommon in the source domain training dataset. Uncertain target domain labeled samples can be understood as target domain labeled samples whose prediction results are uncertain. The distribution probability density difference meets the preset difference threshold, which can be understood as the distribution probability density difference being greater than the preset difference threshold. It can be understood that the larger the distribution probability density difference is, the more representative the target domain initial sample is in the target domain training dataset. The classification probability entropy value meets the preset entropy threshold, which can be understood as the classification probability entropy value being greater than the preset entropy threshold. It can be understood that the larger the classification probability entropy value is, the greater the uncertainty of the target domain initial sample is.
[0142] Regarding the uncertainty of the target domain initial sample, for example, the category of the target domain initial sample can be 0 or 1. The predicted category result for this target domain initial sample is 0.9. In this case, based on this predicted category result, it can be determined that the category of the target domain initial sample is 1. Since 0.9 and 1 are close to each other, the uncertainty of this target domain initial sample is small. If the predicted category result for this target domain initial sample is 0.5, the category of the target domain initial sample cannot be determined based on this predicted category result, and the uncertainty of this target domain initial sample is large.
[0143] Based on this, in one embodiment of the present specification, when determining a representative target domain labeled sample, it can be determined based on a preset difference threshold, and the first target domain initial sample whose distribution probability density difference is greater than the preset difference threshold is determined as the representative target domain labeled sample.
[0144] In another embodiment of the present specification, when determining representative target domain labeled samples, the representative target domain labeled samples may also be determined based on a ranking result of distribution probability density differences among multiple target domain initial samples. For example, the distribution probability density differences among multiple target domain initial samples may be ranked from largest to smallest, and the top K target domain initial samples may be determined as representative target domain labeled samples based on the ranking result.
[0145] In practical applications, the formula for calculating the difference in distribution probability density is as follows: Q1 = αlog(d T )-log(d S ),
[0146] Among them, Q1 is a measure of the difference in distribution probability density, and α is a hyperparameter that can be used to represent the domain factor that assigns weights to the distribution probability density of the target domain and the source domain, and is usually set to 1.
[0147] When determining the uncertain target domain labeled samples, the classification probability entropy value can be calculated based on the calculated first classification probability and the second classification probability predicted by the target detection model, and the first target domain initial sample whose classification probability entropy value is greater than the preset entropy value threshold is determined as the uncertain target domain labeled sample.
[0148] Accordingly, in another embodiment of the present specification, the uncertain target domain labeled sample may also be determined according to the ranking result between the classification probability entropy values of multiple target domain initial samples.
[0149] In a specific implementation, when calculating the classification probability entropy value based on the first classification probability and the second classification probability, the first entropy value can be calculated based on the first classification probability, the second entropy value can be calculated based on the second classification probability, and the classification probability entropy value can be calculated based on the first entropy value and the second entropy value. In one embodiment of the present specification, the first entropy value and the second entropy value can be added to obtain the classification probability entropy value.
[0150] Calculate the first entropy value H f The formula for (z) is as follows:
[0151] Calculate the second entropy value H m The formula for (z) is as follows:
[0152] Among them, p m (c|z) is the second classification probability predicted by the target detection model.
[0153] The formula for calculating the classification probability entropy value H(z) is as follows: H(z)=H f +H m .
[0154] In summary, by calculating the distribution probability density difference and classification probability entropy, we can determine the representative target domain labeled samples and the uncertain target domain labeled samples, thereby screening the valuable samples in the initial samples of the target domain and further realizing the transfer learning of the target detection model.
[0155] In practical applications, multiple representative target domain labeled samples and multiple uncertain target domain labeled samples can be determined, and these target domain labeled samples can be diversely selected to remove redundant samples. In addition, in order to reduce the subsequent manual labeling budget, the sample distribution ratio between representative target domain labeled samples and uncertain target domain labeled samples can be calculated to determine the number of representative target domain labeled samples and uncertain target domain labeled samples to be screened. The specific implementation method is as follows:
[0156] The target domain labeled samples include a plurality of representative target domain labeled samples and a plurality of uncertain target domain labeled samples;
[0157] Accordingly, after determining the first target domain initial sample as a representative target domain labeled sample, the method further includes:
[0158] Screening the plurality of representative target domain labeled samples according to the similarity between each representative target domain labeled sample to obtain a first preset number of representative target domain labeled samples, wherein the first preset number is calculated based on a sample allocation ratio, which is a ratio between the representative target domain labeled samples and the uncertain target domain labeled samples;
[0159] After determining the first target domain initial sample as the uncertain target domain labeled sample, the method further includes:
[0160] According to the similarity between each uncertain target domain labeled sample, the multiple uncertain target domain labeled samples are screened to obtain a second preset number of uncertain target domain labeled samples, wherein the second preset number is calculated according to the sample distribution ratio.
[0161] Here, similarity can be understood as feature similarity. When calculating the sample allocation ratio, the sample allocation ratio between representative target domain labeled samples and uncertain target domain labeled samples can be calculated based on the degree of difference between the source domain distribution and the target domain distribution. When calculating the first preset number and the second preset number, the first preset number and the second preset number can be calculated based on the sample labeling budget and the sample allocation ratio.
[0162] In practical applications, the degree of difference between the source domain distribution and the target domain distribution can be the JS divergence between the source domain distribution and the target domain distribution.
[0163] Specifically, the formula for calculating the JS divergence between the source domain distribution and the target domain distribution is as follows:
[0164] Among them, JSD(p S |p T ) is the JS divergence between the source domain and the target domain. E S is the expected distribution of the source domain, E T is the expected distribution of the target domain. S (z) is the distribution probability density of the sample features of the source domain samples in the source domain, p T (z) is the probability density of the sample features of the sample in the target domain in the target domain.
[0165] The formula for calculating the sample allocation ratio is as follows:
[0166] Where λ is the sample allocation ratio, ranging from 0 to 1. When the source domain and target domain completely overlap, the value is 0, and when the source domain and target domain are completely separated, the value is 1. β is a hyperparameter that can be used to control the impact of JS divergence on the sample annotation budget.
[0167] The formula for calculating the sample annotation budget is as follows:
[0168] Among them, U can be understood as uncertainty, The labeling budget for labeling samples in the uncertain target domain, r can be understood as representativeness, is the labeling budget for representative target domain labeled samples, m is a positive integer that can be used to represent the number of cycles for calculating the labeling budget. B is the sample labeling budget, which includes the labeling budget for the uncertain target domain labeled samples and the labeling budget for the representative target domain labeled samples.
[0169] Specifically, based on the feature similarity between each representative target domain labeled sample, representative target domain labeled samples with smaller feature similarity can be determined to obtain a first preset number of representative target domain labeled samples. Accordingly, based on the feature similarity between each uncertain target domain labeled sample, representative target domain labeled samples with smaller feature similarity can be determined to obtain a second preset number of uncertain target domain labeled samples.
[0170] In practical applications, when screening multiple representative target domain labeled samples and multiple uncertain target domain labeled samples, the initialization method of the K-means++ algorithm or the clustering algorithm can be used. Specifically, taking the screening of multiple representative target domain labeled samples as an example, when using the initialization method of the K-means++ algorithm, the average similarity between the newly added target domain labeled samples and other target domain labeled samples can be calculated, and the newly added target domain labeled samples with the smallest average similarity can be screened out, thereby obtaining a first preset number of representative target domain labeled samples. When using the clustering algorithm, K cluster centers can be determined from the multiple representative target domain labeled samples, and the representative target domain labeled samples closest to each cluster center (i.e., with the smallest similarity to the cluster center) can be screened out, thereby obtaining a first preset number of representative target domain labeled samples.
[0171] Taking the first preset number of representative target domain labeled samples as 2 as an example, after obtaining 4 representative target domain labeled samples, these 4 representative target domain labeled samples need to be screened. Specifically, the sample feature distribution between the 4 representative target domain labeled samples can be determined based on the similarity between the sample features of each representative target domain labeled sample in the 4 representative target domain labeled samples, and in the sample feature distribution, the 2 representative target domain labeled samples with the farthest distance (i.e., the smallest representative similarity) can be determined.
[0172] In summary, by performing diverse selection on representative target domain labeled samples and uncertain target domain labeled samples, redundant samples are removed. In addition, the first preset number and the second preset number are determined according to the sample distribution ratio, which takes into account the manual labeling budget of the samples and saves the labeling cost.
[0173] Step 308: Determine a second model loss value and a third model loss value based on the source domain labeled samples, the target domain initial samples, and the target domain labeled samples.
[0174] Specifically, after obtaining the target domain labeled samples from the target domain initial samples, the second model loss value and the third model loss value may be calculated based on the source domain labeled samples, the target domain initial samples, and the target domain labeled samples.
[0175] In a specific implementation, determining the second model loss value and the third model loss value according to the source domain labeled sample, the target domain initial sample, and the target domain labeled sample includes:
[0176] Determining each of the source domain labeled sample, the target domain initial sample, and the target domain labeled sample as a migration training sample in sequence;
[0177] Performing segmentation processing on the migration training sample to obtain at least two segmented images, wherein the at least two segmented images have an overlapping area;
[0178] Inputting the at least two segmented images into a target detection model, wherein the at least two segmented images are processed in the target detection model using a feature extraction network and a mapping network to obtain at least two feature images;
[0179] In the object detection model, the at least two segmented images are processed using a feature extraction network and a region extraction network to obtain at least two predicted foreground features corresponding to the overlapping region;
[0180] A second model loss value is calculated based on the at least two feature images, and a third model loss value is calculated based on the at least two predicted foreground features.
[0181] Specifically, similar processing can be performed on each of the source domain labeled samples, the target domain initial samples, and the target domain labeled samples. Specifically, when processing each sample, that is, when processing the transfer training sample, to achieve contrastive learning, the transfer training sample can be segmented into at least two segmented images, and the at least two segmented images can be input into the target detection model. In the target detection model, to learn the discriminability of features, the at least two segmented images can be processed using a feature extraction network and a mapping network to obtain at least two feature images. Furthermore, to learn the invariance of features, the at least two segmentation networks can be processed using a feature extraction network and a region extraction network to obtain at least two predicted foreground features corresponding to the overlapping region.
[0182] Among them, the region extraction network can perform pixel-level predictions on the foreground and background in the segmented image. In order to make the at least two predicted foreground features have stable invariant characteristics, for the input of two segmented images with overlapping regions, the predictions for the overlapping regions are the same. Based on this, the at least two predicted foreground features corresponding to the overlapping regions can be made consistent, thereby learning the invariance of features. The feature extraction network can extract image features from the at least two segmented images input, and the mapping network can map the at least two image features extracted from the at least two segmented images to a low-dimensional space. The at least two feature images obtained are low-dimensional features, which does not damage the learning of the original features while improving the efficiency of contrastive learning.
[0183] In practical applications, in order to achieve self-supervision of the sample, constrain feature learning, and save computing power resources, the migration training sample can be split into two segmented images.
[0184] The formula for calculating the loss value of the third model is as follows:
[0185] Among them, L CR is the loss value of the third model, is a predicted foreground feature corresponding to the overlapping area, is another predicted foreground feature corresponding to the overlapping area.
[0186] In summary, by processing at least two segmented images to obtain at least two feature images and at least two predicted foreground features, it is possible to learn the discriminability and invariance between features, and further improve the task processing performance of the target detection model.
[0187] In one embodiment of the present specification, in order to further improve the training effect, after obtaining at least two segmented images, the at least two segmented images can be enhanced to obtain at least two enhanced images. Accordingly, the at least two enhanced images are input into the target detection model, and the at least two enhanced images are processed in the target detection model.
[0188] In a specific implementation, in order to form a contrast paradigm, corresponding positions can be determined in at least two feature images. The specific implementation method is as follows:
[0189] The calculating the second model loss value according to the at least two feature images includes:
[0190] Determining a first position in a first characteristic image, wherein the first characteristic image is any one characteristic image of the at least two characteristic images;
[0191] Determining, according to the overlapping area, a second position corresponding to the first position in a second characteristic image, wherein the second characteristic image is another characteristic image in the at least two characteristic images except the first characteristic image;
[0192] A second model loss value is calculated based on the first position and the second position.
[0193] Taking obtaining two feature images as an example, specifically, the first position can be determined in the first feature image based on the overlapping area, and the second position corresponding to the first position can be determined in the first feature image based on the overlapping area, and the second model loss value can be calculated based on the feature image corresponding to the first position and the feature image corresponding to the second position.
[0194] Accordingly, when three feature images are obtained, the first position can be determined in the first feature image according to the overlapping area, the second position 2 corresponding to the first position can be determined in the second feature image, and the second position 3 corresponding to the first position can be determined in the third feature image, and the second model loss value can be calculated based on the first position, the second position 2 and the second position 3.
[0195] Among them, the second position can be understood as a positive sample.
[0196] Correspondingly, negative samples can also be determined in the second feature image, and the specific implementation is as follows:
[0197] The calculating the second model loss value according to the at least two feature images further includes:
[0198] Determining a third position in the second feature image according to the overlapping area, wherein the third position is another position in the second feature image except the overlapping area;
[0199] A second model loss value is calculated based on the first position and the third position.
[0200] The first position, the second position and the third position can be understood as pixel points in the feature image.
[0201] Specifically, in the second feature image, a third position outside the overlapping area can be randomly sampled as a negative sample, and the second model loss value can be calculated based on the feature image corresponding to the first position and the feature image corresponding to the third position.
[0202] In practical applications, the formula for calculating the loss value of the second model is as follows:
[0203] Among them, L CL is the loss value of the second model, i, j and n are the number of pixels in the feature image, and i, j and n are positive integers. i is the pixel feature of the i-th pixel. It can be used to represent the pixel features of positive samples. τ is a temperature hyperparameter, which is usually set to 0.5. It can be used to represent the features of the pixels of negative samples.
[0204] In summary, by determining positive and negative samples based on the overlapping areas, a contrastive learning paradigm is formed, so that the features of the target points are similar to the corresponding points but separated from other points, thereby enabling the target detection model to learn the discriminability of features.
[0205] Step 310: Adjust the target detection model according to the first model loss value, the second model loss value, and the third model loss value until a target detection model that meets the training stop condition is obtained.
[0206] The training stop condition may be, for example, that the number of training times reaches a preset number threshold and / or the model loss value reaches a preset loss value threshold.
[0207] Specifically, the target model loss value can be calculated based on the first model loss value, the second model loss value, and the third model loss value, and the parameters of the target detection model can be adjusted based on the target model loss value.
[0208] In one embodiment of this specification, the target model loss value may be the sum of the first model loss value, the second model loss value, and the third model loss value. In another embodiment of this specification, the target model loss value may also be the weighted sum of the first model loss value, the second model loss value, and the third model loss value. This embodiment of this specification does not limit the method for calculating the target model loss value.
[0209] In addition, after determining the first target domain initial sample as the target domain labeled sample, the method further includes:
[0210] Determining a second label corresponding to the target domain labeled sample;
[0211] The target detection model is trained according to the target domain labeled samples and the second label until a target detection model that meets the training stop condition is obtained.
[0212] Specifically, the target domain labeled samples can be manually labeled to obtain the second label corresponding to the target domain labeled samples. The target domain labeled samples are then input into the target detection model to obtain the prediction results output by the target detection model. The fourth model loss value is calculated based on the prediction results and the second label, and the target detection model is trained based on the fourth model loss value.
[0213] In one embodiment of the present specification, the target detection model can be trained according to the first model loss value, the second model loss value and the third model loss value to obtain a target detection model that meets the training stop condition. Then, the target detection model that meets the training stop condition can be further trained according to the above-mentioned fourth model loss value.
[0214] In another embodiment of the present specification, the target detection model can be trained according to the first model loss value, the second model loss value, the third model loss value and the fourth model loss value until a target detection model that meets the training stop condition is obtained.
[0215] In summary, by manually labeling the target domain labeled samples to obtain the second label, and training the target detection model based on the target domain labeled samples and the second label, the applicability of the target detection model in the target domain can be improved, thereby further improving the generalization performance and task processing performance of the target detection model.
[0216] See Table 1 below, which shows the statistical comparison results for the lymph node dataset.
[0217] Table 1
[0218] Among them, the first and second datasets include CT scan data of patients with esophageal cancer collected from a hospital. The CT scan area includes the mediastinum and abdomen. The first dataset includes 857 3D lymph node annotations from 90 patients. The second dataset includes 857 3D lymph node annotations from 85 patients. The third dataset includes contrast-enhanced CT scan data of 107 patients with lung cancer, with 668 3D lymph node annotations. The fourth dataset includes three-dimensional mediastinal lymph node scan data of 89 patients. After a CT scan of each patient, a bounding box image with lesion annotations can be generated based on the CT image. In the first dataset, the short axis diameter of the lymph nodes in the CT image ranges from 2.2 to 32.4, with an average of 6.6.
[0219] As shown in Table 2 below, the table shows a comparison of the model processing performance between the method for performing sample sampling according to a preset sample selection strategy provided in one embodiment of this specification and other sample sampling methods. In Table 2, the source domain is the aforementioned first data set. The target domain is the aforementioned second data set. When the number of samples sampled and labeled in the target domain is 0, the processing performance of the model trained with samples obtained using the first sampling method, the second sampling method, the third sampling method, and the fourth sampling method is 74.51 in the source domain, 57.24 in the target domain, and an average processing performance of 65.88. According to Table 2, the sample training model obtained by the method for performing sample sampling according to a preset sample selection strategy provided in this solution has better processing performance in the first data set and the second data set.
[0220] Table 2
[0221] Accordingly, as shown in Table 3 below, the source domain is the fourth dataset and the target domain is the first dataset. As can be seen from Table 3, the model trained with samples obtained by the method of sampling according to the preset sample selection strategy provided in this solution has good processing performance on the first and fourth datasets.
[0222] Table 3
[0223] As shown in Table 4 below, source domain 1 is the fourth dataset, source domain 2 is the third dataset, and target domain is the first dataset. As can be seen from Table 4, the model trained with samples obtained by the method provided in this solution for sampling according to the preset sample selection strategy has good processing performance on the first, third, and fourth datasets.
[0224] Table 4
[0225] As shown in Table 5 below, Table 5 shows a comparison of different versions of the target detection model training method provided for the embodiments of this specification. For example, for the first version, the above-mentioned comparative learning process and consistency learning process are not performed (i.e., the second model loss value and the third model loss value are not calculated), which refers to the sample selection based on uncertainty, representativeness and diversity according to the preset sample selection strategy. The target detection model trained according to the training method of the first version has a performance of 74.51 in the source domain, 57.24 in the target domain, and an average performance of 35.88 when the selected labeled sample is 0. After the first cycle of sample screening according to the preset sample selection strategy is performed to obtain the target domain labeled sample, the trained target detection model has a performance of 77.13 in the source domain, 67.08 in the target domain, and an average performance of 72.10. As shown in Table 5, the target detection model trained after contrastive learning and consistency learning, as well as uncertainty, representativeness, and diversity sample selection, that is, the target detection model trained according to the eighth version of the training method, has better processing performance in the case of zero-labeled samples and in the case of target domain labeled samples obtained by the first cycle of sample screening.
[0226] Table 5
[0227] As shown in Table 6 below, the task processing effects of the model are different for different training methods. It can be seen that the task processing performance of the target detection model in the embodiment of this specification is good.
[0228] Table 6
[0229] It can be understood that what is recorded in Tables 2 to 6 above are the processing performances of the models.
[0230] In summary, in the above method, when processing the target domain image to be detected, the trained target detection model corresponding to the target domain can be used for processing. Moreover, in the process of training the target detection model, the target detection model can be trained based on the source domain labeled samples, the target domain initial samples and the target domain labeled samples. The target domain labeled samples can be screened from the target domain initial samples according to the preset sample selection strategy and the source domain labeled samples. That is to say, in the process of training the target detection model, the labeled training samples in the source domain (i.e., source domain labeled samples) and the unlabeled training samples in the target domain (i.e., target domain initial samples) are combined, and the target domain labeled samples screened from the target domain initial samples are also combined. The training samples of the source domain and the training samples of the target domain are considered in the training process, thereby realizing the migration of the model from the source domain to the target domain, so that the trained target detection model is also applicable in the target domain, further ensuring the generalization performance and task processing performance of the target detection model in various fields.
[0231] The following further describes the target detection method provided in this specification using the application of the target detection method in lesion detection as an example, in conjunction with Figure 4. Figure 4 shows a process flow chart of a target detection method provided in one embodiment of this specification, which specifically includes the following steps.
[0232] Step 402: The terminal-side device receives the medical imaging scan image and sends the medical imaging scan image to the cloud-side device.
[0233] Specifically, in a medical center, a medical imaging scanning device can be used to scan the patient's affected area to obtain a medical imaging scan image. The medical imaging scanning device can send the scanned medical imaging scan image to the end-side device, and the end-side device sends the medical imaging scan image to the cloud-side device.
[0234] Alternatively, the medical imaging scanning device may also directly send the medical imaging scanned images to the cloud-side device.
[0235] Step 404: The cloud-side device inputs the medical imaging scan image into the target detection model to obtain a lesion image output by the target detection model.
[0236] Among them, the cloud-side device can be deployed with the target detection model corresponding to the medical center.
[0237] Specifically, the cloud-side device can input the medical imaging scan image into the target detection model, use the target detection model to detect the lesion location in the medical imaging scan image, and obtain the lesion image marked with the lesion location output by the target detection model.
[0238] Step 406: The cloud-side device sends the lesion image to the end-side device.
[0239] Step 408: The terminal device displays the lesion image through a display interface.
[0240] Specifically, the client-side device may display the lesion image to medical personnel at the medical center through a display interface.
[0241] In summary, in the above method, when processing the target domain image to be detected, the trained target detection model corresponding to the target domain can be used for processing. Moreover, in the process of training the target detection model, the target detection model can be trained based on the source domain labeled samples, the target domain initial samples and the target domain labeled samples. The target domain labeled samples can be screened from the target domain initial samples according to the preset sample selection strategy and the source domain labeled samples. That is to say, in the process of training the target detection model, the labeled training samples in the source domain (i.e., source domain labeled samples) and the unlabeled training samples in the target domain (i.e., target domain initial samples) are combined, and the target domain labeled samples screened from the target domain initial samples are also combined. The training samples of the source domain and the training samples of the target domain are considered in the training process, thereby realizing the migration of the model from the source domain to the target domain, so that the trained target detection model is also applicable in the target domain, further ensuring the generalization performance and task processing performance of the target detection model in various fields.
[0242] Corresponding to the above method embodiment, this specification also provides an embodiment of a target detection device. FIG5 shows a schematic diagram of the structure of a target detection device provided by one embodiment of this specification. As shown in FIG5, the device includes:
[0243] A determination module 502 is configured to determine an image to be detected in a target domain;
[0244] The input module 504 is configured to input the image to be detected into the target detection model corresponding to the target domain to obtain the target object image corresponding to the image to be detected, wherein the target detection model is trained based on the source domain labeled samples in the source domain training dataset, the target domain initial samples and the target domain labeled samples in the target domain training dataset, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training dataset and the source domain training dataset.
[0245] In an optional embodiment, the apparatus further includes a training module configured to:
[0246] Determining a first model loss value based on source domain labeled samples in the source domain training dataset and first labels corresponding to the source domain labeled samples;
[0247] Determine the initial sample of the target domain based on the target domain training dataset;
[0248] According to a preset sample selection strategy, the target domain training dataset and the source domain training dataset, a target domain labeled sample is obtained from the target domain initial samples;
[0249] Determining a second model loss value and a third model loss value according to the source domain labeled sample, the target domain initial sample, and the target domain labeled sample;
[0250] The target detection model is adjusted according to the first model loss value, the second model loss value, and the third model loss value until a target detection model that meets the training stop condition is obtained.
[0251] In an optional embodiment, the training module is further configured to:
[0252] sequentially determining each target domain initial sample in the target domain training data set as a first target domain initial sample;
[0253] Calculating the distribution probability density and classification probability of the initial samples of the first target domain according to a preset sample selection strategy;
[0254] When it is determined that the first target domain initial sample meets a first preset condition according to the distribution probability density, or when it is determined that the first target domain initial sample meets a second preset condition according to the classification probability, the first target domain initial sample is determined as a target domain labeled sample.
[0255] In an optional embodiment, the training module is further configured to:
[0256] Calculating, according to a preset sample selection strategy, a first distribution probability density of the first target domain initial samples in the target domain and a second distribution probability density of the first target domain initial samples in the source domain;
[0257] According to the preset sample selection strategy, a first classification probability of the sample feature corresponding to the first target domain initial sample in the target domain and a second classification probability of the sample feature corresponding to the first target domain initial sample in the source domain are calculated.
[0258] In an optional embodiment, the training module is further configured to:
[0259] Determining a prediction result corresponding to the initial sample of the target domain;
[0260] Constructing a Gaussian model according to the source domain labeled sample, the first label corresponding to the source domain labeled sample, the target domain initial sample, and the prediction result corresponding to the target domain initial sample;
[0261] Calculating, according to the Gaussian model, a first distribution probability density of the first target domain initial samples in the target domain and a second distribution probability density of the first target domain initial samples in the source domain;
[0262] According to the Gaussian model, a first classification probability of the sample feature corresponding to the first target domain initial sample in the target domain and a second classification probability of the sample feature corresponding to the first target domain initial sample in the source domain are calculated.
[0263] In an optional embodiment, the target domain labeled samples include representative target domain labeled samples and uncertain target domain labeled samples; and the training module is further configured to:
[0264] Calculating a distribution probability density difference based on the first distribution probability density and the second distribution probability density;
[0265] If it is determined that the distribution probability density difference satisfies a preset difference threshold, determining the first target domain initial sample as a representative target domain labeled sample; or
[0266] Calculating a classification probability entropy value according to the first classification probability and the second classification probability;
[0267] When it is determined that the classification probability entropy value meets a preset entropy value threshold, the first target domain initial sample is determined as an uncertain target domain labeled sample.
[0268] In an optional embodiment, the target domain labeled samples include a plurality of representative target domain labeled samples and a plurality of uncertain target domain labeled samples; and the training module is further configured to:
[0269] Screening the plurality of representative target domain labeled samples according to the similarity between each representative target domain labeled sample to obtain a first preset number of representative target domain labeled samples, wherein the first preset number is calculated based on a sample allocation ratio, which is a ratio between the representative target domain labeled samples and the uncertain target domain labeled samples;
[0270] According to the similarity between each uncertain target domain labeled sample, the multiple uncertain target domain labeled samples are screened to obtain a second preset number of uncertain target domain labeled samples, wherein the second preset number is calculated according to the sample distribution ratio.
[0271] In an optional embodiment, the training module is further configured to:
[0272] Determining a second label corresponding to the target domain labeled sample;
[0273] The target detection model is trained according to the target domain labeled samples and the second label until a target detection model that meets the training stop condition is obtained.
[0274] In an optional embodiment, the training module is further configured to:
[0275] Determining each of the source domain labeled sample, the target domain initial sample, and the target domain labeled sample as a migration training sample in sequence;
[0276] Performing segmentation processing on the migration training sample to obtain at least two segmented images, wherein the at least two segmented images have an overlapping area;
[0277] Inputting the at least two segmented images into a target detection model, wherein the at least two segmented images are processed in the target detection model using a feature extraction network and a mapping network to obtain at least two feature images;
[0278] In the object detection model, the at least two segmented images are processed using a feature extraction network and a region extraction network to obtain at least two predicted foreground features corresponding to the overlapping region;
[0279] A second model loss value is calculated based on the at least two feature images, and a third model loss value is calculated based on the at least two predicted foreground features.
[0280] In an optional embodiment, the training module is further configured to:
[0281] Determining a first position in a first characteristic image, wherein the first characteristic image is any one characteristic image of the at least two characteristic images;
[0282] Determining, according to the overlapping area, a second position corresponding to the first position in a second characteristic image, wherein the second characteristic image is another characteristic image in the at least two characteristic images except the first characteristic image;
[0283] A second model loss value is calculated based on the first position and the second position.
[0284] In an optional embodiment, the training module is further configured to:
[0285] Determining a third position in the second feature image according to the overlapping area, wherein the third position is another position in the second feature image except the overlapping area;
[0286] A second model loss value is calculated based on the first position and the third position.
[0287] In summary, in the above-mentioned device, when processing the target domain image to be detected, the trained target detection model corresponding to the target domain can be used for processing. Moreover, in the process of training the target detection model, the target detection model can be trained based on the source domain labeled samples, the target domain initial samples and the target domain labeled samples. The target domain labeled samples can be screened from the target domain initial samples according to the preset sample selection strategy and the source domain labeled samples. That is to say, in the process of training the target detection model, the labeled training samples in the source domain (i.e., source domain labeled samples) and the unlabeled training samples in the target domain (i.e., target domain initial samples) are combined, and the target domain labeled samples screened from the target domain initial samples are also combined. The training samples of the source domain and the training samples of the target domain are considered in the training process, thereby realizing the migration of the model from the source domain to the target domain, so that the trained target detection model is also applicable in the target domain, further ensuring the generalization performance and task processing performance of the target detection model in various fields.
[0288] The above is a schematic scheme of a target detection device of this embodiment. It should be noted that the technical scheme of the target detection device and the technical scheme of the target detection method described above are of the same concept. For details not described in detail in the technical scheme of the target detection device, please refer to the description of the technical scheme of the target detection method described above.
[0289] Referring to FIG. 6 , FIG. 6 shows a flowchart of another target detection method provided according to an embodiment of this specification, which is applied to a cloud-side device and specifically includes the following steps.
[0290] Step 602: Receive an image processing request sent by a terminal-side device, wherein the image processing request carries an image to be detected in the target domain;
[0291] Step 604: Input the image to be detected into the target detection model corresponding to the target domain to obtain a target object image corresponding to the image to be detected, wherein the target detection model is trained based on source domain labeled samples in the source domain training dataset, target domain initial samples and target domain labeled samples in the target domain training dataset, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training dataset, and the source domain training dataset;
[0292] Step 606: Send the target object image to the terminal device.
[0293] Corresponding to the above method embodiments, this specification also provides an embodiment of a target detection device. FIG7 shows a schematic diagram of the structure of another target detection device provided in one embodiment of this specification, which is applied to a cloud-side device. As shown in FIG7 , the device includes:
[0294] The receiving module 702 is configured to receive an image processing request sent by an end-side device, wherein the image processing request carries an image to be detected in a target domain;
[0295] An input module 704 is configured to input the image to be detected into a target detection model corresponding to the target domain, and obtain a target object image corresponding to the image to be detected, wherein the target detection model is trained based on source domain labeled samples in a source domain training dataset, target domain initial samples in a target domain training dataset, and target domain labeled samples, and the target domain labeled samples are screened from the target domain initial samples based on a preset sample selection strategy, the target domain training dataset, and the source domain training dataset;
[0296] The sending module 706 is configured to send the target object image to the terminal-side device.
[0297] Refer to Figure 8, which shows a flowchart of a lesion detection method provided according to an embodiment of this specification, which is applied to a cloud-side device and specifically includes the following steps.
[0298] Step 802: receiving an image processing request sent by a terminal-side device, wherein the image processing request carries a medical imaging scan image of a target domain;
[0299] Step 804: Inputting the medical image scan into the target detection model corresponding to the target domain to obtain a lesion image corresponding to the medical image scan, wherein the target detection model is trained based on source domain labeled samples in the source domain training dataset, target domain initial samples in the target domain training dataset, and target domain labeled samples, and the target domain labeled samples are screened from the target domain initial samples based on a preset sample selection strategy, the target domain training dataset, and the source domain training dataset;
[0300] Step 806: Send the lesion image to the terminal device.
[0301] Corresponding to the above method embodiments, this specification also provides an embodiment of a lesion detection device. Figure 9 shows a schematic structural diagram of a lesion detection device provided in one embodiment of this specification, which is applied to a cloud-side device. As shown in Figure 9, the device includes:
[0302] The receiving module 902 is configured to receive an image processing request sent by an end-side device, wherein the image processing request carries a medical imaging scan image of a target domain;
[0303] An input module 904 is configured to input the medical image scan image into a target detection model corresponding to the target domain to obtain a lesion image corresponding to the medical image scan image, wherein the target detection model is trained based on source domain labeled samples in a source domain training dataset, target domain initial samples in a target domain training dataset, and target domain labeled samples, and the target domain labeled samples are screened from the target domain initial samples based on a preset sample selection strategy, the target domain training dataset, and the source domain training dataset;
[0304] The sending module 906 is configured to send the lesion image to the terminal-side device.
[0305] Refer to Figure 10, which shows a flowchart of a target detection model training method provided according to an embodiment of this specification, which is applied to a cloud-side device and specifically includes the following steps.
[0306] Step 1002: Determine a first model loss value based on source domain labeled samples in a source domain training dataset and first labels corresponding to the source domain labeled samples;
[0307] Step 1004: Determine the target domain initial samples based on the target domain training dataset;
[0308] Step 1006: Screening the target domain initial samples to obtain target domain labeled samples according to a preset sample selection strategy, the target domain training dataset, and the source domain training dataset;
[0309] Step 1008: Determine a second model loss value and a third model loss value based on the source domain labeled sample, the target domain initial sample, and the target domain labeled sample;
[0310] Step 1010: Adjust the target detection model according to the first model loss value, the second model loss value, and the third model loss value until a target detection model that meets the training stop condition is obtained.
[0311] Corresponding to the above method embodiments, this specification also provides an embodiment of a target detection model training device. Figure 11 shows a schematic diagram of the structure of a target detection model training device provided by one embodiment of this specification, which is applied to a cloud-side device. As shown in Figure 11, the device includes:
[0312] A first determining module 1102 is configured to determine a first model loss value based on source domain labeled samples in a source domain training dataset and first labels corresponding to the source domain labeled samples;
[0313] The second determination module 1104 is configured to determine the target domain initial sample based on the target domain training dataset;
[0314] A screening module 1106 is configured to screen the target domain initial samples to obtain target domain labeled samples according to a preset sample selection strategy, the target domain training dataset, and the source domain training dataset;
[0315] A third determination module 1108 is configured to determine a second model loss value and a third model loss value based on the source domain labeled sample, the target domain initial sample, and the target domain labeled sample;
[0316] The training module 1110 is configured to adjust the target detection model according to the first model loss value, the second model loss value and the third model loss value until a target detection model that meets the training stop condition is obtained.
[0317] In summary, in the above-mentioned device, when processing the image to be detected in the target domain, the trained target detection model corresponding to the target domain can be used for processing. Moreover, in the process of training the target detection model, the target detection model can be trained based on the source domain labeled samples, the target domain initial samples and the target domain labeled samples. The target domain labeled samples can be screened from the target domain initial samples according to the preset sample selection strategy and the source domain labeled samples. That is to say, in the process of training the target detection model, the labeled training samples in the source domain (i.e., source domain labeled samples) and the unlabeled training samples in the target domain (i.e., target domain initial samples) are combined, and the target domain labeled samples screened from the target domain initial samples are also combined. The training samples of the source domain and the training samples of the target domain are considered in the training process, thereby realizing the migration of the model from the source domain to the target domain, so that the trained target detection model is also applicable in the target domain, further ensuring the generalization performance and task processing performance of the target detection model in various fields. An embodiment of this specification also provides a computer-aided diagnosis method for cancer, comprising:
[0318] Obtain a medical imaging scan image of the target domain;
[0319] The medical image scan image is input into the target detection model corresponding to the target domain to obtain the lesion image corresponding to the medical image scan image, wherein the target detection model is trained based on the source domain labeled samples in the source domain training dataset, the target domain initial samples and the target domain labeled samples in the target domain training dataset, and the target domain labeled samples are screened from the target domain initial samples according to the preset sample selection strategy, the target domain training dataset and the source domain training dataset.
[0320] An embodiment of the present specification further provides a computer-aided diagnosis system for cancer, comprising a memory, a processor, and a computer program stored in the memory and running on the processor. The processor executes the computer program to perform a computer-aided diagnosis method for cancer, the method comprising:
[0321] Obtain a medical imaging scan image of the target domain;
[0322] The medical image scan image is input into the target detection model corresponding to the target domain to obtain the lesion image corresponding to the medical image scan image, wherein the target detection model is trained based on the source domain labeled samples in the source domain training dataset, the target domain initial samples and the target domain labeled samples in the target domain training dataset, and the target domain labeled samples are screened from the target domain initial samples according to the preset sample selection strategy, the target domain training dataset and the source domain training dataset.
[0323] Figure 12 shows a block diagram of a computing device 1200 according to one embodiment of this specification. Components of the computing device 1200 include, but are not limited to, a memory 1210 and a processor 1220. The processor 1220 is connected to the memory 1210 via a bus 1230, and a database 1250 is used to store data.
[0324] The computing device 1200 also includes an access device 1240 that enables the computing device 1200 to communicate via one or more networks 1260. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1240 may include one or more of any type of network interface (e.g., a network interface controller (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0325] In one embodiment of the present application, the aforementioned components of the computing device 1200 and other components not shown in FIG12 may also be connected to each other, for example, via a bus. It should be understood that the computing device structure block diagram shown in FIG12 is for illustrative purposes only and does not limit the scope of the present application. Those skilled in the art may add or replace other components as needed.
[0326] Computing device 1200 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or personal computer (PC). Computing device 1200 may also be a mobile or stationary server.
[0327] The processor 1220 is configured to execute the following computer-executable instructions, which implement the steps of the above method when executed by the processor.
[0328] The above is a schematic solution of a computing device of this embodiment. It should be noted that the technical solution of the computing device and the technical solution of the above method belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above method.
[0329] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which implement the steps of the above method when executed by a processor.
[0330] The above is a schematic solution of a computer-readable storage medium of this embodiment. It should be noted that the technical solution of the storage medium and the technical solution of the above method belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above method.
[0331] An embodiment of the present specification further provides a computer program product, comprising computer-executable instructions, which implement the steps of the above method when executed by a processor.
[0332] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above method.
[0333] The above is an illustrative solution of a computer program of this embodiment. It should be noted that the technical solution of the computer program and the technical solution of the above method belong to the same concept, and any details not described in detail in the technical solution of the computer program can be referred to the description of the technical solution of the above method.
[0334] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0335] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.
[0336] It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0337] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0338] The preferred embodiments disclosed above are intended only to help illustrate this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A target detection method, comprising: Determine the image to be detected in the target domain; The image to be detected is input into the target detection model corresponding to the target domain to obtain a target object image corresponding to the image to be detected, wherein the target detection model is trained based on source domain labeled samples in a source domain training data set, target domain initial samples in a target domain training data set, and target domain labeled samples, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training data set, and the source domain training data set.
2. The method according to claim 1, before inputting the image to be detected into the target detection model corresponding to the target domain, further comprising: Determine a first model loss value according to a source domain labeled sample in a source domain training data set and a first label corresponding to the source domain labeled sample; Determine the initial sample of the target domain based on the target domain training data set; According to a preset sample selection strategy, the target domain training data set and the source domain training data set, a target domain labeled sample is obtained by screening the target domain initial samples; Determine a second model loss value and a third model loss value according to the source domain labeled sample, the target domain initial sample, and the target domain labeled sample; The target detection model is adjusted according to the first model loss value, the second model loss value, and the third model loss value until a target detection model that meets the training stop condition is obtained.
3. The method according to claim 2, wherein the step of screening the target domain initial samples to obtain the target domain labeled samples according to the preset sample selection strategy and the source domain training data set comprises: Determining each target domain initial sample in the target domain training data set as a first target domain initial sample in sequence; Calculating the distribution probability density and classification probability of the initial samples of the first target domain according to a preset sample selection strategy; When it is determined that the first target domain initial sample meets the first preset condition according to the distribution probability density, or when it is determined that the first target domain initial sample meets the second preset condition according to the classification probability, the first target domain initial sample is determined as a target domain labeled sample.
4. The method according to claim 3, wherein the step of calculating the distribution probability density and classification probability of the initial samples of the first target domain according to a preset sample selection strategy comprises: According to a preset sample selection strategy, calculating a first distribution probability density of the first target domain initial samples in the target domain and a second distribution probability density of the first target domain initial samples in the source domain; Calculating a first classification probability of a sample feature corresponding to an initial sample of the first target domain according to the first distribution probability density; Predicting, according to the target detection model, a second classification probability of the sample feature corresponding to the initial sample of the first target domain.
5. The method according to claim 4, before calculating the first distribution probability density of the first target domain initial sample in the target domain and the second distribution probability density of the first target domain initial sample in the source domain according to the preset sample selection strategy, further comprising: Determine a prediction result corresponding to the initial sample of the target domain; Constructing a Gaussian model according to the source domain labeled sample, the first label corresponding to the source domain labeled sample, the target domain initial sample, and the prediction result corresponding to the target domain initial sample; Accordingly, the step of calculating, according to a preset sample selection strategy, a first distribution probability density of the first target domain initial samples in the target domain and a second distribution probability density of the first target domain initial samples in the source domain includes: According to the Gaussian model, a first distribution probability density of the first target domain initial sample in the target domain is calculated, and a second distribution probability density of the first target domain initial samples distributed in the source domain; The calculating, according to the first distribution probability density, a first classification probability of a sample feature corresponding to the first target domain initial sample includes: According to the first distribution probability density and using the Gaussian model, a first classification probability of the sample feature corresponding to the first target domain initial sample in the target domain is calculated.
6. According to the method of claim 4, the target domain labeled samples include representative target domain labeled samples and uncertain target domain labeled samples; Accordingly, when it is determined according to the distribution probability density that the first target domain initial sample satisfies a first preset condition, or when it is determined according to the classification probability that the first target domain initial sample satisfies a second preset condition, determining the first target domain initial sample as a target domain labeled sample includes: Calculating a distribution probability density difference according to the first distribution probability density and the second distribution probability density; In a case where it is determined that the distribution probability density difference satisfies a preset difference threshold, determining the first target domain initial sample as a representative target domain labeled sample; or Calculating a classification probability entropy value according to the first classification probability and the second classification probability; When it is determined that the classification probability entropy value meets a preset entropy value threshold, the first target domain initial sample is determined as an uncertain target domain labeled sample.
7. The method according to claim 6, wherein the target domain labeled samples include a plurality of representative target domain labeled samples and a plurality of uncertain target domain labeled samples; Accordingly, after determining the first target domain initial sample as a representative target domain labeled sample, the method further includes: According to the similarity between each representative target domain labeled sample, the plurality of representative target domain labeled samples are screened to obtain a first preset number of representative target domain labeled samples, wherein the first preset number is calculated according to a sample allocation ratio, and the sample allocation ratio is an allocation ratio between the representative target domain labeled samples and the uncertain target domain labeled samples; After determining the first target domain initial sample as an uncertain target domain labeled sample, the method further includes: According to the similarity between each uncertain target domain labeled sample, the multiple uncertain target domain labeled samples are screened to obtain a second preset number of uncertain target domain labeled samples, wherein the second preset number is calculated according to the sample allocation ratio.
8. The method according to any one of claims 3 to 7, after determining the first target domain initial sample as a target domain labeled sample, further comprising: Determine a second label corresponding to the target domain labeled sample; The target detection model is trained according to the target domain labeled sample and the second label until a target detection model that meets the training stop condition is obtained.
9. The method according to any one of claims 2 to 8, wherein determining the second model loss value and the third model loss value according to the source domain labeled sample, the target domain initial sample and the target domain labeled sample comprises: Determine each sample in the source domain labeled sample, the target domain initial sample, and the target domain labeled sample as a migration training sample in sequence; Performing segmentation processing on the migration training sample to obtain at least two segmented images, wherein the at least two segmented images have an overlapping area; Inputting the at least two segmented images into a target detection model, wherein the at least two segmented images are processed in the target detection model using a feature extraction network and a mapping network to obtain at least two feature images; In the target detection model, the at least two segmented images are processed using a feature extraction network and a region extraction network to obtain at least two predicted foreground features corresponding to the overlapping region; According to the at least two feature images, a second model loss value is calculated, and according to the at least two predicted foreground features, Calculate the loss value of the third model.
10. The method according to claim 9, wherein the calculating the second model loss value according to the at least two feature images comprises: Determining a first position in a first characteristic image, wherein the first characteristic image is any one characteristic image of the at least two characteristic images; Determining, according to the overlapping area, a second position corresponding to the first position in a second feature image, wherein the second feature image is another feature image among the at least two feature images except the first feature image; A second model loss value is calculated based on the first position and the second position.
11. The method according to claim 10, wherein the calculating the second model loss value according to the at least two feature images further comprises: Determine a third position in the second feature image according to the overlapping area, wherein the third position is another position in the second feature image except the overlapping area; A second model loss value is calculated based on the first position and the third position.
12. A target detection method, applied to a cloud-side device, comprising: An image processing request sent by a receiving end-side device, wherein the image processing request carries an image to be detected in a target domain; Inputting the image to be detected into the target detection model corresponding to the target domain, obtaining the target object image corresponding to the image to be detected, wherein the target detection model is trained based on the source domain labeled samples in the source domain training data set, the target domain initial samples in the target domain training data set, and the target domain labeled samples, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training data set, and the source domain training data set; The target object image is sent to the terminal side device.
13. A lesion detection method, applied to a cloud-side device, comprising: An image processing request sent by a receiving end-side device, wherein the image processing request carries a medical imaging scan image of a target domain; Inputting the medical image scan image into the target detection model corresponding to the target domain, obtaining a lesion image corresponding to the medical image scan image, wherein the target detection model is trained based on source domain labeled samples in a source domain training data set, target domain initial samples in a target domain training data set, and target domain labeled samples, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training data set, and the source domain training data set; The lesion image is sent to the terminal side device.
14. A target detection model training method, applied to a cloud-side device, comprising: Determine a first model loss value according to a source domain labeled sample in a source domain training data set and a first label corresponding to the source domain labeled sample; Determine the initial sample of the target domain based on the target domain training data set; According to a preset sample selection strategy, the target domain training data set and the source domain training data set, a target domain labeled sample is obtained by screening the target domain initial samples; Determine a second model loss value and a third model loss value according to the source domain labeled sample, the target domain initial sample, and the target domain labeled sample; The target detection model is adjusted according to the first model loss value, the second model loss value, and the third model loss value until a target detection model that meets the training stop condition is obtained.
15. A method for computer-aided diagnosis of cancer, comprising: Obtain a medical imaging scan image of the target domain; The medical image scan image is input into the target detection model corresponding to the target domain to obtain a lesion image corresponding to the medical image scan image, wherein the target detection model is trained based on source domain labeled samples in a source domain training data set, target domain initial samples in a target domain training data set, and target domain labeled samples, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training data set, and the source domain training data set.
16. A computer-aided diagnosis system for cancer, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to perform a computer-aided diagnosis method for cancer, the method comprising: Obtain a medical imaging scan image of the target domain; The medical image scan image is input into the target detection model corresponding to the target domain to obtain a lesion image corresponding to the medical image scan image, wherein the target detection model is trained based on source domain labeled samples in a source domain training data set, target domain initial samples in a target domain training data set, and target domain labeled samples, and the target domain labeled samples are screened from the target domain initial samples according to a preset sample selection strategy, the target domain training data set, and the source domain training data set.
17. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 15 are implemented.
18. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 15.
19. A computer program product, comprising computer executable instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 15.
20. A computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 15.
Citation Information
Patent Citations
Financial risk prediction method and device based on migration sample screening and electronic equipment
CN112270545A
Cross-domain adaptive semantic segmentation method and system
CN113221903A
Image segmentation method and device, equipment and storage medium
CN113706551A
Model training method and device for risk prediction
CN115393030A
Target detection method
CN117095252A
Cited By
Power distribution terminal health state prediction method and device and electronic equipment
CN120508919A
Adaptive contrast learning method for passive domain cross-domain small sample image classification
CN121883981A