Target detection method, computer device and storage medium
By combining the detection network and the segmentation network, processing the medical images to be tested to determine the target bounding box information, the problem of insufficient detection accuracy of various scales and shape targets in the prior art is solved, and a higher detection accuracy is achieved.
Patent Information
- Application Number
- CN202210858220.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-20
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-07-20
AI Technical Summary
The prior art is difficult to ensure the accuracy of object detection for various scales or shapes, especially in object detection with long tail distribution and irregular shapes.
By combining the detection network and the segmentation network, the medical image to be tested is acquired for object detection and segmentation processing, the first bounding box information and the second bounding box information of the target are determined, and the final target bounding box information is determined through fusion processing or screening processing.
The target detection of various shapes and scales is achieved, and the detection accuracy is improved, especially when dealing with long-tail distribution and irregular shape targets.
Smart Images

Figure CN115131552B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a target detection method, a computer device and a storage medium. Background Art
[0002] With the continuous development of target detection technology, all walks of life have applied target detection technology in their industry-related fields to improve the efficiency and accuracy of target detection. Currently, most commonly used target detection technologies are based on anchor-base methods, which can split the detection problem into simpler classification and regression problems, and achieve fast and accurate target detection.
[0003] In the related art, when the anchor-base method is used for target detection, a detection network is usually set up for target detection. Before using the detection network for target detection, it is necessary to first count the sizes of all targets, and then set detection frames of various scales and aspect ratios to cover all detection targets. After that, the detection network can be trained using the set detection frames, and the target can be detected after the detection network is trained.
[0004] However, the above technology is difficult to guarantee the detection accuracy of objects of various sizes or shapes. Summary of the invention
[0005] Based on this, it is necessary to provide a target detection method, computer equipment and storage medium that can ensure the accuracy of detecting targets of various sizes and shapes in response to the above technical problems.
[0006] In a first aspect, the present application provides a target detection method, the method comprising:
[0007] Acquire a medical image to be tested; the medical image to be tested includes at least one target;
[0008] Inputting the medical image to be tested into the detection network for target detection processing to determine the first bounding box information of each target;
[0009] Inputting the medical image to be tested into the segmentation network for target segmentation processing, and determining the second bounding box information of each target according to the segmentation result;
[0010] According to the first bounding box information of each object and the second bounding box information of each object, the object bounding box information of each object is determined.
[0011] In one embodiment, determining the target bounding box information of each target according to the first bounding box information of each target and the second bounding box information of each target includes:
[0012] The first bounding box information and the second bounding box information of the same target are fused or filtered to determine the target bounding box information of each target.
[0013] In one embodiment, the above-mentioned fusion processing or screening processing at least includes non-maximum suppression processing.
[0014] In one embodiment, the above-mentioned inputting the medical image to be tested into the segmentation network to perform target segmentation processing, and determining the second bounding box information of each target according to the segmentation result, includes:
[0015] Inputting the medical image to be tested into the segmentation network to perform target segmentation processing to obtain a segmentation result; the segmentation result includes a mask image of the target;
[0016] The objects that are stuck together in the mask image are separated, and the second bounding box information of each object is calculated on the mask image of the separated objects.
[0017] In one of the embodiments, the target includes at least one of the following targets: a target whose size is greater than a size threshold, a target with an irregular shape, a target with a regular shape, and a target whose size is not greater than a size threshold; the irregularly shaped targets include targets with a shifted center of mass, and / or targets with an aspect ratio exceeding a proportional range, and / or targets with a width-to-depth ratio exceeding a proportional range, and / or targets with a height-to-depth ratio exceeding a proportional range.
[0018] In one embodiment, the training data sets of the detection network and the segmentation network are divided in the following manner:
[0019] Acquire multiple training sample images; each training sample image includes a sample target and standard bounding box information of the sample target;
[0020] Determine the physical size of each sample target according to the standard bounding box information of each sample target;
[0021] Determine a long-tail distribution target among the sample targets according to at least one of standard bounding box information of each sample target, a physical size of each sample target, and pixel information of an image corresponding to each training sample image in the standard bounding box;
[0022] According to the long-tail distribution target, multiple training sample images are divided into two training data sets; the two training data sets are used to train the detection network and the segmentation network respectively.
[0023] In one embodiment, the above-mentioned dividing the multiple training sample images into two training data sets according to the long-tail distribution target includes:
[0024] Using a first training sample image containing a long-tail distribution target among the multiple training sample images, and a mask image of the long-tail distribution target obtained in the first training sample image as a training data set for the segmentation network;
[0025] A second training sample image other than the first training sample image among the plurality of training sample images is used as a training data set of the detection network; and the second training sample image does not contain a long-tail distribution target.
[0026] In one embodiment, the long-tail distribution target includes at least one of the following:
[0027] The physical size of the sample object is larger than the size threshold;
[0028] The size ratio of the sample target exceeds the proportional range;
[0029] The sample target is a target with a mass center shift; the mass center shift is used to indicate that the eccentricity of the sample target is greater than an eccentricity threshold.
[0030] In one embodiment, the detection network is a cascaded anchor box-based multi-scale detection network, and the segmentation network is a cascaded coarse and fine segmentation network.
[0031] In a second aspect, the present application further provides a target detection device, the device comprising:
[0032] An acquisition module, used for acquiring a medical image to be tested; the medical image to be tested includes at least one target;
[0033] A detection module, used to input the medical image to be tested into the detection network for target detection processing, and determine the first bounding box information of each target;
[0034] A segmentation module is used to input the medical image to be tested into the segmentation network for target segmentation processing, and determine the second bounding box information of each target according to the segmentation result;
[0035] The determination module is used to determine the target bounding box information of each target according to the first bounding box information of each target and the second bounding box information of each target.
[0036] In a third aspect, the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:
[0037] Acquire a medical image to be tested; the medical image to be tested includes at least one target;
[0038] Inputting the medical image to be tested into the detection network for target detection processing to determine the first bounding box information of each target;
[0039] Inputting the medical image to be tested into the segmentation network for target segmentation processing, and determining the second bounding box information of each target according to the segmentation result;
[0040] According to the first bounding box information of each object and the second bounding box information of each object, the object bounding box information of each object is determined.
[0041] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0042] Acquire a medical image to be tested; the medical image to be tested includes at least one target;
[0043] Inputting the medical image to be tested into the detection network for target detection processing to determine the first bounding box information of each target;
[0044] Inputting the medical image to be tested into the segmentation network for target segmentation processing, and determining the second bounding box information of each target according to the segmentation result;
[0045] According to the first bounding box information of each object and the second bounding box information of each object, the object bounding box information of each object is determined.
[0046] In a fifth aspect, the present application further provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0047] Acquire a medical image to be tested; the medical image to be tested includes at least one target;
[0048] Inputting the medical image to be tested into the detection network for target detection processing to determine the first bounding box information of each target;
[0049] Inputting the medical image to be tested into the segmentation network for target segmentation processing, and determining the second bounding box information of each target according to the segmentation result;
[0050] According to the first bounding box information of each object and the second bounding box information of each object, the object bounding box information of each object is determined.
[0051] The above-mentioned target detection method, computer device and storage medium obtain the first bounding box information of each target by inputting the acquired medical image to be detected including the detection target into the detection network for target detection processing, and inputting the medical image to be detected into the segmentation network for target segmentation processing, and determining the second bounding box information of each target according to the segmentation result, and finally determining the target bounding box information of the target according to the first bounding box information and the second bounding box information of each target. In this method, since the segmentation processing can be performed on targets of various shapes and various scales to obtain their bounding box information, it is possible to detect targets of various shapes and various scales, and at the same time, the bounding box information of each target is obtained by combining the bounding box information obtained by detecting each target, thereby ensuring the detection accuracy of the target. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 is an internal structure diagram of a computer device in one embodiment;
[0053] Figure 2 Schematic diagram of a target detection method in one embodiment;
[0054] Figure 3 An example diagram of a target with a center of mass offset in one embodiment;
[0055] Figure 4 An example diagram of a target for proportional deviation in one embodiment;
[0056] Figure 5 is a flow chart of a target detection method in another embodiment;
[0057] Figure 6 is an example diagram of an adhesion target in another embodiment;
[0058] Figure 7 is a flow chart of a target detection method in another embodiment;
[0059] Figure 8 is a distribution diagram of sample targets in another embodiment;
[0060] Fig. 9 This is an example diagram of the distribution of large-size sample targets in another embodiment;
[0061] Fig.10 is a distribution diagram of the width-to-depth ratio and the height-to-depth ratio of each sample target in another embodiment;
[0062] Fig.11 is an example diagram of a target with a proportion deviation in a distribution example diagram in another embodiment;
[0063] Fig.12FIG. 4 is a structural block diagram of a target detection device in an embodiment. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0065] For target detection methods, the anchor-base method based on anchor boxes with higher detection performance is currently mainly used. This method splits the detection problem into simpler classification and regression problems. When detecting targets, this method usually needs to first count the sizes of all targets, and then set anchor boxes / detection boxes of various scales and proportions to cover all detection targets. After that, the true positive anchor boxes belonging to the target can be obtained by first detecting and processing a number of pre-set anchor boxes. After that, the true positive anchor boxes belonging to the target can be regressed to finally obtain the detection box information of the target. This detection method is very effective for small target detection. However, this method also has the following problems: it is necessary to set some hyperparameters, such as the scale of the detected target (generally including multiple scales), the intersection-and-union ratio (IOU) threshold corresponding to the positive and negative anchor boxes of the target, and other parameters; for example, for data with long-tail distribution, these hyperparameters usually need to rely on the experience of the detector or the data distribution law of the target to set. It is usually difficult to find an anchor box that covers the scale, aspect ratio, etc. of all lesions, or it is also difficult to find a unified IOU threshold for irregular anchor box shapes, which makes the process of setting the hyperparameters very difficult. In addition, it is sometimes difficult to obtain suitable hyperparameters in the training data set. It can be seen that due to some problems in the parameter setting process of the prior art, it is difficult to ensure the detection accuracy of targets of various scales or shapes during the target detection process. Based on this, the embodiments of the present application provide a target detection method, a computer device, and a storage medium that can solve the above technical problems.
[0066] The target detection method provided in the embodiment of the present application can be applied to Figure 1 In the computer device shown in the figure, the computer device can be a terminal or a server. Taking the terminal as an example, its internal structure diagram can be as follows: Figure 1As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a target detection method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0067] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0068] In one embodiment, Figure 2 As shown, a target detection method is provided, which is applied to Figure 1 Taking the computer device in the example as an example, the method may include the following steps:
[0069] S202, obtaining a medical image to be tested; the medical image to be tested includes at least one object.
[0070] In this step, the target may be a lesion, and the medical image to be tested may be a medical image of any part of the object to be tested, and the medical image may be a CT (Computed Tomography) image, an MR (Magnetic Resonance) image, or the like.
[0071] Specifically, the medical image to be tested may be obtained by scanning the part to be tested of the object to be tested and reconstructing the scanned data. Alternatively, the medical image to be tested may be obtained from a server or cloud that has been pre-stored. Alternatively, the medical image to be tested may be obtained by other methods, which are not specifically limited here.
[0072] For the above-mentioned targets, optionally, the target includes at least one of the following targets: a target whose size is greater than a size threshold, a target with an irregular shape, a target with a regular shape, and a target whose size is not greater than a size threshold; the above-mentioned irregularly shaped targets include targets with offset center of mass, and / or targets with an aspect ratio exceeding a proportional range, and / or targets with a width-to-depth ratio exceeding a proportional range, and / or targets with a height-to-depth ratio exceeding a proportional range.
[0073] The scale threshold here can be set according to actual conditions, for example, 4mm, 8mm, 16mm, 32mm, 64mm, etc. The target size can be obtained by summing and averaging the lengths of several dimensions of a three-dimensional or two-dimensional detection frame surrounding the target. For example, if the width, height, and depth of the three-dimensional detection frame surrounding the target are w, h, and d, respectively, then the target size of the target can be recorded as l=(w+h+d) / 3.
[0074] Taking the target as the lesion, generally, if the scale / size and ratio (including aspect ratio, width-to-depth ratio, height-to-depth ratio) of the detection target are relatively concentrated and evenly distributed, it is usually easier to set multiple scales and aspect ratios to cover all targets, because the number of anchor boxes of each size is evenly distributed and the contribution during training is also relatively average; however, if the lesion size has a long-tail distribution (i.e., small lesions occupy most of the lesions, but the larger the scale, the fewer the lesions, and large lesions are usually more clinically significant), although more scales can be set to cover targets of all sizes, larger lesions contribute less during training due to their small number, resulting in worse detection of large lesions with more diagnostic significance during testing. It can be seen that the detection accuracy of large-scale / size targets cannot be guaranteed.
[0075] The irregularly shaped targets mentioned above generally include targets with centroid deviation and targets with proportional deviation. For targets with centroid deviation, take the target as an example, see Figure 3As shown in the figure, the centroid shift refers to the centroid of the lesion deviating from the center of the bounding box lesion bounding box / lesion bounding box. The left picture in the figure is the gold standard detection box of the lesion, which contains part of the aorta image. The right picture is the mask image of the irregular lesion surrounding the aorta. The other smaller box in the middle picture is the anchor box anchor set before detection. If the smaller anchor box anchor is detected at this time, when the intersection and union (IOU) value of the anchor box and the gold standard detection box is greater than the IOU threshold, it will be considered as the positive anchor for detecting the lesion, but it is actually a false positive of the aorta. Of course, if the gold standard detection box with a rotation angle is used here, the IOU value of the anchor and the gold standard detection box will be reduced and screened out, and will not be used as the positive anchor for detecting the lesion. However, the gold standard detection box that cannot be rotated is mainly used as an example for explanation here. In actual situations, most of them are gold standard detection boxes that cannot be rotated. It can be seen that for targets with offset centroids, the existing method will use the false positive anchor box as the detection box, thereby failing to ensure the detection accuracy of targets with offset centroids.
[0076] For targets with proportion deviation, the proportion deviation mainly includes the aspect ratio exceeding the proportion range, the width-to-depth ratio exceeding the proportion range, and the height-to-depth ratio exceeding the proportion range. Taking the target as a lesion as an example, see Figure 4 As shown in the figure, the ratio range of the gold standard detection frame of most lesions is usually within a fixed ratio range (for example, [1 / 2, 2]), but the ratio of some lesions may deviate from this range, which may cause the maximum IOU value of the gold standard detection frame of the lesion and the set anchor frame anchor to be less than the IOU threshold. For example, the small box in the figure is part of the large box, and the large box is the gold standard detection frame of the lesion. Here, because the IOU value of the small box and the large box is less than the IOU threshold, the small box is judged as a false negative anchor frame and is screened out, which should not be screened out. It can be seen that for targets with deviated ratios, the existing method will screen out the false negative anchor frame, thereby failing to ensure the detection accuracy of targets with deviated ratios.
[0077] Based on the above situations, the following method steps are proposed to ensure the detection accuracy of these targets.
[0078] S204: Input the medical image to be detected into a detection network for target detection processing to determine first bounding box information of each target.
[0079] Among them, the detection network here can be a neural network based on an anchor-base. The specific architecture of the neural network is not specifically limited here. For example, it can be a cascaded neural network that can perform multi-level coarse-to-fine detection processing on the input image. For the detection network, multiple anchor boxes / detection boxes of known proportions can be pre-set as detection anchors of the detection network. That is to say, optionally, the detection network in this embodiment can be a multi-scale detection network based on an anchor box.
[0080] Specifically, after obtaining the medical image to be tested, the medical image to be tested can be input into the detection network, and target detection processing is performed through multiple pre-set detection frames to obtain bounding box information of each target, which is recorded as first bounding box information. The bounding box here can be a bounding box surrounding the target, and the first bounding box information can include the coordinates of the center point of the target, the coordinates of each corner point of the bounding box, etc.
[0081] S206, inputting the medical image to be tested into a segmentation network for target segmentation processing, and determining second bounding box information of each target according to the segmentation result.
[0082] In this step, the segmentation network can be a segmentation network cascaded by multi-level segmentation modules, and can perform multi-level segmentation processing from coarse to fine on the input image. For example, optionally, the segmentation network in this embodiment can be a cascaded coarse-fine segmentation network. Specifically, the segmentation network can be pre-trained with a mask image of the target, and after training, after obtaining the medical image to be tested here, the medical image to be tested can be input into the trained segmentation network for target segmentation processing to obtain a segmentation result. The segmentation result can be a target segmentation image containing all targets. Through the position information, label information and other contents of each target on the target segmentation image, each target can be distinguished, and the bounding box information of each target can be obtained through the position information of each target, which is recorded as the second bounding box information. Similarly, the second bounding box information here can also include the coordinates of the center point of the target, the coordinates of each corner point of the bounding box, etc.
[0083] It should be noted that compared with the method of using a detection network to detect targets, using a segmentation network for target segmentation requires less training data when training the segmentation network. This is because the segmentation network is generally a dense segmentation process based on pixels, and large-scale targets usually contain more pixels. In this way, training the segmentation network is much easier than training a non-detection network, and the training efficiency will be higher. At the same time, the segmentation network can segment targets of any scale, so the segmentation network can more easily obtain the bounding box information after detecting large-scale targets and irregularly shaped targets.
[0084] In addition, there is no limitation on the order of the steps between S204 and S206. The two steps may be performed simultaneously or sequentially. For example, S206 may be performed first and then S204. This embodiment does not make any specific limitation on this.
[0085] S208: Determine target bounding box information of each target according to the first bounding box information of each target and the second bounding box information of each target.
[0086] In this step, after obtaining the first bounding box information and the second bounding box information of each target, the first bounding box information of each target obtained by detection can be supervised by segmenting the second bounding box information of each target, thereby obtaining more accurate bounding box information of each target, which is recorded as target bounding box information.
[0087] In the above target detection method, the acquired medical image to be detected including the detection target is input into the detection network for target detection processing, the first bounding box information of each target is obtained, and the medical image to be detected is input into the segmentation network for target segmentation processing, and the second bounding box information of each target is determined according to the segmentation result, and finally the target bounding box information of the target is determined according to the first bounding box information and the second bounding box information of each target. In this method, since the segmentation processing can be performed on targets of various shapes and various scales to obtain their bounding box information, it is possible to detect targets of various shapes and various scales, and at the same time, the bounding box information of each target is obtained by combining the bounding box information obtained by detecting each target, thereby ensuring the detection accuracy of the target.
[0088] The following embodiments describe in detail how to obtain the target bounding box through the first bounding box information and the second bounding box information of each target.
[0089] In another embodiment, another target detection method is provided. Based on the above embodiment, the above S208 may include the following steps A:
[0090] Step A: performing fusion processing or screening processing on the first bounding box information and the second bounding box information of the same target to determine the target bounding box information of each target.
[0091] Among them, for the same target that has both the first bounding box information and the second bounding box information, after obtaining the two bounding box information of the target, the two bounding box information can be fused or screened. Optionally, the fusion process or screening process includes at least non-maximum suppression. The non-maximum suppression process includes probability non-maximum suppression and volume non-maximum suppression. Usually, the default non-maximum suppression refers to probability non-maximum suppression, which means that for multiple overlapping boxes, only the box with the highest probability, that is, the most certain box, is retained. Volume non-maximum suppression means that for multiple overlapping boxes, the box with the largest volume is retained when overlapping. In other words, when the two bounding box information of the same target are fused or screened, the probabilities or volumes corresponding to the first bounding box information and the second bounding box information of the target can be compared, and the bounding box information with a larger probability or a larger volume can be taken as the target bounding box information corresponding to the target.
[0092] Of course, the fusion or screening process may also include averaging, etc. That is, when two bounding box information of the same target are fused or screened, the same information in the two bounding box information of the target may be summed and averaged, and finally the obtained averages are combined to obtain the target bounding box information corresponding to the target. Of course, the above-mentioned fusion or screening process may also be in other ways, which are not specifically limited here.
[0093] In addition, for targets with only one bounding box information (for example, target a only has the first bounding box information obtained by the detection network, but no second bounding box information obtained by the segmentation network, or target b only has the second bounding box information obtained by the segmentation network, but no first bounding box information obtained by the detection network), the bounding box information of the target can be directly used as the target bounding box information corresponding to the target.
[0094] In this embodiment, by fusing or filtering the first bounding box information and the second bounding box information of the same target, the corresponding target bounding box information is determined, which can improve the accuracy of the bounding box information of the target, that is, the accuracy of detecting the target can be improved. Further, the fusion or filtering process includes non-maximum suppression processing, which can quickly obtain the target bounding box information of the current target without affecting the detection results of other targets, improve the efficiency of obtaining the target bounding box information of the target, that is, improve the efficiency of detecting the target.
[0095] In the above embodiment, it is mentioned that the bounding box information of the target can be obtained through the segmentation result. The following is a detailed description of the process of how to obtain the bounding box information of the target through the segmentation result.
[0096] In another embodiment, another target detection method is provided, such as Figure 5As shown, based on the above embodiment, the above S206 may include the following steps:
[0097] S302, inputting the medical image to be tested into a segmentation network for target segmentation processing to obtain a segmentation result; the segmentation result includes a mask image of the target.
[0098] In this step, the segmentation network can be trained in advance with a mask image of the target, and each target can be marked in the mask image. After the segmentation network is trained, the medical image to be tested can be input into the trained segmentation network for target segmentation processing to obtain the target segmentation result. Specifically, the target segmentation image can be obtained, and the target segmentation image can actually be the mask image of the target.
[0099] S304: Separate the objects that are stuck together in the mask image, and calculate second bounding box information of each object on the mask image of the separated objects.
[0100] In this step, after obtaining the mask image of the target, the mask image may generally include a single target, or may include multiple targets that are stuck together, see Figure 6 As shown, at this time, it is necessary to separate the small targets in the adhered target. Here, a morphological opening operation (such as a connected domain algorithm) or a level set algorithm can be used to separate multiple adhered targets.
[0101] After separating the adhered targets, individual targets can be obtained. At the same time, the contour information and position information of each target can be obtained through the mask image in the target segmentation result. Then, the minimum bounding box method can be used to enclose each target to obtain the minimum bounding box corresponding to each target, that is, the second bounding box information of each target can be obtained.
[0102] Of course, for individual targets without adhesion, the contour information and position information of each target can also be obtained through the mask image in the target segmentation result, and then the minimum bounding box method can be directly used to enclose each target to obtain the minimum bounding box corresponding to each target, that is, to obtain the second bounding box information of each target.
[0103] In this embodiment, the medical image to be tested is input into a segmentation network for segmentation to obtain a segmentation result of a mask image including the target, and the targets that are adhered to each other in the mask image are separated and the second bounding box information of each individual target is calculated. Here, by separating the targets on the segmented mask image and calculating the bounding box information, it is possible to avoid targets that are adhered to each other being mistaken for one target, thereby reducing the accuracy of detection, thereby improving the accuracy of obtaining the second bounding box information of each target, that is, improving the accuracy of the bounding box information of the target obtained by segmentation.
[0104] The above embodiment mentioned that it is necessary to combine the detection network and the segmentation network to obtain the bounding box information of targets of various scales and shapes, which inevitably involves the training of the segmentation network and the detection network. The following embodiment describes the specific training process of the detection network and the segmentation network.
[0105] In another embodiment, another target detection method is provided, such as Figure 7 As shown, based on the above embodiment, the training method of the above detection network and segmentation network may include the following steps:
[0106] S402, obtaining a plurality of training sample images; each training sample image includes a sample object and standard bounding box information of the sample object.
[0107] In this step, training sample images of multiple sample objects may be obtained in advance. Generally, these multiple training sample images may be sample images of the same part of each sample object. Each sample image may include one or more sample targets, where the sample target may be a lesion.
[0108] In addition, each sample target can be enclosed by a minimum bounding box to obtain the bounding box of each sample target. Here, the bounding box information surrounding the sample target can also be obtained, which is recorded as the standard bounding box information. At the same time, a gold standard mask image of the sample target can also be set for each training sample image for use in subsequent training of the segmentation network.
[0109] S404, determining a long-tail distribution target among each sample target according to at least one of standard bounding box information of each sample target, a physical size of each sample target, and pixel information of an image corresponding to each training sample image in the standard bounding box.
[0110] In this step, taking the bounding box as a three-dimensional detection box as an example, the standard bounding box information of each sample target may include the width, height and depth of the bounding box, which are recorded as w, h and d respectively, so the size of the sample target can be recorded as l = (w + h + d) / 3. By calculating all sample targets in this way, the physical size corresponding to each sample target can be obtained.
[0111] Specifically, the pixel information may include pixel values. The pixel values on each training sample image may be counted in advance, and the pixel values of the images in each standard bounding box may be obtained in combination with the position of the standard bounding box of each sample target on the training sample image. Afterwards, the target with long-tail distribution may be determined from each sample target in combination with the standard bounding box information of each sample target obtained above and the physical size of each sample target.
[0112] Optionally, the long-tail distribution target here includes at least one of the following: the physical size of the sample target is greater than the size threshold; the size ratio of the sample target exceeds the ratio range; the sample target is a target with a center of mass shift; the center of mass shift is used to characterize that the eccentricity of the sample target is greater than the eccentricity threshold.
[0113] Here, the sample targets whose size ratio exceeds the ratio range and the sample targets whose center of mass is offset can be called irregularly shaped sample targets.
[0114] The eccentricity here is defined as the degree to which the centroid of the sample object deviates from the center of the standard bounding box where the sample object is located. The size ratio of the sample object exceeds the ratio range, which may be that at least one of the aspect ratio, width-to-depth ratio, height-to-depth ratio, etc. exceeds the ratio range. The size threshold, ratio range, eccentricity threshold, etc. here can be set according to actual conditions and are not specifically limited here.
[0115] S406, dividing the multiple training sample images into two training data sets according to the long-tail distribution target; the two training data sets are used to train the detection network and the segmentation network respectively.
[0116] In this step, when specifically dividing the training data set, optionally, a first training sample image containing a long-tail distribution target among multiple training sample images, and a mask image of the long-tail distribution target obtained in the first training sample image, are used as training data sets for the segmentation network; a second training sample image except the first training sample image among multiple training sample images is used as a training data set for the detection network; and the second training sample image does not contain a long-tail distribution target.
[0117] That is to say, multiple training data can be divided into two data sets, one of which includes a first training sample image, in which the sample target in the first training sample image is a long-tail distribution target, and the segmentation network is trained with the one data set; the other data set includes a second sample image, in which the sample target in the second training sample image is a target that does not contain a long-tail distribution target, and the detection network is trained with the other data set. In other words, the training data set of the segmentation network includes long-tail distribution targets (generally large-sized and irregularly shaped sample targets), that is, the segmentation network is trained with large-sized and irregularly shaped sample targets. The training data set of the detection network does not include long-tail distribution targets (generally small-sized and regularly shaped sample targets), that is, the detection network is trained with small-sized and regularly shaped sample targets.
[0118] In this embodiment, by acquiring multiple training sample images, the physical size of each sample target is determined by the standard bounding box information of the sample target in each training sample image, and the long-tail distribution target is determined from each sample target by the determined physical size, standard bounding box information, pixel information and other information of the target, and the multiple training samples are divided into two data sets for training the detection network and the segmentation network respectively through the long-tail distribution target, so that the detection network is trained by the small-sized data set to improve the detection performance of the detection network for small-sized targets; at the same time, the segmentation network is trained by the large-sized targets, which can improve the training efficiency of the segmentation network. Furthermore, by using small-sized targets and targets with regular shapes to train the detection network, the accuracy of the detection network in detecting small-sized targets can be further improved; in addition, by using large-sized targets and targets with irregular shapes to train the segmentation network, the generalization performance of the segmentation network can be improved.
[0119] A specific training example is given below.
[0120] First, multiple training sample images can be obtained, and then the size of the sample target in each training sample image can be calculated. After the size of each sample target is calculated, a size threshold can be set in advance based on doctor experience or the distribution law of sample data. For example, the size threshold here can be set to 32 mm.
[0121] For example, see Figure 8 The statistical distribution diagram of each sample target in each training sample image is shown in the figure, where the horizontal axis is the size of the sample target, in mm, and the vertical axis is the number of sample targets at each size, in units of number. In order to more clearly show the data distribution of the large size part, Figure 8 The size 30-70 part of the image is enlarged to obtain Fig. 9 .
[0122] After setting the size threshold, the size of each sample target can be compared with the size threshold respectively, so as to divide each sample target into two parts by the size threshold. One part is that the size of the sample target is less than or equal to the size threshold, and the sample targets in this part and their corresponding mask images and corresponding standard bounding box information are used as the first data set; for example, the sample targets whose size is less than or equal to 32 mm are recorded as Dataset1. The other part is that the size of the sample target is greater than the size threshold, and the sample targets in this part and their corresponding mask images and corresponding standard bounding box information are used as the second data set; for example, the sample targets whose size is greater than 32 mm are recorded as Dataset2.
[0123] After obtaining the first data set and the second data set, the segmentation network and the detection network can be trained. When training the detection network, optionally, the following steps B1-B2 can be used for training:
[0124] Step B1, determining a third data set from the first data set according to standard bounding box information of each sample target; the sample targets in the third data set are sample targets with irregular shapes.
[0125] In this step, for sample targets with irregular shapes, including sample targets with offset centroids and sample targets with deviated proportions, targets with offset centroids can be screened out from the first data set by manual screening or image analysis (for example, by analyzing whether the pixel values of the sample targets on the image are evenly distributed).
[0126] For targets with deviated proportions, the proportion range of each target can also be pre-set, for example, it can be set to: [1,1,1], [2,1,1], [1,2,1], [1,1,2], [1,2,2], [2,1,2], [2,2,1], etc. After obtaining the standard bounding box information of each sample target, taking the three-dimensional bounding box as an example, the aspect ratio, width-depth ratio and height-depth ratio of each sample target can also be calculated by calculating the standard bounding box information; then, the aspect ratio, width-depth ratio and height-depth ratio of each sample target can be compared with the corresponding proportion range respectively to determine whether there is a ratio in the aspect ratio, width-depth ratio and height-depth ratio of the sample target that exceeds the corresponding proportion range. If there is at least one ratio that exceeds the proportion range, the sample target is determined to be an irregularly shaped sample target; if the three ratios of a sample target are all within the proportion range, the sample target is determined to be a regular shaped target. This operation is performed on all sample targets, and finally the sample targets with deviated proportions can be screened out from the first data set.
[0127] Through the above steps, sample targets with centroid offset and scale deviation can be screened out from small-scale sample targets, that is, sample targets with irregular shapes can be screened out, and these sample targets with irregular shapes and their corresponding mask images and corresponding standard bounding box information can be used as the third data set, which is recorded as Dataset3.
[0128] It should be noted that the aspect ratio, width-to-depth ratio, and height-to-depth ratio of the sample target here may correspond to the same ratio range, or the three ratios may each correspond to a different ratio range, that is, the sample target corresponds to three different ratio ranges.
[0129] For example, see Fig.10As shown in the figure, it is a distribution diagram of the width / depth ratio and height / depth ratio of each sample target, where each sample target has a set mark box ratio. Fig.10 The sample targets shown in Fig.11 Arrows are used to mark some sample targets with proportion deviation.
[0130] Step B2: Use the part of the first data set except the third data set to train the detection network.
[0131] In this step, after the third data set is screened out from the first data set, the third data set can be completely subtracted from the first data set to obtain a new first data set. Afterwards, the new first data set can be used as a training sample for the detection network to train the detection network. Here, the loss during the training of the detection network can be composed of classification loss class and regression loss regression, that is, loss = loss_class + loss_regression. The detection network can be a cascaded anchor-base network.
[0132] Since the detection network is trained with small-sized and regularly shaped sample targets and their annotation information, and does not include large-sized targets and irregularly shaped targets, the detection network trained in this way can improve the performance of detecting small-sized targets, that is, the accuracy of the detected targets is higher.
[0133] When training the segmentation network, optionally, the following steps C1-C2 may be used for training:
[0134] Step C1, determining a third data set from the first data set according to standard bounding box information of each sample target; the sample targets in the third data set are sample targets with irregular shapes.
[0135] The explanation of this step can refer to the explanation of the above step B1, which will not be repeated here.
[0136] Step C2: training the segmentation network using the third data set and the second data set.
[0137] In this step, after finding the third data set with irregular shape from the first data set, the third data set can be subtracted from the first data set, and the third data set can be added to the second data set to obtain a new second data set. Afterwards, the segmentation network can be trained using the new second data set, where each sample target in the new second data set contains a corresponding mask image, which can be used as the gold standard for training the segmentation network. It can be directly labeled when obtaining the training sample image, or it can be obtained by re-labeling each sample target in the new second data set when training the segmentation network. In addition, the segmentation network here can use a cascaded coarse and fine segmentation network SegNet, and through training, a trained segmentation network can be finally obtained.
[0138] Since large-sized targets and irregular-shaped targets are used in training the segmentation network here, and the segmentation network is generally densely segmented by pixels, and large-sized targets contain more pixels, when large-sized targets are used to train a segmentation network with the same accuracy as the detection network, the required training sample images are relatively less than the detection network, thereby improving the efficiency of segmentation network training while ensuring the performance of the segmentation network. In addition, using irregular-shaped targets to train the segmentation network here can also improve the generalization performance of the segmentation network, so that the trained segmentation network can better segment targets of various shapes.
[0139] In this embodiment, by screening out irregularly shaped targets from small-sized targets to train the detection network, the accuracy of the detection network in detecting small-sized targets can be further improved; in addition, by using large-sized targets and irregularly shaped targets to train the segmentation network, the generalization performance of the segmentation network can be improved.
[0140] In addition, it should be noted that the Figure 3 , 4 , 6, and the lines and specific contents in 8-11 do not affect the essential contents of the embodiments of the present application.
[0141] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0142] Based on the same inventive concept, the embodiment of the present application also provides a target detection device for implementing the target detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more target detection device embodiments provided below can refer to the limitations on the target detection method above, and will not be repeated here.
[0143] In one embodiment, Fig.12 As shown, a target detection device is provided, comprising: an acquisition module 11, a detection module 12, a segmentation module 13 and a determination module 14, wherein:
[0144] The acquisition module 11 is used to acquire a medical image to be tested; the medical image to be tested includes at least one target;
[0145] A detection module 12, used for inputting the medical image to be detected into the detection network for target detection processing, and determining the first bounding box information of each target;
[0146] The segmentation module 13 is used to input the medical image to be tested into the segmentation network for target segmentation processing, and determine the second bounding box information of each target according to the segmentation result;
[0147] The determination module 14 is used to determine the target bounding box information of each target according to the first bounding box information of each target and the second bounding box information of each target.
[0148] Optionally, the detection network is a cascaded anchor-box-based multi-scale detection network, and the segmentation network is a cascaded coarse and fine segmentation network.
[0149] In another embodiment, another target detection device is provided. Based on the above embodiment, the above determination module 14 may include a processing unit, which is used to fuse or filter the first bounding box information and the second bounding box information of the same target to determine the target bounding box information of each target.
[0150] Optionally, the above-mentioned fusion processing or screening processing at least includes non-maximum suppression processing.
[0151] In another embodiment, another target detection device is provided. Based on the above embodiment, the segmentation module 13 may include a segmentation unit and a calculation unit, wherein:
[0152] The segmentation unit is used to input the medical image to be tested into the segmentation network to perform target segmentation processing and obtain a segmentation result; the segmentation result includes a mask image of the target;
[0153] The calculation unit is used to separate the objects that are stuck together in the mask image, and calculate the second bounding box information of each object on the mask image of the separated objects.
[0154] In another embodiment, another target detection device is provided. Based on the above embodiment, the above device may further include a training module, which may include a sample acquisition unit, a size determination unit, a division unit and a training unit, wherein:
[0155] A sample acquisition unit, used to acquire a plurality of training sample images; each training sample image includes a sample target, standard bounding box information of the sample target, and a mask image of the sample target;
[0156] A long-tail target determination unit, configured to determine a long-tail distribution target among each sample target based on at least one of standard bounding box information of each sample target, a physical size of each sample target, and pixel information of an image corresponding to each training sample image in the standard bounding box;
[0157] The division unit is used to divide the multiple training sample images into two training data sets according to the long-tail distribution target; the two training data sets are used to train the detection network and the segmentation network respectively.
[0158] Optionally, the division unit is specifically used to use a first training sample image containing a long-tail distribution target among multiple training sample images, and a mask image of the long-tail distribution target obtained in the first training sample image, as a training data set for the segmentation network; and use a second training sample image except the first training sample image among multiple training sample images as a training data set for the detection network; the second training sample image does not contain the long-tail distribution target.
[0159] Optionally, the long-tail distribution targets include at least one of the following: the physical size of the sample target is greater than a size threshold; the size ratio of the sample target exceeds a ratio range; the sample target is a target with a center of mass shift; the center of mass shift is used to characterize that the eccentricity of the sample target is greater than an eccentricity threshold.
[0160] Each module in the above target detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0161] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0162] A medical image to be tested is obtained; the medical image to be tested includes at least one target; the medical image to be tested is input into a detection network for target detection processing, and first bounding box information of each target is determined; the medical image to be tested is input into a segmentation network for target segmentation processing, and second bounding box information of each target is determined according to the segmentation result; target bounding box information of each target is determined according to the first bounding box information of each target and the second bounding box information of each target.
[0163] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0164] The first bounding box information and the second bounding box information of the same target are fused or filtered to determine the target bounding box information of each target.
[0165] In one embodiment, the above-mentioned fusion processing or screening processing at least includes non-maximum suppression processing.
[0166] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0167] The medical image to be tested is input into the segmentation network for target segmentation processing to obtain a segmentation result; the segmentation result includes a mask image of the target; the adhered targets in the mask image are separated, and the second bounding box information of each target is calculated on the mask image of the separated targets.
[0168] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0169] Acquire multiple training sample images; each training sample image includes a sample target and standard bounding box information of the sample target; determine the long-tail distribution target in each sample target according to at least one of the standard bounding box information of each sample target, the physical size of each sample target and the pixel information of each training sample image corresponding to the image in the standard bounding box; divide the multiple training sample images into two training data sets according to the long-tail distribution target; the two training data sets are used to train the detection network and the segmentation network respectively.
[0170] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0171] A first training sample image containing a long-tail distribution target among multiple training sample images and a mask image of the long-tail distribution target obtained in the first training sample image are used as training data sets for the segmentation network; a second training sample image except the first training sample image among the multiple training sample images is used as a training data set for the detection network; the second training sample image does not contain the long-tail distribution target.
[0172] In one embodiment, the long-tail distribution target includes at least one of the following: the physical size of the sample target is greater than the size threshold; the size ratio of the sample target exceeds the ratio range; the sample target is a target with a center of mass shift; the center of mass shift is used to characterize that the eccentricity of the sample target is greater than the eccentricity threshold.
[0173] In one embodiment, the detection network is a cascaded anchor box-based multi-scale detection network, and the segmentation network is a cascaded coarse and fine segmentation network.
[0174] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0175] A medical image to be tested is obtained; the medical image to be tested includes at least one target; the medical image to be tested is input into a detection network for target detection processing, and first bounding box information of each target is determined; the medical image to be tested is input into a segmentation network for target segmentation processing, and second bounding box information of each target is determined according to the segmentation result; target bounding box information of each target is determined according to the first bounding box information of each target and the second bounding box information of each target.
[0176] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0177] The first bounding box information and the second bounding box information of the same target are fused or filtered to determine the target bounding box information of each target.
[0178] In one embodiment, the above-mentioned fusion processing or screening processing at least includes non-maximum suppression processing.
[0179] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0180] The medical image to be tested is input into the segmentation network for target segmentation processing to obtain a segmentation result; the segmentation result includes a mask image of the target; the adhered targets in the mask image are separated, and the second bounding box information of each target is calculated on the mask image of the separated targets.
[0181] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0182] Acquire multiple training sample images; each training sample image includes a sample target and standard bounding box information of the sample target; determine the long-tail distribution target in each sample target according to at least one of the standard bounding box information of each sample target, the physical size of each sample target and the pixel information of each training sample image corresponding to the image in the standard bounding box; divide the multiple training sample images into two training data sets according to the long-tail distribution target; the two training data sets are used to train the detection network and the segmentation network respectively.
[0183] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0184] A first training sample image containing a long-tail distribution target among multiple training sample images and a mask image of the long-tail distribution target obtained in the first training sample image are used as training data sets for the segmentation network; a second training sample image except the first training sample image among the multiple training sample images is used as a training data set for the detection network; the second training sample image does not contain the long-tail distribution target.
[0185] In one embodiment, the long-tail distribution target includes at least one of the following: the physical size of the sample target is greater than the size threshold; the size ratio of the sample target exceeds the ratio range; the sample target is a target with a center of mass shift; the center of mass shift is used to characterize that the eccentricity of the sample target is greater than the eccentricity threshold.
[0186] In one embodiment, the detection network is a cascaded anchor box-based multi-scale detection network, and the segmentation network is a cascaded coarse and fine segmentation network.
[0187] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0188] A medical image to be tested is obtained; the medical image to be tested includes at least one target; the medical image to be tested is input into a detection network for target detection processing, and first bounding box information of each target is determined; the medical image to be tested is input into a segmentation network for target segmentation processing, and second bounding box information of each target is determined according to the segmentation result; target bounding box information of each target is determined according to the first bounding box information of each target and the second bounding box information of each target.
[0189] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0190] The first bounding box information and the second bounding box information of the same target are fused or filtered to determine the target bounding box information of each target.
[0191] In one embodiment, the above-mentioned fusion processing or screening processing at least includes non-maximum suppression processing.
[0192] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0193] The medical image to be tested is input into the segmentation network for target segmentation processing to obtain a segmentation result; the segmentation result includes a mask image of the target; the adhered targets in the mask image are separated, and the second bounding box information of each target is calculated on the mask image of the separated targets.
[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0195] Acquire multiple training sample images; each training sample image includes a sample target and standard bounding box information of the sample target; determine the long-tail distribution target in each sample target according to at least one of the standard bounding box information of each sample target, the physical size of each sample target and the pixel information of each training sample image corresponding to the image in the standard bounding box; divide the multiple training sample images into two training data sets according to the long-tail distribution target; the two training data sets are used to train the detection network and the segmentation network respectively.
[0196] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0197] A first training sample image containing a long-tail distribution target among multiple training sample images and a mask image of the long-tail distribution target obtained in the first training sample image are used as training data sets for the segmentation network; a second training sample image except the first training sample image among the multiple training sample images is used as a training data set for the detection network; the second training sample image does not contain the long-tail distribution target.
[0198] In one embodiment, the long-tail distribution target includes at least one of the following: the physical size of the sample target is greater than the size threshold; the size ratio of the sample target exceeds the ratio range; the sample target is a target with a center of mass shift; the center of mass shift is used to characterize that the eccentricity of the sample target is greater than the eccentricity threshold.
[0199] In one embodiment, the detection network is a cascaded anchor box-based multi-scale detection network, and the segmentation network is a cascaded coarse and fine segmentation network.
[0200] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0201] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0202] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0203] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A target detection method, characterized in that: The method comprises: Acquire a medical image to be tested; the medical image to be tested includes at least one target; Inputting the medical image to be tested into a detection network for target detection processing to determine first bounding box information of each target; Inputting the medical image to be tested into a segmentation network for target segmentation processing, and determining the second bounding box information of each target according to the segmentation result; Determining target bounding box information of each target according to the first bounding box information of each target and the second bounding box information of each target; The division method of the training data sets of the detection network and the segmentation network includes: Acquire a plurality of training sample images; each of the training sample images includes a sample target and standard bounding box information of the sample target; Determine a long-tail distribution target among the sample targets according to at least one of standard bounding box information of the sample targets, a physical size of the sample targets, and pixel information of an image corresponding to the standard bounding box of each training sample image; The multiple training sample images are divided into two training data sets according to the long-tail distribution target; the two training data sets are used to train the detection network and the segmentation network respectively.
2. The method according to claim 1, characterized in that The determining the target bounding box information of each target according to the first bounding box information of each target and the second bounding box information of each target includes: The first bounding box information and the second bounding box information of the same target are fused or filtered to determine target bounding box information of each target.
3. The method according to claim 2, characterized in that The fusion processing or screening processing at least includes non-maximum suppression processing.
4. The method according to any one of claims 1 to 3, characterized in that: The step of inputting the medical image to be tested into a segmentation network for target segmentation processing, and determining the second bounding box information of each target according to the segmentation result, comprises: Inputting the medical image to be tested into a segmentation network for target segmentation processing to obtain a segmentation result; the segmentation result includes a mask image of the target; The objects that are stuck together in the mask image are separated, and second bounding box information of each of the objects is calculated on the mask image of the separated objects.
5. The method according to claim 1, characterized in that The step of dividing the plurality of training sample images into two training data sets according to the long-tail distribution target includes: Using a first training sample image containing the long-tail distribution target among the multiple training sample images, and a mask image of the long-tail distribution target obtained in the first training sample image, as a training data set for the segmentation network; A second training sample image other than the first training sample image among the multiple training sample images is used as a training data set of the detection network; the second training sample image does not contain the long-tail distribution target.
6. The method according to claim 1, characterized in that The long-tail distribution target includes at least one of the following: The physical size of the sample object is greater than a size threshold; The size ratio of the sample target exceeds the ratio range; The sample target is a target with a mass center shift; the mass center shift is used to indicate that the eccentricity of the sample target is greater than an eccentricity threshold.
7. The method according to any one of claims 1 to 3, characterized in that: The detection network is a cascaded anchor box-based multi-scale detection network, and the segmentation network is a cascaded coarse and fine segmentation network.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Target detection method, device and equipment, and target detection network training method, device and equipment
CN110298298A
Target detection method and related device
CN112989872A