Artificial intelligence-based object detection method, apparatus, and electronic device
By using an AI-based image segmentation and detection network combined with a nonmaximum suppression algorithm, the problem of low accuracy in blood cell detection was solved, achieving high-precision detection of complexly distributed and highly overlapping cells.
Patent Information
- Application Number
- CN202310674271.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2043-06-07
AI Technical Summary
Existing technologies for blood cell detection and counting suffer from low accuracy due to the diversity and complexity of cell overlap.
An artificial intelligence-based approach is adopted, which uses an image segmentation network to obtain the region of interest, uses an image detection network to detect objects, and combines a non-maximum suppression algorithm to filter and delete error detection boxes, and obtains the target detection box based on the object's morphological features.
It improves the accuracy of blood cell detection, especially in cases of complex distribution and high overlap.
Smart Images

Figure CN117132974B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an object detection method, apparatus and electronic device based on artificial intelligence. Background Technology
[0002] Currently, many algorithms for automatically detecting and counting objects (e.g., blood cells) have been proposed. For example, spatial and spectral fusion recognition algorithms that combine circular Hough transform, iterative structural circle detection algorithm, active contour model and automatic two-dimensional k-means and spectral angle mapping algorithm, and connected component labeling method based on blood cell contour features can solve most blood cell counting problems. However, the complex distribution of cells and the high overlap of red blood cells limit the detection accuracy of these algorithms.
[0003] While convolutional neural network-based blood cell counting models and image analysis-based red blood cell counting systems have shown great potential in blood cell detection and counting, their accuracy remains low due to the diversity and complexity of cell overlap.
[0004] Therefore, how to improve the detection accuracy of objects has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of the above, this application provides an object detection method, apparatus and electronic device based on artificial intelligence, the purpose of which is to solve the above-mentioned technical problems.
[0006] Firstly, this application provides an artificial intelligence-based object detection method, the method comprising:
[0007] The image to be detected is input into an image segmentation network to obtain the region of interest of the image to be detected;
[0008] An image detection network is used to detect object detection results in the region of interest, wherein the object detection results include detection boxes for different types of objects;
[0009] The nonmaximum suppression algorithm is used to filter out the initial detection boxes of objects in the object detection results of the region of interest.
[0010] Based on the morphological characteristics of the different types of objects, the error detection boxes in the initial detection box are deleted to obtain the target detection box of the object.
[0011] Secondly, this application provides an object detection device based on artificial intelligence, the device comprising:
[0012] Segmentation module: used to input the image to be detected into the image segmentation network to obtain the region of interest of the image to be detected;
[0013] Detection module: used to detect object detection results in the region of interest using an image detection network, wherein the object detection results include detection boxes for different types of objects;
[0014] Filtering module: Used to filter out the initial detection boxes of objects in the object detection results of the region of interest using a non-maximum suppression algorithm;
[0015] Deletion module: used to delete the error detection box in the initial detection box according to the morphological characteristics of the different types of objects, and obtain the target detection box of the object.
[0016] Thirdly, this application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0017] Memory, used to store computer programs;
[0018] When a processor executes a program stored in memory, it implements the artificial intelligence-based object detection method described in any embodiment of the first aspect.
[0019] The technical solutions provided in this application have the following advantages compared with the prior art:
[0020] This application inputs the image to be detected into an image segmentation network to obtain the region of interest (ROI). An image detection network then detects objects within the ROI, including bounding boxes for different object types. A non-maximum suppression (NMS) algorithm is used to filter initial bounding boxes for objects within the ROI. Error bounding boxes in the initial bounding boxes are then removed based on the morphological features of different object types, resulting in the final object detection bounding box. Since the object detection results include bounding boxes for different object types, NMS can remove duplicate bounding boxes to obtain the initial bounding box. Furthermore, because objects typically have different morphological features, removing error bounding boxes from the initial bounding box based on these morphological features improves the object detection accuracy. Attached Figure Description
[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart illustrating an embodiment of the object detection method based on artificial intelligence in this application;
[0024] Figure 2 This is a schematic diagram of the architecture of the U-Net++ network in the embodiments of this application;
[0025] Figure 3 This is a diagram showing the segmentation effect of the region of interest in the embodiments of this application;
[0026] Figure 4 This is a schematic diagram of the YOLOv5 network architecture in an embodiment of this application;
[0027] Figure 5 This is a schematic diagram of the object detection results in an embodiment of this application;
[0028] Figure 6 This is a schematic diagram of object detection results in another embodiment of this application;
[0029] Figure 7 These are the detection results of two regions of interest under different NMS thresholds in the embodiments of this application;
[0030] Figure 8 This is a schematic diagram of the initial detection box for selecting the region of interest based on the NMS threshold in an embodiment of this application;
[0031] Figure 9 This is a schematic diagram showing an initial detection frame containing an error detection frame in an embodiment of this application;
[0032] Figure 10 This is a schematic diagram of the target detection box of the object in the embodiments of this application;
[0033] Figure 11 This is a schematic diagram illustrating the detection effect of the artificial intelligence-based object detection method of this application;
[0034] Figure 12 This is a schematic diagram of a preferred embodiment of the artificial intelligence-based object detection device of this application;
[0035] Figure 13 This is a schematic diagram of a preferred embodiment of the electronic device of this application;
[0036] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0038] The following disclosure provides numerous different embodiments or examples for implementing various structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of the invention. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0039] This application provides an object detection method based on artificial intelligence. (Refer to...) Figure 1 The diagram shown is a flowchart illustrating an embodiment of the artificial intelligence-based object detection method of this application. This method can be executed by an electronic device, which can be implemented in software and / or hardware. The artificial intelligence-based object detection method includes:
[0040] Step S10: Input the image to be detected into the image segmentation network to obtain the region of interest of the image to be detected;
[0041] Step S20: Use an image detection network to detect object detection results in the region of interest, wherein the object detection results include detection boxes for different types of objects;
[0042] Step S30: Use the nonmaximum suppression algorithm to filter out the initial detection boxes of objects in the object detection results of the region of interest;
[0043] Step S40: Delete the error detection boxes in the initial detection box according to the morphological features of the different types of objects, and obtain the target detection box of the object.
[0044] Taking blood cell detection as an example, this application's solution will be explained. Complete blood count (CBC) is used to determine the number of blood cells, and blood cell counting can be completed by detecting these cells. It is understood that in practical applications, this object detection method can also be applied to target object detection in other fields, such as face detection in images.
[0045] The image to be detected can be a microscopic image containing blood cells; for example, it is necessary to detect the number of blood cells in the image. The size of the image to be detected can be adjusted to 512×512. The image segmentation network can be a U-Net++ network. By inputting the image to be detected into the U-Net++ network, red blood cells and white blood cells in the image can be segmented from the background. Specifically, by inputting the image to be detected into the image segmentation network, the region of interest of the image to be detected is obtained, including:
[0046] The image to be detected is input into an image segmentation network to obtain multiple segmentation regions of the image to be detected.
[0047] Extract the region of interest from the segmented region, wherein the region of interest includes a single object or multiple objects.
[0048] The image to be detected is input into the U-Net++ network to obtain multiple segmented regions of the image. The regions of interest (ROIs) of the segmented regions are extracted, thereby dividing the image to be detected into multiple regions of interest (ROIs) containing a single cell or multiple adherent cells.
[0049] like Figure 2 The diagram shows the architecture of the U-Net++ network in this embodiment, with ResNet-50 as the backbone and four U-Nets embedded with depth, skip connections, and deep supervision. Skip connections allow the incorporation of high-resolution information from blood cell microscopic images into the upsampled results, improving segmentation accuracy. Deep supervision allows the model to perform pruning operations, making the model more flexible and general. A 1×1 convolution with three kernels (corresponding to red blood cells, white blood cells, and background color, respectively) and a sigmoid activation function are applied to the outputs of nodes x(0,1), x(0,2), x(0,3), and x(0,4) to obtain the final output. The U-Net++ network can be trained using 120 blood cell microscopic image samples. This can be expanded to 960 images by rotating and mirroring the image samples. Training is performed on an Nvidia Tesla V100 GPU platform with an initial learning rate of 0.0001 and the Adam algorithm used for gradient descent. Figure 3 The image shown is a segmentation effect diagram of the region of interest in an embodiment of this application. Blood cells can maintain their original shape, and no blood cells are mistakenly deleted during the denoising process. Each segmented region is extracted as a ROI, so the complex cell distribution can be decomposed into multiple ROIs, each containing a single cell or multiple adherent cells.
[0050] After obtaining the region of interest (ROI) of the image to be detected, an image detection network is used to detect objects within the ROI. These object detection results include bounding boxes for different types of objects; for example, the results include bounding boxes for red blood cells and white blood cells. The image detection network can be a YOLOv5 network, such as... Figure 4 The diagram shows the architecture of the YOLOv5 network in this embodiment. The network consists of a backbone, a neck, and a head. The backbone, used for feature extraction, includes CSP and SPP modules, enhancing the model's ability to capture features. The neck employs a Feature Pyramid Network (FPN) combined with a Pane Network (PAN) structure, fusing semantic information extracted by the deep network with information from the shallow network to obtain richer feature information and enhance the detection capability for targets at different scales. The head is used for bounding box prediction. The YOLOv5 network is trained on an Nvidia Tesla V100 GPU platform with an initial learning rate of 0.01. Gradient descent is performed using the Adam algorithm, and the training and validation sets are derived from region-of-interest (ROI) sample images. Pre-training of the YOLOv5 network on VOC2007 before training improves training speed and accuracy. Figure 5 The diagram shown is a schematic of the object detection results in one embodiment of this application. Single red blood cells, adherent or slightly overlapping red blood cells and white blood cells can be accurately detected. The dashed box represents overlapping red blood cells, and the specific number of overlapping red blood cells is not detected at this time.
[0051] In one embodiment, the object detection result of the region of interest is detected using an image detection network, including:
[0052] Obtain a training sample set, wherein the training sample set includes objects of various forms;
[0053] The image detection network is obtained by training a preset initial detection network based on the training sample set;
[0054] The image detection network is used to detect the object in the region of interest.
[0055] Due to individual variations in red blood cell shape and distribution, a single red blood cell classification is insufficient to cover complex situations, thus requiring refined classification. In terms of shape, red blood cells typically exhibit two forms: round and oval. In terms of distribution, most highly overlapping red blood cells are partially hidden by other red blood cells, resulting in a significant morphological difference from individual red blood cells. Therefore, red blood cells are classified into three categories: round red blood cells, oval red blood cells, and hidden red blood cells. Training samples of these three morphologies are used to train a YOLOv5 network. The trained network is then used as an image detection network, capable of detecting round, oval, and hidden red blood cells, thus improving the detection accuracy. Figure 6 The diagram shown is a schematic representation of object detection results in another embodiment of this application. Some irregularly shaped red blood cells were successfully detected. Figure 6 b compared to Figure 6 a. Irregularly shaped red blood cells were successfully detected.
[0056] Further improvements are needed for the detection of highly overlapping red blood cells. The non-maximum suppression algorithm can be used to select the initial detection box of the object in the object detection results of the region of interest.
[0057] For each target area (ROI), Non-Maximum Suppression (NMS) removes duplicate detection boxes by selecting the box with the local maximum confidence score and removing other boxes that significantly overlap with the selected box. It has an NMS threshold (Intersection over Union (IoU) threshold); a higher NMS threshold allows for greater overlap between detection boxes. Due to the complexity of the detection box distribution, which can vary for each ROI, it is difficult to analyze all ROIs using a fixed NMS threshold. For a single red blood cell, a lower NMS threshold is desirable to remove duplicate detection boxes. For highly overlapping red blood cells, a higher NMS threshold is desirable to avoid missed detections. For example, Figure 7 The detection results of two Regions of Interest (ROIs) at different Non-Maximum Suppression (NMS) thresholds are shown. When the NMS threshold is 0.1, both ROIs have missed detections. As the NMS threshold increases, the missed detections of both ROIs gradually decrease. When the NMS threshold reaches 0.25, red blood cells in ROI(a) are completely detected, but some red blood cells in ROI(b) are still not detected until the NMS threshold is increased to 0.28. That is, different ROIs have different optimal NMS thresholds. Therefore, it is necessary to determine the optimal NMS threshold for each region of interest to filter out the detection boxes (denoted as initial detection boxes) for each red blood cell in the object detection results of each region of interest. Specifically, the initial detection boxes of objects in the object detection results of the region of interest are filtered out using a non-maximum suppression algorithm, including:
[0058] Define the intersection-union ratio (IU) threshold range;
[0059] The intersection-union ratio (IU) threshold interval is iterated with a preset step size, and the area of the object not covered by the detection box in the region of interest is calculated in each IU threshold interval of the iteration.
[0060] Based on the area of the uncovered objects, the target intersection-union ratio threshold of the region of interest is determined;
[0061] Based on the target intersection-union ratio threshold of the region of interest, the initial detection box of each object in the object detection results of the region of interest is selected.
[0062] The cross-union ratio (CUP) threshold is between 0.1 and 0.655. Iterations are performed with a step size of 0.01. For each region of interest (ROI), the area of the object (red blood cell) not covered by the detection box within the ROI threshold is calculated at each iteration. The area of the red blood cell not covered by the detection box is defined as e. Based on the area e, the target CUP threshold (i.e., the optimal NMS threshold) for each ROI is determined. Based on the target CUP threshold of the ROI, the initial detection box of each object in the object detection results of each ROI is selected.
[0063] Further, based on the area of the uncovered objects, a target intersection-union (IU) threshold for the region of interest is determined, including:
[0064] If the area of objects not covered by the detection box within the region of interest remains unchanged in each iteration of the cross-union ratio threshold, then the preset value is used as the target cross-union ratio threshold for the region of interest.
[0065] If, in each iteration of the cross-union ratio (CUP) threshold, the area of objects not covered by the detection box within the region of interest decreases and then tends to level off, then the CUP threshold corresponding to the inflection point is taken as the target CUP threshold.
[0066] For regions of interest containing a single red blood cell, the area *e* typically remains constant during iteration, and 0.1 can be selected as the optimal NMS threshold for this region of interest. For most regions of interest containing multiple red blood cells, during iteration, the area *e* decreases in a stepwise manner as the NMS threshold gradually increases, until it flattens out; the inflection point is then selected as the optimal NMS threshold for this region of interest. Figure 8 The diagram shown is a schematic of the initial detection box for selecting the region of interest based on the NMS threshold in an embodiment of this application. Figure 8 'a' represents the initial detection box used to filter regions of interest using a non-optimal NMS threshold. Figure 8 b is the initial detection box for selecting the region of interest using the optimal NMS threshold. By using the optimal NMS threshold, highly overlapping red blood cells can be successfully detected, thereby further improving the detection accuracy based on the fine classification of red blood cells.
[0067] Because false positive bounding boxes have high confidence levels, they cannot be removed by the NMS algorithm. Even after NMS processing, a small number of erroneous bounding boxes remain. Examples include identifying multiple overlapping red blood cells as a single red blood cell (i.e., a single bounding box containing multiple red blood cells), bounding boxes with aspect ratios inconsistent with blood cell morphology, or bounding boxes that fail to accurately pinpoint the location of red blood cells. Figure 9The diagram illustrates an initial detection box containing error detection boxes. Therefore, error detection boxes in the initial detection box can be removed based on the morphological characteristics of different types of objects (red blood cells) to obtain the target detection box for the object. Specifically, based on the morphological characteristics of red blood cells, constraints are imposed on the detection boxes regarding area, aspect ratio, and duty cycle to exclude error detection boxes. In particular, removing error detection boxes from the initial detection box based on the morphological characteristics of the different types of objects to obtain the target detection box for the object includes:
[0068] Determine the ratio of the length to the width of each detection box in the initial detection frame, the area of each detection box, and the ratio of the area of the object within each detection box to the area of the detection box;
[0069] Based on the ratio of the length to the width of each detection box, the area of each detection box, the ratio of the area of the object within each detection box to the area of the detection box, and the morphological characteristics of the different types of objects, the error detection box in the initial detection box is determined.
[0070] Delete the error detection box in the initial detection box to obtain the object target detection box.
[0071] Based on the length-to-width ratio of each detection box, the area of each detection box, the ratio of the object area within each detection box to the detection box area, and the morphological characteristics of different object types, error detection boxes can be determined in the initial detection box. After deleting the error detection boxes from the initial detection box, the target detection box for the object (red blood cells) can be obtained. This effectively removes error detection boxes and adds correct detection boxes, thereby improving detection accuracy. Figure 10 The image shown is a schematic diagram of the target detection bounding box of this application. Figure 10 Compared to Figure 9 The error detection box has been removed.
[0072] Further, determining the error detection box within the initial detection box based on the ratio of the length to the width of each detection box, the area of each detection box, and the ratio of the area of the object within each detection box to the area of the detection box includes:
[0073] Detection boxes whose length-to-width ratio in the initial detection box is less than the first threshold are designated as error detection boxes;
[0074] Detection boxes whose area is less than the second threshold and whose ratio of the area of the object within the detection box to the area of the detection box is less than the third threshold are designated as error detection boxes.
[0075] The first threshold can be 5, the second threshold can be 8800, and the third threshold can be 0.94. It can be understood that the first, second, and third thresholds can be set according to the morphological characteristics of the object (red blood cells).
[0076] In one embodiment, after obtaining the object target detection box, the method further includes:
[0077] The number of the target detection boxes is counted to obtain the number of the objects.
[0078] Since the target detection box corresponds to the red blood cells, the target detection box accurately indicates the distribution of single red blood cells and overlapping red blood cells. Therefore, counting the number of target detection boxes can be used as the number of red blood cells, thus completing the blood cell count in the microscopic image.
[0079] like Figure 11 The diagram illustrates the detection performance of the AI-based object detection method of this application. It shows that the method can accurately detect white blood cells, single red blood cells, and multiple adherent red blood cells, demonstrating strong adaptability to complex cell distributions. This method can also accurately detect highly overlapping red blood cells, such as… Figure 11 c and Figure 11 As shown in d.
[0080] Furthermore, the object detection method based on artificial intelligence in this application is compared with the detection methods in existing literature. The comparison results are shown in the table below. It can be seen that the detection method in this application can not only detect highly overlapping cells in terms of function, but also outperforms the current state-of-the-art methods in terms of accuracy.
[0081]
[0082] Reference Figure 12 The diagram shown is a functional module schematic of the artificial intelligence-based object detection device 100 of this application.
[0083] The AI-based object detection device 100 described in this application can be installed in an electronic device. Depending on the functions implemented, the AI-based object detection device 100 may include a segmentation module 110, a detection module 120, a filtering module 130, and a deletion module 140. The module described in this application can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and which are stored in the memory of the electronic device.
[0084] In this embodiment, the functions of each module / unit are as follows:
[0085] Segmentation module 110: used to input the image to be detected into the image segmentation network to obtain the region of interest of the image to be detected;
[0086] Detection module 120: used to detect object detection results in the region of interest using an image detection network, wherein the object detection results include detection boxes for different types of objects;
[0087] Filtering module 130: used to filter out the initial detection boxes of objects in the object detection results of the region of interest using a non-maximum suppression algorithm;
[0088] Deletion module 140: used to delete the error detection box in the initial detection box according to the morphological characteristics of the different types of objects, and obtain the target detection box of the object.
[0089] In one embodiment, inputting the image to be detected into an image segmentation network to obtain the region of interest of the image to be detected includes:
[0090] The image to be detected is input into an image segmentation network to obtain multiple segmentation regions of the image to be detected.
[0091] Extract the region of interest from the segmented region, wherein the region of interest includes a single object or multiple objects.
[0092] In one embodiment, the object detection result of detecting the region of interest using an image detection network includes:
[0093] Obtain a training sample set, wherein the training sample set includes objects of various forms;
[0094] The image detection network is obtained by training a preset initial detection network based on the training sample set;
[0095] The image detection network is used to detect the object in the region of interest.
[0096] In one embodiment, the initial detection bounding box of the object in the object detection result of the region of interest is selected using a non-maximum suppression algorithm, including:
[0097] Define the intersection-union ratio (IU) threshold range;
[0098] The intersection-union ratio (IU) threshold interval is iterated with a preset step size, and the area of the object not covered by the detection box in the region of interest is calculated in each IU threshold interval of the iteration.
[0099] Based on the area of the uncovered objects, the target intersection-union ratio threshold of the region of interest is determined;
[0100] Based on the target intersection-union ratio threshold of the region of interest, the initial detection box of each object in the object detection results of the region of interest is selected.
[0101] In one embodiment, determining the target intersection-union (IU) threshold of the region of interest based on the area of the uncovered objects includes:
[0102] If the area of objects not covered by the detection box within the region of interest remains unchanged in each iteration of the cross-union ratio threshold, then the preset value is used as the target cross-union ratio threshold for the region of interest.
[0103] If, in each iteration of the cross-union ratio (CUP) threshold, the area of objects not covered by the detection box within the region of interest decreases and then tends to level off, then the CUP threshold corresponding to the inflection point is taken as the target CUP threshold.
[0104] In one embodiment, the step of deleting error detection boxes from the initial detection box based on the morphological features of the different types of objects to obtain the target detection box of the object includes:
[0105] Determine the ratio of the length to the width of each detection box in the initial detection frame, the area of each detection box, and the ratio of the area of the object within each detection box to the area of the detection box;
[0106] Based on the ratio of the length to the width of each detection box, the area of each detection box, the ratio of the area of the object within each detection box to the area of the detection box, and the morphological characteristics of the different types of objects, the error detection box in the initial detection box is determined.
[0107] Delete the error detection box in the initial detection box to obtain the object target detection box.
[0108] In one embodiment, determining the error detection box within the initial detection box based on the ratio of the length to the width of each detection box, the area of each detection box, and the ratio of the area of the object within each detection box to the area of the detection box includes:
[0109] Detection boxes whose length-to-width ratio in the initial detection box is less than the first threshold are designated as error detection boxes;
[0110] Detection boxes whose area is less than the second threshold and whose ratio of the area of the object within the detection box to the area of the detection box is less than the third threshold are designated as error detection boxes.
[0111] In one embodiment, the AI-based object detection device 100 further includes a statistics module, which is used to count the number of target detection boxes to obtain the number of objects.
[0112] Reference Figure 13 The diagram shown is a schematic representation of a preferred embodiment of the electronic device of this application.
[0113] The electronic device includes a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other via the communication bus 114.
[0114] Memory 113 is used to store computer programs, such as an artificial intelligence-based object detection program;
[0115] In one embodiment of this application, when the processor 111 executes the program stored in the memory 113, it implements the artificial intelligence-based object detection method provided in any of the foregoing method embodiments, including:
[0116] The image to be detected is input into an image segmentation network to obtain the region of interest of the image to be detected;
[0117] An image detection network is used to detect object detection results in the region of interest, wherein the object detection results include detection boxes for different types of objects;
[0118] The nonmaximum suppression algorithm is used to filter out the initial detection boxes of objects in the object detection results of the region of interest.
[0119] Based on the morphological characteristics of the different types of objects, the error detection boxes in the initial detection box are deleted to obtain the target detection box of the object.
[0120] For a detailed explanation of the above steps, please refer to the above. Figure 12 Functional block diagram of an embodiment of an artificial intelligence-based object detection device 100 and Figure 1 A flowchart illustrating an embodiment of an artificial intelligence-based object detection method.
[0121] Furthermore, embodiments of this application also propose a computer-readable storage medium, which can be non-volatile or volatile. The computer-readable storage medium includes a data storage area and a program storage area. The program storage area stores an artificial intelligence-based object detection program, which, when executed by a processor, performs the following operations:
[0122] The image to be detected is input into an image segmentation network to obtain the region of interest of the image to be detected;
[0123] An image detection network is used to detect object detection results in the region of interest, wherein the object detection results include detection boxes for different types of objects;
[0124] The nonmaximum suppression algorithm is used to filter out the initial detection boxes of objects in the object detection results of the region of interest.
[0125] Based on the morphological characteristics of the different types of objects, the error detection boxes in the initial detection box are deleted to obtain the target detection box of the object.
[0126] The specific implementation of the computer-readable storage medium in this application is largely the same as the specific implementation of the above-described artificial intelligence-based object detection method, and will not be repeated here.
[0127] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units 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.
[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0129] It should be noted that the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.
[0130] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.
[0131] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. An object detection method based on artificial intelligence, characterized in that, The method includes: The image to be detected is input into an image segmentation network to obtain the region of interest of the image to be detected; An image detection network is used to detect object detection results in the region of interest, wherein the object detection results include detection boxes for different types of objects; The nonmaximum suppression algorithm is used to filter out the initial detection boxes of objects in the object detection results of the region of interest. Based on the morphological characteristics of the different types of objects, the error detection boxes in the initial detection box are deleted to obtain the target detection box of the object; The initial detection bounding box for the object in the object detection result of the region of interest is selected using the non-maximum suppression algorithm, including: Define the intersection-union ratio (IU) threshold range; The intersection-union ratio (IU) threshold interval is iterated with a preset step size, and the area of the object not covered by the detection box in the region of interest is calculated in each IU threshold interval of the iteration. Based on the area of the uncovered objects, the target intersection-union ratio threshold of the region of interest is determined; Based on the target intersection-union ratio threshold of the region of interest, the initial detection box of each object in the object detection results of the region of interest is selected.
2. The object detection method based on artificial intelligence as described in claim 1, characterized in that, The step of inputting the image to be detected into an image segmentation network to obtain the region of interest of the image to be detected includes: The image to be detected is input into an image segmentation network to obtain multiple segmentation regions of the image to be detected. Extract the region of interest from the segmented region, wherein the region of interest includes a single object or multiple objects.
3. The object detection method based on artificial intelligence as described in claim 1, characterized in that, The object detection result obtained by using an image detection network to detect the region of interest includes: Obtain a training sample set, wherein the training sample set includes objects of various forms; The image detection network is obtained by training a preset initial detection network based on the training sample set; The image detection network is used to detect the object in the region of interest.
4. The object detection method based on artificial intelligence as described in claim 1, characterized in that, The step of determining the target intersection-union threshold of the region of interest based on the area of the uncovered objects includes: If the area of objects not covered by the detection box within the region of interest remains unchanged in each iteration of the cross-union ratio threshold, then the preset value is used as the target cross-union ratio threshold for the region of interest. If, in each iteration of the cross-union ratio (CUP) threshold, the area of objects not covered by the detection box within the region of interest decreases and then tends to level off, then the CUP threshold corresponding to the inflection point is taken as the target CUP threshold.
5. The object detection method based on artificial intelligence as described in claim 1, characterized in that, The step of deleting error detection boxes from the initial detection box based on the morphological features of the different types of objects to obtain the target detection box of the object includes: Determine the ratio of the length to the width of each detection box in the initial detection frame, the area of each detection box, and the ratio of the area of the object within each detection box to the area of the detection box; Based on the ratio of the length to the width of each detection box, the area of each detection box, the ratio of the area of the object within each detection box to the area of the detection box, and the morphological characteristics of the different types of objects, the error detection box in the initial detection box is determined. Delete the error detection box in the initial detection box to obtain the object target detection box.
6. The object detection method based on artificial intelligence as described in claim 5, characterized in that, The step of determining the error detection box in the initial detection box based on the ratio of the length to the width of each detection box, the area of each detection box, and the ratio of the area of the object within each detection box to the area of the detection box includes: Detection boxes whose length-to-width ratio in the initial detection box is less than the first threshold are designated as error detection boxes; Detection boxes whose area is less than the second threshold and whose ratio of the area of the object within the detection box to the area of the detection box is less than the third threshold are designated as error detection boxes.
7. The object detection method based on artificial intelligence as described in claim 1, characterized in that, After obtaining the object target detection box, the method further includes: The number of the target detection boxes is counted to obtain the number of the objects.
8. An object detection device based on artificial intelligence, characterized in that, The device includes: Segmentation module: used to input the image to be detected into the image segmentation network to obtain the region of interest of the image to be detected; Detection module: used to detect object detection results in the region of interest using an image detection network, wherein the object detection results include detection boxes for different types of objects; Filtering module: Used to filter out the initial detection boxes of objects in the object detection results of the region of interest using a non-maximum suppression algorithm; Deletion module: used to delete error detection boxes in the initial detection box according to the morphological characteristics of the different types of objects, and obtain the target detection box of the object; The initial detection bounding box for the object in the object detection result of the region of interest is selected using the non-maximum suppression algorithm, including: Define the intersection-union ratio (IU) threshold range; The intersection-union ratio (IU) threshold interval is iterated with a preset step size, and the area of the object not covered by the detection box in the region of interest is calculated in each IU threshold interval of the iteration. Based on the area of the uncovered objects, the target intersection-union ratio threshold of the region of interest is determined; Based on the target intersection-union ratio threshold of the region of interest, the initial detection box of each object in the object detection results of the region of interest is selected.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the artificial intelligence-based object detection method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Image detection method and device, computer equipment and storage medium
CN110796656A
Automatic detection method for multi-scale polymorphic target in two-dimensional image
CN111027547A