Image processing method, electronic device, and storage medium

TW202640648AActive Publication Date: 2026-10-01HON HAI PRECISION INDUSTRY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
TW114110141
Authority / Receiving Office
TW · TW
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2026-10-01
Estimated Expiration
2045-03-17

Smart Images

  • Figure TWG2TA001077547_001
    Figure TWG2TA001077547_001
  • Figure TWG2TA001077547_002
    Figure TWG2TA001077547_002
  • Figure TWG2TA001077547_003
    Figure TWG2TA001077547_003
Patent Text Reader

Abstract

The present application provides an image processing method, an electronic device, and a storage medium. The method includes: obtaining a detection result of a medical image, the detection result including initial detection frames for identifying lesions in the medical image and a corresponding confidence level; determining a target detection frame corresponding to each lesion from the initial detection frames based on the confidence level and overlap ratios between the initial detection frames. By utilizing the present application, accurate deduplication of the lesion detection frame can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application belongs to the biomedical field and relates to image processing technology, and in particular to an image processing method, electronic device and storage medium. [Previous Technology]

[0002] In the field of medical technology, medical imaging has become an important tool to assist doctors in diagnosing diseases. Taking fundus images as an example, doctors can use fundus images to determine whether there are lesions such as microaneurysms and hemorrhages.

[0003] In related technologies, lesions in medical images are often located using detection boxes, also known as anchor boxes, through models. However, due to limitations in model performance, the generated detection boxes may be duplicated.

[0004] If duplicate detection boxes cannot be removed, it may lead to a waste of computing resources and inaccurate recognition results of medical images in subsequent lesion identification, thereby affecting the auxiliary diagnosis of diseases. [Summary of the Invention]

[0005] In view of the above, it is necessary to provide an image processing method, electronic device and storage medium that can solve the technical problems of wasted computing resources and inaccurate recognition results caused by repeated detection boxes.

[0006] On one hand, this application provides an image processing method, the method comprising: acquiring detection results of a medical image, the detection results comprising initial detection boxes that identify lesions in the medical image and corresponding confidence scores, and determining target detection boxes corresponding to each lesion from the initial detection boxes based on the confidence scores and the overlap ratio between the initial detection boxes.

[0007] In some embodiments of this application, the method for calculating the overlap ratio includes: calculating the intersection area between two initial detection boxes, determining the smaller area between the two initial detection boxes, and determining the overlap ratio between the initial detection boxes based on the intersection area and the smaller area.

[0008] In some embodiments of this application, determining the overlap ratio between the initial detection boxes based on the intersection area and the smaller area includes: calculating the ratio between the intersection area and the smaller area as the overlap ratio between the initial detection boxes.

[0009] In some embodiments of this application, determining the target detection box corresponding to each lesion from the initial detection box based on the confidence level and the overlap ratio between the initial detection boxes includes: performing at least one deduplication operation on the initial detection box until the deduplicated initial detection box meets a preset condition, and taking the initial detection box that meets the preset condition as the target detection box. The deduplication operation includes: selecting a reference detection box from the initial detection box after the Nth deduplication, and determining the initial detection boxes in the initial detection box after the Nth deduplication that were not selected as the reference detection box. Based on the overlap ratio between the reference detection box and each initial detection box that was not selected as the reference detection box, determining the initial detection box after the N+1th deduplication from the initial detection box after the Nth deduplication, where N is an integer greater than or equal to zero.

[0010] In some embodiments of this application, the method for calculating the overlap ratio includes: calculating the intersection area between the reference detection box and any one of the initial detection boxes that were not selected as the reference detection box, determining the smaller area between the area of ​​the reference detection box and the area of ​​any one of the initial detection boxes, and determining the overlap ratio between the reference detection box and the any one of the initial detection boxes based on the intersection area and the smaller area.

[0011] In some embodiments of this application, determining the overlap ratio between the reference detection box and any initial detection box based on the intersection area and the smaller area includes: calculating the ratio between the intersection area and the smaller area as the overlap ratio between the reference detection box and the any initial detection box.

[0012] In some embodiments of this application, the method for determining the initial detection box after the (N+1)th deduplication includes: excluding the reference detection box and the historical reference detection box from the initial detection box after the Nth deduplication, wherein the historical reference detection box is a reference detection box selected in the deduplication operation during the Nth deduplication operation and in the deduplication operation before the Nth deduplication operation; and determining the initial detection box corresponding to an overlap ratio less than or equal to a preset threshold from the initial detection boxes after excluding the reference detection box and the historical reference detection box as the initial detection box after the (N+1)th deduplication.

[0013] In some embodiments of this application, the step of selecting a reference detection box from the initial detection box after the Nth deduplication includes: sorting the confidence levels of the initial detection boxes after the Nth deduplication, selecting a confidence level from the confidence levels sorted from high to low, and using the initial detection box corresponding to the selected confidence level as the reference detection box.

[0014] In some embodiments of this application, the preset conditions include: all remaining initial detection boxes after the Nth deduplication have been selected as reference detection boxes, and the reference detection boxes selected each time are not repeated.

[0015] In some embodiments of this application, the method further includes: classifying the medical image based on the target detection box to obtain the lesion type of the medical image.

[0016] On the other hand, this application provides an electronic device, the electronic device including: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the image processing method.

[0017] On the other hand, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor in an electronic device, implements the image processing method.

[0018] In the image processing method provided in the embodiments of this application, since the confidence level can reflect the accuracy of the corresponding initial detection box and the overlap ratio can reflect the degree of overlap between the corresponding detection boxes, based on the confidence level and the overlap ratio, a detection box that does not overlap with other initial detection boxes and has high accuracy can be selected from the initial detection boxes as the target detection box, thereby achieving accurate deduplication of lesion detection boxes.

Implementation Method

[0019] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, or B exists alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, scope of the invention application, and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0020] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner. Without conflict, the following embodiments and features described therein can be combined with each other.

[0021] In the field of medical technology, medical imaging has become an important tool to assist doctors in diagnosing diseases. Taking fundus images as an example, doctors can use fundus images to determine whether a patient has lesions such as microaneurysms and hemorrhages.

[0022] In related technologies, the location of lesions in medical images is often located by using a model and a detection box, also known as an anchor box. However, due to limitations in the performance of the model, the generated detection boxes may be duplicated.

[0023] Taking fundus images as an example, due to the small, dense, and concentrated characteristics of fundus lesions, it is often necessary to accurately select each lesion location in the fundus image using detection boxes in order to accurately identify the lesions. The following will illustrate the desired selection effect of lesion locations with reference to Figure 1. In Figure 1, rectangular detection boxes are used to select each lesion location in the medical image, and the detection boxes do not overlap. However, the accuracy of lesion selection in related technologies is often difficult to achieve the selection effect shown in Figure 1. The following will illustrate this with reference to Figures 2 to 4. In Figure 2, two large rectangular detection boxes are used to select clusters of lesion locations to identify the lesions, but each lesion location is not accurately selected. In Figure 3, not only are two large rectangular detection boxes used to select clusters of lesion locations to identify the lesions, but smaller rectangular detection boxes are also used to select each lesion location. In Figure 4, two rectangular detection boxes are used to select the same lesion location, and there is overlap between the two rectangular detection boxes.

[0024] As mentioned above, the relevant technologies all have the problem of duplicate detection boxes when selecting the location of lesions. If duplicate detection boxes cannot be removed, it may lead to a waste of computing resources and inaccurate recognition results of medical images in subsequent lesion identification, thereby affecting the auxiliary diagnosis of diseases.

[0025] In order to solve the above technical problems, this application provides an image processing method that can achieve accurate deduplication of lesion detection boxes.

[0026] The image processing method provided in this application embodiment can be applied to one or more electronic devices, such as computers, mobile phones, laptops, servers, etc. The server can be a cloud server or a server cluster. This application does not limit the type of electronic device.

[0027] Figure 5 shows a flowchart of an image processing method provided in an embodiment of this application. Depending on different needs, the order of the steps in this flowchart can be adjusted according to actual requirements, and some steps can be omitted. The image processing method is applied to an electronic device, such as the electronic device 10 shown in Figure 9.

[0028] Step S11: Obtain the detection results of the medical image. The detection results include the initial detection box that identifies the lesion in the medical image and the corresponding confidence level.

[0029] This application does not limit the type of medical image. For example, the medical image can be a fundus image, or other types of medical images, such as pathological slide images, lung CT images, colonoscopy images, brain MRI images, corneal images, and retinal images. To clearly illustrate the image processing method of this application, the fundus image will be used as an example of a medical image in the following description.

[0030] The initial detection box can be used to select the location of the lesion in the medical image to identify the lesion. The shape of the initial detection box can be rectangular or other shapes, and this application does not limit it. The confidence level corresponding to the initial detection box can reflect the reliability of the initial detection box. For example, as shown in Figure 6, it is a schematic diagram of the detection results of a medical image provided by an embodiment of this application. The medical image in Figure 6 includes 5 initial detection boxes represented by different colors, and the confidence levels of the 5 initial detection boxes are 0.9, 0.7, 0.89, 0.77 and 0.6, respectively. In Figure 6, the initial detection boxes with the same color and their confidence levels correspond to each other. For example, the confidence level corresponding to the red initial detection box is 0.9, the confidence level corresponding to the green initial detection box is 0.89, and so on. Each initial detection box has a corresponding confidence level.

[0031] The embodiments of this application can obtain the detection results of medical images through various methods, and this application does not limit the method of obtaining the detection results.

[0032] For example, an electronic device can use a target detection network to detect fundus images and obtain detection results. Target detection networks include, but are not limited to: YOLO, PP-YOLO, RetinaNet, RestNet+FPN, and EfficientNet. The above examples of detection results for medical images are merely illustrative and are not limited to practical applications.

[0033] Step S12: Based on the confidence level and the overlap ratio between the initial detection boxes, determine the target detection box corresponding to each lesion from the initial detection boxes.

[0034] In some embodiments of this application, the method for calculating the overlap ratio includes: the electronic device calculates the intersection area between two initial detection frames, determines the smaller area between the two initial detection frames, and determines the overlap ratio between the initial detection frames based on the intersection area and the smaller area.

[0035] For example, the electronic device determines the overlap ratio between initial detection boxes based on the intersection area and the smaller area by: calculating the ratio between the intersection area and the smaller area as the overlap ratio between initial detection boxes.

[0036] For example, the electronic device can determine the target detection box from the initial detection box based on the comparison result between the overlap ratio and the preset threshold. For example, the initial detection box corresponding to the overlap ratio that is less than or equal to the preset threshold can be used as the target detection box, and each lesion can correspond to one target detection box in the medical image.

[0037] In other embodiments of this application, the electronic device determines the target detection box corresponding to each lesion from the initial detection box based on the confidence level and the overlap ratio between the initial detection boxes, including: performing at least one deduplication operation on the initial detection box until the deduplicated initial detection box meets the preset conditions, and taking the initial detection box that meets the preset conditions as the target detection box. The deduplication operation includes: selecting a reference detection box from the initial detection box after the Nth deduplication, and determining the initial detection boxes in the initial detection box after the Nth deduplication that were not selected as reference detection boxes, and determining the initial detection box after the N+1th deduplication from the initial detection box after the Nth deduplication based on the overlap ratio between the reference detection box and each initial detection box that was not selected as a reference detection box.

[0038] Where N is an integer greater than or equal to zero. Preset conditions include: all remaining initial detection boxes after the Nth deduplication are selected as reference detection boxes, and the selected reference detection boxes are not repeated each time. The number of deduplication operations can be one or more; for example, at least one deduplication operation can be performed on the initial detection boxes until each lesion corresponds to only one initial detection box in the medical image.

[0039] In this embodiment, at least one deduplication operation is performed on the initial detection box until each lesion corresponds to only one initial detection box in the medical image, thereby achieving accurate deduplication of lesion detection boxes.

[0040] For example, selecting a reference detection box from the initial detection box after the Nth deduplication includes: sorting the confidence of the initial detection box after the Nth deduplication, selecting a confidence from the confidence sorted from high to low, and using the initial detection box corresponding to the selected confidence as the reference detection box.

[0041] For example, following the above embodiment, the confidence levels shown in Figure 6 are arranged from high to low as 0.9, 0.7, 0.89, 0.77, and 0.6. Since the confidence level of 0.9 is the highest, the initial detection box corresponding to the confidence level of 0.9 can be selected as the reference detection box when selecting the reference detection box for the first time.

[0042] In this embodiment, selecting reference detection boxes from the initial detection boxes in descending order of confidence level can enable the target detection boxes to have higher confidence levels, thereby improving the accuracy of the target detection boxes.

[0043] For example, the method for calculating the overlap ratio includes: the electronic device calculating the intersection area between the reference detection box and any one of the initial detection boxes that are not selected as reference detection boxes, determining the smaller area between the area of ​​the reference detection box and the area of ​​the any one initial detection box, and determining the overlap ratio between the reference detection box and the any one initial detection box based on the intersection area and the smaller area, thereby obtaining the overlap ratio between the selected reference detection box and each initial detection box that is not selected as a reference detection box.

[0044] The electronic device can calculate the ratio between the intersection area and the smaller area as the overlap ratio between the reference detection box and any of the initial detection boxes.

[0045] For example, following the above embodiment, after selecting the initial detection box corresponding to 0.9 as the reference detection box, the electronic device can select the initial detection box corresponding to 0.89 confidence level, calculate the area of ​​the intersection region between the reference detection box and the initial detection box corresponding to 0.89 confidence level as the intersection area, compare the area of ​​the reference detection box with the area of ​​the initial detection box corresponding to 0.89 confidence level, if the area of ​​the reference detection box is greater than the area of ​​the initial detection box corresponding to 0.89 confidence level, the electronic device can use the ratio of the intersection area to the area of ​​the initial detection box corresponding to 0.89 confidence level as the overlap ratio between the reference detection box and the initial detection box corresponding to 0.89 confidence level. By analogy, the overlap ratio between the reference detection box and the initial detection box corresponding to 0.77 confidence level, the overlap ratio between the reference detection box and the initial detection box corresponding to 0.7 confidence level, and the overlap ratio between the reference detection box and the initial detection box corresponding to 0.6 confidence level can be obtained.

[0046] As shown in Figure 7, this is a schematic diagram of the overlap ratio provided in an embodiment of this application. Figure 7 corresponds to the case where the initial detection box corresponding to 0.9 is selected as the reference detection box. In Figure 7, the overlap ratio between the reference detection box and the initial detection box corresponding to confidence level 0.89 is 0.05, the overlap ratio between the reference detection box and the initial detection box corresponding to confidence level 0.77 is 0, the overlap ratio between the reference detection box and the initial detection box corresponding to confidence level 0.7 is 1, and the overlap ratio between the reference detection box and the initial detection box corresponding to confidence level 0.6 is 1. In Figure 7, detection boxes, confidence levels, and overlap ratios of the same color correspond to each other. For example, the red detection box is the reference detection box with a corresponding confidence level of 0.9; the green detection box has a corresponding confidence level of 0.89 and an overlap ratio of 0.05; the purple detection box has a corresponding confidence level of 0.77 and an overlap ratio of 0, and so on.

[0047] In this embodiment, the intersection area of ​​the area of ​​the reference detection box and any initial detection box that was not selected as the reference detection box can reflect whether the reference detection box overlaps with the initial detection box. Compared to the ratio of the intersection area to the smaller of the two areas, the ratio of the intersection area to the smaller of the two areas more directly reflects the overlap between the two detection boxes. Therefore, the ratio of the intersection area to the smaller of the two areas is used as the overlap ratio between the area of ​​the reference detection box and the initial detection box, so that the overlap ratio accurately reflects the degree of overlap between the reference detection box and the initial detection box, and the degree of overlap is positively correlated with the overlap ratio. For example, the larger the overlap ratio, the higher the degree of overlap between the reference detection box and the initial detection box; the smaller the overlap ratio, the lower the degree of overlap between the reference detection box and the initial detection box. An overlap ratio of 0 indicates that the two corresponding detection boxes do not intersect at all, and an overlap ratio of 1 indicates that the two corresponding detection boxes are in an inclusive relationship.

[0048] For example, the method for determining the initial detection box after the N+1th deduplication includes: the electronic device excludes reference detection boxes and historical reference detection boxes from the initial detection box after the Nth deduplication, wherein the historical reference detection box is a reference detection box selected in the deduplication operation in the Nth deduplication operation and in the deduplication operation before the Nth deduplication operation; from the initial detection boxes after excluding the reference detection boxes and historical reference detection boxes, the initial detection box corresponding to the overlap ratio less than or equal to a preset threshold is determined as the initial detection box after the N+1th deduplication.

[0049] The historical reference detection box is for the case where N is greater than or equal to 2. When N is 1, there may be no historical reference detection box. The preset threshold can be customized and can be a single value or a range of values.

[0050] In this embodiment, since the overlap ratio of the reference detection box with any initial detection box that is not selected as the reference detection box can reflect the degree of overlap between the reference detection box and any initial detection box, the reference detection box and historical reference detection boxes are excluded from the initial detection box after the Nth deduplication. The initial detection box corresponding to the overlap ratio that is less than or equal to the preset threshold is determined as the initial detection box after the N+1th deduplication. This can filter out the initial detection boxes that have a high degree of overlap with the reference detection box, thereby improving the accuracy of the target detection box and realizing accurate deduplication of the lesion detection box.

[0051] As shown in Figure 8, it is a schematic diagram of a target detection box provided in an embodiment of this application. After accurate deduplication of the initial detection box shown in Figure 6, each lesion in Figure 8 has a target detection box, and each target detection box can accurately select the location of the lesion.

[0052] In other embodiments of this application, after determining the target detection box, the electronic device can remove other detection boxes from the medical image besides the target detection box.

[0053] In other embodiments of this application, after determining the target detection box, the electronic device can classify the medical image based on the target detection box to obtain the lesion type of the medical image.

[0054] Wherein, when the medical image is a fundus image, the lesion type can be a fundus lesion type, such as hemorrhage, microaneurysm, hard exudate, etc.

[0055] Exemplarily, an electronic device can delete other initial detection boxes besides the target detection box in a medical image, and input the deleted medical image into a classification model to obtain the lesion type of the medical image. This application does not limit the type of classification model. For example, the classification model can be a logistic regression network model, a support vector machine network model, a decision tree network model, a random forest network model, a limit gradient boosting network model, a convolutional neural network model, and a semantic analysis network model, etc. Convolutional neural network models include, but are not limited to: RestNet, GoogleNet, and VGG Net. Semantic analysis network models include, but are not limited to: Vision Transformer and Swing Transformer.

[0056] In the image processing scheme provided in this application embodiment, selecting reference detection boxes from the initial detection boxes according to the order of confidence from high to low can enable the target detection boxes to have higher confidence, thereby improving the accuracy of the target detection boxes. The intersection area of ​​the area of ​​the reference detection box and any initial detection box that was not selected as a reference detection box can reflect whether the reference detection box overlaps with the initial detection box. Regarding the area of ​​the reference detection box and the area of ​​the initial detection box, compared with the ratio of the intersection area to the smaller value between the two areas, the ratio of the intersection area to the smaller value between the two areas can more intuitively reflect the overlap between the two detection boxes. Therefore, the ratio of the intersection area to the smaller value between the two areas is used as the overlap ratio between the area of ​​the reference detection box and the initial detection box, so that the overlap ratio can accurately reflect the degree of overlap between the reference detection box and the initial detection box, and the degree of overlap is positively correlated with the overlap ratio. Since the overlap ratio of the reference detection box with any initial detection box that was not selected as a reference detection box can reflect the degree of overlap between the reference detection box and any initial detection box, the reference detection box and historical reference detection boxes are excluded from the initial detection boxes after the Nth deduplication. The initial detection boxes with an overlap ratio less than or equal to a preset threshold are determined as the initial detection boxes after the N+1th deduplication. This can filter out the initial detection boxes with a high degree of overlap with the reference detection box, thereby improving the accuracy of the target detection box and achieving accurate deduplication of the lesion detection box.

[0057] As shown in Figure 9, this is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 10 can be a computer, mobile phone, tablet computer, laptop computer, server, etc. The specific type of the electronic device 10 is not limited in this embodiment of the application.

[0058] In Figure 9, the electronic device 10 may include a communication module 101, a memory 102, a processor 103, an input / output (I / O) interface 104, and a bus 105. The processor 103 is coupled to the communication module 101, the memory 102, and the input / output interface 104 through the bus 105.

[0059] Communication module 101 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as Universal Serial Bus (USB) and Controller Area Network (CAN). The wireless communication module may provide one or more wireless communication solutions such as Wireless Fidelity (Wi-Fi), Bluetooth (BT), mobile communication networks, frequency modulation (FM), near field communication (NFC), and infrared (IR).

[0060] Memory 102 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 103, and can be used to store executable programs (e.g., machine instructions) of other running programs, as well as user and application data. The RAM may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.

[0061] Non-volatile memory can also store executable programs and user and application data, etc., and can be pre-loaded into random access memory for direct reading and writing by the processor 103. Non-volatile memory may include disk memory and flash memory.

[0062] Memory 102 is used to store one or more computer programs. The one or more computer programs are configured to be executed by processor 103. The one or more computer programs include multiple instructions that, when executed by processor 103, can implement an image processing method executed on electronic device 10.

[0063] In other embodiments, the electronic device 10 shown in FIG9 further includes an external memory interface for connecting to external memory to expand the storage capacity of the electronic device 10.

[0064] The processor 103 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video transcoder, a digital signal processor (DSP), and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0065] The processor 103 provides computing and control capabilities. For example, the processor 103 is used to execute computer programs stored in the memory 102 to implement the above-described image processing method.

[0066] The input / output interface 104 is used to provide a channel for user input or output. For example, the input / output interface 104 can be used to connect various input / output devices, such as mice, keyboards, touch devices, and display screens, so that users can enter information or visualize information.

[0067] Bus 105 is used to provide at least a channel for communication between communication modules 101, memory 102, processor 103 and input / output interface 104 in electronic device 10.

[0068] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 10. In other embodiments of this application, the electronic device 10 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of hardware and software.

[0069] This application also provides a computer-readable storage medium storing a computer program, which includes program instructions. When the program instructions are executed, the method implemented can refer to the methods in the above embodiments of this application.

[0070] The computer-readable storage medium may be the internal memory of the electronic device described in the above embodiments, such as the hard drive or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash memory card, etc. equipped on the electronic device.

[0071] In some embodiments, the computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, etc.; and the data storage area may store data created based on the use of the electronic device, etc.

[0072] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of the modules is merely a logical functional division, and there may be other division methods in actual implementation.

[0073] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0074] In addition, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware form or in the form of hardware plus software functional modules.

[0075] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, it is intended to encompass all variations falling within the meaning and scope of equivalents that fall within the claims. No appended diagram markings in the claims should be construed as limiting the scope of the claims involved.

[0076] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in this application may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.

[0077] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application. [Simplified Explanation of the Diagram]

[0078] Figure 1 is a schematic diagram of a lesion detection frame provided in an embodiment of this application.

[0079] Figure 2 is a schematic diagram of a lesion detection frame provided in another embodiment of this application.

[0080] Figure 3 is a schematic diagram of a lesion detection frame provided in another embodiment of this application.

[0081] Figure 4 is a schematic diagram of a lesion detection frame provided in another embodiment of this application.

[0082] Figure 5 is a flowchart of an image processing method provided in an embodiment of this application.

[0083] Figure 6 is a schematic diagram of the detection results of a medical image provided in an embodiment of this application.

[0084] Figure 7 is a schematic diagram of the overlap ratio provided in an embodiment of this application.

[0085] Figure 8 is a schematic diagram of a target detection box provided in an embodiment of this application.

[0086] Figure 9 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

Claims

1. An image processing method applied to an electronic device, wherein, The method includes: acquiring detection results of a medical image, the detection results including initial detection boxes identifying lesions in the medical image and corresponding confidence scores; calculating the intersection area between any two initial detection boxes, determining the smaller area between any two initial detection boxes, and determining the overlap ratio between any two initial detection boxes based on the intersection area and the smaller area, including: calculating the ratio between the intersection area and the smaller area as the overlap ratio between the initial detection boxes, wherein the degree of overlap between any two initial detection boxes is positively correlated with the overlap ratio; and performing a deduplication operation on the initial detection boxes based on the confidence scores and the overlap ratio between the initial detection boxes to obtain target detection boxes.

2. The image processing method as described in claim 1, wherein, The step of performing a deduplication operation on the initial detection boxes based on the confidence level and the overlap ratio between the initial detection boxes to obtain a target detection box includes: performing a deduplication operation on the initial detection boxes at least once until the deduplicated initial detection boxes meet a preset condition, and taking the initial detection boxes that meet the preset condition as the target detection boxes. The deduplication operation includes: selecting a reference detection box from the initial detection boxes after the Nth deduplication based on the confidence level, and determining the initial detection boxes in the initial detection boxes after the Nth deduplication that were not selected as the reference detection boxes. Based on the overlap ratio between the reference detection box and each initial detection box that was not selected as the reference detection box, determining the initial detection box after the N+1th deduplication from the initial detection boxes after the Nth deduplication, where N is an integer greater than or equal to zero.

3. The image processing method as described in claim 2, wherein, The method for determining the initial detection box after the (N+1)th deduplication includes: excluding the reference detection box and the historical reference detection box from the initial detection box after the Nth deduplication, wherein the historical reference detection box is a reference detection box selected in the deduplication operation during the Nth deduplication operation and in the deduplication operation before the Nth deduplication operation; and determining the initial detection box corresponding to an overlap ratio less than or equal to a preset threshold from the initial detection boxes after excluding the reference detection box and the historical reference detection box as the initial detection box after the (N+1)th deduplication.

4. The image processing method as described in claim 2, wherein, The step of selecting a reference detection box from the initial detection boxes after the Nth deduplication based on the confidence level includes: sorting the confidence levels of the initial detection boxes after the Nth deduplication; selecting a confidence level from the confidence levels sorted from high to low, and using the initial detection box corresponding to the selected confidence level as the reference detection box.

5. The image processing method as described in claim 2, wherein, The preset conditions include: all remaining initial detection boxes after the Nth deduplication have been selected as reference detection boxes, and the selected reference detection boxes are not repeated each time.

6. The image processing method as described in claim 1, wherein, The method further includes: classifying the medical image based on the target detection box to obtain the lesion type of the medical image.

7. An electronic device, wherein, include: Memory; A processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device performs the image processing method as described in any one of claims 1 to 6.

8. A computer-readable storage medium, wherein, The computer-readable storage medium stores a computer program that, when executed by a processor in an electronic device, implements the image processing method as described in any one of claims 1 to 6.