Target detection method
By selecting and utilizing training samples from both the source and target domains in the target domain, the target detection model is trained, which solves the problem of poor adaptability of deep learning models during transfer learning and achieves efficient application and generalization of the model in the target domain.
Patent Information
- Application Number
- CN202310879587.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-17
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2043-07-17
AI Technical Summary
When deep learning models are transferred to different medical centers, they have difficulty adapting to the differences in the distribution of image data in the target domain, resulting in a decline in generalization performance and task processing performance.
By combining training samples from the source and target domains and using a pre-defined sample selection strategy to filter labeled samples in the target domain, the target detection model is trained, thus achieving model transfer from the source domain to the target domain.
This improves the applicability and generalization performance of the object detection model in the target domain, ensuring the model's performance in handling tasks across different domains.
Smart Images

Figure CN117095252B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present specification relate to the technical field of Internet, and particularly relate to a target detection method. BACKGROUND
[0002] Deep learning models, especially deep neural networks, can be applied to multiple fields for image classification, image segmentation, target detection and other task processing. For example, in the medical field, a deep learning model can be used to detect lesions. In practical applications, a trained deep learning model is migrated to different medical centers for application, that is, a deep learning model trained in a source domain is migrated to a target domain. Since the image data of different medical centers often exhibits different characteristics and distributions, the deep learning model trained in the source domain may be difficult to apply to the target domain, resulting in a decline in the generalization performance and task processing performance of the model. Therefore, there is an urgent need for an effective technical solution to solve the above problems. SUMMARY
[0003] Therefore, the embodiments of the present specification provide two target detection methods. One or more embodiments of the present specification simultaneously 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 computing device, a computer-readable storage medium, and a computer program to solve the technical defects in the prior art.
[0004] According to a first aspect of the embodiments of the present specification, a target detection method is provided, comprising:
[0005] determining a to-be-detected image of a target domain;
[0006] inputting the to-be-detected image into a target detection model corresponding to the target domain to obtain a target object image corresponding to the to-be-detected image, wherein the target detection model is trained based on a source domain labeled sample in a source domain training data set, a target domain initial sample in a target domain training data set, and a target domain labeled sample, the target domain labeled sample is obtained by screening the target domain initial sample according to a preset sample selection strategy, the target domain training data set, and the source domain training data set.
[0007] According to a second aspect of the embodiments of the present specification, a target detection device is provided, comprising:
[0008] a determining module configured to determine a to-be-detected image of a target domain;
[0009] The input module is configured to input the to-be-detected image into a target detection model corresponding to the target domain to obtain a target object image corresponding to the to-be-detected 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 obtained by screening 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.
[0010] According to a third aspect of an embodiment of the present specification, a target detection method applied to a cloud-side device is provided, including:
[0011] receiving an image processing request sent by an end-side device, wherein the image processing request carries a to-be-detected image of a target domain;
[0012] inputting the to-be-detected image into a target detection model corresponding to the target domain to obtain a target object image corresponding to the to-be-detected 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 obtained by screening 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;
[0013] sending the target object image to the end-side device.
[0014] According to a fourth aspect of an embodiment of the present specification, a target detection device applied to a cloud-side device is provided, including:
[0015] a receiving module configured to receive an image processing request sent by an end-side device, wherein the image processing request carries a to-be-detected image of a target domain;
[0016] an input module configured to input the to-be-detected image into a target detection model corresponding to the target domain to obtain a target object image corresponding to the to-be-detected 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 obtained by screening 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;
[0017] a sending module configured to send the target object image to the end-side device.
[0018] According to a fifth aspect of an embodiment of the present specification, a lesion detection method applied to a cloud-side device is provided, including:
[0019] receiving an image processing request sent by an end-side device, wherein the image processing request carries a medical image scan image of a target domain;
[0020] 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 data set, target domain initial samples in a target domain training data set, and target domain labeled samples, the target domain labeled samples being obtained by screening 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;
[0021] sending the lesion image to the end-side device.
[0022] According to a sixth aspect of an embodiment of the present specification, a lesion detection device is provided, applied to a cloud-side device, and includes:
[0023] a receiving module configured to receive an image processing request sent by an end-side device, wherein the image processing request carries a medical image scan image of a target domain;
[0024] an inputting module 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 data set, target domain initial samples in a target domain training data set, and target domain labeled samples, the target domain labeled samples being obtained by screening 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;
[0025] a sending module configured to send the lesion image to the end-side device.
[0026] According to a seventh aspect of an embodiment of the present specification, a target detection model training method is provided, applied to a cloud-side device, and includes:
[0027] determining a first model loss value according to source domain labeled samples in a source domain training data set and first labels corresponding to the source domain labeled samples;
[0028] determining target domain initial samples according to a target domain training data set;
[0029] obtaining target domain labeled samples by screening 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;
[0030] 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;
[0031] 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 meeting a training stop condition is obtained.
[0032] According to an eighth aspect of an embodiment of the present specification, a target detection model training apparatus applied to a cloud side device is provided, comprising:
[0033] The first determining module is configured to 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;
[0034] The second determining module is configured to determine a target domain initial sample according to a target domain training data set;
[0035] The screening module is configured to screen a target domain labeled sample from the target domain initial sample according to a preset sample selection strategy, the target domain training data set and the source domain training data set;
[0036] The third determining module is 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;
[0037] 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 meeting a training stop condition is obtained.
[0038] According to a ninth aspect of an embodiment of the present specification, a computing device is provided, comprising:
[0039] a memory and a processor;
[0040] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions, which realize the steps of the above method when executed by the processor.
[0041] According to a tenth aspect of an embodiment of the present specification, a computer readable storage medium is provided, which stores computer executable instructions, which realize the steps of the above method when executed by the processor.
[0042] According to an eleventh aspect of an embodiment of the present specification, a computer program is provided, which makes a computer execute the steps of the above method when executed in the computer.
[0043] One embodiment of the present specification provides a target detection method, determining a to-be-detected image of a target domain; inputting the to-be-detected image into a target detection model corresponding to the target domain to obtain a target object image corresponding to the to-be-detected image, wherein the target detection model is trained based on a source domain labeled sample in a source domain training data set, a target domain initial sample in a target domain training data set, and a target domain labeled sample, and the target domain labeled sample is obtained by screening the target domain initial sample according to a preset sample selection strategy, the target domain training data set, and the source domain training data set.
[0044] In the above method, when processing the to-be-detected image of 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 according to the source domain labeled sample, the target domain initial sample, and the target domain labeled sample. The target domain labeled sample can be obtained by screening the target domain initial sample according to the preset sample selection strategy and the source domain labeled sample. That is to say, in the process of training the target detection model, the labeled training sample in the source domain (i.e., the source domain labeled sample) and the unlabeled training sample in the target domain (i.e., the target domain initial sample) are combined, and the target domain labeled sample screened from the target domain initial sample is also combined. In the training process, the training samples in the source domain and the training samples in the target domain are considered, so as to realize the migration of the model from the source domain to the target domain, so that the trained target detection model also has applicability in the target domain, and further guarantees the generalization performance and task processing performance of the target detection model in each domain. BRIEF DESCRIPTION OF DRAWINGS
[0045] Figure 1 FIG. 1 shows a structural schematic diagram of a target detection system according to one embodiment of the present specification;
[0046] Figure 2 FIG. 2 is a flowchart of a target detection method according to one embodiment of the present specification;
[0047] Figure 3 FIG. 3 shows a training process schematic diagram of a target detection model in a target detection method according to an embodiment of the present specification;
[0048] Figure 4 FIG. 4 is a processing process flowchart of a target detection method according to one embodiment of the present specification;
[0049] Figure 5 FIG. 5 is a structural schematic diagram of a target detection device according to one embodiment of the present specification;
[0050] Figure 6 FIG. 6 is a flowchart of another target detection method according to one embodiment of the present specification;
[0051] Figure 7 is a structural schematic diagram of another target detection device provided by an embodiment of the present specification;
[0052] Figure 8 is a flowchart of a lesion detection method provided by an embodiment of the present specification;
[0053] Figure 9 is a structural schematic diagram of a lesion detection device provided by an embodiment of the present specification;
[0054] Figure 10 is a flowchart of a target detection model training method provided by an embodiment of the present specification;
[0055] Figure 11 is a structural schematic diagram of a target detection model training device provided by an embodiment of the present specification;
[0056] Figure 12 is a structural block diagram of a computing device provided by an embodiment of the present specification. DETAILED DESCRIPTION
[0057] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present specification. However, the present specification can be practiced without the specific details, other than in the examples, set forth in this description. Those skilled in the art, in light of the description, can implement the present specification without limiting to the specific details disclosed in the description.
[0058] The terminology used in one or more embodiments of the present specification is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments of the present specification. As used in one or more embodiments of the present specification and the accompanying claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in one or more embodiments of the present specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0059] It will be understood that, although the terms first, second, etc. can be used herein to describe various information, these terms are not intended to denote a temporal or chronological order. Rather, these terms are used solely to distinguish one from another only. For example, without departing from the scope of one or more embodiments of the present specification, first can be termed second, and similarly, second can be termed first. The term "if' as used herein, can be interpreted as meaning "when" or "upon" or "in response to determining," depending on the context.
[0060] In addition, it should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in one or more embodiments of the present specification are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.
[0061] In the present specification, two target detection methods are provided, and the present specification relates 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 computing device, and a computer readable storage medium, which are described in detail one by one in the following embodiments.
[0062] Referring to Figure 1 , Figure 1 A structural schematic diagram of a target detection system provided according to one embodiment of the present specification is shown, and the target detection system 100 can include a client 102 and a server 104.
[0063] The client 102 is configured to send a to-be-detected image to the server 104.
[0064] The server 104 inputs the to-be-detected image into a target detection model corresponding to the target domain, to obtain a target object image corresponding to the to-be-detected image, wherein the target detection model is trained based on a source domain labeled sample in a source domain training data set, a target domain initial sample in a target domain training data set and a target domain labeled sample, and the target domain labeled sample is obtained by screening the target domain initial sample 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 client 102.
[0065] The client 102 is further configured to receive the target object image sent by the server 104.
[0066] In the system, when processing the to-be-detected image of the target domain, the trained target detection model corresponding to the target domain can be used for processing. In the training process of the target detection model, the target detection model can be trained according to the source domain labeled sample, the target domain initial sample and the target domain labeled sample. The target domain labeled sample can be obtained by screening the target domain initial sample according to the preset sample selection strategy and the source domain labeled sample. That is, in the training process of the target detection model, the labeled training sample in the source domain (i.e., the source domain labeled sample) and the unlabeled training sample in the target domain (i.e., the target domain initial sample) are combined, and the target domain labeled sample screened from the target domain initial sample is also combined. In the training process, the training samples of the source domain and the training samples of the target domain are considered, so as to realize the migration of the model from the source domain to the target domain, so that the trained target detection model also has applicability in the target domain, and further guarantees the generalization performance and task processing performance of the target detection model in each field.
[0067] In practical applications, the target detection system can include a plurality of clients 102 and a server 104. The plurality of clients 102 can establish a communication connection through the server 104. In the target detection scenario, the server 104 is used to provide target detection services between the plurality of clients 102. The plurality of clients 102 can respectively act as a sending end or a receiving end to realize communication through the server 104.
[0068] The user 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, etc. In the target detection scenario, the user can publish a data stream to the server 104 through the client 102. The server 104 generates a target object image according to the data stream and pushes the target object image to other clients that establish a communication.
[0069] The client 102 and the server 104 establish a connection through a network. The network provides a medium for a communication link between the client 102 and the server 104. The network can include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The data transmitted by the client 102 can need to be processed through encoding, transcoding, compression, etc. before being published to the server 104.
[0070] The client 102 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5) application, or a light application (also known as a small program, a lightweight application), or a cloud application, etc. The client 102 can be developed based on a software development kit (SDK) of a corresponding service provided by the server 104, such as a real-time communication (RTC) SDK, etc. The client 102 can be deployed in an electronic device, and needs to rely on the device or some APP in the device to run, etc. The electronic device may, for example, have a display screen and support information browsing, etc., and may be a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. 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.
[0071] The server 104 can include servers that provide various services, such as servers that provide communication services for multiple clients, servers that provide support for models used on clients for background training, servers that process data sent by clients, etc. It should be noted that the server 104 can be implemented as a distributed server cluster composed of multiple servers, or as a single server. The server can also be a server of a distributed system, or a server combined with a blockchain. The server can also be a cloud server (cloud-side device) of a cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, etc. basic cloud computing services, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0072] It should be noted that the target detection method provided in the embodiments of the present specification is generally executed by the server, but in other embodiments of the present specification, the client can also have similar functions as the server, so as to execute the target detection method provided in the embodiments of the present specification. In other embodiments, the target detection method provided in the embodiments of the present specification can also be executed by the client and the server together.
[0073] Referring to Figure 2 , Figure 2 A flowchart of a target detection method according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0074] Step 202: determining a to-be-detected image in a target domain.
[0075] Specifically, the target detection method provided in the embodiments of the present 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 image scan images, thereby realizing detection of lesions in the medical image scan images. Alternatively, in the e-commerce field, the target detection method can be used to process product images, thereby determining product information in the images. Alternatively, in the remote sensing field, the target detection method can be used to process remote sensing images to obtain point of interest information, etc. The embodiments of the present specification are not limited herein.
[0076] For ease of understanding, the embodiments of the present specification are described in detail by taking application of the target detection method in the medical field as an example, but this does not affect the implementation of the target detection method in other applicable scenarios.
[0077] The target domain can be understood as a field 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 opposite 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 labeled samples in the source domain can be used to supervise the training of the target detection model, and the knowledge learned by the target detection model in the source domain is migrated to the target domain, so that the target detection model can also be used in the target domain. For example, the source domain is medical center A, the training samples of the medical center A are rich and labeled, after training the target detection model using the training samples of the medical center A, it is necessary to migrate the target detection model to medical center B, the training samples of the medical center B are scarce and unlabeled, and the target detection method provided in the embodiments of the present specification needs to realize the migration of the target detection model from the medical center A to the medical center B according to the training samples of the medical center A and the training samples of the medical center B, and further ensure the applicability of the target detection model in the medical center B.
[0078] Step 204: inputting the to-be-detected image into a target detection model corresponding to the target domain to obtain a target object image corresponding to the to-be-detected 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, the target domain labeled samples are selected 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.
[0079] Specifically, after determining the to-be-detected image of the target domain, the to-be-detected image can be input into the target detection model corresponding to the target domain to obtain a target object image corresponding to the to-be-detected image.
[0080] The target detection model corresponding to the target domain can be understood as a target detection model migrated from a source domain to a target domain. The to-be-detected image can include a target object, and the target detection model can be used to predict the position of the target object in the to-be-detected image. The target object image obtained can be understood as an image in which the position of the target object in the to-be-detected image is marked. The marking can be in the form of a frame selection.
[0081] For example, in the case of a medical image scanning image as the to-be-detected image, the target object can be a lesion, and the target detection model can be used to predict the position of the lesion in the medical image scanning image, thereby obtaining a lesion image marked with the position.
[0082] In actual implementation, before the to-be-detected image is input into the target detection model corresponding to the target domain, the target detection model corresponding to the target domain needs to be trained to realize migration from the source domain to the target domain. Referring to Figure 3 , Figure 3 A training process diagram of a target detection model in a target detection method provided by an embodiment of the present specification is shown, and the specific training steps are described below in steps 302 to 310.
[0083] Step 302: determining 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.
[0084] 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 position of the target object in the source domain labeled sample. It can be understood that the source domain labeled sample is an image.
[0085] Specifically, the target detection model can include a feature extraction network, a region extraction network, a pooling network, and a classification network. The source domain labeled sample can be input into the target detection model, and in the target detection model, the source domain labeled sample sequentially passes through the feature extraction network, the region extraction network, the pooling network, and the classification network, thereby obtaining a prediction result output by the target detection model. According to the prediction result and the first label, the first model loss value is calculated.
[0086] The feature extraction network can be used to extract image features, the region extraction network can be used to determine a plurality of candidate prediction regions in the image features, and the candidate prediction region can be understood as a region where the target object can exist. The pooling network can pool each candidate prediction region to obtain a feature vector of the same size, and the classification network can predict the class and the bounding box for each feature vector.
[0087] In actual application, the region extraction network (RPN network) can be an FCOS network.
[0088] Step 304: determining a target domain initial sample according to a target domain training data set.
[0089] 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.
[0090] Step 306: screening a target domain labeled sample from the target domain initial sample according to a preset sample selection strategy, the target domain training data set and the source domain training data set.
[0091] The preset sample selection strategy can be understood as a strategy for screening representative samples, uncertain samples and diverse samples from the target domain initial sample. The target domain labeled sample can be understood as a valuable sample screened from the unlabeled sample in the target domain. For the screened target domain labeled sample, manual labeling can be performed to further realize training of the target detection model.
[0092] In specific implementation, the target domain labeled sample can be screened from the target domain initial sample through active learning, and the specific implementation manner is as follows:
[0093] The screening of the target domain labeled sample from the target domain initial sample according to the preset sample selection strategy and the source domain training data set comprises:
[0094] Each target domain initial sample in the target domain training data set is sequentially determined as a first target domain initial sample.
[0095] According to the preset sample selection strategy, a distribution probability density and a classification probability of the first target domain initial sample are calculated.
[0096] In a case where the first target domain initial sample meets a first preset condition according to the distribution probability density or meets a second preset condition according to the classification probability, the first target domain initial sample is determined as the target domain labeled sample.
[0097] The distribution probability density of the first target domain initial sample can be used to represent the representativeness of the first target domain initial sample, that is, can be used to represent whether the first target domain initial sample is common. The classification probability of the first target domain initial sample can be used to represent the uncertainty of the first target domain initial sample. The first target domain initial sample satisfying the first preset condition can be understood as that the first target domain initial sample is a representative sample. The first target domain initial sample satisfying the second preset condition can be understood as that the second target domain initial sample is an uncertainty sample.
[0098] Based on this, for each target domain initial sample in the target domain training data set, the distribution probability density and the classification probability of each target domain initial sample can be calculated, and whether the target domain initial sample is a representative sample is determined according to the distribution probability density, and whether the target domain initial sample is an uncertainty sample is determined according to the classification probability.
[0099] In summary, by screening the target domain labeled samples satisfying the representativeness and uncertainty in the target domain training data set, the alignment between the target domain and the source domain can be realized, so as to further realize the model refinement and ensure the migration of the target detection model from the source domain to the target domain.
[0100] In specific implementation, when calculating the distribution probability density of the first target domain initial sample, the distribution probability densities of the first target domain initial sample in the target domain and the source domain can be calculated respectively, so as to establish the association relationship between the target domain and the source domain, and the specific implementation manner is as follows:
[0101] The distribution probability density and the classification probability of the first target domain initial sample are calculated according to the preset sample selection strategy, including:
[0102] According to the preset sample selection strategy, the first distribution probability density of the first target domain initial sample distributed in the target domain and the second distribution probability density of the first target domain initial sample distributed in the source domain are calculated.
[0103] The first classification probability of the sample feature corresponding to the first target domain initial sample is calculated according to the first distribution probability density.
[0104] The second classification probability of the sample feature corresponding to the first target domain initial sample is predicted according to the target detection model.
[0105] The target domain distribution can be understood as the distribution of the target domain training data set under the Gaussian, and the source domain distribution can be understood as the distribution of the source domain training data set under the Gaussian. The sample feature corresponding to the first target domain initial sample can be understood as the image feature of the first target domain initial sample. The first distribution probability density of the first target domain initial sample in the target domain distribution can be understood as the distribution probability density of the sample feature corresponding to the first target domain initial sample in the target domain distribution. The second distribution probability density of the first target domain initial sample in the source domain distribution can be understood as the distribution probability density of the sample feature corresponding to the first target domain initial sample in the source domain distribution. The first classification probability of the sample feature corresponding to the first target domain initial sample can be understood as the classification probability of the sample feature corresponding to the first target domain initial sample in the feature space.
[0106] Based on this, the first distribution probability density of the first target domain initial sample in the target domain distribution can be calculated, and the second distribution probability density of the first target domain initial sample in the source domain distribution can be calculated, the first classification probability of the sample feature corresponding to the first target domain initial sample in the feature space can be calculated, and the second classification probability of the sample feature corresponding to the first target domain initial sample can be predicted by using the target detection model.
[0107] In summary, by calculating the distribution probability density and the classification probability of the first target domain initial sample in the target domain and the source domain, a data basis is provided for subsequent screening of representative samples and uncertain samples, and further migration training of the target detection model is realized.
[0108] In practical applications, the distribution probability density and the classification probability can be calculated according to the Gaussian model, and the specific implementation manner is as follows:
[0109] Before the first distribution probability density of the first target domain initial sample in the target domain distribution and the second distribution probability density of the first target domain initial sample in the source domain distribution are calculated according to the preset sample selection strategy, the method further includes:
[0110] determining a prediction result corresponding to the target domain initial sample;
[0111] 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;
[0112] Correspondingly, the calculation of the first distribution probability density of the first target domain initial sample in the target domain distribution and the second distribution probability density of the first target domain initial sample in the source domain distribution according to the preset sample selection strategy includes:
[0113] According to the Gaussian model, a first distribution probability density of the first target domain initial sample in a target domain distribution and a second distribution probability density of the first target domain initial sample in a source domain distribution are calculated.
[0114] The first classification probability of the sample feature corresponding to the first target domain initial sample is calculated according to the first distribution probability density, and the Gaussian model is used.
[0115] The first classification probability of the sample feature corresponding to the first target domain initial sample is calculated according to the first distribution probability density, and the Gaussian model is used.
[0116] The predicted result corresponding to the target domain initial sample can be understood as the predicted position of the target object in the target domain initial sample, or can also be the category information of the target object in the target domain initial sample. It can be understood that the predicted result corresponding to the target domain initial sample can be determined according to the processing task of the target detection model.
[0117] Specifically, the predicted result corresponding to the target domain initial sample can be determined by using the target detection model.
[0118] Based on this, the target domain initial sample can be input into the target detection model to obtain the predicted result corresponding to the target domain initial sample output by the target detection model, and the Gaussian model can be constructed according to the source domain labeled sample, the first label corresponding to the source domain labeled sample, the target domain initial sample, and the predicted 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.
[0119] In practical applications, the Gaussian model corresponding to each type can be constructed according to the type information of the source domain labeled sample and the target domain initial sample.
[0120] Specifically, the calculation formula of the first distribution probability density is as follows:
[0121] d T =p T (z|c).
[0122] Wherein, d T is used to represent the first distribution probability density, T is used to represent the target domain, z is used to represent the sample feature corresponding to the first target domain initial sample, and c represents the category. P is used to represent the probability density function.
[0123] The calculation formula of the second distribution probability density is as follows:
[0124] d S =p S (z|c).
[0125] wherein S is used to represent the source domain, d S is used to represent the second distribution probability density.
[0126] The first classification probability p f The formula of (c / z) is as follows:
[0127] p f (c|z)=softmax(pT(z|c)).
[0128] In summary, by constructing a Gaussian model, the calculation of the distribution probability density and the classification probability is realized.
[0129] Further, the target domain labeled sample includes a representative target domain labeled sample and an uncertain target domain labeled sample;
[0130] Correspondingly, in the case that the first target domain initial sample meets a first preset condition according to the distribution probability density, or 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, including:
[0131] According to the first distribution probability density and the second distribution probability density, a distribution probability density difference value is calculated;
[0132] In the case that the distribution probability density difference value meets a preset difference threshold value, the first target domain initial sample is determined as a representative target domain labeled sample; or
[0133] According to the first classification probability and the second classification probability, a classification probability entropy value is calculated;
[0134] In the case that the classification probability entropy value meets a preset entropy threshold value, the first target domain initial sample is determined as an uncertain target domain labeled sample.
[0135] The representative target domain labeled sample can be understood as a target domain labeled sample that is common in the target domain training data set and uncommon in the source domain training data set. The uncertain target domain labeled sample can be understood as a target domain labeled sample with uncertain prediction results. The distribution probability density difference value meeting the preset difference threshold value can be understood as the distribution probability density difference value being greater than the preset difference threshold value. It can be understood that the greater the distribution probability density difference value is, the more representative the target domain initial sample is in the target domain training data set. The classification probability entropy value meeting the preset entropy threshold value can be understood as the classification probability entropy value being greater than the preset entropy threshold value. It can be understood that the greater the classification probability entropy value is, the greater the uncertainty of the target domain initial sample is.
[0136] For example, the class of the target domain initial sample can be 0 or 1, and the predicted class result of the target domain initial sample is 0.9. At this time, according to the predicted class result, it can be determined that the class of the target domain initial sample is 1. Since 0.9 and 1 are close to each other, the uncertainty of the target domain initial sample is small. If the predicted class result of the target domain initial sample is 0.5, at this time, according to the predicted class result, the class of the target domain initial sample cannot be determined, and the uncertainty of the target domain initial sample is large.
[0137] Based on this, in an embodiment of the present specification, when determining the representative target domain labeled sample, the first target domain initial sample with a distribution probability density difference greater than the preset difference threshold value can be determined as the representative target domain labeled sample according to the preset difference threshold value.
[0138] In another embodiment of the present specification, when determining the representative target domain labeled sample, the representative target domain labeled sample can also be determined according to the sorting result between the distribution probability density differences of the plurality of target domain initial samples. For example, the distribution probability density differences of the plurality of target domain initial samples can be sorted in descending order, and the first K target domain initial samples are determined as the representative target domain labeled sample according to the sorting result.
[0139] In practical applications, the formula for calculating the distribution probability density difference is as follows:
[0140] Q1=αlog(d T )-log(d S ),
[0141] Wherein, Q1 is the measure of the distribution probability density difference, and a is a hyperparameter, which can be used to represent a domain factor for assigning weights to the target domain and source domain distribution probability density, and is usually taken as 1.
[0142] When determining the uncertainty target domain labeled sample, the classification probability entropy value can be calculated according to the first classification probability calculated and the second classification probability predicted by the target detection model, and the first target domain initial sample with a classification probability entropy value greater than a preset entropy value threshold can be determined as the uncertainty target domain labeled sample.
[0143] Correspondingly, in another embodiment of the present specification, the uncertainty target domain labeled sample can also be determined according to the sorting result between the classification probability entropy values of the plurality of target domain initial samples.
[0144] In a specific implementation, when the classification probability entropy value is calculated according to the first classification probability and the second classification probability, the first entropy value can be calculated according to the first classification probability, the second entropy value can be calculated according to the second classification probability, and the classification probability entropy value can be calculated according to the first entropy value and the second entropy value. In an embodiment of the present specification, the first entropy value and the second entropy value can be added to obtain the classification probability entropy value.
[0145] The first entropy value H f (z) is shown in the following formula:
[0146]
[0147] The second entropy value H m (z) is shown in the following formula:
[0148]
[0149] Wherein, p m (c|z) is the second classification probability predicted by the target detection model.
[0150] The formula for calculating the classification probability entropy value H(z) is shown in the following formula:
[0151] H(z)=H f +H m .
[0152] In summary, by calculating the distribution probability density difference and the classification probability entropy value, the representative target domain labeled samples and the uncertain target domain labeled samples can be determined, so as to realize the screening of valuable samples in the target domain initial samples, and further realize the transfer learning of the target detection model.
[0153] In practical applications, a plurality of representative target domain labeled samples and a plurality of uncertain target domain labeled samples can be determined, and these target domain labeled samples can be selected for diversity, so as to remove redundant samples. In order to reduce the subsequent manual labeling budget, the sample allocation ratio between the representative target domain labeled samples and the uncertain target domain labeled samples can be calculated, so as to determine the number of screened representative target domain labeled samples and uncertain target domain labeled samples, and the specific implementation is as follows:
[0154] The target domain labeled samples include a plurality of representative target domain labeled samples and a plurality of uncertain target domain labeled samples.
[0155] Correspondingly, after the first target domain initial sample is determined as a representative target domain labeled sample, the method further includes:
[0156] 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.
[0157] After determining the first target domain initial sample as the uncertain target domain labeled sample, the method further comprises:
[0158] According to the similarity between each uncertain target domain labeled sample, the plurality of 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.
[0159] In the actual application, the difference degree 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.
[0160] In the actual application, the difference degree 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.
[0161] Specifically, the formula for calculating the JS divergence between the source domain distribution and the target domain distribution is as follows:
[0162]
[0163] Wherein, JSD(p S |p T ) is the JS divergence between the source domain and the target domain. S E T is the expectation of the source domain distribution, and E S (z) is the distribution probability density of the sample feature of the sample of the source domain, and p T (z) is the probability density of the sample feature of the sample of the target domain in the target domain.
[0164] The formula for calculating the sample allocation ratio is as follows:
[0165]
[0166] Wherein, λ is the sample allocation ratio, the value range is 0 to 1, when the source domain and the target domain completely overlap, the value is 0, when the source domain and the target domain are completely separated, the value is 1. β is a hyper parameter, which can be used to control the influence of JS divergence on sample label budget.
[0167] The formula for calculating the sample label budget is as follows:
[0168]
[0169] Wherein, U can be understood as uncertainty, is the label budget of the uncertainty target domain labeled sample, r can be understood as representative, is the label budget of the representative target domain labeled sample, m is a positive integer, which can be used to represent the number of cycles of calculating the label budget. B is the sample label budget, which includes the label budget of the uncertainty target domain labeled sample and the label budget of the representative target domain labeled sample.
[0170] Specifically, according to the feature similarity between each representative target domain labeled sample, the representative target domain labeled sample with smaller feature similarity can be determined, and the first preset number of representative target domain labeled samples can be obtained. Correspondingly, according to the feature similarity between each uncertainty target domain labeled sample, the representative target domain labeled sample with smaller feature similarity can be determined, and the second preset number of uncertainty target domain labeled samples can be obtained.
[0171] In actual application, when screening multiple representative target domain labeled samples and multiple uncertainty target domain labeled samples, the initialization method of K-means++ algorithm or 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 K-means++ algorithm, the similarity average of the newly added target domain labeled sample and other target domain labeled samples can be calculated, and the newly added target domain labeled sample with the smallest similarity average is screened out, thereby obtaining the first preset number of representative target domain labeled samples. When using clustering algorithm, K cluster centers can be determined in multiple representative target domain labeled samples, and the representative target domain labeled sample closest to each cluster center (i.e. with the smallest similarity to the cluster center) is screened out, thereby obtaining the first preset number of representative target domain labeled samples.
[0172] Taking 2 as an example of the first preset number of representative target domain labeled samples, after obtaining 4 representative target domain labeled samples, the 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 according to the similarity between the sample features of each of the 4 representative target domain labeled samples, and the 2 representative target domain labeled samples farthest apart (i.e., the smallest similarity) in the sample feature distribution are determined.
[0173] In summary, by selecting the diversity of representative target domain labeled samples and uncertain target domain labeled samples, the removal of redundant samples is achieved. Moreover, the first preset number and the second preset number are determined according to the sample allocation ratio, which takes into account the artificial labeling budget of the samples and saves the labeling cost.
[0174] Step 308: 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.
[0175] Specifically, after the target domain labeled sample is screened from the target domain initial sample, the second model loss value and the third model loss value can be calculated according to the source domain labeled sample, the target domain initial sample, and the target domain labeled sample.
[0176] In specific implementation, the determination of 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:
[0177] Each sample in the source domain labeled sample, the target domain initial sample, and the target domain labeled sample is sequentially determined as a transfer training sample;
[0178] The transfer training sample is segmented to obtain at least two segmented images, wherein the at least two segmented images have an overlapping area;
[0179] The at least two segmented images are input into a target detection model, and in the target detection model, a feature extraction network and a mapping network are used to process the at least two segmented images to obtain at least two feature images;
[0180] In the target detection model, a feature extraction network and a region extraction network are used to process the at least two segmented images to obtain at least two predicted foreground features corresponding to the overlapping area;
[0181] The second model loss value is calculated according to the at least two feature images, and the third model loss value is calculated according to the at least two predicted foreground features.
[0182] 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, i.e., processing the transfer training sample, in order to realize contrastive learning, the transfer training sample can be divided into at least two segmentation images, and the at least two segmentation images are input into the target detection model. In the target detection model, in order to learn the discriminability of the features, the at least two segmentation images can be processed by using the feature extraction network and the mapping network to obtain at least two feature images. Moreover, in order to learn the invariance of the features, the at least two segmentation images can be processed by using the feature extraction network and the region extraction network to obtain at least two predicted foreground features corresponding to the overlapping region.
[0183] The region extraction network can perform pixel-level prediction on the foreground and the background in the segmentation image. In order to make the at least two predicted foreground features have stable invariance features, for the input of the two segmentation images with the overlapping region, the prediction of the overlapping region is the same. Based on this, the at least two predicted foreground features corresponding to the overlapping region obtained can have consistency, so as to learn the invariance of the features. The feature extraction network can extract image features from the input at least two segmentation images, and the mapping network can map the at least two image features extracted from the at least two segmentation images to a low-dimensional space to obtain the at least two feature images as low-dimensional features, i.e., without damaging the learning of the original features, and the efficiency of the contrastive learning can be improved.
[0184] In actual application, in order to realize the supervision of the sample itself, constrain feature learning, and save the consumption of computing resources, the transfer training sample can be divided into two segmentation images.
[0185] The formula for calculating the third model loss value is as follows:
[0186]
[0187] wherein, L CR is the third model loss value, is one predicted foreground feature corresponding to the overlapping region, is another predicted foreground feature corresponding to the overlapping region.
[0188] In summary, by processing the at least two segmentation images to obtain the at least two feature images and the at least two predicted foreground features, the discriminability and the invariance between the features can be learned, and the task processing performance of the target detection model can be further improved.
[0189] In one embodiment of the present specification, in order to further improve the training effect, after obtaining the at least two segmented images, the at least two segmented images can also be subjected to enhancement processing to obtain at least two enhanced images, and correspondingly, 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.
[0190] In specific implementation, in order to constitute a contrast paradigm, corresponding positions can be determined in the at least two feature images, and the specific implementation manner is as follows:
[0191] The calculating the second model loss value according to the at least two feature images comprises:
[0192] determining a first position in a first feature image, wherein the first feature image is any one of the at least two feature images;
[0193] determining a second position corresponding to the first position in a second feature image according to the overlapping region, wherein the second feature image is any one of the at least two feature images except the first feature image;
[0194] calculating a second model loss value according to the first position and the second position.
[0195] For example, taking two feature images as an example, specifically, a first position can be determined in a first feature image according to an overlapping region, and a second position corresponding to the first position in the first feature image can be determined according to the overlapping region, and a second model loss value can be calculated according to a feature image corresponding to the first position and a feature image corresponding to the second position.
[0196] Correspondingly, in the case of obtaining three feature images, the first position can be determined in the first feature image according to an overlapping region, 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 a second model loss value can be calculated according to the first position, the second position 2 and the second position 3.
[0197] The second position can be understood as a positive sample.
[0198] Correspondingly, a negative sample can also be determined in the second feature image, and the specific implementation manner is as follows:
[0199] The calculating the second model loss value according to the at least two feature images further comprises:
[0200] determining a third position in the second feature image according to the overlapping region, wherein the third position is any position in the second feature image except the overlapping region.
[0201] According to the first position and the third position, a second model loss value is calculated.
[0202] The first position, the second position and the third position can be understood as pixel points in the feature image.
[0203] Specifically, in the second feature image, a third position outside the overlapping region can be randomly sampled as a negative sample, and according to the feature image corresponding to the first position and the feature image corresponding to the third position, the second model loss value is calculated.
[0204] In actual application, the formula for calculating the second model loss value is as follows:
[0205]
[0206] The second model loss value is L, i, j and n are the number of pixel points in the feature image, and i, j and n are positive integers. CL The pixel point feature of the i th pixel point is z. i The pixel point feature of the i th pixel point is z. The pixel point feature of the i th pixel point is z. The pixel point feature of the i th pixel point is z.
[0207] In summary, by determining the positive sample and the negative sample according to the overlapping region, the contrast learning paradigm is formed, so that the feature of the target point is similar to the corresponding point and separated from other points, so that the target detection model learns the discriminability of the feature.
[0208] Step 310: According to the first model loss value, the second model loss value and the third model loss value, the target detection model is adjusted until a target detection model meeting a training stop condition is obtained.
[0209] 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.
[0210] Specifically, the target model loss value can be calculated according to 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 according to the target model loss value.
[0211] In an embodiment of the present specification, the target model loss value can be the sum of the first model loss value, the second model loss value and the third model loss value. In another embodiment of the present specification, the target model loss value can also be the weighted sum result of the first model loss value, the second model loss value and the third model loss value. The present specification does not limit the calculation method of the target model loss value.
[0212] Further, after determining the first target domain initial sample as the target domain labeled sample, the method further comprises:
[0213] determining a second label corresponding to the target domain labeled sample;
[0214] training the target detection model according to the target domain labeled sample and the second label until a target detection model satisfying a training stop condition is obtained.
[0215] Specifically, the target domain labeled sample can be manually labeled to obtain the second label corresponding to the target domain labeled sample. The target domain labeled sample is input into the target detection model to obtain a prediction result output by the target detection model. A fourth model loss value is calculated according to the prediction result and the second label. The target detection model is trained according to the fourth model loss value.
[0216] In an embodiment of the present specification, after the target detection model is 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 satisfying a training stop condition, the target detection model satisfying the training stop condition can be further trained according to the fourth model loss value.
[0217] 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 satisfying a training stop condition is obtained.
[0218] In summary, by manually labeling the target domain labeled sample to obtain the second label, and training the target detection model according to the target domain labeled sample and the second label, the applicability of the target detection model in the target domain can be improved, and thus the generalization performance and task processing performance of the target detection model can be further improved.
[0219] Referring to Table 1 below, Table 1 shows statistical comparison results for a lymph node data set.
[0220] Table 1
[0221]
[0222] The first data set and the second data set include CT scan data of esophageal cancer patients collected from a hospital, and the CT scan region includes mediastinum and abdomen. The first data set includes 857 3D lymph node annotations from 90 patients. The second data set includes 857 3D lymph node annotations from 85 patients. The third data set includes contrast-enhanced CT scan data of 107 lung cancer patients, with 668 3D lymph node annotations. The fourth data set includes three-dimensional mediastinal lymph node scan data of 89 patients. After CT scanning of each patient, a bounding box image with lesion annotations can be generated according to the CT image. In the first data set, the short axis diameter of the lymph node in the CT image ranges from 2.2 to 32.4, with an average of 6.6.
[0223] As shown in Table 2 below, the following table shows the comparison of the model processing performance of the sample sampling method according to the preset sample selection strategy provided in an embodiment of the present specification and other sample sampling methods. In Table 2, the source domain is the first data set described above. The target domain is the second data set described above. When the number of samples sampled and labeled in the target domain is 0, the processing performance of the model trained by the samples obtained by using the first sampling method, the second sampling method, the third sampling method and the fourth sampling method in the source domain is 74.51, in the target domain is 57.24, and the average processing performance is 65.88. According to Table 2, the model trained by the samples obtained by the sample sampling method according to the preset sample selection strategy has better processing performance in the first data set and the second data set.
[0224] Table 2
[0225]
[0226] Correspondingly, as shown in Table 3 below, the source domain is the fourth data set, and the target domain is the first data set. As can be seen from Table 3, the model trained by the samples obtained by the sample sampling method according to the preset sample selection strategy has better processing performance in the first data set and the fourth data set.
[0227] Table 3
[0228]
[0229] In addition, referring to Table 4 below, the source domain 1 is the fourth data set, the source domain 2 is the third data set, and the target domain is the first data set. As can be seen from Table 4, the model trained by the samples obtained by the sample sampling method according to the preset sample selection strategy has better processing performance in the first data set, the third data set and the fourth data set.
[0230] Table 4
[0231]
[0232] As shown in Table 5 below, Table 5 shows a comparison of different versions of the target detection model training method provided by the embodiments of the present specification. For example, for the first version, the above-mentioned contrast 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), and the sample selection according to the uncertainty, representativeness and diversity is performed according to the preset sample selection strategy. According to the training method of the first version, the target detection model trained has a performance of 74.51 in the source domain, a performance of 57.24 in the target domain, and an average performance of 35.88 when the selected labeled sample is 0. After the target domain labeled sample is obtained by performing the sample screening according to the preset sample selection strategy for the first cycle, the target detection model trained has a performance of 77.13 in the source domain, a performance of 67.08 in the target domain, and an average performance of 72.10. As can be seen from Table 5, the target detection model trained after the contrast learning and consistency learning, and the sample selection according to the uncertainty, representativeness and diversity, i.e., the target detection model trained according to the eighth version of the training method, has better processing performance in the case of 0 labeled sample and in the case of the target domain labeled sample obtained by performing the sample screening for the first cycle.
[0233] Table 5
[0234]
[0235] As shown in Table 6 below, for different training methods, the task processing effect of the model is different. It can be seen that the task processing performance of the target detection model in the embodiments of the present specification is better.
[0236] Table 6
[0237]
[0238] It can be understood that the processing performance of the model is recorded in the above Tables 2 to 6.
[0239] To sum up, in the above method, when processing the to-be-detected image of 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 according to the source domain labeled sample, the target domain initial sample and the target domain labeled sample, and the target domain labeled sample can be selected from the target domain initial sample according to the preset sample selection strategy and the source domain labeled sample. That is to say, in the process of training the target detection model, the labeled training sample in the source domain (i.e., the source domain labeled sample) and the unlabeled training sample in the target domain (i.e., the target domain initial sample) are combined, and the target domain labeled sample selected from the target domain initial sample is also combined. In the training process, the training samples in the source domain and the training samples in the target domain are considered, so as to realize the migration of the model from the source domain to the target domain, so that the trained target detection model also has applicability in the target domain, further ensuring the generalization performance and task processing performance of the target detection model in each field.
[0240] The following describes the target detection method provided in the specification in conjunction with the accompanying Figure 4 For example, the application of the target detection method provided in the specification to lesion detection is taken as an example to further illustrate the target detection method. Wherein, Figure 4 A processing process flowchart of a target detection method provided in an embodiment of the specification is shown, which specifically includes the following steps.
[0241] Step 402: The end-side device receives a medical image scan image and sends the medical image scan image to the cloud-side device.
[0242] Specifically, in a certain medical center, a medical image scan device can be used to scan the affected part of a patient to obtain a medical image scan image. The medical image scan device can send the scanned medical image scan image to the end-side device, and the end-side device can send the medical image scan image to the cloud-side device.
[0243] Alternatively, the medical image scan device can also directly send the medical image scan image to the cloud-side device.
[0244] Step 404: The cloud-side device inputs the medical image scan image into the target detection model to obtain a lesion image output by the target detection model.
[0245] The cloud-side device can be deployed with the target detection model corresponding to the medical center.
[0246] Specifically, the cloud-side device can input the medical image scan image into the target detection model, detect the lesion position in the medical image scan image by using the target detection model, and obtain a lesion image labeled with the lesion position and output by the target detection model.
[0247] Step 406: The cloud-side device sends the lesion image to the terminal-side device.
[0248] Step 408: The terminal-side device displays the lesion image through the display interface.
[0249] Specifically, the terminal-side device can display the lesion image to the medical staff of the medical center through the display interface.
[0250] To sum up, in the above method, when processing the to-be-detected image of 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 according to the source domain labeled sample, the target domain initial sample and the target domain labeled sample, and the target domain labeled sample can be selected from the target domain initial sample according to the preset sample selection strategy and the source domain labeled sample. That is to say, in the process of training the target detection model, the labeled training sample in the source domain (i.e., the source domain labeled sample) and the unlabeled training sample in the target domain (i.e., the target domain initial sample) are combined, and the target domain labeled sample selected from the target domain initial sample is also combined. In the training process, the training samples in the source domain and the training samples in the target domain are considered, so as to realize the migration of the model from the source domain to the target domain, so that the trained target detection model also has applicability in the target domain, and further guarantees the generalization performance and task processing performance of the target detection model in each field.
[0251] Corresponding to the above method embodiments, the present specification also provides target detection device embodiments, Figure 5 A structure schematic diagram of a target detection device provided by one embodiment of the present specification is shown. As shown in the figure, Figure 5 The device comprises:
[0252] A determination module 502 configured to determine a to-be-detected image of a target domain;
[0253] An input module 504 configured to input the to-be-detected image into a target detection model corresponding to the target domain to obtain a target object image corresponding to the to-be-detected image, wherein the target detection model is trained based on a source domain labeled sample in a source domain training data set, a target domain initial sample in a target domain training data set and a target domain labeled sample, and the target domain labeled sample is selected from the target domain initial sample according to a preset sample selection strategy, the target domain training data set and the source domain training data set.
[0254] In an optional embodiment, the device further comprises a training module configured to:
[0255] determine a first model loss value according to the source domain labeled sample in the source domain training data set and a first label corresponding to the source domain labeled sample;
[0256] determine the target domain initial samples according to a target domain training dataset;
[0257] select target domain labeled samples from the target domain initial samples according to a preset sample selection strategy, the target domain training dataset, and the source domain training dataset;
[0258] determine a second model loss value and a third model loss value according to the source domain labeled samples, the target domain initial samples, and the target domain labeled samples;
[0259] 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 satisfying a training stop condition is obtained.
[0260] In an optional embodiment, the training module is further configured to:
[0261] determine each target domain initial sample in the target domain training dataset as a first target domain initial sample in sequence;
[0262] calculate a distribution probability density and a classification probability of the first target domain initial sample according to a preset sample selection strategy;
[0263] determine the first target domain initial sample as a target domain labeled sample when the first target domain initial sample satisfies a first preset condition according to the distribution probability density or satisfies a second preset condition according to the classification probability.
[0264] In an optional embodiment, the training module is further configured to:
[0265] calculate a first distribution probability density of the first target domain initial sample in a target domain distribution and a second distribution probability density of the first target domain initial sample in a source domain distribution according to a preset sample selection strategy;
[0266] calculate a first classification probability of a 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 according to the preset sample selection strategy.
[0267] In an optional embodiment, the training module is further configured to:
[0268] determine a prediction result corresponding to the target domain initial sample;
[0269] 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 predicted result corresponding to the target domain initial sample;
[0270] calculating a first distribution probability density of the first target domain initial sample in a target domain distribution and a second distribution probability density of the first target domain initial sample in a source domain distribution according to the Gaussian model;
[0271] calculating a first classification probability of a sample feature corresponding to the first target domain initial sample in a target domain and a second classification probability of the sample feature in a source domain according to the Gaussian model.
[0272] In an optional embodiment, the target domain labeled sample includes a representative target domain labeled sample and an uncertain target domain labeled sample; the training module is further configured to:
[0273] calculating a distribution probability density difference value according to the first distribution probability density and the second distribution probability density;
[0274] determining the first target domain initial sample as the representative target domain labeled sample in a case where the distribution probability density difference value meets a preset difference value threshold; or
[0275] calculating a classification probability entropy value according to the first classification probability and the second classification probability;
[0276] determining the first target domain initial sample as the uncertain target domain labeled sample in a case where the classification probability entropy value meets a preset entropy value threshold.
[0277] In an optional embodiment, the target domain labeled sample includes a plurality of representative target domain labeled samples and a plurality of uncertain target domain labeled samples; the training module is further configured to:
[0278] screening the plurality of representative target domain labeled samples according to similarities between the respective representative target domain labeled samples 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 sample and the uncertain target domain labeled sample;
[0279] screening the plurality of uncertain target domain labeled samples according to similarities between the respective uncertain target domain labeled samples 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.
[0280] In an optional embodiment, the training module is further configured to:
[0281] determine a second label corresponding to the target domain labeled sample;
[0282] train the target detection model according to the target domain labeled sample and the second label until a target detection model satisfying a training stop condition is obtained.
[0283] In an optional embodiment, the training module is further configured to:
[0284] determine each sample in the source domain labeled sample, the target domain initial sample and the target domain labeled sample as a transfer training sample in sequence;
[0285] perform segmentation processing on the transfer training sample to obtain at least two segmentation images, wherein the at least two segmentation images have an overlapping region therebetween;
[0286] input the at least two segmentation images into the target detection model, and process the at least two segmentation images by using a feature extraction network and a mapping network in the target detection model to obtain at least two feature images;
[0287] process the at least two segmentation images by using a feature extraction network and a region extraction network in the target detection model to obtain at least two predicted foreground features corresponding to the overlapping region;
[0288] calculate a second model loss value according to the at least two feature images, and calculate a third model loss value according to the at least two predicted foreground features.
[0289] In an optional embodiment, the training module is further configured to:
[0290] determine a first position in a first feature image, wherein the first feature image is any one of the at least two feature images;
[0291] determine a second position corresponding to the first position in a second feature image according to the overlapping region, wherein the second feature image is any one of the at least two feature images other than the first feature image;
[0292] calculate a second model loss value according to the first position and the second position.
[0293] In an optional embodiment, the training module is further configured to:
[0294] According to the overlapping region, a third position is determined in the second feature image, wherein the third position is a position in the second feature image other than the overlapping region;
[0295] According to the first position and the third position, a second model loss value is calculated.
[0296] To sum up, in the above device, when processing the to-be-detected image of the target domain, the trained target detection model corresponding to the target domain can be used for processing. Moreover, in the training process of the target detection model, the target detection model can be trained according to the source domain labeled sample, the target domain initial sample and the target domain labeled sample. The target domain labeled sample can be obtained by screening the target domain initial sample according to the preset sample selection strategy and the source domain labeled sample. That is to say, in the training process of the target detection model, the source domain labeled sample and the target domain initial sample are combined, and the target domain labeled sample obtained by screening the target domain initial sample is also combined. In the training process, the training samples of the source domain and the training samples of the target domain are considered, so as to realize the migration of the model from the source domain to the target domain, so that the trained target detection model has applicability in the target domain, and further guarantees the generalization performance and task processing performance of the target detection model in each field.
[0297] The above is a schematic scheme of the target detection device of the embodiment. It should be noted that the technical scheme of the target detection device belongs to the same concept as the technical scheme of the target detection method described above. The details of the technical scheme of the target detection device that are not described in detail can be referred to the description of the technical scheme of the target detection method.
[0298] Referring to Figure 6 , Figure 6 A flowchart of another target detection method provided according to an embodiment of the present specification is shown, which is applied to a cloud-side device, and specifically includes the following steps.
[0299] Step 602: receiving an image processing request sent by an end-side device, wherein the image processing request carries a to-be-detected image of a target domain;
[0300] Step 604: inputting the to-be-detected image into a target detection model corresponding to the target domain to obtain a target object image corresponding to the to-be-detected image, wherein the target detection model is trained based on a source domain labeled sample in a source domain training data set, a target domain initial sample in a target domain training data set and a target domain labeled sample, and the target domain labeled sample is obtained by screening the target domain initial sample according to a preset sample selection strategy, the target domain training data set and the source domain training data set;
[0301] Step 606: sending the target object image to the terminal side device.
[0302] Corresponding to the method embodiments described above, the specification also provides target detection device embodiments, Figure 7 The structure diagram of another target detection device provided by an embodiment of the specification is shown, which is applied to a cloud side device. As shown in the figure, Figure 7 The device includes:
[0303] The receiving module 702 is configured to receive an image processing request sent by a terminal side device, wherein the image processing request carries a to-be-detected image of a target domain;
[0304] The input module 704 is configured to input the to-be-detected image into a target detection model corresponding to the target domain to obtain a target object image corresponding to the to-be-detected 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, the target domain labeled samples are obtained by screening 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;
[0305] The sending module 706 is configured to send the target object image to the terminal side device.
[0306] Referring to Figure 8 , Figure 8 The flow chart of a lesion detection method provided by an embodiment of the specification is shown, which is applied to a cloud side device and specifically includes the following steps.
[0307] Step 802: receiving an image processing request sent by a terminal side device, wherein the image processing request carries a medical image scan image of a target domain;
[0308] Step 804: 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 data set, target domain initial samples in a target domain training data set, and target domain labeled samples, the target domain labeled samples are obtained by screening 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;
[0309] Step 806: sending the lesion image to the terminal side device.
[0310] Corresponding to the method embodiments described above, the specification also provides lesion detection device embodiments, Figure 9A structural diagram of a lesion detection device provided by one embodiment of the present specification is shown, which is applied to a cloud-side device. As shown in Figure 9 The device includes:
[0311] 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 image scan image of a target domain;
[0312] The 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 data set, target domain initial samples in a target domain training data set, and target domain labeled samples, the target domain labeled samples are obtained by screening 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;
[0313] The sending module 906 is configured to send the lesion image to the end-side device.
[0314] Referring to Figure 10 , Figure 10 A flowchart of a target detection model training method provided by one embodiment of the present specification is shown, which is applied to a cloud-side device and specifically includes the following steps.
[0315] Step 1002: determining a first model loss value according to source domain labeled samples in a source domain training data set and first labels corresponding to the source domain labeled samples;
[0316] Step 1004: determining target domain initial samples according to a target domain training data set;
[0317] Step 1006: obtaining target domain labeled samples by screening 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;
[0318] Step 1008: determining a second model loss value and a third model loss value according to the source domain labeled samples, the target domain initial samples, and the target domain labeled samples;
[0319] Step 1010: adjusting a 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 meeting a training stop condition is obtained.
[0320] Corresponding to the above method embodiments, the present specification also provides target detection model training device embodiments, Figure 11A structural schematic diagram of a target detection model training device provided by one embodiment of the present specification is shown, which is applied to a cloud side device.
[0321] As shown in Figure 11 , the device comprises:
[0322] A first determination module 1102 is configured to 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;
[0323] A second determination module 1104 is configured to determine a target domain initial sample according to a target domain training data set;
[0324] A screening module 1106 is configured to screen a target domain labeled sample from the target domain initial sample according to a preset sample selection strategy, the target domain training data set and the source domain training data set;
[0325] A third determination module 1108 is 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;
[0326] A training module 1110 is configured to adjust a 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 meeting a training stop condition is obtained.
[0327] In summary, in the above 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 according to the source domain labeled sample, the target domain initial sample and the target domain labeled sample. The target domain labeled sample can be screened from the target domain initial sample according to the preset sample selection strategy and the source domain labeled sample. That is to say, in the process of training the target detection model, the labeled training sample in the source domain (i.e. the source domain labeled sample) and the unlabeled training sample in the target domain (i.e. the target domain initial sample) are combined, and the target domain labeled sample screened from the target domain initial sample is also combined. The training samples in the source domain and the training samples in the target domain are considered in the training process, so as to realize the migration of the model from the source domain to the target domain, so that the trained target detection model also has applicability in the target domain, further ensuring the generalization performance and task processing performance of the target detection model in each field.
[0328] Figure 12A structural block diagram of a computing device 1200 according to one embodiment of the present specification is shown. The components of the computing device 1200 include, but are not limited to, a memory 1210 and a processor 1220. The processor 1220 is connected with the memory 1210 through a bus 1230, and a database 1250 is used to save data.
[0329] The computing device 1200 also includes an access device 1240, which enables the computing device 1200 to communicate via one or more networks 1260. Examples of these networks include the 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 can include one or more of any type of network interface (e.g., a network interface card (NIC)), 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.
[0330] In one embodiment of the present application, the above-mentioned components of the computing device 1200 and other components not shown in the Figure 12 may be connected to each other, for example, through a bus. It should be understood that Figure 12 The structural block diagram of the computing device shown is only for the purpose of example, and is not a limitation on the scope of the present application. Other components can be added or replaced as needed by those skilled in the art.
[0331] The computing device 1200 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1200 can also be a mobile or stationary server.
[0332] The processor 1220 is configured to execute instructions for the steps of the above method.
[0333] The above is a schematic solution of the computing device of the 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, and the details of the technical solution of the computing device which are not described in detail can be referred to the description of the technical solution of the above method.
[0334] An embodiment of the present specification also provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions implement the steps of the above method when executed by a processor.
[0335] The above is a schematic solution of the computer readable storage medium of the 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, and the details of the technical solution of the storage medium which are not described in detail can be referred to the description of the technical solution of the above method.
[0336] An embodiment of the present specification also provides a computer program, which causes a computer to perform the steps of the above method when the computer program is executed in the computer.
[0337] The above is a schematic solution of the computer program of the 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 the details of the technical solution of the computer program which are not described in detail can be referred to the description of the technical solution of the above method.
[0338] The above describes specific embodiments of the present specification. 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 a different order than the order in which they are recited and still accomplish desirable results. In addition, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order to achieve desirable results. In some embodiments, multitasking and parallel processing can be advantageous.
[0339] The computer readable medium can include any entity or apparatus capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium can include appropriate additions or subtractions according to the requirements of patent practice. For example, according to the patent practice in some regions, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0340] It should be noted that, for the foregoing method embodiments, in order to facilitate description, each is described as a combination of a series of acts, but those skilled in the art should know that the embodiments of the present specification are not limited by the order of the acts described, because according to the embodiments of the present specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the acts and modules involved are not necessarily essential to the embodiments of the present specification.
[0341] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0342] The preferred embodiments of the present specification disclosed above are only used to help explain the present specification. The alternative embodiments do not describe all the details and limit the invention to the specific embodiments described. Obviously, according to the content of the embodiments of the present specification, many modifications and changes can be made. The present specification selects and describes these embodiments in order to better explain the principles and practical applications of the embodiments of the present specification, so that those skilled in the art can well understand and use the present specification. The present specification is limited only by the claims and their full scope and equivalents.
Claims
1. A target detection method, comprising: determining a to-be-detected image of a target domain; inputting the to-be-detected image into a target detection model corresponding to the target domain to obtain a target object image corresponding to the to-be-detected 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, the target domain labeled samples being obtained by screening 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, wherein the target domain labeled samples are obtained by screening 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, comprising: determining each target domain initial sample in the target domain training data set as a first target domain initial sample in turn, calculating a distribution probability density and a classification probability of the first target domain initial sample according to the preset sample selection strategy, and determining the first target domain initial sample as a target domain labeled sample in a case that the first target domain initial sample meets a first preset condition according to the distribution probability density or meets a second preset condition according to the classification probability.
2. The method of claim 1, before the inputting the to-be-detected image into the target detection model corresponding to the target domain, further comprising: determining a first model loss value according to source domain labeled samples in a source domain training data set and first labels corresponding to the source domain labeled samples; determining target domain initial samples according to a target domain training data set; obtaining target domain labeled samples by screening 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; determining a second model loss value and a third model loss value according to the source domain labeled samples, the target domain initial samples, and the target domain labeled samples; adjusting 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 meeting a training stop condition is obtained.
3. The method of claim 1, wherein the calculating the distribution probability density and the classification probability of the first target domain initial sample according to the preset sample selection strategy comprises: calculating a first distribution probability density of the first target domain initial sample in a target domain distribution and a second distribution probability density of the first target domain initial sample in a source domain distribution according to the preset sample selection strategy; calculating a first classification probability of a sample feature corresponding to the first target domain initial sample according to the first distribution probability density; predicting a second classification probability of the sample feature corresponding to the first target domain initial sample according to the target detection model.
4. The method of claim 3, before the calculating the first distribution probability density of the first target domain initial sample in the target domain distribution and the second distribution probability density of the first target domain initial sample in the source domain distribution according to the preset sample selection strategy, further comprising: determine a prediction result corresponding to the target domain initial sample; construct 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 first distribution probability density of the first target domain initial sample in the target domain distribution and the second distribution probability density of the first target domain initial sample in the source domain distribution are calculated according to the preset sample selection strategy, comprising: According to the Gaussian model, the first distribution probability density of the first target domain initial sample in the target domain distribution and the second distribution probability density of the first target domain initial sample in the source domain distribution are calculated; The first classification probability of the sample feature corresponding to the first target domain initial sample is calculated according to the first distribution probability density and using the Gaussian model.
5. The method of claim 3, wherein the target domain labeled sample comprises a representative target domain labeled sample and an uncertain target domain labeled sample; Accordingly, in the case that the first target domain initial sample is determined as a target domain labeled sample according to the distribution probability density that the first target domain initial sample meets the first preset condition or according to the classification probability that the first target domain initial sample meets the second preset condition, the method further comprises: According to the first distribution probability density and the second distribution probability density, a distribution probability density difference value is calculated; In the case that the distribution probability density difference value meets a preset difference threshold, the first target domain initial sample is determined as a representative target domain labeled sample; or According to the first classification probability and the second classification probability, a classification probability entropy value is calculated; In the case that the classification probability entropy value meets a preset entropy threshold, the first target domain initial sample is determined as an uncertain target domain labeled sample.
6. The method of claim 5, wherein the target domain labeled sample comprises a plurality of representative target domain labeled samples and a plurality of uncertain target domain labeled samples; Accordingly, after the first target domain initial sample is determined as a representative target domain labeled sample, the method further comprises: 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 sample and the uncertain target domain labeled sample; After the first target domain initial sample is determined as an uncertain target domain labeled sample, the method further comprises: According to the similarity between each uncertain target domain labeled sample, the plurality of 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. 7. The method of claim 1, after determining the first target domain initial sample as a target domain labeled sample, further comprising: determining a second label corresponding to the target domain labeled sample; training a target detection model according to the target domain labeled sample and the second label until a target detection model satisfying a training stop condition is obtained.
8. The method of claim 2, 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: determining each sample in the source domain labeled sample, the target domain initial sample and the target domain labeled sample as a transfer training sample in turn; performing segmentation processing on the transfer training sample to obtain at least two segmentation images, wherein the at least two segmentation images have an overlapping region therebetween; inputting the at least two segmentation images into a target detection model, wherein the at least two segmentation images are processed by a feature extraction network and a mapping network in the target detection model to obtain at least two feature images; processing the at least two segmentation images by a feature extraction network and a region extraction network in the target detection model to obtain at least two predicted foreground features corresponding to the overlapping region; calculating a second model loss value according to the at least two feature images and a third model loss value according to the at least two predicted foreground features.
9. The method of claim 8, wherein calculating a second model loss value according to the at least two feature images comprises: determining a first position in a first feature image, wherein the first feature image is any one of the at least two feature images; determining a second position corresponding to the first position in a second feature image according to the overlapping region, wherein the second feature image is any one of the at least two feature images other than the first feature image; calculating a second model loss value according to the first position and the second position.
10. The method of claim 9, wherein calculating a second model loss value according to the at least two feature images further comprises: determining a third position in the second feature image according to the overlapping region, wherein the third position is any position in the second feature image other than the overlapping region; calculating a second model loss value according to the first position and the third position.
11. A target detection method applied to a cloud-side device, comprising: receiving an image processing request sent by an end-side device, wherein the image processing request carries a to-be-detected image of a target domain; inputting the to-be-detected image into a target detection model corresponding to the target domain to obtain a target object image corresponding to the to-be-detected 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, the target domain labeled samples being obtained by screening 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, wherein the target domain labeled samples are obtained by screening the target domain initial samples according to the preset sample selection strategy, the target domain training data set, and the source domain training data set, including: sequentially determining each target domain initial sample in the target domain training data set as a first target domain initial sample, calculating a distribution probability density and a classification probability of the first target domain initial sample according to the preset sample selection strategy, and determining the first target domain initial sample as a target domain labeled sample in a case that the first target domain initial sample meets a first preset condition according to the distribution probability density or meets a second preset condition according to the classification probability; sending the target object image to the terminal-side device.
12. A lesion detection method applied to a cloud-side device, comprising: receiving an image processing request sent by a terminal-side device, wherein the image processing request carries a medical image scan image of a target domain; 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 data set, target domain initial samples in a target domain training data set, and target domain labeled samples, the target domain labeled samples being obtained by screening 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, wherein the target domain labeled samples are obtained by screening the target domain initial samples according to the preset sample selection strategy, the target domain training data set, and the source domain training data set, including: sequentially determining each target domain initial sample in the target domain training data set as a first target domain initial sample, calculating a distribution probability density and a classification probability of the first target domain initial sample according to the preset sample selection strategy, and determining the first target domain initial sample as a target domain labeled sample in a case that the first target domain initial sample meets a first preset condition according to the distribution probability density or meets a second preset condition according to the classification probability; sending the lesion image to the terminal-side device.
13. A target detection model training method applied to a cloud-side device, comprising: determining a first model loss value according to source domain labeled samples in a source domain training data set and first labels corresponding to the source domain labeled samples; determining target domain initial samples according to a target domain training data set; According to the preset sample selection strategy, the target domain training data set and the source domain training data set, a target domain labeled sample is screened from the target domain initial sample, wherein the target domain labeled sample is screened from the target domain initial sample according to the preset sample selection strategy, the target domain training data set and the source domain training data set, and comprises the following steps: each target domain initial sample in the target domain training data set is sequentially determined as a first target domain initial sample, the distribution probability density and the classification probability of the first target domain initial sample are calculated according to the preset sample selection strategy, and the first target domain initial sample is determined as a target domain labeled sample when the first target domain initial sample meets a first preset condition according to the distribution probability density or meets a second preset condition according to the classification probability; According to the source domain labeled sample, the target domain initial sample and the target domain labeled sample, a second model loss value and a third model loss value are determined; According to the first model loss value, the second model loss value and the third model loss value, the target detection model is adjusted until a target detection model meeting a training stop condition is obtained.
Citation Information
Patent Citations
Target detection method for reducing annotation requirements based on active learning
CN112149721A
Model training method and device for risk prediction
CN115393030A