Image detection model training method, lung image processing method and device

By using partial annotation frames and image enhancement processing technology, combining pseudo annotation frames and original annotation frames for training the image detection model, the problem of time-consuming and costly labeling in the existing technology is solved, and efficient image detection model training is achieved and accurate detection of effects.

CN118898567APending Publication Date: 2024-11-05BEIJING JINGDONG CENTURY TRADING CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310485970.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

In the prior art, the labeling quality of the target object directly affects the training effect of the image detection model, resulting in the labeling taking a long time and costly, and requires multiple professionals to make all labels.

Method used

By using only partial annotation boxes for training the image detection model, image enhancement processing is used to generate a multi-sample image set with the same annotation box, model training is performed in combination with pseudo annotation box and the original annotation box, and network weights are updated cyclically until preset convergence is met. condition.

Benefits of technology

It reduces the labeling cost, improves the robustness and accuracy of model training, and achieves an image detection effect comparable to the complete labeling method without all labeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118898567A_ABST
    Figure CN118898567A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an image detection model training method, a lung image processing method and a lung image processing device. The method comprises the following steps: performing image enhancement processing on a first sample image set to obtain a second sample image set and a third sample image set; training the image detection model based on the second sample image set and the corresponding original annotation box to obtain a current first image detection model and a current second image detection model; determining a current pseudo annotation box based on the current first image detection model, and performing current training based on the third sample image set, the current pseudo annotation box and the original annotation box; and updating the current first image detection model based on the current second image detection model of which the current training is finished, and carrying out next training based on the updated current first image detection model until a preset convergence condition is met, thereby finishing the training of the current second image detection model. According to the invention, model training is carried out by using part of the annotation box, and the model training effect is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The disclosed embodiments relate to the fields of artificial intelligence technology and medical health technology, and in particular to a training method for an image detection model, and a lung image processing method and device. Background Art

[0002] With the rapid development of computer technology, deep learning-based image detection models can be used to identify and detect target objects in images. For example, by processing lung images using deep learning-based image detection models, target objects in lung images can be detected.

[0003] At present, it is usually necessary to first mark all target objects in each sample image in the sample image set to obtain all the annotation boxes of the target objects, and then train the image detection model based on the sample image set and all the corresponding annotation boxes to ensure the accuracy of the model detection.

[0004] However, in the process of implementing the present disclosure, the inventors found that there are at least the following problems in the prior art:

[0005] Since the labeling quality of the target object directly affects the model training effect, multiple experienced professionals are required to label all the target objects, which results in a long labeling time and high manual labeling cost. Summary of the invention

[0006] The embodiments of the present disclosure provide a method for training an image detection model, a method and device for processing lung images, which can train the image detection model using only part of the annotation box and ensure the training effect of the image detection model without the need for full annotation, thereby reducing the annotation cost.

[0007] In a first aspect, an embodiment of the present disclosure provides a method for training an image detection model, comprising:

[0008] Acquire a first sample image set and an original annotation box corresponding to the first sample image set;

[0009] Performing image enhancement processing on the first sample image set to obtain a second sample image set and a third sample image set having the same annotation frame;

[0010] Based on the second sample image set and the original annotation box corresponding to the second sample image set, the image detection model is trained to obtain a current first image detection model and a current second image detection model having the same network weights;

[0011] Based on the current first image detection model, determine the current pseudo-annotation box corresponding to the second sample image set, and based on the third sample image set, the current pseudo-annotation box corresponding to the second sample image set and the original annotated box, perform current training on the current second image detection model;

[0012] Based on the current second image detection model that has completed training, the network weights of the current first image detection model are updated, and the current second image detection model is trained next time based on the updated current first image detection model, until the preset convergence conditions are met, and the training of the current second image detection model is completed.

[0013] In a second aspect, the present disclosure also provides a lung image processing method, including:

[0014] Acquire a target lung image to be processed;

[0015] Inputting the target lung image into a target image detection model to detect the target object, wherein the target image detection model is a current second image detection model trained by the image detection model training method provided by any embodiment of the present disclosure;

[0016] Based on the output of the target image detection model, a target object detection result in the target lung image is obtained.

[0017] In a third aspect, the present disclosure also provides a training device for an image detection model, including:

[0018] A first sample image set acquisition module, used to acquire a first sample image set and an original annotation frame corresponding to the first sample image set;

[0019] An image enhancement processing module, used for performing image enhancement processing on the first sample image set to obtain a second sample image set and a third sample image set having the same annotation frame;

[0020] An image detection model training module, used to train the image detection model based on the second sample image set and the original annotation box corresponding to the second sample image set, to obtain a current first image detection model and a current second image detection model with the same network weights;

[0021] a current second image detection model training module, used to determine a current pseudo-annotation box corresponding to the second sample image set based on the current first image detection model, and to perform current training on the current second image detection model based on the third sample image set, the current pseudo-annotation box corresponding to the second sample image set, and the original annotated box;

[0022] The network weight updating module is used to update the network weights of the current first image detection model based on the current second image detection model that has completed the current training, and to perform the next training on the current second image detection model based on the updated current first image detection model until the preset convergence conditions are met to complete the training of the current second image detection model.

[0023] In a fourth aspect, the present disclosure also provides a lung image processing device, including:

[0024] A target lung image acquisition module, used for acquiring a target lung image to be processed;

[0025] A target lung image input module, used for inputting the target lung image into a target image detection model to detect the target object, wherein the target image detection model is a current second image detection model trained by the image detection model training method provided by any embodiment of the present disclosure;

[0026] A detection result determination module is used to obtain a target object detection result in the target lung image based on the output of the target image detection model.

[0027] In a fifth aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0028] one or more processors;

[0029] A memory for storing one or more programs;

[0030] When the one or more programs are executed by the one or more processors, the one or more processors implement the training method of the image detection model provided in any embodiment of the present disclosure.

[0031] In a sixth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a training method for an image detection model as provided in any embodiment of the present disclosure.

[0032] One embodiment of the above invention has the following advantages or beneficial effects:

[0033] By only annotating the original annotation frame of part of the first sample image set and performing image enhancement processing on the first sample image set, a second sample image set and a third sample image set with the same annotation frame are obtained, so that the second sample image set and the third sample image set with different image information but the same annotation frame can be used for model training, which can reduce overfitting and improve the robustness of model training. Based on the second sample image set and the original annotation frame corresponding to the second sample image set, the image detection model is trained, and the model network weights after the training are used as the initial network weights in the current first image detection model and the current second image detection model. Based on the current first image detection model, the current pseudo-annotation frame corresponding to the second sample image set is determined, and based on the current pseudo-annotation frame and the original annotation frame corresponding to the third sample image set and the second sample image set, the current second image detection model is trained, so that the current pseudo-annotation frame and the original annotation frame are used as all the annotations of the third sample image set, and the current second image detection model is accurately trained. Based on the current second image detection model that has completed the training, the network weights of the current first image detection model are updated, and the current second image detection model is trained next time based on the updated current first image detection model, so that the current second image detection model is trained multiple times by cyclically updating the current first image detection model and the current pseudo-annotation box until the preset convergence condition is met, and the training of the current second image detection model is completed, thereby realizing the training of the image detection model using only part of the annotation box, and ensuring the training effect of the image detection model, and no need for full annotation, reducing the annotation cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present disclosure 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, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0035] Figure 1 is a flow chart of a method for training an image detection model provided by an embodiment of the present disclosure;

[0036] Figure 2 This is an example of a training process of an image detection model involved in an embodiment of the present disclosure;

[0037] Figure 3 This is an example of a process for determining a current pseudo-annotation box involved in an embodiment of the present disclosure;

[0038] Figure 4is a flowchart of another method for training an image detection model provided by an embodiment of the present disclosure;

[0039] Figure 5 is a flow chart of a lung image processing method provided by an embodiment of the present disclosure;

[0040] Figure 6 It is a structural schematic diagram of a training device for an image detection model provided by an embodiment of the present disclosure;

[0041] Figure 7 is a schematic structural diagram of a lung image processing device provided by an embodiment of the present disclosure;

[0042] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0043] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present disclosure, rather than to limit the present disclosure. It should also be noted that, for ease of description, only parts related to the present disclosure are shown in the accompanying drawings, rather than all structures.

[0044] It should be noted that in the technical solution of the present disclosure, the collection / collection, update, analysis, use, transmission, storage and other aspects of user personal information involved (such as the collection and use of human lung images, etc.) are in compliance with the provisions of relevant laws and regulations, and are used for legal and reasonable purposes, and are not shared, leaked or sold outside of these legal uses, and are subject to supervision and management by national regulatory authorities. Necessary measures should be taken for user personal information to selectively block the use or access to personal information data to prevent illegal access to such personal information data, ensure that persons who have access to personal information data comply with the provisions of relevant laws and regulations, and ensure the security of user personal information. In addition, once these user personal information data are no longer needed, the risks should be minimized by restricting or even prohibiting data collection and / or deleting data.

[0045] Figure 1 A flowchart of a method for training an image detection model provided by an embodiment of the present disclosure. This embodiment can be applied to training an image detection model using a partial annotation box, and is particularly applicable to training an image detection model using a set of lung images that lack a partial annotation box, so as to detect lung nodules in lung images using the trained image detection model. The method can be executed by a training device for an image detection model, which can be implemented by software and / or hardware and integrated into an electronic device. Figure 1 As shown, the method specifically comprises the following steps:

[0046] S110: Acquire a first sample image set and an original annotation box corresponding to the first sample image set.

[0047] Among them, the first sample image set may be a set consisting of multiple sample images. The annotation box may be used to mark the position of the target object in the image. The target object may be any object that needs to be detected and is pre-set based on business needs. For example, when processing lung images, the target object may refer to a lung nodule. A lung nodule refers to a focal circular dense shadow of various sizes, with clear or blurred edges and a diameter of less than or equal to 3 cm on a lung image. There may be one or more target objects in each sample image, so that each sample image may correspond to one or more annotation boxes. The original annotation box may refer to the annotation box that has been marked in the first sample image set. The original annotation box obtained is only a part of all the annotation boxes corresponding to all target objects in the first sample image set. In other words, the original annotation box obtained is a partial annotation box corresponding to some sample images in the first sample image set.

[0048] Specifically, the original sample image set can be directly used as the first sample image set, or the sample images in the original sample image set can be preprocessed, such as normalization, binarization, etc., and the preprocessed original sample image set can be used as the first sample image set to reduce detection noise and improve the accuracy of image detection. For the first sample image set, professionals can be allowed to mark only the original annotation boxes corresponding to the target objects with certainty, without marking the annotation boxes of all target objects, thereby reducing the difficulty of annotation and improving the efficiency of annotation.

[0049] Exemplarily, the original annotation box corresponding to the first sample image set is obtained by marking the target object in the first sample image set based on a sparse marking method.

[0050] Specifically, the entire first sample image set can be marked in advance using a sparse marking method to obtain a sparse original annotation box. For example, each sample image in the first sample image set may have three situations: all target objects are marked, all target objects are not marked, or only part of the target objects are marked. When the marking is very sparse, such as when the sparse marking rate is 90%, the sample images in the first sample image set are all unmarked or only part of the target objects are marked. For example, if the first sample image set includes 100 sample images, only the annotation boxes that are most likely to be the target objects in 50 sample images can be marked, and the other sample images are not marked, thereby obtaining a sparse original annotation box.

[0051] It should be noted that if the lung image is processed, the first sample image set obtained is the lung sample image set, so that the model can be trained based on the lung sample image set and part of the original annotation box to obtain a model for detecting target objects in the lung image.

[0052] S120: Perform image enhancement processing on the first sample image set to obtain a second sample image set and a third sample image set having the same annotation box.

[0053] The sample images in the second sample image set and the sample images in the third sample image set are in one-to-one correspondence, and the positions of the target objects in the two corresponding sample images are the same, so that the two corresponding sample images have the same annotation box. The second sample image set and the third sample image set are two different sample image sets, but have the same annotation box.

[0054] Specifically, see Figure 2 In the image enhancement stage, two image enhancement methods that will not change the position of the target object, such as pixel value transformation, can be used to directly perform image enhancement processing on each sample image in the first sample image set to obtain the second sample image set and the third sample image set with the same annotation box. In this case, the original annotation box corresponding to the first sample image set can be directly used as the original annotation box corresponding to the second sample image set and the original annotation box corresponding to the third sample image.

[0055] For example, based on the first pixel value transformation method, each sample image A in the first sample image set is enhanced by pixel value transformation to obtain a processed sample image A', and all the sample images A' are combined to obtain a second sample image set. Based on the second pixel value transformation method, each sample image A in the first sample image set is enhanced by pixel value transformation to obtain a processed sample image A", and all the sample images A" are combined to obtain a third sample image set. Among them, the pixel value transformation method may be a method of adjusting pixel value parameters such as brightness or saturation. The first pixel value transformation method and the second pixel value transformation method are two different pixel value transformation methods. The sample image A' in the second sample image set and the sample image A" in the third sample image set are obtained by performing pixel value transformation enhancement on the same sample image A, so that the annotation box information corresponding to the sample image A' and the sample image A" is completely consistent.

[0056] S130. Based on the second sample image set and the original annotation box corresponding to the second sample image set, the image detection model is trained to obtain a current first image detection model and a current second image detection model with the same network weights.

[0057] Specifically, the image detection model can be trained based on the sample images with annotations in the second sample image set and the corresponding original annotation boxes. For example, each sample image with annotations in the second sample image set is input into the image detection model to detect the target object, and the prediction box corresponding to the sample image is obtained based on the output of the image detection model. Based on the prediction box and the original annotation box, the prediction loss value corresponding to the sample image is determined, such as using the cross entropy function to determine the classification loss value between the prediction box and the original annotation box, using the mean square error function to determine the regression loss value between the prediction box and the original annotation box, and adding the classification loss value and the regression loss value to obtain the prediction loss value corresponding to the sample image. The prediction loss value is back-propagated to the image detection model, and the network parameters in the image detection model are adjusted until the preset convergence condition is reached, such as when the number of iterations is equal to the preset number, or when the change of the prediction loss value tends to be stable, it is determined that the image detection model training is completed. The image detection model after training can be copied to obtain two completely identical image detection models, namely the current first image detection model and the current second image detection model. By using part of the original annotation box to train the image detection model, the initial network weights in the current first image detection model and the current second image detection model are obtained, so that subsequent training can be continued on this basis. Figure 2 , the image detection model after training is the initial model of the current first image detection model and the current second image detection model in the mutual learning stage.

[0058] It should be noted that, during the mutual learning phase, the current network weights in the current first image detection model and the current network weights in the current second image detection model will change dynamically as the models are trained.

[0059] S140. Based on the current first image detection model, determine the current pseudo-annotation box corresponding to the second sample image set, and train the current second image detection model based on the third sample image set, the current pseudo-annotation box corresponding to the second sample image set, and the original annotation box.

[0060] The current pseudo-annotation frame may be a annotation frame predicted by the current first image detection model. The current pseudo-annotation frame may change dynamically with the update of the network weights of the current first image detection model to ensure the model training effect.

[0061] Specifically, see Figure 2, based on the current first image detection model, the target object can be detected for each sample image in the second sample image set, and the current pseudo-annotation box corresponding to each sample image in the second sample image set can be determined based on the detection result. Since the second sample image set and the third sample image set have the same annotation box, the current pseudo-annotation box and the original annotation box corresponding to the second sample image set can be determined as the current pseudo-annotation box and the original annotation box corresponding to the third sample image set, thereby realizing the expansion of the annotation box. By using the current pseudo-annotation box and the original annotation box as all the annotations of the third sample image set, the current training of the second image detection model can be accurately completed.

[0062] Exemplarily, "based on the third sample image set, the current pseudo-annotation box corresponding to the second sample image set, and the original annotation box, performing current training on the current second image detection model" in S140 may include: determining the current pseudo-annotation box corresponding to the second sample image set as the current pseudo-annotation box corresponding to the third sample image set; inputting the third sample image set into the current second image detection model to detect the target object, and obtaining the target prediction box corresponding to the third sample image data set; determining the target loss value corresponding to the third sample image set based on the current pseudo-annotation box, the original annotation box, and the target prediction box corresponding to the third sample image set; back-propagating the target loss value to the current second image detection model, adjusting the network weights in the current second image detection model, and completing the current training of the current second image detection model.

[0063] Specifically, each sample image in the third sample image set is input into the current second image detection model to detect the target object, and based on the output of the current second image detection model, all target prediction boxes corresponding to each sample image in the third sample image data set are obtained. Based on the current pseudo-annotation box, the original annotation box and the target prediction box, the classification loss value and the regression loss value corresponding to the third sample image set are determined, and the classification loss value and the regression loss value are added to obtain the target loss value corresponding to the third sample image set. The target loss value is back-propagated to the current second image detection model, and the network parameters in the current second image detection model are adjusted, thereby completing the current training of the second image detection model.

[0064] S150. Based on the current second image detection model that has completed training, the network weights of the current first image detection model are updated, and the current second image detection model is trained next time based on the updated current first image detection model, until the preset convergence conditions are met, and the training of the current second image detection model is completed.

[0065] Specifically, the current first network weights in the current first image detection model can be directly updated to the current second network weights in the current second image detection model when the training is completed, and based on the updated current first image detection model, the method of returning to execute step S140 is used to perform the next training on the current second image detection model, thereby achieving mutual learning, until the preset convergence condition is reached, such as when the number of iterations is equal to the preset number of times, or when the target loss value changes tend to be stable, it is determined that the training of the current second image detection model is completed. The current second image detection model after the training is completed can be used as the target image detection model to detect the target object of the image to be detected, thereby ensuring the accuracy of image detection. By utilizing the mutual learning method of the current first image detection model and the current second image detection model, an image detection model with the same accuracy as that trained using a complete annotation method can be obtained without requiring all target objects in each sample image to be labeled, thereby greatly reducing the annotation cost.

[0066] The technical solution of this embodiment is to obtain the second sample image set and the third sample image set with the same annotation frame by only marking the original annotation frame of the first sample image set and performing image enhancement processing on the first sample image set, so as to use the second sample image set and the third sample image set with different image information but the same annotation frame for model training, which can reduce overfitting and improve the robustness of model training. Based on the second sample image set and the original annotation frame corresponding to the second sample image set, the image detection model is trained, and the model network weights after the training are used as the initial network weights in the current first image detection model and the current second image detection model. Based on the current first image detection model, the current pseudo-annotation frame corresponding to the second sample image set is determined, and based on the current pseudo-annotation frame and the original annotation frame corresponding to the third sample image set and the second sample image set, the current second image detection model is trained, so that the current pseudo-annotation frame and the original annotation frame are used as all the annotations of the third sample image set, and the current second image detection model is accurately trained. Based on the current second image detection model that has completed the training, the network weights of the current first image detection model are updated, and the current second image detection model is trained next time based on the updated current first image detection model, so that the current second image detection model is trained multiple times by cyclically updating the current first image detection model and the current pseudo-annotation box until the preset convergence condition is met, and the training of the current second image detection model is completed, thereby realizing the training of the image detection model using only part of the annotation box, and ensuring the training effect of the image detection model, and no need for full annotation, reducing the annotation cost.

[0067] As an optional embodiment, "obtaining a first sample image set" in S110 may include: binarizing each original sample image in the original sample image set to obtain a binary image; determining a first connected area with the largest connected area and a second connected area with the second largest connected area based on a connected area corresponding to each connected area in the binary image; adjusting the pixel value of each connected area in the binary image based on a ratio between the first connected area and the second connected area to obtain an adjusted binary image; and processing the original sample image based on the adjusted binary image to determine the first sample image set.

[0068] Specifically, when the original sample image is a lung image, such as a lung CT (Computed Tomography) image, the original sample image can be preprocessed to remove interference outside the lung lobe area, thereby further improving the model training effect. For example, each original sample image is binarized using a threshold, such as setting a pixel value greater than or equal to the threshold as a first pixel value, such as 1, and setting a pixel value less than the threshold as a second pixel value, such as 0, thereby obtaining a corresponding binary image. All connected regions existing in each binary image can be determined, and the connected areas corresponding to each connected region are compared to obtain a first connected region with the largest connected area and a second connected region with the second largest connected area. The first connected region can be divided by the second connected region to obtain a ratio between the two, and the lung lobe connected region can be identified by detecting whether the ratio is less than or equal to a preset ratio. For example, if the ratio between the first connected region and the second connected region is less than or equal to the preset ratio, it indicates that the first connected region and the second connected region correspond to the left and right lungs, respectively, and the first connected region and the second connected region can be determined as lung lobe connected regions. If the ratio between the first connected area and the second connected area is greater than the preset ratio, it indicates that the first connected area includes both the left and right lungs, and the first connected area can be determined as a lobe connected area. By adjusting the pixel values ​​in the lobe connected area to a first pixel value, such as 1, and adjusting the pixel values ​​in other connected areas except the lobe connected area to a second pixel value, such as 0, a binary image with adjusted pixel values ​​is obtained. For example, the adjusted binary image is an image in which the lobe area is white and other areas are black, so that the lobe position in the image can be located.

[0069] After obtaining the corresponding adjusted binary image for each original sample image, as an implementation method, the pixel values ​​of each original sample image and the corresponding adjusted binary image can be multiplied bit by bit to obtain each sample image in the first sample image set. At this time, each sample image in the first sample image set only retains the original pixel value of the lung lobe area, and the pixel values ​​of other areas are 0, so that the target object can be identified only from the lung lobe area, further ensuring the accuracy of target object identification.

[0070] After obtaining the corresponding adjusted binary image for each original sample image, as another implementation method, the bounding box corresponding to the connected area of ​​the lung lobe in the adjusted binary image can be determined. The bounding box can be a minimum rectangular box containing the connected area of ​​the lung lobe, or a matrix box slightly larger than the minimum rectangular box obtained by dilating the minimum rectangular box with preset pixels. Based on the bounding box, the original sample image can be cropped to obtain a local image corresponding to the bounding box in the original sample image, that is, a lung lobe area image, and the lung lobe area image is used as a sample image in the first sample image set for model training, thereby eliminating interference outside the lung tissue, avoiding processing useless information, and improving image detection speed and accuracy.

[0071] Exemplarily, before the binarization process, each original sample image in the original sample image set may be normalized to the maximum and minimum values ​​so as to unify the data range. For example, when the sample image is a lung CT (Computed Tomography) image, the numerical range of the original sample data may be converted using a preset window width (such as 1500) and a preset window position (such as -500) to obtain the converted original sample image, and the original sample image may be normalized to the maximum and minimum values, thereby unifying the lung image data collected by different CT devices and further improving the model training effect.

[0072] As an optional embodiment, S120 may include: performing spatial transformation enhancement processing on each sample image in the first sample image set to obtain a reference sample image set; performing two different pixel value transformation enhancement processing on each sample image in the reference sample image set to respectively obtain a second sample image set and a third sample image set having the same annotation box.

[0073] Specifically, each sample image A in the first sample image set can be enhanced by spatial transformation, such as rotation, flipping, etc., to obtain a processed sample image A1, and all sample images A1 are combined to obtain a reference sample image set, and then based on the first pixel value transformation method, each sample image A1 in the reference sample image set is enhanced by pixel value transformation to obtain a processed sample image A2, and all sample images A2 are combined to obtain a second sample image set. Based on the second pixel value transformation method, each sample image A1 in the reference sample image set is enhanced by pixel value transformation to obtain a processed sample image A3, and all sample images A3 are combined to obtain a third sample image set. Since the sample images A2 in the second sample image set and the sample images A3 in the third sample image set have the same spatial transformation enhancement method, the annotation box information corresponding to the sample images A2 and A3 is also completely consistent. By utilizing the spatial transformation enhancement processing, the diversity of sample images can be further improved, thereby improving the robustness of model training.

[0074] It should be noted that since the enhanced processing of spatial transformation can change the position of the target object in the sample image, when performing enhanced processing of spatial transformation on the first sample image set, it is also necessary to perform corresponding spatial transformation on the original annotation box corresponding to the first sample image set, so as to obtain the original annotation box corresponding to each sample image in the reference sample image set, and use the original annotation box corresponding to the reference sample image set as the original annotation box corresponding to the second sample image set and the original annotation box corresponding to the third sample image, thereby ensuring the accuracy of model training while ensuring image diversity.

[0075] As an optional embodiment, "determining the current pseudo-annotation box corresponding to the second sample image set based on the current first image detection model" in S140 may include: inputting each sample image in the second sample image set into the current first image detection model to detect the target object, obtaining the current prediction box corresponding to each sample image in the second sample image set and the confidence corresponding to the current prediction box; based on the confidence corresponding to the current prediction box, determining the current pseudo-annotation box corresponding to each sample image in the second sample image set.

[0076] Specifically, each sample image in the second sample image set can be input into the current first image detection model, and the current first image detection model detects the target object for each input sample image, and outputs all the detected current prediction boxes and the confidence corresponding to each current prediction box, so that based on the output of the current first image detection model, all the current prediction boxes corresponding to each sample image in the second sample image set and the confidence corresponding to each current prediction box can be obtained. Each sample image in the second sample image set can be used as the current sample image to determine the current pseudo-annotation box. For example, by comparing the confidence corresponding to each current prediction box in the current sample image with the preset confidence, the current prediction box with a confidence greater than or equal to the preset confidence can be directly determined as the current pseudo-annotation box corresponding to the current sample image, and the current prediction box with a confidence less than the preset confidence can be removed. Alternatively, when the number of current prediction boxes whose confidence is greater than or equal to a preset confidence is greater than a preset number, these current prediction boxes can be sorted based on the confidence to obtain a sequence of current prediction boxes with reduced confidence, and the first preset number of current prediction boxes in the sequence can be determined as current pseudo-annotation boxes corresponding to the current sample image, so that a preset number of current pseudo-annotation boxes can be screened out.

[0077] It should be noted that if there is no current prediction box with a confidence level greater than or equal to the preset confidence level, it indicates that the target object may not exist in the current sample image. At this time, there is no need to add the current pseudo-annotation box to the current sample image, thereby ensuring the training effect of the model.

[0078] Exemplarily, determining the current pseudo-annotation box corresponding to each sample image in the second sample image set based on the confidence corresponding to the current prediction box may include: determining the overlap rate between the current prediction box corresponding to the current sample image and the original annotation box based on the current prediction box and the original annotation box corresponding to the current sample image in the second sample image set; determining the current pseudo-annotation box corresponding to the current sample image based on the current prediction box whose overlap rate is less than or equal to a preset overlap rate and whose confidence is greater than or equal to the preset confidence.

[0079] Specifically, if there is an original annotation frame for the current sample image in the second sample image set, the overlap rate between each current prediction frame and each original annotation frame corresponding to the current sample image can be determined based on the intersection over union (IOU) calculation method. For example, the ratio of the intersection and union between the current prediction frame and the original annotation frame can be determined as the overlap rate. If the overlap rate between a current prediction frame and an original annotation frame is greater than the preset overlap rate, it indicates that the overlapping area between the current prediction frame and the original annotation frame is large, and the current prediction frame can be considered to be an already marked original annotation frame, and the current prediction frame can be removed at this time. If the overlap rate between a current prediction frame and an original annotation frame is less than or equal to the preset overlap rate, it indicates that the current prediction frame is not an already marked original annotation frame, and at this time, it can continue to detect whether the confidence corresponding to the current prediction frame is greater than or equal to the preset confidence, and determine whether the current prediction frame is a current pseudo-annotation frame. For example, the current prediction frame with an overlap rate less than or equal to a preset overlap rate and a confidence level greater than or equal to a preset confidence level can be directly determined as the current pseudo-annotation frame corresponding to the current sample image, and the current prediction frame with an overlap rate less than or equal to a preset overlap rate and a confidence level less than a preset confidence level can be removed. Alternatively, when the number of current prediction frames with an overlap rate less than or equal to a preset overlap rate and a confidence level greater than or equal to a preset confidence level is greater than a preset number, these current prediction frames can be sorted based on the confidence level to obtain a current prediction frame sequence with reduced confidence levels, and the first preset number of current prediction frames in the sequence can be determined as the current pseudo-annotation frame corresponding to the current sample image, thereby screening out a preset number of current pseudo-annotation frames. By using the overlap rate and confidence level for screening at the same time, the effectiveness and accuracy of the screened current pseudo-annotation frames can be further guaranteed, thereby ensuring the model training effect.

[0080] For example, Figure 3 An example of the process of determining the current pseudo-annotation box is given, such as Figure 3 As shown, there is an original annotation box in the current sample image, and there are three current prediction boxes with confidence greater than or equal to the preset confidence (for example, 0.85), namely: the current prediction box with a confidence of 0.99, the current prediction box with a confidence of 0.93, and the current prediction box with a confidence of 0.86. The overlap rate between the current prediction box with a confidence of 0.99 and the original annotation box is greater than the preset overlap rate, so the current prediction box with a confidence of 0.99 can be removed, and the remaining current prediction box with a confidence of 0.93 and the current prediction box with a confidence of 0.86 are determined as the two current pseudo-annotation boxes corresponding to the current sample image.

[0081] It should be noted that if there is no original annotation frame for the current sample image in the second sample image set, the current pseudo annotation frame corresponding to the current sample image can be determined based only on the current prediction frame whose confidence is greater than or equal to the preset confidence.

[0082] As an optional embodiment, "updating the network weights of the current first image detection model based on the current second image detection model at the end of training" in S150 may include: determining the target network weights corresponding to the current first image detection model based on the exponential moving average method, the current first network weights in the current first image detection model, and the current second network weights in the current second image detection model at the end of training; updating the current first network weights in the current first image detection model to the target network weights.

[0083] Specifically, the exponential moving average (EMA) method can be used to update the current first network weight in the current first image detection model, thereby reducing the model's fitting of incorrect labels and further improving the model training effect. For example, the target network weight in the current first image detection model can be determined by the following formula:

[0084] θ t+1 =α*θ t +(1-α)*θ s

[0085] Among them, θ t θ is the current first network weight in the current first image detection model when the current second image detection model is trained for the tth time. s is the current second network weight in the current second image detection model at the end of the tth training. t+1 It refers to the target network weight corresponding to the current first image detection model when the current second image detection model is trained for the t+1th time, that is, the updated current first network weight. α is a hyperparameter used to update the update speed.

[0086] Figure 4 This is a flowchart of another method for training an image detection model provided by an embodiment of the present disclosure. Based on the above embodiments, this embodiment describes in detail the current training process of the second image detection model. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.

[0087] See also Figure 4 Another image detection model training method provided in this embodiment specifically includes the following steps:

[0088] S410: Obtain a first sample image set and an original annotation box corresponding to the first sample image set.

[0089] S420: Perform image enhancement processing on the first sample image set to obtain a second sample image set and a third sample image set having the same annotation box.

[0090] S430: Based on the second sample image set and the original annotation box corresponding to the second sample image set, the image detection model is trained to obtain a current first image detection model and a current second image detection model with the same network weights.

[0091] S440: Determine a current pseudo-annotation frame corresponding to the second sample image set based on the current first image detection model, and determine the current pseudo-annotation frame corresponding to the second sample image set as the current pseudo-annotation frame corresponding to the third sample image set.

[0092] Specifically, since the two corresponding sample images in the second sample image set and the third sample image set are obtained by performing enhancement processing on the basis of the same sample image, the position of the target object will not be changed, so that the current pseudo-annotation box corresponding to each sample image in the second sample image set can be determined as the current pseudo-annotation box corresponding to the corresponding sample image in the third sample image set.

[0093] S450: Input the second sample image set into the current second image detection model to detect the target object, and obtain the first image feature information output by the feature extraction layer in the current second image detection model.

[0094] Among them, the feature extraction layer may refer to a network module in the current second image detection model for extracting image feature information. The current second image detection model may include multiple feature extraction layers to extract deeper features. The feature extraction layer in this embodiment may refer to the deepest feature extraction layer, and accordingly, the first image feature information may refer to the extracted deepest feature information.

[0095] It should be noted that, since the second sample image set and the third sample image set have different input information but the same annotation box, that is, the same output information, the image feature information extracted from the second sample image set and the third sample image set should be consistent, and the deeper the feature information, the more similar it should be, so as to ensure the same output results and reduce the self-training situation. Self-training refers to the model supervising and training itself through its own output, which will introduce wrong predictions and cause overfitting.

[0096] Specifically, each sample image in the second sample image set can be input into the current second image detection model. The feature extraction layer in the current second image detection model performs feature extraction on the input sample image, and the first image feature information output by the middle feature extraction layer can be obtained, or the first image feature information output by the deepest feature extraction layer can be obtained, so as to perform penalty based on the deepest image feature information to further ensure the model training effect.

[0097] S460: Input the third sample image set into the current second image detection model to detect the target object, and obtain the target prediction box corresponding to the third sample image data set and the second image feature information output by the feature extraction layer in the current second image detection model.

[0098] Specifically, each sample image in the third sample image set can be input into the current second image detection model, and the feature extraction layer in the current second image detection model extracts features from the input sample image, and the second image feature information output by the middle feature extraction layer can be obtained, or the second image feature information output by the deepest feature extraction layer can be obtained, so as to perform a penalty based on the deepest image feature information, and further ensure the model training effect. At the same time, the current second image detection model can also output the target prediction box where the target object is located in each sample image in the third sample image set.

[0099] S470: Determine a feature difference loss value between the second sample image set and the third sample image set based on the first image feature information and the second image feature information.

[0100] Specifically, the KL (Kullback-Leibler) divergence method can be used to determine the feature difference loss value between the second sample image set and the third sample image set. For example, based on the first image feature information corresponding to each sample image in the second sample image set and the second image feature information corresponding to the corresponding sample image in the third sample image set, the forward KL divergence and the backward KL divergence between the second sample image set and the third sample image set are determined, and the forward KL divergence and the backward KL divergence are averaged to obtain the feature difference loss value. For example, the feature difference loss value L can be determined by the following formula: FS :

[0101]

[0102] Among them, f A is the first image feature information corresponding to the sample image A in the second sample image set; B is the second image feature information corresponding to the corresponding sample image B in the third sample image set. The sum is the sum of all sample images in the second sample image set.

[0103] S480 , determining a target loss value corresponding to the third sample image set based on the current pseudo-annotated box, the original annotated box, the target predicted box, and the feature difference loss value corresponding to the third sample image set.

[0104] Specifically, by adding an additional feature difference loss value between the third sample image set and the second sample image set for training penalty, the overfitting caused by self-training can be reduced, and the accuracy of model detection can be further guaranteed.

[0105] Exemplarily, based on the current pseudo-annotation box, the original annotation box and the target prediction box corresponding to the third sample image set, the prediction loss value corresponding to the third sample image set is determined; the prediction loss value and the feature difference loss value are added to obtain the target loss value corresponding to the third sample image set.

[0106] Specifically, based on the current pseudo-annotation frame, the original annotated frame, and the target predicted frame corresponding to the third sample image set, the classification loss value and the regression loss value corresponding to the third sample image set are determined, and the classification loss value and the regression loss value are added to obtain the prediction loss value corresponding to the third sample image set. For example, the prediction loss value L can be determined by the following formula sup :

[0107]

[0108] in, refers to the target prediction box corresponding to the third sample image set, and y refers to the original annotation box corresponding to the third sample image set. is the current pseudo-annotation box corresponding to the third sample image set, L cls refers to the classification loss value, L reg It refers to the regression loss value.

[0109] By setting the prediction loss value L sup And the feature difference loss value L FSL Add them together to obtain the target loss value L corresponding to the third sample image set Total =L Sup +L FSL .

[0110] S490, back-propagating the target loss value to the current second image detection model, adjusting the network weights in the current second image detection model, and completing the current training of the second image detection model.

[0111] S491. Based on the current second image detection model that has completed training, the network weights of the current first image detection model are updated, and the current second image detection model is trained next time based on the updated current first image detection model, until the preset convergence conditions are met, and the training of the current second image detection model is completed.

[0112] Specifically, based on the updated current first image detection model, the execution step S440 is returned to perform the next training on the current second image detection model, thereby achieving mutual learning, until the preset convergence condition is reached, such as the number of iterations is equal to the preset number (such as 60 times), or the target loss value changes tends to be stable, it is determined that the training of the current second image detection model is completed.

[0113] The technical solution of this embodiment, when training the current second image detection model, adds an additional feature difference loss value between the third sample image set and the second sample image set for training penalty, which can reduce the overfitting caused by self-training and further ensure the accuracy of model detection.

[0114] Figure 5 This is a flow chart of a lung image processing method provided by an embodiment of the present disclosure. This embodiment can be applied to the case where the image detection model obtained by the training method provided by any of the above embodiments processes lung images. The method can be executed by a lung image processing device, which can be implemented by software and / or hardware and integrated into an electronic device. Figure 5 As shown, the method specifically comprises the following steps:

[0115] S510: Acquire a target lung image to be processed.

[0116] The target lung image may refer to a lung image of a target object that needs to be detected currently. For example, the target lung image may refer to a lung CT image.

[0117] Specifically, the original lung image acquired by using a CT device may be used as the target lung image to be processed.

[0118] S520: Input the target lung image into the target image detection model to detect the target object.

[0119] Among them, the target image detection model is the current second image detection model trained by the training method of the image detection model provided by any of the above embodiments.

[0120] Specifically, when the first sample image set is a lung image set, the current second image detection model trained by the training method provided in any of the above embodiments is used as the target image detection model. In practical applications, the target lung image to be processed can be input into the target image detection model, and the target image detection model can detect all target objects present in the input target lung image, and output the marking box corresponding to each detected target object.

[0121] S530. Obtain a target object detection result in the target lung image based on an output of the target image detection model.

[0122] The target object may be, but is not limited to, a lung nodule. The target object detection result may refer to the target object position information in the target lung image, that is, a marking box of the target object. The marking box is used to mark the location of the target object.

[0123] Specifically, all the marked boxes output by the target image detection model can be directly used as the target object detection result in the target lung image. The confidence corresponding to each marked box output by the target image detection model can also be compared with a preset confidence, and the marked box with a confidence greater than or equal to the preset confidence is used as the final target object detection result.

[0124] The technical solution of this embodiment can accurately detect the target object in the lung image by training the target image detection model using the lung image set with missing annotations or missing partial annotation boxes, thereby ensuring the accuracy of target object detection.

[0125] As an optional embodiment, step S520 may include the following steps S521-S524:

[0126] S521 . Binarize the target lung image to obtain a first binarized lung image.

[0127] Specifically, the target lung image can be preprocessed to remove interference outside the lung lobe area to further improve the model training effect. For example, the target lung image is first binarized using a threshold, such as setting pixel values ​​greater than or equal to the threshold as a first pixel value, such as 1, and setting pixel values ​​less than the threshold as a second pixel value, such as 0, thereby obtaining a binarized first lung image.

[0128] S522: Based on the connected areas corresponding to each connected area in the first lung image, determine a first connected area with the largest connected area and a second connected area with the second largest connected area.

[0129] Specifically, all connected regions in each binary image may be determined, and connected areas corresponding to each connected region may be compared to obtain a first connected region with the largest connected area and a second connected region with the second largest connected area.

[0130] S523. Based on the ratio between the first connected area and the second connected area, adjust the pixel value of each connected area in the first lung image to obtain an adjusted second lung image.

[0131] Specifically, the first connected area can be divided by the second connected area to obtain a ratio between the two, and based on the ratio, the pixel value of each connected area in the first lung image can be effectively adjusted so that the lobe area and the non-lobe area can be distinguished in the adjusted second lung image.

[0132] Exemplarily, S523 may include: determining the lobe connected area and other connected areas except the lobe connected area based on the ratio between the first connected area and the second connected area; adjusting the pixel values ​​in the lobe connected area to the first pixel values, and adjusting the pixel values ​​in the other connected areas to the second pixel values, to obtain an adjusted second lung image.

[0133] Specifically, the first connected area can be divided by the second connected area to obtain the ratio between the two, and the lobe connected area can be screened out from all connected areas by detecting whether the ratio is less than or equal to a preset ratio. Exemplarily, if the ratio between the first connected area and the second connected area is less than or equal to the preset ratio, it indicates that the first connected area and the second connected area correspond to the left and right lungs respectively, and the first connected area and the second connected area can be determined as lobe connected areas. If the ratio between the first connected area and the second connected area is greater than the preset ratio, it indicates that the first connected area contains both left and right lungs, and the first connected area can be determined as a lobe connected area. By adjusting the pixel values ​​in the lobe connected area to the first pixel value, such as 1, and adjusting the pixel values ​​in other connected areas except the lobe connected area to the second pixel value, such as 0, a second lung image after pixel value adjustment is obtained. For example, the second lung image is an image in which the lobe area is white and other areas are black, so that the lobe position in the image can be clearly located.

[0134] S524: Process the target lung image based on the second lung image to determine a third lung image, and input the third lung image into the target image detection model to detect the target object.

[0135] Specifically, the determination process of the third lung image can be implemented in at least the following two ways:

[0136] As an implementation method, the pixel values ​​of the target lung image and the second lung image are multiplied bit by bit to obtain a third lung image. At this time, only the original pixel values ​​of the lung lobe area are retained in the third lung image, and the pixel values ​​of other areas are 0, so that the target object can be identified only from the lung lobe area, further ensuring the accuracy of target object identification.

[0137] As another implementation method, determine the bounding box corresponding to the connected area of ​​the lung lobes in the second lung image; the bounding box can be a minimum rectangular box containing the connected area of ​​the lung lobes, or it can be a matrix box slightly larger than the minimum rectangular box obtained by dilating the minimum rectangular box with preset pixels. Based on the bounding box, the target lung image is cropped to obtain a third lung image. The third lung image is a local image corresponding to the bounding box in the target lung image, that is, a lung lobe area image. Inputting the third lung image into the target image detection model for target object detection can eliminate interference outside the lung tissue, avoid the model processing useless information, and improve the target detection speed and accuracy.

[0138] The following is an embodiment of a training device for an image detection model provided in an embodiment of the present disclosure. The device and the training method for an image detection model in the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the training device for an image detection model, reference can be made to the embodiment of the training method for an image detection model in the above-mentioned embodiment.

[0139] Figure 6 A schematic diagram of the structure of a training device for an image detection model provided in an embodiment of the present disclosure. Figure 6 As shown, the device specifically includes: a first sample image set acquisition module 610, an image enhancement processing module 620, an image detection model training module 630, a current second image detection model training module 640 and a network weight updating module 650.

[0140] The first sample image set acquisition module 610 is used to acquire the first sample image set and the original annotation box corresponding to the first sample image set; the image enhancement processing module 620 is used to perform image enhancement processing on the first sample image set to obtain the second sample image set and the third sample image set with the same annotation box; the image detection model training module 630 is used to train the image detection model based on the second sample image set and the original annotation box corresponding to the second sample image set to obtain the current first image detection model and the current second image detection model with the same network weights; the current second image detection model training module 6 40, used to determine the current pseudo-annotation box corresponding to the second sample image set based on the current first image detection model, and perform current training on the current second image detection model based on the third sample image set, the current pseudo-annotation box corresponding to the second sample image set and the original annotation box; the network weight updating module 650, used to update the network weights of the current first image detection model based on the current second image detection model at the end of the current training, and perform next training on the current second image detection model based on the updated current first image detection model, until the preset convergence condition is met, and the training of the current second image detection model is completed.

[0141] Optionally, the original annotation box corresponding to the first sample image set is obtained by marking the target object in the first sample image set based on a sparse marking method.

[0142] Optionally, the image enhancement processing module 620 is specifically configured to:

[0143] Perform spatial transformation enhancement processing on each sample image in the first sample image set to obtain a reference sample image set; perform two different pixel value transformation enhancement processing on each sample image in the reference sample image set to obtain a second sample image set and a third sample image set with the same annotation box, respectively.

[0144] Optionally, the current second image detection model training module 640 includes:

[0145] A second sample image set input unit, used to input each sample image in the second sample image set into the current first image detection model to detect the target object, and obtain a current prediction box corresponding to each sample image in the second sample image set and a confidence level corresponding to the current prediction box;

[0146] The current pseudo-annotation frame determining unit is used to determine the current pseudo-annotation frame corresponding to each sample image in the second sample image set based on the confidence corresponding to the current prediction frame.

[0147] Optionally, the current pseudo-annotation frame determining unit is specifically used to:

[0148] Based on the current prediction box and the original annotation box corresponding to the current sample image in the second sample image set, determine the overlap rate between the current prediction box and the original annotation box corresponding to the current sample image; based on the current prediction box whose overlap rate is less than or equal to the preset overlap rate and whose confidence is greater than or equal to the preset confidence, determine the current pseudo-annotation box corresponding to the current sample image.

[0149] Optionally, the current second image detection model training module 640 further includes:

[0150] The current pseudo-annotation frame is used as a unit to determine the current pseudo-annotation frame corresponding to the second sample image set as the current pseudo-annotation frame corresponding to the third sample image set;

[0151] A third sample image set input unit, used for inputting the third sample image set into the current second image detection model to detect the target object, and obtaining a target prediction frame corresponding to the third sample image data set;

[0152] a target loss value determining unit, configured to determine a target loss value corresponding to the third sample image set based on a current pseudo-annotated frame, an original annotated frame, and the target predicted frame corresponding to the third sample image set;

[0153] The target loss value back-propagation unit is used to back-propagate the target loss value to the current second image detection model, adjust the network weights in the current second image detection model, and complete the current training of the second image detection model.

[0154] Optionally, the third sample image set input unit includes:

[0155] A second sample image set input subunit, used for inputting the second sample image set into the current second image detection model to detect the target object, and obtaining the first image feature information output by the feature extraction layer in the current second image detection model;

[0156] A third sample image set input subunit is used to input the third sample image set into the current second image detection model to detect the target object, and obtain the target prediction box corresponding to the third sample image data set and the second image feature information output by the feature extraction layer in the current second image detection model;

[0157] Accordingly, the target loss value determination unit includes:

[0158] a feature difference loss value determining subunit, configured to determine a feature difference loss value between the second sample image set and the third sample image set based on the first image feature information and the second image feature information;

[0159] The target loss value determination subunit is used to determine the target loss value corresponding to the third sample image set based on the current pseudo-annotation box, the original annotation box, the target prediction box and the feature difference loss value corresponding to the third sample image set.

[0160] Optionally, the target loss value determination subunit is specifically used to:

[0161] Based on the current pseudo-annotation box, the original annotated box and the target prediction box corresponding to the third sample image set, the prediction loss value corresponding to the third sample image set is determined; the prediction loss value and the feature difference loss value are added to obtain the target loss value corresponding to the third sample image set.

[0162] Optionally, the network weight updating module 650 is specifically used to:

[0163] Based on the exponential moving average method, the current first network weight in the current first image detection model and the current second network weight in the current second image detection model at the end of the current training, determine the target network weight corresponding to the current first image detection model; update the current first network weight in the current first image detection model to the target network weight.

[0164] Optionally, the first sample image set acquisition module 610 is specifically configured to:

[0165] Each original sample image in the original sample image set is normalized and binarized to obtain a binary image; based on the connected area corresponding to each connected area in the binary image, a first connected area with the largest connected area and a second connected area with the second largest connected area are determined; based on the ratio between the first connected area and the second connected area, a pixel value of each connected area in the binary image is adjusted to obtain an adjusted binary image; based on the adjusted binary image, the original sample image is processed to determine a first sample image set.

[0166] The image detection model training device provided in the embodiments of the present disclosure can execute the image detection model training method provided in any embodiment of the present disclosure, and has corresponding functional modules and beneficial effects for executing the image detection model training method.

[0167] It is worth noting that in the embodiment of the training device for the above-mentioned image detection model, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present disclosure.

[0168] The following is an embodiment of a lung image processing device provided in an embodiment of the present disclosure. The device and the lung image processing methods of the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the training device for the image detection model, reference can be made to the embodiment of the above-mentioned lung image processing method.

[0169] Figure 7 FIG. 1 is a schematic diagram of a lung image processing device provided by an embodiment of the present disclosure. Figure 7 As shown, the device specifically includes: a target lung image acquisition module 710, a target lung image input module 720 and a detection result determination module 730.

[0170] Among them, the target lung image acquisition module 710 is used to acquire the target lung image to be processed; the target lung image input module 720 is used to input the target lung image into the target image detection model to detect the target object, wherein the target image detection model is the current second image detection model trained by the training method of the image detection model provided in any of the above embodiments; the detection result determination module 730 is used to obtain the target object detection result in the target lung image based on the output of the target image detection model.

[0171] Optionally, the target lung image input module includes:

[0172] A binarization processing unit, used for performing binarization processing on the target lung image to obtain a binarized first lung image;

[0173] a connected region determining unit, configured to determine a first connected region with a largest connected area and a second connected region with a second largest connected area based on a connected area corresponding to each connected region in the first lung image;

[0174] a pixel value adjustment unit, configured to adjust the pixel value of each connected area in the first lung image based on the ratio between the first connected area and the second connected area, so as to obtain an adjusted second lung image;

[0175] The third lung image input unit is used to process the target lung image based on the second lung image, determine a third lung image, and input the third lung image into the target image detection model to detect the target object.

[0176] Optionally, the pixel value adjustment unit includes:

[0177] a pulmonary lobe connected area determination subunit, configured to determine a pulmonary lobe connected area and other connected areas except the pulmonary lobe connected area based on a ratio between the first connected area and the second connected area;

[0178] The pixel value adjustment subunit is used to adjust the pixel values ​​in the connected area of ​​the lung lobe to the first pixel value, and adjust the pixel values ​​in the other connected areas to the second pixel value, so as to obtain an adjusted second lung image.

[0179] Optionally, the pulmonary lobe connected area determination subunit is specifically used for:

[0180] If the ratio between the first connected area and the second connected area is less than or equal to a preset ratio, determining the first connected area and the second connected area as a lung lobe connected area;

[0181] If the ratio between the first connected area and the second connected area is greater than a preset ratio, the first connected area is determined as a lung lobe connected area.

[0182] Optionally, the third lung image input unit is specifically used to:

[0183] Determine a bounding box corresponding to the connected region of the lung lobes in the second lung image;

[0184] Based on the bounding box, the target lung image is cropped to obtain a third lung image.

[0185] Optionally, the target object is a lung nodule.

[0186] The lung image processing device provided in the embodiments of the present disclosure can execute the lung image processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects for executing the lung image processing method.

[0187] It is worth noting that in the embodiment of the above-mentioned lung image processing device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present disclosure.

[0188] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Figure 8 A block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present disclosure is shown. Figure 8 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0189] like Figure 8As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0190] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0191] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0192] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8 not shown, usually called a "hard drive"). Although Figure 8 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.

[0193] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0194] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0195] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing the steps of a training method for an image detection model provided in the embodiment of the present invention, the method comprising:

[0196] Acquire a first sample image set and a sparse original annotation box corresponding to the first sample image set;

[0197] Performing image enhancement processing on the first sample image set to obtain a second sample image set and a third sample image set having the same annotation frame;

[0198] Based on the second sample image set and the original annotation box corresponding to the second sample image set, the image detection model is trained to obtain a current first image detection model and a current second image detection model having the same network weights;

[0199] Based on the current first image detection model, determine the current pseudo-annotation box corresponding to the second sample image set, and based on the third sample image set, the current pseudo-annotation box corresponding to the second sample image set and the original annotated box, perform current training on the current second image detection model;

[0200] Based on the current second image detection model that has completed training, the network weights of the current first image detection model are updated, and the current second image detection model is trained next time based on the updated current first image detection model, until the preset convergence conditions are met, and the training of the current second image detection model is completed.

[0201] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, also implements the steps of a lung image processing method provided in the embodiment of the present invention, the method comprising:

[0202] Acquire a target lung image to be processed;

[0203] Inputting the target lung image into a target image detection model to detect the target object, wherein the target image detection model is a current second image detection model trained by the image detection model training method according to any one of claims 1 to 10;

[0204] Based on the output of the target image detection model, a target object detection result in the target lung image is obtained.

[0205] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the image detection model training method provided in any embodiment of the present disclosure.

[0206] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the training method of the image detection model or the lung image processing method provided in any embodiment of the present disclosure is implemented.

[0207] The computer storage medium of the embodiment of the present disclosure may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it.

[0208] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0209] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0210] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0211] It should be understood by those skilled in the art that the above modules or steps of the present disclosure can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present disclosure is not limited to any specific combination of hardware and software.

[0212] Note that the above are only preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art will understand that the present disclosure is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present disclosure. Therefore, although the present disclosure is described in more detail through the above embodiments, the present disclosure is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present disclosure, and the scope of the present disclosure is determined by the scope of the attached claims.

Claims

1. A training method for an image detection model, characterized in that: include: Acquire a first sample image set and an original annotation box corresponding to the first sample image set; Performing image enhancement processing on the first sample image set to obtain a second sample image set and a third sample image set having the same annotation frame; Based on the second sample image set and the original annotation box corresponding to the second sample image set, the image detection model is trained to obtain a current first image detection model and a current second image detection model having the same network weights; Based on the current first image detection model, determine the current pseudo-annotation box corresponding to the second sample image set, and based on the third sample image set, the current pseudo-annotation box corresponding to the second sample image set and the original annotated box, perform current training on the current second image detection model; Based on the current second image detection model that has completed training, the network weights of the current first image detection model are updated, and the current second image detection model is trained next time based on the updated current first image detection model, until the preset convergence conditions are met, and the training of the current second image detection model is completed.

2. The method according to claim 1, characterized in that The original annotation box corresponding to the first sample image set is obtained by marking the target object in the first sample image set based on a sparse marking method.

3. The method according to claim 1, characterized in that The performing image enhancement processing on the first sample image set to obtain a second sample image set and a third sample image set having the same annotation frame includes: Performing spatial transformation enhancement processing on each sample image in the first sample image set to obtain a reference sample image set; Two different pixel value transformation and enhancement processes are performed on each sample image in the reference sample image set to respectively obtain a second sample image set and a third sample image set having the same annotation frame.

4. The method according to claim 1, characterized in that: The determining, based on the current first image detection model, a current pseudo-annotation box corresponding to the second sample image set includes: Input each sample image in the second sample image set into the current first image detection model to detect the target object, and obtain a current prediction box corresponding to each sample image in the second sample image set and a confidence level corresponding to the current prediction box; Based on the confidence corresponding to the current prediction box, a current pseudo-annotation box corresponding to each sample image in the second sample image set is determined.

5. The method according to claim 4, characterized in that The determining, based on the confidence corresponding to the current prediction box, a current pseudo-annotated box corresponding to each sample image in the second sample image set comprises: Determine an overlap ratio between a current prediction box and an original annotation box corresponding to a current sample image in the second sample image set based on the current prediction box and the original annotation box; Based on a current prediction frame whose overlap rate is less than or equal to a preset overlap rate and whose confidence is greater than or equal to a preset confidence, a current pseudo-annotation frame corresponding to the current sample image is determined.

6. The method according to claim 1, characterized in that The training of the current second image detection model based on the third sample image set and the current pseudo-annotated frame and the original annotated frame corresponding to the second sample image set includes: Determine the current pseudo-annotation frame corresponding to the second sample image set as the current pseudo-annotation frame corresponding to the third sample image set; Inputting the third sample image set into the current second image detection model to detect the target object, and obtaining a target prediction box corresponding to the third sample image data set; Determine a target loss value corresponding to the third sample image set based on a current pseudo-annotated frame, an original annotated frame, and the target predicted frame corresponding to the third sample image set; The target loss value is back-propagated to the current second image detection model, the network weights in the current second image detection model are adjusted, and the current training of the second image detection model is completed.

7. The method according to claim 6, characterized in that The step of inputting the third sample image set into the current second image detection model to detect the target object and obtaining the target prediction frame corresponding to the third sample image data set includes: Inputting the second sample image set into the current second image detection model to detect the target object, and obtaining the first image feature information output by the feature extraction layer in the current second image detection model; Input the third sample image set into the current second image detection model to detect the target object, and obtain the target prediction box corresponding to the third sample image data set and the second image feature information output by the feature extraction layer in the current second image detection model; The determining the target loss value corresponding to the third sample image set based on the current pseudo-annotated frame, the original annotated frame and the target predicted frame corresponding to the third sample image set includes: Determining a feature difference loss value between the second sample image set and the third sample image set based on the first image feature information and the second image feature information; Based on the current pseudo-annotated box, the original annotated box, the target prediction box and the feature difference loss value corresponding to the third sample image set, a target loss value corresponding to the third sample image set is determined.

8. The method according to claim 7, characterized in that The determining the target loss value corresponding to the third sample image set based on the current pseudo-annotated frame, the original annotated frame, the target predicted frame and the feature difference loss value corresponding to the third sample image set includes: Determine a prediction loss value corresponding to the third sample image set based on a current pseudo-annotated frame, an original annotated frame, and the target predicted frame corresponding to the third sample image set; The predicted loss value and the feature difference loss value are added to obtain a target loss value corresponding to the third sample image set.

9. The method according to claim 1, characterized in that: The updating of the network weights of the current first image detection model based on the current second image detection model that has been trained includes: Determine the target network weight corresponding to the current first image detection model based on the exponential moving average method, the current first network weight in the current first image detection model, and the current second network weight in the current second image detection model at the end of the current training; Update the current first network weights in the current first image detection model to the target network weights.

10. The method according to claim 1, characterized in that The step of acquiring a first sample image set comprises: Performing binarization processing on each original sample image in the original sample image set to obtain a binary image; Based on the connected areas corresponding to each connected area in the binary image, determining a first connected area with the largest connected area and a second connected area with the second largest connected area; Based on the ratio between the first connected area and the second connected area, adjusting the pixel value of each connected area in the binary image to obtain an adjusted binary image; The original sample images are processed based on the adjusted binary images to determine a first sample image set.

11. A lung image processing method, characterized in that: include: Acquire a target lung image to be processed; Inputting the target lung image into a target image detection model to detect the target object, wherein the target image detection model is a current second image detection model trained by the image detection model training method according to any one of claims 1 to 10; Based on the output of the target image detection model, a target object detection result in the target lung image is obtained.

12. The method according to claim 11, characterized in that Inputting the target lung image into a target image detection model to detect the target object includes: Performing binarization processing on the target lung image to obtain a binarized first lung image; Determine, based on the connected areas corresponding to each connected area in the first lung image, a first connected area with the largest connected area and a second connected area with the second largest connected area; Based on the ratio between the first connected area and the second connected area, adjusting the pixel value of each connected area in the first lung image to obtain an adjusted second lung image; The target lung image is processed based on the second lung image to determine a third lung image, and the third lung image is input into a target image detection model to detect a target object.

13. The method according to claim 12, characterized in that The step of adjusting the pixel value of each connected area in the first lung image based on the ratio between the first connected area and the second connected area to obtain the adjusted second lung image includes: Determine a pulmonary lobe connected area and other connected areas except the pulmonary lobe connected area based on a ratio between the first connected area and the second connected area; The pixel values ​​in the connected regions of the pulmonary lobes are adjusted to first pixel values, and the pixel values ​​in the other connected regions are adjusted to second pixel values, so as to obtain an adjusted second lung image.

14. The method according to claim 13, characterized in that Determining the lung lobe connected area based on the ratio between the first connected area and the second connected area includes: If the ratio between the first connected area and the second connected area is less than or equal to a preset ratio, determining the first connected area and the second connected area as a lung lobe connected area; If the ratio between the first connected area and the second connected area is greater than a preset ratio, the first connected area is determined as a lung lobe connected area.

15. The method according to claim 12, characterized in that The step of processing the target lung image based on the second lung image to determine a third lung image includes: Determine a bounding box corresponding to the connected region of the lung lobes in the second lung image; Based on the bounding box, the target lung image is cropped to obtain a third lung image.

16. The method according to claim 11, characterized in that The target object is a lung nodule.

17. A training device for an image detection model, characterized in that: include: A first sample image set acquisition module, used to acquire a first sample image set and an original annotation frame corresponding to the first sample image set; An image enhancement processing module, used for performing image enhancement processing on the first sample image set to obtain a second sample image set and a third sample image set having the same annotation frame; An image detection model training module, used to train the image detection model based on the second sample image set and the original annotation box corresponding to the second sample image set, to obtain a current first image detection model and a current second image detection model with the same network weights; a current second image detection model training module, used to determine a current pseudo-annotation box corresponding to the second sample image set based on the current first image detection model, and to perform current training on the current second image detection model based on the third sample image set, the current pseudo-annotation box corresponding to the second sample image set, and the original annotated box; The network weight updating module is used to update the network weights of the current first image detection model based on the current second image detection model that has completed the current training, and to perform the next training on the current second image detection model based on the updated current first image detection model until the preset convergence conditions are met to complete the training of the current second image detection model.

18. The device according to claim 17, characterized in that The original annotation box corresponding to the first sample image set is obtained by marking the target object in the first sample image set based on a sparse marking method.

19. The device according to claim 17, characterized in that The image enhancement processing module is specifically used for: Performing spatial transformation enhancement processing on each sample image in the first sample image set to obtain a reference sample image set; Two different pixel value transformation and enhancement processes are performed on each sample image in the reference sample image set to respectively obtain a second sample image set and a third sample image set having the same annotation frame.

20. The device according to claim 17, characterized in that The current second image detection model training module includes: A second sample image set input unit, used to input each sample image in the second sample image set into the current first image detection model to detect the target object, and obtain a current prediction box corresponding to each sample image in the second sample image set and a confidence level corresponding to the current prediction box; The current pseudo-annotation frame determining unit is used to determine the current pseudo-annotation frame corresponding to each sample image in the second sample image set based on the confidence corresponding to the current prediction frame.

21. The device according to claim 20, characterized in that The current pseudo-annotation frame determining unit is specifically used to: Determine an overlap ratio between a current prediction box and an original annotation box corresponding to a current sample image in the second sample image set based on the current prediction box and the original annotation box; Based on a current prediction frame whose overlap rate is less than or equal to a preset overlap rate and whose confidence is greater than or equal to a preset confidence, a current pseudo-annotation frame corresponding to the current sample image is determined.

22. The device according to claim 17, characterized in that The current second image detection model training module further includes: The current pseudo-annotation frame is used as a unit to determine the current pseudo-annotation frame corresponding to the second sample image set as the current pseudo-annotation frame corresponding to the third sample image set; A third sample image set input unit, used for inputting the third sample image set into the current second image detection model to detect the target object, and obtaining a target prediction frame corresponding to the third sample image data set; a target loss value determining unit, configured to determine a target loss value corresponding to the third sample image set based on a current pseudo-annotated frame, an original annotated frame, and the target predicted frame corresponding to the third sample image set; The target loss value back-propagation unit is used to back-propagate the target loss value to the current second image detection model, adjust the network weights in the current second image detection model, and complete the current training of the second image detection model.

23. The device according to claim 22, characterized in that The third sample image set input unit comprises: A second sample image set input subunit, used for inputting the second sample image set into the current second image detection model to detect the target object, and obtaining the first image feature information output by the feature extraction layer in the current second image detection model; A third sample image set input subunit is used to input the third sample image set into the current second image detection model to detect the target object, and obtain the target prediction box corresponding to the third sample image data set and the second image feature information output by the feature extraction layer in the current second image detection model; The target loss value determination unit includes: a feature difference loss value determining subunit, configured to determine a feature difference loss value between the second sample image set and the third sample image set based on the first image feature information and the second image feature information; The target loss value determination subunit is used to determine the target loss value corresponding to the third sample image set based on the current pseudo-annotation box, the original annotation box, the target prediction box and the feature difference loss value corresponding to the third sample image set.

24. The device according to claim 23, characterized in that The target loss value determination subunit is specifically used for: Determine a prediction loss value corresponding to the third sample image set based on a current pseudo-annotated frame, an original annotated frame, and the target predicted frame corresponding to the third sample image set; The predicted loss value and the feature difference loss value are added to obtain a target loss value corresponding to the third sample image set.

25. The device according to claim 17, characterized in that The network weight updating module is specifically used for: Determine the target network weight corresponding to the current first image detection model based on the exponential moving average method, the current first network weight in the current first image detection model, and the current second network weight in the current second image detection model at the end of the current training; Update the current first network weights in the current first image detection model to the target network weights.

26. The device according to any one of claims 17 to 25, characterized in that The first sample image set acquisition module is specifically used to: Performing binarization processing on each original sample image in the original sample image set to obtain a binary image; Based on the connected areas corresponding to each connected area in the binary image, determining a first connected area with the largest connected area and a second connected area with the second largest connected area; Based on the ratio between the first connected area and the second connected area, adjusting the pixel value of each connected area in the binary image to obtain an adjusted binary image; The original sample images are processed based on the adjusted binary images to determine a first sample image set.

27. A lung image processing device, characterized in that: include: A target lung image acquisition module, used for acquiring a target lung image to be processed; A target lung image input module, used for inputting the target lung image into a target image detection model to detect the target object, wherein the target image detection model is a current second image detection model trained by the image detection model training method according to any one of claims 1 to 10; A detection result determination module is used to obtain a target object detection result in the target lung image based on the output of the target image detection model.

28. The device according to claim 27, characterized in that The target lung image input module comprises: A binarization processing unit, used for performing binarization processing on the target lung image to obtain a binarized first lung image; a connected region determining unit, configured to determine a first connected region with a largest connected area and a second connected region with a second largest connected area based on a connected area corresponding to each connected region in the first lung image; a pixel value adjustment unit, configured to adjust the pixel value of each connected area in the first lung image based on the ratio between the first connected area and the second connected area, so as to obtain an adjusted second lung image; The third lung image input unit is used to process the target lung image based on the second lung image, determine a third lung image, and input the third lung image into the target image detection model to detect the target object.

29. The device according to claim 28, characterized in that The pixel value adjustment unit comprises: a pulmonary lobe connected area determination subunit, configured to determine a pulmonary lobe connected area and other connected areas except the pulmonary lobe connected area based on a ratio between the first connected area and the second connected area; The pixel value adjustment subunit is used to adjust the pixel values ​​in the connected area of ​​the lung lobe to the first pixel value, and adjust the pixel values ​​in the other connected areas to the second pixel value, so as to obtain an adjusted second lung image.

30. The device according to claim 29, characterized in that The pulmonary lobe connected area determination subunit is specifically used for: If the ratio between the first connected area and the second connected area is less than or equal to a preset ratio, determining the first connected area and the second connected area as a lung lobe connected area; If the ratio between the first connected area and the second connected area is greater than a preset ratio, the first connected area is determined as a lung lobe connected area.

31. The device according to claim 28, characterized in that The third lung image input unit is specifically used for: Determine a bounding box corresponding to the connected region of the lung lobes in the second lung image; Based on the bounding box, the target lung image is cropped to obtain a third lung image.

32. The device according to claim 27, characterized in that The target object is a lung nodule.

33. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the training method of the image detection model as described in any one of claims 1-10 or the lung image processing method as described in any one of claims 11-16.

34. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the training method of the image detection model as described in any one of claims 1-10 or the lung image processing method as described in any one of claims 11-16.