Medical image small target detection method and device and electronic equipment

By introducing the P2 detection head and attention mechanism into the medical image detection model, combined with image cropping and annotation frame adjustment, the problem of low detection accuracy of small targets in medical images is solved, and the small target recognition and extraction effect is significantly improved.

CN118570185APending Publication Date: 2024-08-30HUAZHONG NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410776813.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The existing technology has low accuracy in detecting small targets in medical images. It is affected by problems such as interference factors, difficulty in distinguishing the target area, proximity between the background and the target, and the target area is too small, resulting in unsatisfactory detection results.

Method used

An image detection model equipped with a P2 detection head and an attention mechanism is used to detect the image to be tested. The attention mechanism enhances the ability to extract object feature information. The P2 detection head enhances the ability to mine small target information, combined with image cropping and labeling frame adjustment. Improve small target recognition and extraction effects.

Benefits of technology

It effectively improves the recognition and extraction effect of small target information in medical images, improves detection accuracy, and solves the problem of low detection accuracy in the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570185A
    Figure CN118570185A
Patent Text Reader

Abstract

The invention provides a medical image small target detection method and device and electronic equipment, and the method comprises the steps: obtaining a to-be-detected image; the to-be-detected image comprises a medical treatment point and / or a medical tool; inputting the to-be-detected image into a pre-trained image detection model for detection to obtain an image detection result; the image detection model comprises a Backbone structure and a Head structure, an attention mechanism is configured in the Backbone structure in advance, and a P2 detection head is configured in the Head structure in advance. According to the invention, the method can effectively improve the recognition and extraction effects of the small target information in the to-be-detected image, and solves a problem that the detection precision of the medical image is lower in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image detection technology, and in particular to a method, device and electronic equipment for detecting small objects in medical images. Background Art

[0002] Machine learning, deep learning and other technologies are also playing an increasingly important role in the field of computer vision. As an important research direction in the field of computer vision, object detection is facing some problems while developing rapidly. There are certain difficulties to be solved in the detection of small objects.

[0003] In medical image processing, some medical images contain some small targets, such as some medical treatment points, or some small medical tools. When processing such medical images, the detection task of small targets has many interference factors, such as the difficulty of collecting pictures, the difficulty of distinguishing the target area, the background and the target are too close, the target area is too small, etc., which brings certain difficulties to the detection task and affects the detection results.

[0004] There is currently no good solution to the problem of low detection accuracy of medical images in existing related technologies. Summary of the invention

[0005] The present invention provides a method, device and electronic equipment for detecting small targets in medical images, which are used to solve the defect of low detection accuracy of medical images in the prior art.

[0006] In a first aspect, the present invention provides a method for detecting small objects in medical images, comprising:

[0007] Acquire an image to be tested; the image to be tested includes a medical treatment point and / or a medical tool;

[0008] The image to be tested is input into a pre-trained image detection model for detection to obtain an image detection result; the image detection model includes a Backbone structure and a Head structure, wherein the Backbone structure is pre-configured with an attention mechanism, and the Head structure is pre-configured with a P2 detection head.

[0009] According to a method for detecting small targets in medical images provided by the present invention, before the image to be detected is input into a pre-trained image detection model for detection, the method comprises:

[0010] The image to be tested is cropped to adjust the image size of the image to be tested.

[0011] According to a small target detection method for medical images provided by the present invention, the image detection model includes a C2f structure, an SPPF structure, a Conv structure, a Concat structure and an upsampling structure.

[0012] According to a small target detection method for medical images provided by the present invention, training the image detection model includes:

[0013] Acquire a sample picture set; the sample picture set includes a plurality of sample pictures, and the sample pictures include medical treatment points and medical tools;

[0014] With the goal of minimizing the model loss of the image detection model, the image detection model is trained using the sample picture set.

[0015] According to a method for detecting small objects in medical images provided by the present invention, before training the image detection model using the sample picture set, the method includes:

[0016] The medical treatment points and medical tools in the sample image are marked by a marking frame.

[0017] According to a small target detection method for medical images provided by the present invention, medical treatment points and medical tools in the sample image are annotated by a labeling frame, including:

[0018] A circular annotation frame is used to annotate the medical treatment points in the sample image.

[0019] According to a method for detecting small objects in medical images provided by the present invention, before training the image detection model using the sample picture set, the method further includes:

[0020] The file format of the labeled sample image is adjusted.

[0021] According to a small target detection method for medical images provided by the present invention, training the image detection model includes:

[0022] Setting training parameters of the image detection model;

[0023] The training parameters include learning rate, momentum, weight decay, training threshold, image size of the sample image, number of iterations and batch size.

[0024] In a second aspect, the present invention further provides a medical image small object detection device, comprising:

[0025] An acquisition module, used for acquiring an image to be tested; the image to be tested contains medical treatment points and / or medical tools;

[0026] The detection module is used to input the image to be tested into a pre-trained image detection model for detection to obtain an image detection result; the image detection model includes a Backbone structure and a Head structure, wherein the Backbone structure is pre-configured with an attention mechanism, and the Head structure is pre-configured with a P2 detection head.

[0027] In a third aspect, the present invention further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for detecting small targets in medical images as described in the first aspect above is implemented.

[0028] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for detecting small objects in medical images as described in the first aspect above.

[0029] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method for detecting small objects in medical images as described in the first aspect above.

[0030] Compared with the prior art, the present invention has the following beneficial effects:

[0031] The medical image small target detection method provided by the present invention detects and identifies the image to be tested by using an image detection model equipped with a P2 detection head and an attention mechanism, wherein the attention mechanism can enhance the image detection model's ability to extract object feature information in the image to be tested, thereby improving the image detection model's ability to extract small target features in the image to be tested; the P2 detection head can enhance the image detection model's ability to mine small target information, making the image detection model more capable of understanding the content of small target information. In summary, this method can effectively improve the recognition and extraction effects of small target information in the image to be tested, solving the problem of low detection accuracy of medical images in existing related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the present invention or 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 is a flow chart of the small target detection method for medical images proposed by the present invention;

[0034] Figure 2 is a schematic diagram of the structure of an image detection model in one embodiment of the present invention;

[0035] Figure 3 It is a structural block diagram of the medical image small object detection device proposed by the present invention;

[0036] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] The present invention provides a method for detecting small objects in medical images. Figure 1 is a flow chart of the small target detection method for medical images proposed by the present invention. Figure 1 As shown, the method comprises the following steps:

[0039] Step S101, obtaining an image to be tested; the image to be tested includes medical treatment points and / or medical tools;

[0040] Step S102, input the image to be tested into a pre-trained image detection model for detection to obtain an image detection result; the image detection model includes a Backbone structure and a Head structure, wherein the Backbone structure is pre-configured with an attention mechanism, and the Head structure is pre-configured with a P2 detection head.

[0041] In this method, firstly, the image to be tested is obtained, and the image to be tested contains the medical treatment point or medical tool to be detected. Then, the image to be tested is input into the image detection model. The basic framework of the image detection model can adopt the YOLOv8 target detection model or the traditional YOLOv5 target detection model. For the traditional YOLOv8 target detection model, the image to be tested must undergo two 3*3 convolutions to eliminate redundant information and improve the extraction of feature information. In this process, since the target information is not easy to identify, it is easy to fail to detect. Therefore, in the image detection model used in this method, the Backbone structure is pre-configured with an attention mechanism, which enhances the image detection model's ability to extract feature information of objects in the image to be tested through the attention mechanism, thereby improving the image detection model's ability to extract small target features in the image to be tested. For the type of attention mechanism, it can be selected and adjusted according to actual needs. In this method, the CBAM attention mechanism (Convolutional Block Attention Module) is adopted. For the traditional YOLOv8 target detection model, since the target information is too small, when the convolutional neural network is used to extract features, the features of the target information will become less and less as the number of convolutional layers increases. For small targets, the feature information will be reduced more and more. Therefore, the image detection model used in this method is also equipped with a P2 detection head, which can enhance the image detection model's ability to mine small target information, making the image detection model more capable of understanding the content of small target information. Through the above method, the image to be tested is detected, which can effectively improve the recognition and extraction effect of small target information in the image to be tested, and solve the problem of low detection accuracy of medical images in existing related technologies.

[0042] Generally speaking, for an image to be tested with small target features, the size of the original image to be tested is relatively large, for example, an image with a size of 2048*2448, in which the small target features occupy a relatively small proportion in the image, which is not conducive to detecting the small target in the image to be tested. Therefore, in some embodiments, before the image to be tested is input into the pre-trained image detection model for detection, the following steps are performed: cropping the image to be tested and adjusting the image size of the image to be tested.

[0043] Exemplarily, the image size of the original image to be tested is cropped to a test image with an image size of 1280*1280. It is worth noting that in the process of image cropping, the image to be tested also needs to be preliminarily identified. At least the approximate positions of small target features (medical treatment points and medical tools) in the image to be tested should be identified to prevent the removal of small target features that need to be detected during the cropping process. Through the above operation, the overall size of the image to be tested can be reduced, thereby increasing the proportion of small target features in the image to be tested, that is, the proportion of effective features, thereby improving the recognition accuracy of the image to be tested.

[0044] In some of the embodiments, the image detection model includes a C2f structure, an SPPF structure (Spatial PyramidPooling with Features structure), a Conv structure, a Concat structure and an upsampling structure.

[0045] For example, Figure 2 is a schematic diagram of the structure of an image detection model in an embodiment of the present invention. Figure 2 As shown in the figure, the network structure of the image detection model includes 10 C2f structures, 1 SPPF structure, 8 Conv structures, 2 CBAM structures, 6 Concat structures, 3 upsampling structures and 4 detection heads. Among them, the C2f structure includes 3×3 convolution layers, BN (Batch Normalization) layers and SiLU activation function layers cascaded in sequence; the SPPF structure includes 5×5 global pooling layers cascaded in sequence, and the results are spliced ​​through the Concat structure; the Conv structure includes 1×1 convolution layers, BN layers and ReLu activation function layers cascaded in sequence; the CBAM structure includes a channel attention module and a spatial attention module.

[0046] After adding the P2 detection head to the Head structure, a feature fusion part is also added to the Neck part of the image detection model. Specifically, after the 15th layer of the C2f structure in the Neck part, an upsampling structure and a C2f structure are added, and after feature fusion, the P2 detection head is obtained. After passing through the 18th layer of the C2f module, after one convolution, and then another C2f structure, after feature fusion, the P3 detection head is obtained. The newly added P2 detection head part can detect the features of smaller targets. This is more conducive to the image detection model to extract feature information of small targets.

[0047] In some of the embodiments, training an image detection model includes: obtaining a sample picture set; the sample picture set includes a number of sample pictures, and the sample pictures include medical treatment points and medical tools; with the goal of minimizing the model loss of the image detection model, training the image detection model through the sample picture set.

[0048] In this embodiment, after obtaining the sample picture set, in order to improve the training effect of the image detection model, the image size of the sample picture can also be cropped in advance. For the sample pictures in the sample picture set, the data set can also be divided, and 70% of the sample pictures are used as the training set, 20% of the sample pictures are used as the verification set, and 10% of the sample pictures are used as the test set. Then, the image detection model is trained with the sample pictures in the training set to reduce the model loss of the image detection model.

[0049] Specifically, this embodiment uses the WIoU (Wise-IoU) function as the loss function of the image detection model. The WIoU function introduces a weight factor, which adaptively adjusts the weight of the overlapping part according to the size of the target, paying more attention to small targets. The distance attention is constructed based on the distance metric, and the WIoU with a two-layer attention mechanism is obtained. v1 , and its calculation formula is as follows:

[0050] L WIoUv1 =R WIoU ×L Iou

[0051]

[0052] L IoU =1-IoU

[0053]

[0054] Among them, L WIoUv1 represents the weighted IoU loss function, R WIoU Represents the weight coefficient, L Iou represents the basic IoU loss; and Respectively represent the horizontal and vertical coordinates of the center point of the predicted bounding box, and Represents the horizontal and vertical coordinates of the center point of the true bounding box, c w Indicates the width of the anchor box, c h represents the height of the anchor box; P represents the predicted box, GT represents the real annotation box, P∩GT represents the intersection area of ​​P and GT, and P∪GT represents the union area of ​​P and GT. Then, β is used to construct a non-monotonic focusing coefficient and apply it to WIoU v1 We get WIoU with dynamic non-monotonic FM v3 . Utilizing a smart gradient gain allocation strategy for dynamic non-monotonic FM, WIoU v3 The superior performance is obtained, and the calculation formula is as follows:

[0055] L WIoU =r×LWIoUv1

[0056]

[0057]

[0058] Among them, L WIoU is the adjusted weighted IoU loss function, r represents the adjustment factor, β is the non-monotonic focusing coefficient, δ is the threshold parameter, and α is the minimum value of IoU; L * IoU represents the ideal IoU loss, L IoU represents the actual IoU loss.

[0059] Furthermore, before training the image detection model with the sample picture set, the method includes: annotating the medical treatment points and medical tools in the sample pictures with the annotation box. Specifically, annotating the medical treatment points and medical tools in the sample pictures with the annotation box includes: annotating the medical treatment points in the sample pictures with the circular annotation box.

[0060] Furthermore, before training the image detection model through the sample picture set, the method further includes: adjusting the file format of the labeled sample pictures.

[0061] Exemplarily, sample images of different angles captured by the camera are used to mark the feature information of small targets in the image using the Labelme annotation tool. Since the feature information of small targets is closer to a circle, a circular annotation box is used to mark the small target treatment point, and the medical tools are marked with a square annotation box. Convert the json file annotated by Labelme into the txt file required for image detection model training. Since the circular annotation box annotated by Labelme is composed of the center of the circle and any point on the circle, that is, it is composed of two points, this is very bad for data format conversion and experimental training. Therefore, this embodiment divides the circular box into the following 24 angles:

[0062] theta_numbers=[0,15,30,45,60,75,90,105,120,135,150,165,180,195,210,225,240,255,270,285,300,315,330,345]

[0063] Take 24 points on the circle equally, and determine the position of the label by extracting the coordinates of the 24 points. In this way, the two points originally marked are divided into 24 points. When converted into a txt file, 48 coordinates are generated. The coordinates are converted by obtaining the position of the marked circle center self.x, self.y, and the radius of the circle self.r. The conversion formula is as follows:

[0064] X=self.x+self.r*math.cos(theta)

[0065] Y=self.y+self.r*math.sin(theta)

[0066] Among them, X is the converted horizontal coordinate, Y is the converted vertical coordinate, self.x is the horizontal coordinate of the center of the circle, self.y is the vertical coordinate of the center of the circle, self.r is the radius of the circle, and theta is the angle of the circle.

[0067] In addition, for the labeled sample image, when cropping, you can first find the four points closest to the edges of the image, and then crop according to the coordinates of these four points to ensure that all the labeled points can be displayed in the cropped image.

[0068] In this embodiment, training the image detection model includes: setting training parameters of the image detection model; the training parameters include presenting a learning rate, momentum, weight decay, a training threshold, an image size of a sample image, a number of iterations, and a batch size.

[0069] Exemplarily, a virtual environment for training the model is built on a GPU server, and the training set is input into the image detection model for training. After the training is completed, an image detection model for small target recognition and detection in medical images is obtained. The verification set is input into the image detection model for small target image recognition and detection in medical images for verification. According to the verification results, the image detection model is optimized to finally obtain the image detection model for small target image recognition and detection in medical images with the best results.

[0070] In this implementation, two 3×3 convolutions and one 1×1 convolution are used as the final output module of the YOLOv8 network structure; the detected feature maps of four different pixel scales are respectively input into the Head structure for decoding, and the global features are extracted through the 3×3 convolution layer, and the 1×1 convolution layer is fully connected, and finally the predicted bounding box, confidence value and category are calculated. After the Head structure, the model loss of the image detection model is minimized by iterative calculation. When the training iteration is completed, the model with the highest detection accuracy is selected as the final image detection model. For the above training process, the training parameters are set as follows: the initial learning rate is 0.01, the momentum is set to 0.937, the weight decay is set to 0.0005, the training threshold is 0.2, the image size is normalized to 640×640, the number of iterations is 300, and the batch size is 16.

[0071] In order to verify the effectiveness of this method, performance index detection tests are carried out on the traditional image detection model based on the YOLOv8 network structure and the gradually improved image detection model. The test index adopts the mean Average Precision index (mAp index). The experimental results are shown in Table 1:

[0072] Table 1 Comparison results of indicators before and after the improvement of the image detection model

[0073] Model Number Basic WU P2 sensor head CBAM Cut mAp P1 √ 0.805 P2 √ √ 0.825 P3 √ √ √ 0.891 P4 √ √ √ √ 0.983 P5 √ √ √ √ √ 0.994

[0074] In Table 1, model numbers P1-P5 are basic models, that is, models obtained by gradually improving the image detection model based on the traditional YOLOv8 network structure. Basic is the basic model, and its mAp index is 0.805. After WIoU training optimization, model P2 is obtained, and its mAp index is 0.825, which is an improvement. Furthermore, on the basis of model P2, the P2 detection head is added to obtain model P3, and its mAp index is further improved to 0.891. On the basis of model P3, the CBAM attention mechanism is introduced to obtain model P4, and its index is improved to 0.983. Furthermore, on the basis of model P4, the size of the image to be tested is cropped, and the mAp index corresponding to the output result is improved to 0.994. It can be seen that compared with the direct use of the traditional image detection model based on the YOLOv8 network structure, this method has a higher mAp index and a higher accuracy in detecting small targets.

[0075] The present invention also proposes a medical image small target detection device. The medical image small target detection device provided by the present invention is described below. The medical image small target detection device described below and the medical image small target detection method described above can be referenced to each other. Figure 3 is a structural block diagram of the medical image small target detection device proposed by the present invention, such as Figure 3 As shown, the device comprises:

[0076] The acquisition module 301 is used to acquire the image to be tested; the image to be tested includes medical treatment points and / or medical tools;

[0077] The detection module 302 is used to input the image to be tested into a pre-trained image detection model for detection to obtain an image detection result; the image detection model includes a Backbone structure and a Head structure, wherein the Backbone structure is pre-configured with an attention mechanism, and the Head structure is pre-configured with a P2 detection head.

[0078] When the device is in use, first, the acquisition module 301 acquires the image to be tested, and the image to be tested contains the medical treatment point or medical tool to be detected. Then, the detection module 302 inputs the image to be tested into the image detection model. The basic framework of the image detection model can adopt the YOLOv8 target detection model or the traditional YOLOv5 target detection model. For the traditional YOLOv8 target detection model, the image to be tested must undergo two 3*3 convolutions to eliminate redundant information and improve the extraction of feature information. In this process, since the target information is not easy to identify, it is easy to fail to detect. Therefore, in the image detection model used in the device, the Backbone structure is pre-configured with an attention mechanism, which enhances the image detection model's ability to extract object feature information in the image to be tested through the attention mechanism, thereby improving the image detection model's ability to extract small target features in the image to be tested. For the type of attention mechanism, it can be selected and adjusted according to actual needs. The CBAM attention mechanism (Convolutional Block Attention Module) is adopted in the device. For the traditional YOLOv8 target detection model, since the target information is too small, when the convolutional neural network is used to extract features, the features of the target information will become less and less as the number of convolutional layers increases. For small targets, the feature information will be reduced more and more. Therefore, the image detection model used in this device is also equipped with a P2 detection head, which can enhance the image detection model's ability to mine small target information, making the image detection model more capable of understanding the content of small target information. Through the above device, the image to be tested is detected, which can effectively improve the recognition and extraction effect of small target information in the image to be tested, and solve the problem of low detection accuracy of medical images in existing related technologies.

[0079] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 communicate with each other through the communication bus 404. The processor 401 may call the logic instructions in the memory 403 to execute the medical image small target detection method, which includes:

[0080] Acquire an image to be tested; the image to be tested contains a medical treatment point and / or a medical tool;

[0081] The image to be tested is input into a pre-trained image detection model for detection to obtain an image detection result; the image detection model includes a Backbone structure and a Head structure, wherein the Backbone structure is pre-configured with an attention mechanism, and the Head structure is pre-configured with a P2 detection head.

[0082] In addition, the logic instructions in the above-mentioned memory 403 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0083] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the medical image small object detection method provided by the above methods, the method comprising:

[0084] Acquire an image to be tested; the image to be tested contains a medical treatment point and / or a medical tool;

[0085] The image to be tested is input into a pre-trained image detection model for detection to obtain an image detection result; the image detection model includes a Backbone structure and a Head structure, wherein the Backbone structure is pre-configured with an attention mechanism, and the Head structure is pre-configured with a P2 detection head.

[0086] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the medical image small object detection method provided by the above methods, the method comprising:

[0087] Acquire an image to be tested; the image to be tested contains a medical treatment point and / or a medical tool;

[0088] The image to be tested is input into a pre-trained image detection model for detection to obtain an image detection result; the image detection model includes a Backbone structure and a Head structure, wherein the Backbone structure is pre-configured with an attention mechanism, and the Head structure is pre-configured with a P2 detection head.

[0089] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting small objects in medical images, characterized in that: include: Acquire an image to be tested; the image to be tested includes a medical treatment point and / or a medical tool; The image to be tested is input into a pre-trained image detection model for detection to obtain an image detection result; the image detection model includes a Backbone structure and a Head structure, wherein the Backbone structure is pre-configured with an attention mechanism, and the Head structure is pre-configured with a P2 detection head.

2. The method for detecting small targets in medical images according to claim 1, characterized in that: Before inputting the image to be tested into the pre-trained image detection model for detection, the method includes: The image to be tested is cropped to adjust the image size of the image to be tested.

3. The method for detecting small targets in medical images according to claim 1, characterized in that: The image detection model includes a C2f structure, an SPPF structure, a Conv structure, a Concat structure and an upsampling structure.

4. The method for detecting small targets in medical images according to claim 1, characterized in that: Training the image detection model includes: Acquire a sample picture set; the sample picture set includes a plurality of sample pictures, and the sample pictures include medical treatment points and medical tools; With the goal of minimizing the model loss of the image detection model, the image detection model is trained using the sample picture set.

5. The method for detecting small targets in medical images according to claim 4, characterized in that: Before training the image detection model using the sample picture set, the method includes: The medical treatment points and medical tools in the sample image are marked by a marking frame.

6. The method for detecting small targets in medical images according to claim 5, characterized in that: The medical treatment points and medical tools in the sample image are marked by a marking frame, including: A circular annotation frame is used to annotate the medical treatment points in the sample image.

7. The method for detecting small targets in medical images according to claim 6, characterized in that: Before training the image detection model through the sample picture set, the method further includes: The file format of the labeled sample image is adjusted.

8. The method for detecting small targets in medical images according to claim 4, characterized in that: Training the image detection model includes: Setting training parameters of the image detection model; The training parameters include learning rate, momentum, weight decay, training threshold, image size of the sample image, number of iterations and batch size.

9. A small object detection device for medical images, characterized in that: include: An acquisition module, used for acquiring an image to be tested; the image to be tested contains medical treatment points and / or medical tools; The detection module is used to input the image to be tested into a pre-trained image detection model for detection to obtain an image detection result; the image detection model includes a Backbone structure and a Head structure, wherein the Backbone structure is pre-configured with an attention mechanism, and the Head structure is pre-configured with a P2 detection head.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the medical image small target detection method as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Method and device for detecting surface defects of cotton covered wire

    CN118014982A

  • Power transmission line defect detection method, device and equipment and storage medium

    CN118096684A