Pulmonary nodule detection model construction optimization method, equipment, storage medium and product

Through federated learning, the federal lung nodule detection model is constructed and the local model is iteratively optimized. The problem of low accuracy in the identification of difficult samples in the prior art is solved, and higher detection accuracy is achieved.

CN113793298BActive Publication Date: 2025-05-13CLUSTAR TECH LO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110937349.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-16
Publication Date
2025-05-13
Estimated Expiration
2041-08-16

AI Technical Summary

Technical Problem

The existing lung nodule detection model has low accuracy when identifying difficult samples, resulting in the image areas that are suspected of lung nodules but are actually not lung nodules being misidentified as lesion areas.

Method used

By obtaining the difficult lung nodule sample set in the local training sample set, using federated learning and the second device for modeling, a federated lung nodule detection model is constructed, and iteratively optimized the local lung nodule detection model to be trained to obtain the target lung nodule detection model.

Benefits of technology

The recognition accuracy of the lung nodule detection model on difficult samples was improved, and the problem of poor recognition of difficult samples in the prior art was overcome, and the detection accuracy was improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113793298B_ABST
    Figure CN113793298B_ABST
Patent Text Reader

Abstract

The present application discloses a lung nodule detection model construction optimization method, device, storage medium and product, the lung nodule detection model construction optimization method comprising: obtaining a difficult lung nodule sample set in a local training sample set, and based on the difficult lung nodule sample set, constructing a federated lung nodule detection model by performing federated learning modeling with a second device; based on the federated lung nodule detection model and the local training sample set, iteratively optimizing the local lung nodule detection model to be trained to obtain a target lung nodule detection model. The present application solves the technical problem of low detection accuracy of the lung nodule detection model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, storage medium and product for building an optimization model for lung nodule detection. Background Art

[0002] With the continuous development of computer technology, the application of artificial intelligence is becoming more and more extensive. For example, in the field of lung nodule detection, the lung nodule detection model obtained by learning from a large data set can automatically segment the chest area and quickly and accurately locate the lesions of suspected lung nodules. At present, the lung nodule detection model is usually constructed locally based on local lung nodule image data. However, the lung nodule detection model often identifies image areas that are suspected to be lung nodules but are not actually lung nodules as lesion areas. In other words, the lung nodule detection model has poor recognition effect on difficult samples in lung nodule images. Therefore, the detection accuracy of existing lung nodule detection models needs to be improved. Summary of the invention

[0003] The main purpose of this application is to provide a lung nodule detection model construction optimization method, equipment, storage medium and product, aiming to solve the technical problem of low detection accuracy of lung nodule detection models in the prior art.

[0004] To achieve the above-mentioned purpose, the present application provides a method for optimizing the construction of a pulmonary nodule detection model, which is applied to a first device and includes:

[0005] Obtain a difficult lung nodule sample set from a local training sample set, and build a federated lung nodule detection model based on the difficult lung nodule sample set by performing federated learning modeling with a second device;

[0006] Based on the federal pulmonary nodule detection model and the local training sample set, the local pulmonary nodule detection model to be trained is iteratively optimized to obtain a target pulmonary nodule detection model.

[0007] Optionally, the step of iteratively optimizing the local pulmonary nodule detection model based on the federal pulmonary nodule detection model and the local training sample set to obtain a target pulmonary nodule detection model includes:

[0008] Based on the local training sample set, iteratively train and optimize the local pulmonary nodule detection model to be trained to obtain a local pulmonary nodule detection model;

[0009] Aggregating the federated pulmonary nodule detection model and the local pulmonary nodule detection model based on the first initial model weight and the second initial model weight to obtain an aggregated pulmonary nodule detection model;

[0010] Based on the local training sample set, the aggregated pulmonary nodule detection model is optimized through iterative training to obtain the target pulmonary nodule detection model.

[0011] Optionally, the step of iteratively training and optimizing the aggregated pulmonary nodule detection model based on the local training sample set to obtain the target pulmonary nodule detection model includes:

[0012] Extracting local training samples and training sample labels corresponding to the local training samples from the local training sample set;

[0013] Based on the aggregated pulmonary nodule detection model, performing model prediction on the local training samples to obtain an aggregated model prediction result;

[0014] Calculating the aggregation model loss based on the aggregation model prediction result and the training sample label;

[0015] Based on the aggregation model loss, the aggregation weight corresponding to the aggregated pulmonary nodule detection model is optimized to obtain the target pulmonary nodule detection model.

[0016] Optionally, the step of iteratively optimizing the local pulmonary nodule detection model based on the federated pulmonary nodule detection model and the local training sample set to obtain a target pulmonary nodule detection model includes:

[0017] Selecting non-difficult example training samples and difficult example training samples from the local training sample set;

[0018] Calculate the first model prediction loss of the non-difficult example training sample on the local pulmonary nodule detection model to be trained;

[0019] Calculating a second model prediction loss of the difficult training sample on the local pulmonary nodule detection model to be trained, and calculating a total model distillation loss of the difficult training sample between the local pulmonary nodule detection model to be trained and the federal pulmonary nodule detection model;

[0020] Based on the first model prediction loss, the second model prediction loss and the model distillation total loss, the local pulmonary nodule detection model to be trained is iteratively optimized to obtain the target pulmonary nodule detection model.

[0021] Optionally, the step of calculating the total model distillation loss of the difficult training sample between the local pulmonary nodule detection model to be trained and the federal pulmonary nodule detection model comprises:

[0022] Obtaining a first intermediate sample feature generated by a feature extractor in the local pulmonary nodule model to be trained performing feature extraction on the difficult training sample, and obtaining a first difficult model prediction result generated by the local pulmonary nodule model to be trained performing model prediction on the difficult training sample;

[0023] Obtaining a second intermediate sample feature generated by a feature extractor in the federated pulmonary nodule detection model performing feature extraction on the difficult training sample, and obtaining a second difficult model prediction result generated by the federated pulmonary nodule detection model performing model prediction on the difficult training sample;

[0024] Calculating a first model distillation loss based on the difference between the first intermediate sample feature and the second intermediate sample feature;

[0025] Calculating a second model distillation loss based on a difference between a prediction result of the first hard example model and a prediction result of the second hard example model;

[0026] The first model distillation loss and the second model distillation loss are aggregated to obtain the model distillation total loss.

[0027] Optionally, the step of iteratively optimizing the local pulmonary nodule detection model to be trained based on the first model prediction loss, the second model prediction loss and the model distillation total loss to obtain the target pulmonary nodule detection model includes:

[0028] Performing a weighted combination of the first model prediction loss, the second model prediction loss, and the model distillation total loss to obtain a model total loss;

[0029] Determining whether the total loss of the model converges, and if the total loss of the model converges, using the local pulmonary nodule detection model to be trained as the target pulmonary nodule detection model;

[0030] If the total loss of the model has not converged, the local pulmonary nodule detection model to be trained is updated based on the total loss of the model, and the execution step is returned to: non-difficult example training samples and difficult example training samples are selected from the local training sample set.

[0031] Optionally, the model distillation total loss includes the contrastive learning total loss,

[0032] The step of calculating the total model distillation loss of the difficult training sample between the local pulmonary nodule detection model to be trained and the federal pulmonary nodule detection model comprises:

[0033] Acquire a first intermediate sample feature generated by extracting features from at least one of the difficult training samples by a feature extractor in the local pulmonary nodule model to be trained, and a second intermediate sample feature generated by extracting features from at least one of the difficult training samples by a feature extractor in the federated pulmonary nodule detection model;

[0034] The contrastive learning total loss is constructed based on each of the first intermediate sample features and each of the second intermediate sample features.

[0035] Optionally, the target lung nodule detection model includes a target detection model and a classification model.

[0036] After the step of iteratively optimizing the local pulmonary nodule detection model to be trained based on the federated pulmonary nodule detection model and the local training sample set to obtain a target pulmonary nodule detection model, the pulmonary nodule detection model construction optimization method further includes:

[0037] Acquire a lung nodule image to be predicted corresponding to the target to be detected, and perform target detection on the lung nodule image to be predicted based on the target detection model to obtain a target detection result;

[0038] The target detection result is classified by the classification model, and lung nodule detection is performed on the target to be detected to obtain a lung nodule detection result.

[0039] The present application also provides a lung nodule detection model construction optimization device, the lung nodule detection model construction optimization device is a virtual device, and the lung nodule detection model construction optimization device is applied to a first device, and the lung nodule detection model construction optimization device includes:

[0040] A federated learning modeling module is used to obtain a difficult lung nodule sample set in a local training sample set, and build a federated lung nodule detection model by performing federated learning modeling with a second device based on the difficult lung nodule sample set;

[0041] The iterative optimization module is used to iteratively optimize the local pulmonary nodule detection model to be trained based on the federal pulmonary nodule detection model and the local training sample set to obtain a target pulmonary nodule detection model.

[0042] Optionally, the iterative optimization module is further used to:

[0043] Based on the local training sample set, iteratively train and optimize the local pulmonary nodule detection model to be trained to obtain a local pulmonary nodule detection model;

[0044] Aggregating the federated pulmonary nodule detection model and the local pulmonary nodule detection model based on the first initial model weight and the second initial model weight to obtain an aggregated pulmonary nodule detection model;

[0045] Based on the local training sample set, the aggregated pulmonary nodule detection model is optimized through iterative training to obtain the target pulmonary nodule detection model.

[0046] Optionally, the iterative optimization module is further used to:

[0047] Extracting local training samples and training sample labels corresponding to the local training samples from the local training sample set;

[0048] Based on the aggregated pulmonary nodule detection model, performing model prediction on the local training samples to obtain an aggregated model prediction result;

[0049] Calculating the aggregation model loss based on the aggregation model prediction result and the training sample label;

[0050] Based on the aggregation model loss, the aggregation weight corresponding to the aggregated pulmonary nodule detection model is optimized to obtain the target pulmonary nodule detection model.

[0051] Optionally, the iterative optimization module is further used to:

[0052] Selecting non-difficult example training samples and difficult example training samples from the local training sample set;

[0053] Calculate the first model prediction loss of the non-difficult example training sample on the local pulmonary nodule detection model to be trained;

[0054] Calculating a second model prediction loss of the difficult training sample on the local pulmonary nodule detection model to be trained, and calculating a total model distillation loss of the difficult training sample between the local pulmonary nodule detection model to be trained and the federal pulmonary nodule detection model;

[0055] Based on the first model prediction loss, the second model prediction loss and the model distillation total loss, the local pulmonary nodule detection model to be trained is iteratively optimized to obtain the target pulmonary nodule detection model.

[0056] Optionally, the iterative optimization module is further used to:

[0057] Obtaining a first intermediate sample feature generated by a feature extractor in the local pulmonary nodule model to be trained performing feature extraction on the difficult training sample, and obtaining a first difficult model prediction result generated by the local pulmonary nodule model to be trained performing model prediction on the difficult training sample;

[0058] Obtaining a second intermediate sample feature generated by a feature extractor in the federated pulmonary nodule detection model performing feature extraction on the difficult training sample, and obtaining a second difficult model prediction result generated by the federated pulmonary nodule detection model performing model prediction on the difficult training sample;

[0059] Calculating a first model distillation loss based on the difference between the first intermediate sample feature and the second intermediate sample feature;

[0060] Calculating a second model distillation loss based on a difference between a prediction result of the first hard example model and a prediction result of the second hard example model;

[0061] The first model distillation loss and the second model distillation loss are aggregated to obtain the model distillation total loss.

[0062] Optionally, the iterative optimization module is further used to:

[0063] Performing a weighted combination of the first model prediction loss, the second model prediction loss, and the model distillation total loss to obtain a model total loss;

[0064] Determining whether the total loss of the model converges, and if the total loss of the model converges, using the local pulmonary nodule detection model to be trained as the target pulmonary nodule detection model;

[0065] If the total loss of the model has not converged, the local pulmonary nodule detection model to be trained is updated based on the total loss of the model, and the execution step is returned to: non-difficult example training samples and difficult example training samples are selected from the local training sample set.

[0066] Optionally, the total model distillation loss includes a total contrastive learning loss, and the iterative optimization module is further used to:

[0067] Acquire a first intermediate sample feature generated by extracting features from at least one of the difficult training samples by a feature extractor in the local pulmonary nodule model to be trained, and a second intermediate sample feature generated by extracting features from at least one of the difficult training samples by a feature extractor in the federated pulmonary nodule detection model;

[0068] The contrastive learning total loss is constructed based on each of the first intermediate sample features and each of the second intermediate sample features.

[0069] Optionally, the pulmonary nodule detection model construction and optimization device is further used for:

[0070] Acquire a lung nodule image to be predicted corresponding to the target to be detected, and perform target detection on the lung nodule image to be predicted based on the target detection model to obtain a target detection result;

[0071] The target detection result is classified by the classification model, and lung nodule detection is performed on the target to be detected to obtain a lung nodule detection result.

[0072] The present application also provides a lung nodule detection model construction optimization device, which is a physical device, and includes: a memory, a processor, and a program of the lung nodule detection model construction optimization method stored in the memory and executable on the processor. When the program of the lung nodule detection model construction optimization method is executed by the processor, the steps of the lung nodule detection model construction optimization method as described above can be implemented.

[0073] The present application also provides a readable storage medium, on which is stored a program for implementing a method for optimizing the construction of a lung nodule detection model. When the program for the method for optimizing the construction of a lung nodule detection model is executed by a processor, the steps of the method for optimizing the construction of a lung nodule detection model as described above are implemented.

[0074] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned lung nodule detection model construction optimization method.

[0075] The present application provides a lung nodule detection model construction optimization method, device, storage medium and product. Compared with the technical means adopted in the prior art to locally construct a lung nodule detection model based on local lung nodule image data, the present application first obtains a difficult lung nodule sample set in a local training sample set, and based on the difficult lung nodule sample set, constructs a federated lung nodule detection model by performing federated learning modeling with a second device, thereby achieving the purpose of constructing a federated lung nodule detection model for accurately identifying difficult samples based on federated learning, and then iteratively optimizes the local lung nodule detection model to be trained based on the federated lung nodule detection model and the local training sample set, so that the local lung nodule detection model to be trained can learn the model knowledge of the federated lung nodule detection model for accurately identifying difficult lung nodule samples, thereby enabling the obtained target lung nodule detection model to have the ability to accurately identify difficult lung nodule samples, thereby overcoming the technical defect in the prior art that the lung nodule detection model often identifies image areas that are suspected to be lung nodules but are not actually lung nodules as lesion areas, thereby improving the detection accuracy of the lung nodule detection model. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0077] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0078] Figure 1 A schematic diagram of the process of the first embodiment of the lung nodule detection model construction optimization method of the present application;

[0079] Figure 2 A schematic diagram of the flow chart of the second embodiment of the lung nodule detection model construction optimization method of the present application;

[0080] Figure 3Schematic diagram of the device structure of the hardware operating environment involved in the lung nodule detection model construction optimization method in the embodiment of the present application.

[0081] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0082] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0083] The present application embodiment provides a method for optimizing the construction of a lung nodule detection model. In the first embodiment of the method for optimizing the construction of a lung nodule detection model of the present application, refer to Figure 1 , the pulmonary nodule detection model construction optimization method includes:

[0084] Step S10, obtaining a difficult lung nodule sample set in the local training sample set, and building a federated lung nodule detection model by performing federated learning modeling with a second device based on the difficult lung nodule sample set;

[0085] In the present embodiment, it should be noted that the lung nodule detection model construction optimization method is applied to horizontal federated learning, the first device and the second device are both participants in horizontal federated learning, the local training sample set includes a difficult lung nodule sample set and a non-difficult lung nodule sample set, wherein the difficult sample set includes at least one difficult lung nodule sample, and the difficult lung nodule sample has a lung nodule with a similar appearance to a lung nodule, wherein the detection accuracy of the lung nodule detection model on the difficult sample set is lower than the preset first detection accuracy, and the detection accuracy of the lung nodule detection model on the non-difficult sample set is higher than the preset second detection accuracy, and the preset second detection accuracy is greater than the preset first detection accuracy.

[0086] A difficult lung nodule sample set is obtained from a local training sample set, and based on the difficult lung nodule sample set, a federated lung nodule detection model is constructed by performing federated learning modeling with a second device. Specifically, a difficult lung nodule sample set is obtained from a local training sample set, and based on the difficult lung nodule sample set, a federated lung nodule detection model to be trained is locally iteratively trained, and then when the federated lung nodule detection model to be trained is iteratively trained to a preset number of iterations, local model parameters of the federated lung nodule detection model to be trained after iterative training are obtained, and the local model parameters are sent to a federal server so that the federal server aggregates the local model parameters from each second device and the first device to obtain the aggregated model parameters, and sends the aggregated model parameters to the first device and the first device. Each second device feeds back the aggregate model parameters respectively, and then the first device receives the aggregate model parameters, and replaces and updates the model parameters of the federated pulmonary nodule detection model to be trained based on the aggregate model parameters, and determines whether the replaced and updated federal pulmonary nodule detection model to be trained meets the preset federal training end condition. If the replaced and updated federal pulmonary nodule detection model to be trained meets the preset federal training end condition, the replaced and updated federal pulmonary nodule detection model to be trained is used as the federal pulmonary nodule detection model. If the replaced and updated federal pulmonary nodule detection model to be trained does not meet the preset federal training end condition, return to the execution step: based on the difficult pulmonary nodule sample set, locally iteratively train the federal pulmonary nodule detection model to be trained.

[0087] Furthermore, it should be noted that in the embodiment of the present application, when the first device and each second device perform horizontal federated learning, the first device only provides a difficult lung nodule sample set. For different participants, due to differences in the accuracy of lung nodule image shooting devices, the difficult lung nodule samples corresponding to the first device may not be difficult lung nodule samples in the second device. Therefore, the first device performs federated learning with each second device and constructs a federated lung nodule detection model with the lung nodule samples in each second device. This can improve the detection accuracy of the lung nodule detection model in the difficult lung nodule sample set, so that the federated lung nodule detection model can accurately detect difficult lung nodule samples, and at the same time, there is no need to perform federated learning with each second device based on all the lung nodule samples locally in the first device, so that the federated lung nodule detection model to be trained can converge on the difficult lung nodule sample set faster, thereby reducing the communication time and model iteration times between the participants in the process of constructing the federated lung nodule detection model based on federated learning, thereby improving the efficiency of constructing federated lung nodule detection.

[0088] Step S20, based on the federal pulmonary nodule detection model and the local training sample set, iteratively optimize the local pulmonary nodule detection model to be trained to obtain a target pulmonary nodule detection model.

[0089] In this embodiment, based on the federated pulmonary nodule detection model and the local training sample set, the local pulmonary nodule detection model to be trained is iteratively optimized to obtain a target pulmonary nodule detection model. Specifically, based on the federated pulmonary nodule detection model and the local training sample set, the local pulmonary nodule detection model to be trained is iteratively optimized to prompt the local pulmonary nodule detection model to be trained to learn the model knowledge of the federated pulmonary nodule detection model to obtain the target pulmonary nodule detection model, thereby enabling the target pulmonary nodule detection model to have the accurate detection capability of the federated pulmonary nodule detection model for difficult pulmonary nodule samples, wherein the model knowledge includes the knowledge of generating intermediate features and prediction results of the federated pulmonary nodule detection model, which can be represented by the distribution of model parameters of the federated pulmonary nodule detection model, and the process of the local pulmonary nodule detection model to be trained learning the model knowledge of the federated pulmonary nodule detection model can be regarded as the process of the local pulmonary nodule detection model to be trained learning the distribution of model parameters of the federated pulmonary nodule detection model.

[0090] The intermediate features are output by the feature extractor of the federated pulmonary nodule detection model, and the prediction results are output by the output layer of the federated pulmonary nodule detection model.

[0091] The step of iteratively optimizing the local pulmonary nodule detection model based on the federated pulmonary nodule detection model and the local training sample set to obtain the target pulmonary nodule detection model includes:

[0092] Step S21, based on the local training sample set, iteratively train and optimize the local pulmonary nodule detection model to be trained to obtain a local pulmonary nodule detection model;

[0093] In this embodiment, based on the local training sample set, the local pulmonary nodule detection model to be trained is iteratively trained and optimized to obtain a local pulmonary nodule detection model. Specifically, local training samples are selected from the local training sample set, and then based on the local pulmonary nodule detection model to be trained, model prediction is performed on the local training samples to obtain a training local model prediction result, and then based on the training local model prediction result and the training sample label corresponding to the local training sample, the training local model loss is calculated, and then it is determined whether the training local model loss converges. If the training local model loss converges, the local pulmonary nodule detection model to be trained is used as the local pulmonary nodule detection model. If the training local model loss does not converge, the local pulmonary nodule detection model to be trained is updated by a preset model updating method based on the gradient calculated by the training local model loss, and the execution step is returned to: selecting a local training sample from the local training sample set, wherein the preset model updating method includes a gradient descent method and a gradient ascent method, etc.

[0094] Step S22, aggregating the federated pulmonary nodule detection model and the local pulmonary nodule detection model based on the first initial model weight and the second initial model weight to obtain an aggregated pulmonary nodule detection model;

[0095] In this embodiment, the federated pulmonary nodule detection model and the local pulmonary nodule detection model are aggregated based on the first initial model weight and the second initial model weight to obtain an aggregated pulmonary nodule detection model. Specifically, the federated pulmonary nodule detection model weighted by the first initial model weight and the local pulmonary nodule detection model weighted by the second initial model weight are aggregated to obtain an aggregated pulmonary nodule detection model.

[0096] Step S23, based on the local training sample set, iteratively train and optimize the aggregated pulmonary nodule detection model to obtain the target pulmonary nodule detection model.

[0097] In this embodiment, based on the local training sample set, iterative training is performed to optimize the aggregated lung nodule detection model to obtain the target lung nodule detection model. Specifically, based on the local training sample set, the aggregated lung nodule detection model is iteratively trained until the aggregated lung nodule detection model meets the preset iterative training end conditions, and the aggregated lung nodule detection model is used as the target lung nodule detection model, wherein the preset iterative training end conditions include an iteration maximum iteration number threshold and model loss, etc.

[0098] The step of iteratively training and optimizing the aggregated pulmonary nodule detection model based on the local training sample set to obtain the target pulmonary nodule detection model includes:

[0099] Step S231, extracting local training samples and training sample labels corresponding to the local training samples from the local training sample set;

[0100] Step S232, based on the aggregated pulmonary nodule detection model, performing model prediction on the local training samples to obtain an aggregated model prediction result;

[0101] In this embodiment, it should be noted that the local training samples may be local training lung nodule images, and the aggregated lung nodule detection model includes an aggregated target detection model and an aggregated classification model.

[0102] Based on the aggregated lung nodule detection model, model prediction is performed on the local training samples to obtain the aggregated model prediction results. Specifically, based on the aggregated target detection model, target detection is performed on the local training lung nodule image to select candidate lung nodule regions in the local training lung nodule image, and then based on the aggregated classification model, each of the candidate lung nodule regions is classified separately to determine whether the candidate lung nodule region is a real lung nodule region, and the classification results corresponding to each of the candidate lung nodule regions are obtained, and then each of the classification results is collectively used as the aggregated model prediction result.

[0103] Step S233, calculating the aggregation model loss based on the aggregation model prediction result and the training sample label;

[0104] In this embodiment, based on the prediction result of the aggregation model and the training sample label, the aggregation model loss is calculated. Specifically, the difference between the prediction result of the aggregation model and the training sample label is calculated to obtain the aggregation model loss.

[0105] In another embodiment, based on the prediction result of the aggregation model and the training sample label, the aggregation model loss is calculated by using an L2 loss function.

[0106] Step S234, based on the aggregation model loss, optimizing the aggregation weight corresponding to the aggregated pulmonary nodule detection model to obtain the target pulmonary nodule detection model.

[0107] In this embodiment, it should be noted that the aggregation weight includes the first initial model weight and the second initial model weight.

[0108] Based on the aggregation model loss, the aggregation weights corresponding to the aggregated lung nodule detection model are optimized to obtain the target lung nodule detection model. Specifically, it is determined whether the aggregation model loss converges. If the aggregation model loss converges, the aggregated lung nodule detection model is used as the target lung nodule detection model. If the aggregation model loss does not converge, based on the aggregation model loss, the first initial model weights and the corresponding second initial model weights corresponding to the aggregated lung nodule detection model are updated, and the execution step is returned to: extracting local training samples and training sample labels corresponding to the local training samples from the local training sample set.

[0109] Wherein, the target lung nodule detection model includes a target detection model and a classification model.

[0110] After the step of iteratively optimizing the local pulmonary nodule detection model to be trained based on the federated pulmonary nodule detection model and the local training sample set to obtain a target pulmonary nodule detection model, the pulmonary nodule detection model construction optimization method further includes:

[0111] Step A10, obtaining a lung nodule image to be predicted corresponding to the target to be detected, and performing target detection on the lung nodule image to be predicted based on the target detection model to obtain a target detection result;

[0112] In this embodiment, an image of a lung nodule to be predicted corresponding to the target to be detected is obtained, and target detection is performed on the image of the lung nodule to be predicted based on the target detection model to obtain a target detection result. Specifically, an image of a lung nodule to be predicted taken for the target to be detected is obtained, and then target detection is performed on the image of the lung nodule to be predicted based on the target detection model to select a candidate area image of the lung nodule in the image of the lung nodule to be detected, and the candidate area image of the lung nodule is used as the target detection result.

[0113] Step A20, classifying the target detection result by using the classification model, performing lung nodule detection on the target to be detected, and obtaining a lung nodule detection result.

[0114] In this embodiment, the target detection result is classified by the classification model, and lung nodule detection is performed on the target to be detected to obtain a lung nodule detection result. Specifically, based on the classification model, the lung nodule candidate area image is binary classified to obtain a binary classification result, and then based on the binary classification result, it is judged whether the target to be detected has lung nodules to obtain a lung nodule detection result. Among them, since the target lung nodule detection model also has a high detection accuracy for difficult lung nodule samples, the target detection accuracy of the target detection model for difficult lung nodule samples and the classification accuracy of the classification model for difficult lung nodule samples are respectively improved, thereby improving the accuracy of lung nodule detection.

[0115] The embodiment of the present application provides a method for optimizing the construction of a lung nodule detection model. Compared with the technical means adopted in the prior art for locally constructing a lung nodule detection model based on local lung nodule image data, the embodiment of the present application first obtains a difficult lung nodule sample set in a local training sample set, and based on the difficult lung nodule sample set, constructs a federated lung nodule detection model by performing federated learning modeling with a second device, thereby achieving the purpose of constructing a federated lung nodule detection model for accurately identifying difficult samples based on federated learning, and then iteratively optimizes the local lung nodule detection model to be trained based on the federated lung nodule detection model and the local training sample set, so that the local lung nodule detection model to be trained can learn the model knowledge of the federated lung nodule detection model for accurately identifying difficult lung nodule samples, thereby enabling the obtained target lung nodule detection model to have the ability to accurately identify difficult lung nodule samples, thereby overcoming the technical defect in the prior art that the lung nodule detection model often identifies image areas that are suspected to be lung nodules but are not actually lung nodules as lesion areas, thereby improving the detection accuracy of the lung nodule detection model.

[0116] Further, refer to Figure 2 Based on the first embodiment of the present application, in another embodiment of the present application, the step of iteratively optimizing the local pulmonary nodule detection model based on the federal pulmonary nodule detection model and the local training sample set to obtain the target pulmonary nodule detection model includes:

[0117] Step B10, selecting non-difficult example training samples and difficult example training samples from the local training sample set;

[0118] In this embodiment, it should be noted that the local training sample set consists of a hard training sample set and a non-hard training sample set, the hard training sample set includes at least one hard training sample, and the non-hard training sample set includes at least one non-hard training sample.

[0119] Step B20, calculating the first model prediction loss of the non-difficult example training sample on the local pulmonary nodule detection model to be trained;

[0120] In this embodiment, the first model prediction loss of the non-difficult training sample on the local lung nodule detection model to be trained is calculated. Specifically, based on the local lung nodule detection model to be trained, lung nodule detection is performed on the non-difficult training sample to obtain a first training lung nodule detection result, and then based on the difference between the non-difficult training sample label corresponding to the non-difficult training sample and the first training lung nodule detection result, the first model prediction loss is calculated.

[0121] Step B30, calculating the second model prediction loss of the difficult training sample on the local pulmonary nodule detection model to be trained, and calculating the total model distillation loss of the difficult training sample between the local pulmonary nodule detection model to be trained and the federated pulmonary nodule detection model;

[0122] In this embodiment, the second model prediction loss of the difficult training sample on the local pulmonary nodule detection model to be trained is calculated, and the total model distillation loss of the difficult training sample between the local pulmonary nodule detection model to be trained and the federated pulmonary nodule detection model is calculated. Specifically, based on the feature extractor in the local pulmonary nodule detection model to be trained, feature extraction is performed on the difficult training sample to obtain a first intermediate sample feature, and then based on the classifier in the local pulmonary nodule detection model to be trained, the first intermediate sample feature is fully connected to obtain a first fully connected layer output, and then the first fully connected layer output is converted into a first difficult model prediction result through a preset activation function, and then based on the first difficult model prediction result, The second model prediction loss is calculated based on the difference between the difficult training sample labels corresponding to the difficult training samples. Furthermore, based on the feature extractor in the federated pulmonary nodule detection model, feature extraction is performed on the difficult training samples to obtain second intermediate sample features. Then, based on the classifier in the federated pulmonary nodule detection model, the second intermediate sample features are fully connected to obtain a second fully connected layer output. Then, the second fully connected layer output is converted into a second difficult model prediction result through a preset activation function. Then, based on the difference between the first intermediate sample features and the second intermediate sample features, and the difference between the first difficult model prediction result and the second difficult model prediction result, the total model distillation loss is calculated.

[0123] The step of calculating the total model distillation loss of the difficult training sample between the local pulmonary nodule detection model to be trained and the federal pulmonary nodule detection model comprises:

[0124] Step B31, obtaining a first intermediate sample feature generated by a feature extractor in the local pulmonary nodule model to be trained performing feature extraction on the difficult training sample, and obtaining a first difficult model prediction result generated by the local pulmonary nodule model to be trained performing model prediction on the difficult training sample;

[0125] In this embodiment, a first intermediate sample feature is generated by the feature extractor in the local lung nodule model to be trained performing feature extraction on the difficult training sample, and a first difficult model prediction result is generated by the local lung nodule model to be trained performing model prediction on the difficult training sample. Specifically, based on the feature extractor in the local lung nodule model to be trained, feature extraction is performed on the difficult training sample to obtain the first intermediate sample feature, and then based on the classifier in the local lung nodule model to be trained, the first intermediate sample feature is fully connected to obtain a first fully connected layer output, and then based on a preset activation function, the first fully connected layer output is converted into a first difficult model prediction result.

[0126] Step B32, obtaining a second intermediate sample feature generated by the feature extractor in the federated pulmonary nodule detection model performing feature extraction on the difficult training sample, and obtaining a second difficult model prediction result generated by the federated pulmonary nodule detection model performing model prediction on the difficult training sample;

[0127] In this embodiment, a second intermediate sample feature is generated by the feature extractor in the federated pulmonary nodule detection model performing feature extraction on the difficult training sample, and a second difficult model prediction result is generated by the federated pulmonary nodule detection model performing model prediction on the difficult training sample. Specifically, based on the feature extractor in the federated pulmonary nodule detection model, feature extraction is performed on the difficult training sample to obtain the second intermediate sample feature, and then based on the classifier in the federated pulmonary nodule detection model, the second intermediate sample feature is fully connected to obtain a second fully connected layer output, and then based on a preset activation function, the second fully connected layer output is converted into a second difficult model prediction result.

[0128] Step B33, calculating a first model distillation loss based on the difference between the first intermediate sample feature and the second intermediate sample feature;

[0129] In this embodiment, it should be noted that the loss function for calculating the distillation loss of the first model includes at least one of a contrastive learning loss function and a cross entropy loss function.

[0130] Step B34, calculating the second model distillation loss based on the difference between the prediction result of the first hard example model and the prediction result of the second hard example model;

[0131] In this embodiment, it should be noted that the loss function for calculating the distillation loss of the second model includes at least one of a contrastive learning loss function and a cross entropy loss function.

[0132] Step B35, aggregating the first model distillation loss and the second model distillation loss to obtain the total model distillation loss.

[0133] In this embodiment, the first model distillation loss and the second model distillation loss are aggregated to obtain the model distillation total loss. Specifically, the first model distillation loss and the second model distillation loss are weighted summed to obtain the model distillation total loss.

[0134] The total loss of the model distillation includes the total loss of contrastive learning.

[0135] The step of calculating the total model distillation loss of the difficult training sample between the local pulmonary nodule detection model to be trained and the federal pulmonary nodule detection model comprises:

[0136] Step C10, obtaining a first intermediate sample feature generated by extracting features from at least one of the difficult training samples by a feature extractor in the local pulmonary nodule model to be trained, and a second intermediate sample feature generated by extracting features from at least one of the difficult training samples by a feature extractor in the federated pulmonary nodule detection model;

[0137] In this embodiment, it should be noted that the number of the difficult training samples is at least 1.

[0138] Obtain a first intermediate sample feature generated by performing feature extraction on at least one of the difficult training samples by the feature extractor in the local lung nodule model to be trained, and obtain a second intermediate sample feature generated by performing feature extraction on at least one of the difficult training samples by the feature extractor in the federated lung nodule detection model. Specifically, based on the feature extractor in the local lung nodule model to be trained, perform feature extraction on each of the difficult training samples to obtain each first intermediate sample feature, and based on the feature extractor in the federated lung nodule detection model, perform feature extraction on each of the difficult training samples to obtain each second intermediate sample feature.

[0139] Step C20: constructing the contrastive learning total loss based on each of the first intermediate sample features and each of the second intermediate sample features.

[0140] In this embodiment, specifically, a positive sample feature and at least one negative sample feature corresponding to each first intermediate sample feature are determined in each of the second intermediate sample features, and then the following steps are performed for each of the first intermediate sample features:

[0141] Based on the difference between the first intermediate sample feature and the corresponding positive sample feature, and the difference between the first intermediate sample feature and at least one corresponding negative sample feature, the contrast loss corresponding to the first intermediate sample feature is calculated. Furthermore, the contrast losses corresponding to each first intermediate sample feature are summed to obtain the total contrast learning loss.

[0142] The step of determining, in each of the second intermediate sample features, a positive sample feature and at least one negative sample feature corresponding to each first intermediate sample feature comprises:

[0143] Obtain a sample ID corresponding to the first intermediate sample feature, and then use the second intermediate sample feature corresponding to the sample ID as the positive sample feature corresponding to the first intermediate sample feature, and use each second intermediate sample feature except the positive sample feature as the negative sample feature corresponding to the first intermediate sample feature.

[0144] The specific formula for calculating the contrast loss is as follows:

[0145]

[0146] Among them, L N is the contrast loss, f(x) T is the first intermediate sample feature, f(x + ) is the positive sample feature corresponding to the first intermediate sample feature, is the jth negative sample feature corresponding to the first intermediate sample feature, and N-1 is the number of negative sample features.

[0147] Step B40, based on the first model prediction loss, the second model prediction loss and the model distillation total loss, iteratively optimize the local pulmonary nodule detection model to be trained to obtain the target pulmonary nodule detection model.

[0148] In this embodiment, based on the first model prediction loss, the second model prediction loss and the model distillation total loss, the local lung nodule detection model to be trained is iteratively optimized to obtain the target lung nodule detection model. Specifically, the total model loss corresponding to the first model prediction loss, the second model prediction loss and the model distillation total loss is calculated, and then based on the model total loss, the local lung nodule detection model to be trained is iteratively optimized to obtain the target lung nodule detection model.

[0149] The step of iteratively optimizing the local pulmonary nodule detection model to be trained based on the first model prediction loss, the second model prediction loss and the model distillation total loss to obtain the target pulmonary nodule detection model includes:

[0150] Step B41, performing a weighted combination of the first model prediction loss, the second model prediction loss and the model distillation total loss to obtain a model total loss;

[0151] In this embodiment, specifically, a weighted sum is performed on the first model prediction loss, the second model prediction loss, and the model distillation total loss to obtain the model total loss.

[0152] Step B42, determining whether the total loss of the model converges, if the total loss of the model converges, using the local pulmonary nodule detection model to be trained as the target pulmonary nodule detection model;

[0153] Step B43, if the total loss of the model has not converged, then based on the total loss of the model, update the local lung nodule detection model to be trained, and return to the execution step: select non-difficult example training samples and difficult example training samples in the local training sample set.

[0154] In this embodiment, it is determined whether the total loss of the model converges. If the total loss of the model converges, it proves that the local lung nodule model to be trained has converged, and then the local lung nodule detection model to be trained is directly used as the target lung nodule detection model. If the total loss of the model converges, it proves that the local lung nodule model to be trained has not converged, and then based on the gradient calculated by the total loss of the model, the model parameters of the local lung nodule detection model to be trained are updated by a preset model updating method to perform the next round of iteration, and return to the execution step: select non-difficult example training samples and difficult example training samples from the local training sample set.

[0155] In addition, it should be noted that although the lung nodule detection model obtained by directly performing federated learning modeling with the second device based on the local training sample set can converge on the local training sample set, when the local training sample set is of a large magnitude, the lung nodule detection model locally iteratively trained by the first device has low recognition accuracy only on the difficult sample set, but still has a high recognition accuracy in the non-difficult sample set. Moreover, since federated learning modeling requires data to be calculated in an encrypted state, the communication resources and computing resources required are much higher than those of local modeling. If federated learning modeling is performed directly based on a local training sample set of a larger magnitude, the required communication resources and computing resources are too high. The embodiment of the present application only performs federated learning modeling based on a difficult sample set of a smaller magnitude to obtain a federated lung nodule detection model, thereby reducing the communication resources and computing resources required for model construction in the federated learning stage, and at the same time, using the model distillation method to encourage the local lung nodule detection model to be trained to learn the federated lung nodule detection model. Model knowledge, so that the target lung nodule detection model obtained by iterative training optimization has the ability to accurately detect difficult lung nodule samples consistent with the federal lung nodule detection model, and because the model distillation process is performed locally on the first device, there is no need to interact with the second device, that is, there is no need to communicate with the outside, thereby saving communication resources, and the local model construction process can be directly performed in plain text, and the required computing resources are far less than the computing resources required for federated learning modeling, thereby saving computing resources. Therefore, the lung nodule detection model construction method in the embodiment of the present application, compared with the method of directly obtaining a lung nodule detection model based on the local training sample set and performing federated learning modeling with the second device, the target lung nodule detection model constructed in the embodiment of the present application can save the communication resources and computing resources of the device while ensuring the detection accuracy, and when the proportion of difficult samples in the local training sample set is low, the effect of saving the communication resources and computing resources of the device will be better.

[0156] An embodiment of the present application provides a method for constructing a pulmonary nodule detection model based on model distillation, that is, non-difficult training samples and difficult training samples are selected from the local training sample set, and then the first model prediction loss of the non-difficult training samples on the local pulmonary nodule detection model to be trained is calculated, and then the second model prediction loss of the difficult training samples on the local pulmonary nodule detection model to be trained is calculated, and the total model distillation loss of the difficult training samples between the local pulmonary nodule detection model to be trained and the federal pulmonary nodule detection model is calculated, and then based on the first model prediction loss, the second model prediction loss and the total model distillation loss, the local pulmonary nodule detection model to be trained is iteratively optimized to obtain the target pulmonary nodule detection model, thereby realizing a model distillation-based method, in the process of iteratively training the local pulmonary nodule detection model to be trained, prompting the local pulmonary nodule detection model to be trained to learn the model knowledge of the federal pulmonary nodule detection model, so that the target pulmonary nodule detection model obtained by iterative training optimization has the ability to accurately detect difficult pulmonary nodule samples consistent with the federal pulmonary nodule detection model, thereby improving the detection accuracy of the pulmonary nodule detection model.

[0157] Reference Figure 3 , Figure 3 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0158] like Figure 3 As shown, the lung nodule detection model construction optimization device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005. The memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.

[0159] Optionally, the lung nodule detection model construction optimization device may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, etc. The rectangular user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0160] Those skilled in the art will understand that Figure 3The structure of the lung nodule detection model construction optimization device shown in the figure does not constitute a limitation of the lung nodule detection model construction optimization device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0161] like Figure 3 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, and a lung nodule detection model construction optimization program. The operating system is a program that manages and controls the hardware and software resources of the lung nodule detection model construction optimization device, and supports the operation of the lung nodule detection model construction optimization program and other software and / or programs. The network communication module is used to realize the communication between the components inside the memory 1005, and to communicate with other hardware and software in the lung nodule detection model construction optimization system.

[0162] exist Figure 3 In the lung nodule detection model construction optimization device shown, the processor 1001 is used to execute the lung nodule detection model construction optimization program stored in the memory 1005 to implement the steps of any of the above-mentioned lung nodule detection model construction optimization methods.

[0163] The specific implementation methods and beneficial effects of the lung nodule detection model construction optimization device of the present application are basically the same as those of the above-mentioned lung nodule detection model construction optimization method embodiments, and will not be repeated here.

[0164] The embodiment of the present application also provides a lung nodule detection model construction optimization device, which is applied to a lung nodule detection model construction optimization device, and the lung nodule detection model construction optimization device includes:

[0165] A federated learning modeling module is used to obtain a difficult lung nodule sample set in a local training sample set, and build a federated lung nodule detection model by performing federated learning modeling with a second device based on the difficult lung nodule sample set;

[0166] The iterative optimization module is used to iteratively optimize the local pulmonary nodule detection model to be trained based on the federal pulmonary nodule detection model and the local training sample set to obtain a target pulmonary nodule detection model.

[0167] Optionally, the iterative optimization module is further used to:

[0168] Based on the local training sample set, iteratively train and optimize the local pulmonary nodule detection model to be trained to obtain a local pulmonary nodule detection model;

[0169] Aggregating the federated pulmonary nodule detection model and the local pulmonary nodule detection model based on the first initial model weight and the second initial model weight to obtain an aggregated pulmonary nodule detection model;

[0170] Based on the local training sample set, the aggregated pulmonary nodule detection model is optimized through iterative training to obtain the target pulmonary nodule detection model.

[0171] Optionally, the iterative optimization module is further used to:

[0172] Extracting local training samples and training sample labels corresponding to the local training samples from the local training sample set;

[0173] Based on the aggregated pulmonary nodule detection model, performing model prediction on the local training samples to obtain an aggregated model prediction result;

[0174] Calculating the aggregation model loss based on the aggregation model prediction result and the training sample label;

[0175] Based on the aggregation model loss, the aggregation weight corresponding to the aggregated pulmonary nodule detection model is optimized to obtain the target pulmonary nodule detection model.

[0176] Optionally, the iterative optimization module is further used to:

[0177] Selecting non-difficult example training samples and difficult example training samples from the local training sample set;

[0178] Calculate the first model prediction loss of the non-difficult example training sample on the local pulmonary nodule detection model to be trained;

[0179] Calculating a second model prediction loss of the difficult training sample on the local pulmonary nodule detection model to be trained, and calculating a total model distillation loss of the difficult training sample between the local pulmonary nodule detection model to be trained and the federal pulmonary nodule detection model;

[0180] Based on the first model prediction loss, the second model prediction loss and the model distillation total loss, the local pulmonary nodule detection model to be trained is iteratively optimized to obtain the target pulmonary nodule detection model.

[0181] Optionally, the iterative optimization module is further used to:

[0182] Obtaining a first intermediate sample feature generated by a feature extractor in the local pulmonary nodule model to be trained performing feature extraction on the difficult training sample, and obtaining a first difficult model prediction result generated by the local pulmonary nodule model to be trained performing model prediction on the difficult training sample;

[0183] Obtaining a second intermediate sample feature generated by a feature extractor in the federated pulmonary nodule detection model performing feature extraction on the difficult training sample, and obtaining a second difficult model prediction result generated by the federated pulmonary nodule detection model performing model prediction on the difficult training sample;

[0184] Calculating a first model distillation loss based on the difference between the first intermediate sample feature and the second intermediate sample feature;

[0185] Calculating a second model distillation loss based on a difference between a prediction result of the first hard example model and a prediction result of the second hard example model;

[0186] The first model distillation loss and the second model distillation loss are aggregated to obtain the model distillation total loss.

[0187] Optionally, the iterative optimization module is further used to:

[0188] Performing a weighted combination of the first model prediction loss, the second model prediction loss, and the model distillation total loss to obtain a model total loss;

[0189] Determining whether the total loss of the model converges, and if the total loss of the model converges, using the local pulmonary nodule detection model to be trained as the target pulmonary nodule detection model;

[0190] If the total loss of the model has not converged, the local pulmonary nodule detection model to be trained is updated based on the total loss of the model, and the execution step is returned to: non-difficult example training samples and difficult example training samples are selected from the local training sample set.

[0191] Optionally, the total model distillation loss includes a total contrastive learning loss, and the iterative optimization module is further used to:

[0192] Acquire a first intermediate sample feature generated by extracting features from at least one of the difficult training samples by a feature extractor in the local pulmonary nodule model to be trained, and a second intermediate sample feature generated by extracting features from at least one of the difficult training samples by a feature extractor in the federated pulmonary nodule detection model;

[0193] The contrastive learning total loss is constructed based on each of the first intermediate sample features and each of the second intermediate sample features.

[0194] Optionally, the pulmonary nodule detection model construction and optimization device is further used for:

[0195] Acquire a lung nodule image to be predicted corresponding to the target to be detected, and perform target detection on the lung nodule image to be predicted based on the target detection model to obtain a target detection result;

[0196] The target detection result is classified by the classification model, and lung nodule detection is performed on the target to be detected to obtain a lung nodule detection result.

[0197] The specific implementation methods and beneficial effects of the lung nodule detection model construction optimization device of the present application are basically the same as the above-mentioned embodiments of the lung nodule detection model construction optimization method, and will not be repeated here.

[0198] An embodiment of the present application provides a readable storage medium, and the readable storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of any of the above-mentioned methods for building an optimization model for lung nodule detection.

[0199] The specific implementation methods and beneficial effects of the readable storage medium of the present application are basically the same as those of the above-mentioned embodiments of the lung nodule detection model construction optimization method, and will not be repeated here.

[0200] An embodiment of the present application provides a computer program product, and the computer program product includes one or more computer programs, and the one or more computer programs can also be executed by one or more processors to implement the steps of any of the above-mentioned methods for optimizing the construction of a lung nodule detection model.

[0201] The specific implementation methods and beneficial effects of the computer program product of the present application are basically the same as those of the above-mentioned embodiments of the lung nodule detection model construction optimization method, and will not be repeated here.

[0202] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. A method for optimizing the construction of a pulmonary nodule detection model, characterized in that: Using the first device, the pulmonary nodule detection model construction optimization method includes: Obtain a difficult lung nodule sample set from a local training sample set, and build a federated lung nodule detection model based on the difficult lung nodule sample set by performing federated learning modeling with a second device; Based on the federal pulmonary nodule detection model and the local training sample set, iteratively optimize the local pulmonary nodule detection model to be trained to obtain a target pulmonary nodule detection model; The step of iteratively optimizing the local pulmonary nodule detection model to be trained based on the federal pulmonary nodule detection model and the local training sample set to obtain the target pulmonary nodule detection model comprises: Based on the local training sample set, iteratively train and optimize the local pulmonary nodule detection model to be trained to obtain a local pulmonary nodule detection model; Aggregating the federated pulmonary nodule detection model and the local pulmonary nodule detection model based on the first initial model weight and the second initial model weight to obtain an aggregated pulmonary nodule detection model; Based on the local training sample set, the aggregated pulmonary nodule detection model is optimized through iterative training to obtain the target pulmonary nodule detection model.

2. The method for optimizing the lung nodule detection model according to claim 1, characterized in that: The step of iteratively training and optimizing the aggregated pulmonary nodule detection model based on the local training sample set to obtain the target pulmonary nodule detection model comprises: Extracting local training samples and training sample labels corresponding to the local training samples from the local training sample set; Based on the aggregated pulmonary nodule detection model, performing model prediction on the local training samples to obtain an aggregated model prediction result; Calculating the aggregation model loss based on the aggregation model prediction result and the training sample label; Based on the aggregation model loss, the aggregation weight corresponding to the aggregated pulmonary nodule detection model is optimized to obtain the target pulmonary nodule detection model.

3. The method for constructing and optimizing a pulmonary nodule detection model according to claim 1, characterized in that: The step of iteratively optimizing the local pulmonary nodule detection model based on the federal pulmonary nodule detection model and the local training sample set to obtain a target pulmonary nodule detection model comprises: Selecting non-difficult example training samples and difficult example training samples from the local training sample set; Calculate the first model prediction loss of the non-difficult example training sample on the local pulmonary nodule detection model to be trained; Calculating a second model prediction loss of the difficult training sample on the local pulmonary nodule detection model to be trained, and calculating a total model distillation loss of the difficult training sample between the local pulmonary nodule detection model to be trained and the federal pulmonary nodule detection model; Based on the first model prediction loss, the second model prediction loss and the model distillation total loss, the local pulmonary nodule detection model to be trained is iteratively optimized to obtain the target pulmonary nodule detection model.

4. The method for optimizing the lung nodule detection model as claimed in claim 3, characterized in that: The step of calculating the total model distillation loss of the difficult training sample between the local pulmonary nodule detection model to be trained and the federal pulmonary nodule detection model comprises: Obtaining a first intermediate sample feature generated by a feature extractor in the local pulmonary nodule detection model to be trained performing feature extraction on the difficult training sample, and obtaining a first difficult model prediction result generated by the local pulmonary nodule detection model to be trained performing model prediction on the difficult training sample; Obtaining a second intermediate sample feature generated by a feature extractor in the federated pulmonary nodule detection model performing feature extraction on the difficult training sample, and obtaining a second difficult model prediction result generated by the federated pulmonary nodule detection model performing model prediction on the difficult training sample; Calculating a first model distillation loss based on the difference between the first intermediate sample feature and the second intermediate sample feature; Calculating a second model distillation loss based on a difference between a prediction result of the first hard example model and a prediction result of the second hard example model; The first model distillation loss and the second model distillation loss are aggregated to obtain the model distillation total loss.

5. The method for constructing and optimizing a lung nodule detection model according to claim 3, characterized in that: The step of iteratively optimizing the local pulmonary nodule detection model to be trained based on the first model prediction loss, the second model prediction loss and the model distillation total loss to obtain the target pulmonary nodule detection model comprises: Performing a weighted combination of the first model prediction loss, the second model prediction loss, and the model distillation total loss to obtain a model total loss; Determining whether the total loss of the model converges, and if the total loss of the model converges, using the local pulmonary nodule detection model to be trained as the target pulmonary nodule detection model; If the total loss of the model has not converged, the local pulmonary nodule detection model to be trained is updated based on the total loss of the model, and the execution step is returned to: non-difficult example training samples and difficult example training samples are selected from the local training sample set.

6. The method for constructing and optimizing a lung nodule detection model according to claim 3, characterized in that: The total loss of the model distillation includes the total loss of contrastive learning, The step of calculating the total model distillation loss of the difficult training sample between the local pulmonary nodule detection model to be trained and the federal pulmonary nodule detection model comprises: Acquire a first intermediate sample feature generated by extracting features from at least one of the difficult training samples by a feature extractor in the local pulmonary nodule detection model to be trained, and a second intermediate sample feature generated by extracting features from at least one of the difficult training samples by a feature extractor in the federated pulmonary nodule detection model; The contrastive learning total loss is constructed based on each of the first intermediate sample features and each of the second intermediate sample features.

7. The method for constructing and optimizing a pulmonary nodule detection model according to claim 1, wherein: The target lung nodule detection model includes a target detection model and a classification model. After the step of iteratively optimizing the local pulmonary nodule detection model to be trained based on the federated pulmonary nodule detection model and the local training sample set to obtain a target pulmonary nodule detection model, the pulmonary nodule detection model construction optimization method further includes: Acquire a lung nodule image to be predicted corresponding to the target to be detected, and perform target detection on the lung nodule image to be predicted based on the target detection model to obtain a target detection result; The target detection result is classified by the classification model, and lung nodule detection is performed on the target to be detected to obtain a lung nodule detection result.

8. A lung nodule detection model construction optimization device, characterized in that: The pulmonary nodule detection model construction optimization device includes: a memory, a processor, and a program stored in the memory for implementing the pulmonary nodule detection model construction optimization method. The memory is used to store a program for implementing a method for optimizing the construction of a lung nodule detection model; The processor is used to execute a program for implementing the pulmonary nodule detection model construction optimization method to implement the steps of the pulmonary nodule detection model construction optimization method as described in any one of claims 1 to 7.

9. A storage medium, the storage medium being a readable storage medium, characterized in that: The readable storage medium stores a program for implementing a method for optimizing the construction of a lung nodule detection model, and the program for implementing a method for optimizing the construction of a lung nodule detection model is executed by a processor to implement the steps of the method for optimizing the construction of a lung nodule detection model as described in any one of claims 1 to 7.

10. A product, the product being a computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for building an optimization model for pulmonary nodule detection as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Federal learning-based distributed language relationship identification method, system and device

    CN112101578A

  • Medical auxiliary diagnosis method and device based on federated learning, equipment and storage medium

    CN112201342A