Image detection method, device and equipment and computer readable storage medium

By using the probability matrix to adjust the detection results and the secondary detection method in image target detection, the problems of category correlation and sample imbalance are solved, and the detection accuracy and recall rate are improved.

CN118799669APending Publication Date: 2024-10-18CHINA MOBILE COMM LTD RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311688739.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-11
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing image target detection models fail to effectively consider the correlation between different categories of targets, resulting in low detection efficiency. Due to the problem of sample imbalance, a large number of missed samples affect the detection accuracy.

Method used

By using the probability matrix to adjust the detection results of the first model to characterize the correlation between targets of different categories, and using the secondary detection method to separately train the target detection model for specific categories of sample data, the second model is used to perform targeted secondary detection. detection, and fuse the second and third detection results to remove duplicate detections.

Benefits of technology

It improves the target detection accuracy and recall rate of categories with fewer samples, and improves the target detection accuracy and recall rate of the entire image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799669A_ABST
    Figure CN118799669A_ABST
Patent Text Reader

Abstract

The invention discloses an image detection method, device and equipment and a computer readable storage medium. The method comprises the following steps: inputting a to-be-detected image into a first model to obtain a first detection result; determining a second detection result based on the first detection result and a probability matrix; inputting the to-be-detected image into a second model to obtain a third detection result; the second model is obtained by taking expanded data and specific category sample data of the first model as target sample data and training the target sample data; the expanded data represents data obtained by expanding the specific category of sample data; determining a fourth detection result based on the second detection result and the third detection result; the fourth detection result at least comprises all target categories in the to-be-detected image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image detection method, device, equipment and computer-readable storage medium. Background Art

[0002] Image object detection is a hot topic in the field of computer vision, and image object detection methods have emerged in an endless stream in recent years. Although the one-stage object detection model and the two-stage object detection model proposed in the related art can be applied to practical tasks, these two models usually require prior knowledge such as anchor points and anchor box ratios, and post-processing methods such as non-maximum suppression (NMS). They are not end-to-end detection models, and the object detection process is complicated.

[0003] With the development of transformers, a transformer-based detection method (DETR) has been proposed in related technologies. DETR is an end-to-end detection model. Although this method can simplify the target detection process to a certain extent, the DETR model does not consider the correlation between targets of different categories. Each target is detected independently, and the detection efficiency is low. In addition, due to the extremely unbalanced number of samples in each category in the image, targets with a small number of samples are missed, resulting in a low detection accuracy for targets with a small number of samples, which affects the target detection accuracy of the entire image. Summary of the invention

[0004] In order to solve the technical problems existing in the related art, the embodiments of the present application provide an image detection method, device, equipment and computer-readable storage medium.

[0005] To achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides an image detection method, the method comprising:

[0007] Inputting the image to be detected into the first model to obtain a first detection result;

[0008] Determine a second detection result based on the first detection result and the probability matrix;

[0009] The image to be detected is input into a second model to obtain a third detection result; the second model is obtained by training the target sample data using the extended data and the specific category sample data of the first model as target sample data; the extended data represents data obtained by extending the specific category sample data;

[0010] Based on the second detection result and the third detection result, a fourth detection result is determined; the fourth detection result at least includes all target categories in the image to be detected.

[0011] In a second aspect, the embodiment of the present application further provides an image detection device, including:

[0012] A first determination unit, used for inputting the image to be detected into the first model to obtain a first detection result;

[0013] A second determining unit, configured to determine a second detection result based on the first detection result and the probability matrix;

[0014] A third determination unit is used to input the image to be detected into a second model to obtain a third detection result; the second model is obtained by training the target sample data using the extended data and the specific category sample data of the first model as target sample data; the extended data represents data obtained by extending the specific category sample data;

[0015] A fourth determination unit is used to determine a fourth detection result based on the second detection result and the third detection result; the fourth detection result at least includes all target categories in the image to be detected.

[0016] In a third aspect, an embodiment of the present application further provides an image detection device, comprising: a processor and a memory for storing a computer program that can be run on the processor;

[0017] Wherein, when the processor is used to run the computer program, it executes the steps of the image detection method described in the embodiment of the present application.

[0018] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the image detection method described in the embodiment of the present application are implemented.

[0019] The image detection method, apparatus, device and computer-readable storage medium provided by the embodiments of the present application obtain a first detection result by inputting the image to be detected into a first model; determining a second detection result based on the first detection result and a probability matrix; inputting the image to be detected into a second model to obtain a third detection result; the second model is obtained by training the target sample data using the extended data and the specific category sample data of the first model as target sample data; the extended data represents the data obtained by expanding the specific category sample data; determining a fourth detection result based on the second detection result and the third detection result; the fourth detection result includes at least all target categories in the image to be detected. The image detection method of the embodiment of the present application is adopted, and the first detection result of the first model is adjusted by using a probability matrix to characterize the correlation between targets of different categories, thereby reducing the impact of sample imbalance; a secondary detection method is adopted, by expanding the category with a smaller sample size, that is, the specific category sample data, and separately training a target detection model for the specific category sample data, that is, the second model, and using the second model to perform targeted secondary detection to obtain the third detection result, thereby eliminating duplicate detections through the fusion of the second detection result and the third detection result, thereby improving the detection accuracy and recall rate of targets in the category with fewer samples, thereby improving the target detection accuracy and recall rate of the entire image to be detected. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 The process diagram of the image detection method of the present application embodiment is as follows: Figure 1 ;

[0021] Figure 2 The process diagram of the image detection method of the present application embodiment is as follows: Figure 2 ;

[0022] Figure 3 The process diagram of the image detection method of the present application embodiment is as follows: Figure 3 ;

[0023] Figure 4 A schematic diagram of the structure of an image detection device according to an embodiment of the present application;

[0024] Figure 5 This is a schematic diagram of the hardware composition structure of the image detection device according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] The present application will be further described in detail below with reference to the accompanying drawings and embodiments.

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0027] Image target detection has always been a hot research topic in the field of image processing technology, and image target detection methods have emerged in an endless stream over the years. At present, image target detection methods can be divided into two types: open-set target detection and closed-set target detection, depending on whether the target category to be detected appears in the training data. Among them, open-set target detection generally requires a large amount of data and system resources for model pre-training, and then fine-tuning and application to downstream tasks. It has not yet been applied on a large scale; while closed-set target detection directly trains a model based on the labeled training data, and then detects fixed category targets in the image to be detected, which can be more efficiently applied to actual tasks.

[0028] In the related technology, the mainstream closed-set target detection methods include one-stage target detection models and two-stage target detection models. Among them, the one-stage target detection model is mainly represented by the yolo (you only look once) model, which has been updated to version v8. It mainly uses multi-scale analysis, residual connection and other methods to achieve accurate detection of targets of different scales. The two-stage target detection model is mainly represented by the region-based convolutional neural network model (RCNN, Regionbased Convolutional Neural Network) series. Such models usually require a candidate box extraction step and a detection step. Among them, the candidate box extraction step can use methods such as selective search (selection search) and region sampling network (RPN, Region Proposal Network); in the detection step, a simple fully connected network is used to obtain the coordinates and category of the target. Faster RCNN (fast region-based convolutional neural network model) also introduces anchor boxes to reduce the amount of calculation.

[0029] Compared with the two-stage target detection model, the detection speed of the one-stage target detection model is greatly improved, and the accuracy rate is constantly improved as the model is updated. It has now surpassed the two-stage target detection model. However, the one-stage target detection model and the two-stage target detection model usually require prior knowledge such as anchor points and anchor box ratios, and post-processing methods such as NMS. They are not end-to-end detection models, and the target detection process is complicated.

[0030] In recent years, with the popularity of transformers, visual problems are also trying to find transformer solutions. In 2020, DETR was also proposed in related technologies. DETR is an end-to-end target detection model. It does not have prior knowledge such as anchor points and anchor box ratios, and post-processing methods such as NMS, which greatly simplifies the target detection process. In addition, the DETR model models target detection as set detection and uses a bipartite graph matching algorithm to calculate the loss function. There are many variants of the DETR model, such as DN-DETR (Accelerate DETR Training by Introducing QueryDeNoising), DAB-DETR (Dynamic Anchor Boxes are Better Queries for DETR) and DINO (DETR withImproved deNoising anchOr boxes).

[0031] The existing closed-set target detection technology is applied to target detection in images, such as target detection in images of construction hazards, and there are the following technical problems:

[0032] 1. The model design does not consider the correlation between different types of targets, and the detection efficiency is low. Take the construction hazard image to be detected as an example. In a construction hazard image, highly correlated targets such as excavators, earth piles, fences, workers, and dustproof cloths often appear in combination. The existing model does not consider the correlation between different types of targets, and each type of target is detected independently, resulting in low detection efficiency.

[0033] 2. Extremely unbalanced samples lead to missed detection of targets with a small number of samples. Taking the construction hazard images as an example, the number of samples in each category in the construction hazard data varies greatly. For example, there are nearly 10,000 samples of excavators and workers, while there are only dozens to hundreds of samples of construction signs and wires. Moreover, since some targets often appear at the same time, it is difficult to directly expand the samples by supplementing Internet images to achieve sample balance; other sample balancing methods, such as multiple sampling methods, focal loss loss functions, etc., are also very limited in effect when faced with samples with such a large difference in number.

[0034] Based on this, an embodiment of the present application proposes an image detection method. In various embodiments of the present application, the first detection result of the first model is adjusted by using a probability matrix to characterize the correlation between targets of different categories, thereby reducing the impact of sample imbalance; a secondary detection method is adopted to expand the category with a smaller sample size, that is, the specific category sample data, and separately train a target detection model for the specific category sample data, that is, the second model, and use the second model to perform targeted secondary detection to obtain a third detection result, thereby eliminating duplicate detections through the fusion of the second detection result and the third detection result, thereby improving the detection accuracy and recall rate of targets of the category with fewer samples, thereby improving the target detection accuracy and recall rate of the entire image to be detected.

[0035] The present application embodiment provides an image detection method, which is applied to an image detection device. Figure 1 The process diagram of the image detection method of the present application embodiment is as follows: Figure 1 ;like Figure 1 As shown, the image detection method includes:

[0036] Step 101: Input the image to be detected into the first model to obtain a first detection result.

[0037] The image detection method of the embodiment of the present application can be applied to various types of image target detection scenarios. For example, it can be applied to a variety of hidden danger identification scenarios including construction. For example, in the construction hidden danger image target detection scenario, excavators, earth pits, fences, etc. often appear at the same time, and all hidden danger target categories in the construction hidden danger image are identified. For example, in the cable hidden danger image target detection scenario, overhead cables hanging and ground optical cables scattered often appear at the same time, and all hidden danger target categories in the cable hidden danger image are identified.

[0038] It should be noted that, in complex backgrounds, the efficiency of the image detection method of the embodiment of the present application in identifying hidden dangers is much higher than the efficiency of the existing manual identification of hidden dangers, which can greatly reduce the labor cost. In addition, the embodiment of the present application can also be used for target detection tasks where there are associations between different categories other than hidden dangers, such as pedestrian and vehicle violation detection, and can also be applied to target detection tasks with extremely unbalanced samples. The embodiment of the present application does not make any restrictions on the scene of image target detection.

[0039] In actual application, before the image detection device inputs the image to be detected into the first model and obtains the first detection result, it is necessary to construct the first model.

[0040] Based on this, in one embodiment, before inputting the image to be detected into the first model to obtain the first detection result, the method further includes:

[0041] Determine the target loss function;

[0042] The target loss function is used to update the parameters of the first model until the loss value of the target loss function converges, thereby obtaining a trained first model.

[0043] Here, the first model may be a DETR model, or may be a variant model of the DETR model, such as DN-DETR, DAB-DETR, and DINO.

[0044] In actual application, in the process of constructing the first model, it is necessary to first determine the target loss function, and then use the determined target loss function to update the parameters of the first model to obtain the trained first model. However, in order to further model the impact of the simultaneous appearance of different categories of targets on target detection, the embodiment of the present application introduces an interactive loss function based on the original loss function of the first model, and quantifies the impact of different categories of targets that appear simultaneously in the image to be detected through the interactive loss function, thereby improving the accuracy of the first model.

[0045] Based on this, in one embodiment, determining the target loss function includes:

[0046] Determine an interaction loss function; the interaction loss function is used to quantify the impact of different categories of targets appearing simultaneously in the image to be detected;

[0047] The target loss function is determined based on the interaction loss function and the original loss function corresponding to the first model.

[0048] Here, assuming that the interaction loss function is Inter_loss, the interaction loss function can be calculated by the following formula (1):

[0049]

[0050] Among them, k, l represent the detected targets; cls * Indicates the category to which the detected target belongs; P(*) indicates the probability that the category to which target k belongs and the category to which target l belongs appear at the same time.

[0051] It should be noted that the calculation process of the probability of two different categories appearing at the same time will be described in detail below.

[0052] Here, in the embodiment of the present application, an interaction loss function is added to the original loss function of the first model to form the final target loss function. For example, the target loss function can be obtained by directly adding the interaction loss function and the original loss function corresponding to the first model. Alternatively, in order to avoid a large difference in the value range of the interaction loss function and the original loss function corresponding to the first model, a value range adjustment coefficient is added. For example, the value range adjustment coefficient corresponding to the interaction loss function is α, and the value range adjustment coefficient of the original loss function corresponding to the first model is β. At this time, the target loss function can be calculated by the following formula (2):

[0053] L=α*Inter_loss+β*L p (2)

[0054] Where L represents the target loss function; L p Represents the original loss function corresponding to the first model.

[0055] Here, taking the first model as the DETR model as an example, the embodiment of the present application is to input the image to be detected into the DETR model through an image detection device to obtain the output result of the DETR model, that is, the first detection result. Specifically, the first detection result can be the output result of the feed-forward network (FFN, Feed-Forward Network) layer of the DETR model.

[0056] Step 102: Determine a second detection result based on the first detection result and the probability matrix.

[0057] In actual application, before the image detection device determines the second detection result based on the first detection result and the probability matrix, it is necessary to first obtain the probability matrix.

[0058] Based on this, in one embodiment, before determining the second detection result based on the first detection result and the probability matrix, the method further includes: generating a probability matrix.

[0059] The generation process of the probability matrix is ​​described below.

[0060] In actual application, the image detection device can first count the number and distribution of targets of each category, and then generate a probability matrix based on the number and distribution of targets of each category.

[0061] Based on this, in one embodiment, the generation probability matrix includes:

[0062] Determine the number of targets of each category in the image to be detected and the distribution of the targets of each category; and generate the probability matrix based on the number of targets of each category and the distribution of the targets of each category.

[0063] Here, the image detection device can count the number of targets of each category according to the labels of the targets in the image to be detected; after counting the number of targets of each category, the distribution of targets of each category can be determined accordingly, wherein the distribution of targets of each category can be expressed in the form of a histogram or in other forms, which is not limited in the embodiments of the present application.

[0064] In one embodiment, generating the probability matrix based on the number of targets of each category and the distribution of targets of each category includes:

[0065] Determine a first probability based on the number of targets of each category and the distribution of targets of each category; the first probability represents the probability of simultaneous occurrence of targets of each main category and targets of each sub-category;

[0066] Based on the first probability, the probability matrix is ​​generated.

[0067] Here, the image detection device first sorts the targets of each category according to the quantity to obtain the sorting result; secondly, determines the main category targets and the sub-category targets based on the sorting result; finally, determines the first probability based on the main category targets and the sub-category targets, and generates a probability matrix based on the first probability.

[0068] Here, for sorting each category of targets according to quantity, each category of targets may be sorted in descending order according to quantity, or each category of targets may be sorted in ascending order according to quantity. The embodiment of the present application does not limit the sorting method.

[0069] The following example is used to illustrate the descending order of the number of targets in each category. In the sorting result, the category targets with the first number of targets are selected as the main category targets, and the targets of the remaining categories except the target number of categories in the total number of categories are selected as the secondary category targets. Among them, the number of targets can be determined according to the number of target categories and the number of samples in each category, or different thresholds such as the upper quartile can be selected according to the specific situation, which is not limited here. After determining the main category targets and secondary category targets, the probability of each main category target and each secondary category target appearing at the same time can be calculated, that is, the first probability, and then based on the probability of each main category target and each secondary category target appearing at the same time, the category distribution probability matrix A is generated, referred to as probability matrix A for short.

[0070] In one embodiment, determining the second detection result based on the first detection result and the probability matrix includes: performing a first operation on the first detection result and the probability matrix to obtain the second detection result.

[0071] Here, the first operation includes a matrix multiplication operation. That is, in an embodiment of the present application, after obtaining the first detection result and the probability matrix, the image detection device can perform matrix multiplication on the first detection result, i.e., the output result of the FFN layer of the DETR model, with the aforementioned generated probability matrix to obtain an initial detection result, i.e., the second detection result.

[0072] Step 103: input the image to be detected into the second model to obtain a third detection result.

[0073] In an embodiment of the present application, the second model is obtained by training the target sample data using the expanded data and the specific category sample data of the first model as target sample data; the expanded data represents data obtained by expanding the specific category sample data.

[0074] In actual application, before training the second model, the image detection device needs to first determine the target sample data, and then train the target sample data to obtain the second model, wherein the target sample data includes two parts, namely, the expanded data and the specific category sample data of the first model. Before determining the target sample data, the image detection device needs to obtain the expanded data and the specific category sample data of the first model.

[0075] Based on this, in one embodiment, the method further includes:

[0076] Selecting the specific category sample data; the specific category sample data represents sample data of a relatively small category that appears in all sample data used to train the first model;

[0077] The specific category sample data is expanded by using the Internet to obtain the expanded data.

[0078] Here, the embodiment of the present application is to expand the data of the category with a small sample size to obtain expanded data. In practical applications, the image detection device selects the category with the number of category samples ranked after the target number in the sorting result as the specific category sample data, that is, the sample data of the category with fewer samples in all the sample data for training the first model, and then obtains images of these categories from the Internet to obtain expanded data.

[0079] The embodiment of the present application expands sample data of specific categories, that is, only expands sample data of fewer categories, and uses sample data of fewer categories to train a second model, such as a YOLO model, so as to use the second model to perform targeted secondary detection to obtain secondary detection results, that is, third detection results, so as to improve the accuracy and recall rate of the third detection results.

[0080] Step 104: Determine a fourth detection result based on the second detection result and the third detection result; the fourth detection result at least includes all target categories in the image to be detected.

[0081] In actual application, since there may be targets in the third detection result that are repeated in the second detection result, the embodiment of the present application removes duplicate detections by fusing the second detection result and the third detection result to obtain the final detection result, i.e., the fourth detection result.

[0082] Based on this, in one embodiment, determining a fourth detection result based on the second detection result and the third detection result includes:

[0083] The second detection result is combined with the third detection result to obtain the fourth detection result.

[0084] The fusion process of the second detection result and the third detection result is described below.

[0085] In one embodiment, the fusing the second detection result with the third detection result to obtain the fourth detection result includes:

[0086] performing a second operation on the anchor frame of each second detection result and the anchor frame of each third detection result to obtain an intersection-over-union ratio of the anchor frame of the second detection result and the anchor frame of the third detection result;

[0087] Based on the intersection-over-union ratio, the fourth detection result is determined.

[0088] Here, the second operation includes an intersection-and-union operation, that is, after obtaining the second detection result and the third detection result, the image detection device performs an intersection-and-union operation on the anchor frame of each second detection result with the anchor frame of each third detection result, and obtains the intersection-and-union ratio of the anchor frame of the second detection result and the anchor frame of the third detection result; then, according to the intersection-and-union ratio of the anchor frame of the second detection result and the anchor frame of the third detection result, the fourth detection result is determined, specifically, the intersection-and-union ratio is compared with the first threshold to obtain a comparison result; then, based on the comparison result, the fourth detection result is determined.

[0089] Here, the first threshold value may be set according to actual conditions. For example, the first threshold value may be set to 0.8 according to multiple test results.

[0090] In one embodiment, determining the fourth detection result based on the comparison result includes:

[0091] When the comparison result indicates that the intersection-over-union ratio is greater than the first threshold, determining the fourth detection result based on the target category consistency between the second detection result and the third detection result;

[0092] When the comparison result indicates that the intersection-over-union ratio is less than or equal to the first threshold, all target categories of the second detection result and the third detection result are determined as the fourth detection result.

[0093] It should be noted that the target category consistency between the second detection result and the third detection result includes one of the following: the target category of the second detection result and the target category of the third detection result belong to the same category; the target category of the second detection result and the target category of the third detection result belong to different categories.

[0094] Here, assuming that the first threshold is th2, when the intersection and union ratio of the anchor box of the second detection result and the anchor box of the third detection result is greater than th2 and the target category of the second detection result and the target category of the third detection result belong to the same category, the target position of the fourth detection result is determined as the circumscribed rectangle of the anchor box of the second detection result and the anchor box of the third detection result, and the target category remains unchanged; when the intersection and union ratio of the anchor box of the second detection result and the anchor box of the third detection result is greater than th2 and the target category of the second detection result and the target category of the third detection result belong to different categories, the fourth detection result is determined according to the distribution probability matrix of the target category of the second detection result and the target category of the third detection result.

[0095] Specifically, the method of determining the fourth detection result according to the distribution probability matrix of the target category of the second detection result and the target category of the third detection result includes: comparing the distribution probability matrix of the target category of the second detection result and the target category of the third detection result with the second threshold value respectively to obtain a comparison result; when the comparison result indicates that the distribution probability matrices corresponding to the two categories are both less than the second threshold value, the target category with a larger number of samples is determined as the fourth detection result, otherwise all categories are retained, that is, all target categories of the second detection result and the third detection result are determined as the fourth detection result. When the intersection and union ratio of the anchor box of the second detection result and the anchor box of the third detection result is less than th2, all target categories of the second detection result and the third detection result are determined as the fourth detection result.

[0096] Here, the second threshold value may be set according to actual conditions. For example, the second threshold value may be set to 0.5 according to multiple test results.

[0097] The present application also provides another image detection method, which is applied to an image detection device. Figure 2 The process diagram of the image detection method of the present application embodiment is as follows: Figure 2 ;like Figure 2 As shown, the image detection method includes:

[0098] Step 201: Input the image to be detected into the first model to obtain a first detection result.

[0099] Step 202: Determine the number of targets of each category in the image to be detected and the distribution of the targets of each category, and generate a probability matrix based on the number of targets of each category and the distribution of the targets of each category.

[0100] In one embodiment, generating a probability matrix based on the number of targets of each category and the distribution of targets of each category includes:

[0101] Determine a first probability based on the number of targets of each category and the distribution of targets of each category; the first probability represents the probability of simultaneous occurrence of targets of each main category and targets of each sub-category;

[0102] Based on the first probability, the probability matrix is ​​generated.

[0103] Step 203: performing a first operation on the first detection result and the probability matrix to obtain a second detection result.

[0104] Step 204: input the image to be detected into the second model to obtain a third detection result.

[0105] Here, the second model is obtained by training the target sample data using the expanded data and the specific category sample data of the first model as target sample data; the expanded data represents data obtained by expanding the specific category sample data.

[0106] Step 205: performing a second operation on the anchor boxes of the second detection results and the anchor boxes of the third detection results to obtain an intersection-over-union ratio of the anchor boxes of the second detection results and the anchor boxes of the third detection results.

[0107] Step 206: Compare the intersection-over-union ratio with the first threshold to obtain a comparison result; and determine a fourth detection result based on the comparison result.

[0108] In one embodiment, determining the fourth detection result based on the comparison result includes:

[0109] When the comparison result indicates that the intersection-over-union ratio is greater than the first threshold, determining the fourth detection result based on the target category consistency between the second detection result and the third detection result;

[0110] When the comparison result indicates that the intersection-over-union ratio is less than or equal to the first threshold, all target categories of the second detection result and the third detection result are determined as the fourth detection result.

[0111] It should be noted that the specific processing process of the image detection device to complete the image detection has been described in detail above and will not be repeated here.

[0112] By adopting the technical solution of the embodiment of the present application, the first detection result of the first model is adjusted by using a probability matrix to characterize the correlation between targets of different categories, thereby reducing the impact of sample imbalance; a secondary detection method is adopted to expand the category with a smaller sample size, namely, the specific category sample data, and separately train a target detection model for the specific category sample data, namely, the second model; the second model is used to perform targeted secondary detection to obtain the third detection result, thereby eliminating duplicate detections through the fusion of the second detection result and the third detection result, thereby improving the detection accuracy and recall rate of targets of the category with fewer samples, thereby improving the target detection accuracy and recall rate of the entire image to be detected.

[0113] The present application is described below in conjunction with application examples.

[0114] The image detection method of the present application is described below by taking the image to be detected as a construction hazard image as an example.

[0115] Aiming at the problems of low detection efficiency and extremely unbalanced samples leading to missed detection of targets with a small number of samples in the construction hazard image target detection in the related art, this application proposes a construction hazard image target detection method based on probability matrix and secondary detection. Figure 3 The process diagram of the image detection method of the present application embodiment is as follows: Figure 3 ,like Figure 3As shown, the method mainly includes the steps of generating a probability matrix, a primary training model, data expansion, a secondary training model, and secondary target detection. Specifically, first, the number and distribution of targets of each category are counted to generate a probability matrix; then, the DETR model (corresponding to the aforementioned first model) is initially trained using all construction training data, the image to be detected is input into the DETR model, the category output result of the DETR model is obtained (corresponding to the aforementioned first detection result), and the category output result of the DETR model is matrix-multiplied with the probability matrix to obtain the initial detection result (corresponding to the aforementioned second detection result); next, the data of fewer categories is expanded, that is, the training data of a specific category is expanded, and a yolov5 target detection model (corresponding to the aforementioned second model) is trained twice using the expanded data and the data containing fewer category samples in the original training data to obtain the secondary detection result (corresponding to the aforementioned third detection result); finally, the initial detection result is fused with the secondary detection result to remove repeated detection, and the final detection result (corresponding to the aforementioned fourth detection result) is obtained, which realizes efficient and accurate construction hidden danger image target detection, and realizes target detection of categories with fewer samples through the probability matrix and targeted secondary detection.

[0116] Combine the following Figure 3 The construction hazard image target detection method based on probability matrix and secondary detection of this application is described in detail. The implementation scheme mainly includes the following parts:

[0117] 1. Count the number and distribution of targets in each category and generate a probability matrix.

[0118] Taking into account the scenarios where multiple targets appear in combination in construction hazard images, this application calculates the probability of two targets appearing at the same time. In this way, when one target is detected, other targets can be detected with focus based on the probability matrix, thereby improving the accuracy of detecting other targets.

[0119] First, count the number of targets in each category according to the labels of the training data, and draw a histogram based on the number of targets in each category. Then, calculate the probability matrix through the following steps:

[0120] 1) Sort each type of target in descending order according to their quantity.

[0121] 2) Select the first p f The categories are taken as the main categories, for example, the main category sequence is {C0, C1, C2...}, and the remaining 1-p f As sub-categories, for example, the sub-category sequence is {C n , C n+1 , C n+2 ......, C m-1}, where n is the number of main categories, m is the number of all categories, and p f It indicates the probability that the number of main categories accounts for the total number of categories.

[0122] In this application, p can be calculated based on the number of target categories and the number of samples in each category. f Set to 30%, or select different thresholds such as the upper quartile according to specific circumstances. Where n = ceil (p f *m).

[0123] 3) Calculate the probability that the main category target and the secondary category target appear at the same time (corresponding to the first probability mentioned above):

[0124]

[0125] Among them, P(C i , C j ) represents the probability of the main category target and the secondary category target appearing at the same time, C i represents any target in the main category sequence, C j Represents any target in the subcategory sequence.

[0126] 4) Generate the category distribution probability matrix A, A according to the probability of the main category target and the secondary category target appearing at the same time ij =exp(P(C i , C j )).

[0127] It should be noted that here ∑ n≤j<m P(C i , C j )≠1.

[0128] 2. Use all construction data to train the DETR model for the first time and obtain the initial detection results.

[0129] Considering that there is rich scene semantic information in construction hazard images, and the DETR model, as a transformer-based target detection model, can understand the semantic information in the image through the attention mechanism, this application uses the DETR model for initial training. The specific implementation steps are as follows:

[0130] 1) Use the resnet50 (residual network 50) pre-trained model to extract the feature F of the input image to be detected.

[0131] 2) Initialize the location query using an all-zero vector.

[0132] 3) Divide the original image, i.e. the image to be detected, into several n s *n simage blocks, and then encode these image blocks sequentially 0, 1, 2, 3... to obtain position codes.

[0133] Among them, n s Indicates the side length of the image block. In practical applications, n can be set based on experience. s However, in general, n s The value of is set to 32.

[0134] 4) Input F, location query, and location encoding into the DETR model to obtain the output category and location.

[0135] 5) The result of the FFN layer of the output category is matrix multiplied with the probability matrix generated in step 1, and the design of the model is fine-tuned to characterize the correlation between targets of different categories.

[0136] After the DETR model is trained, the image to be detected is input into the DETR model, and the initial detection result Res = {res0, res1, ...} can be obtained, where each res i All contain the coordinates of the target box and the target category. After the above steps 1 and 2, most targets have been detected, but some categories with very small sample sizes are still missed. Therefore, this application adopts a secondary detection method, by expanding the categories with small sample sizes, and separately training a detection model for targets with small sample sizes.

[0137] 3. Perform data expansion for categories with small sample sizes.

[0138] The number of selected category samples is ranked at the end p f The categories are taken as fewer categories, and images of these categories are obtained from the Internet. Because the semantic information of the scene and the correlation between categories have been learned in the above step 2, the data expansion here does not limit the specific scene of the sample.

[0139] 4. Use the expanded data and the data containing fewer category samples in the original training data to retrain a YOLO model, such as the YOLOv5 target detection model.

[0140] Since in step 2, the categories with a large sample size and high sample quality (i.e., the main category) can basically achieve accurate detection, while the categories with a small sample size and poor sample quality (i.e., the minor categories in the secondary category) have poor detection effects. Therefore, this application separately trains a secondary target detection model for the minor categories, and based on the initial detection results in step 2, uses the yolov5 model to perform targeted secondary detection to improve the accuracy and recall of the detection results. The training samples of the secondary target detection model are constructed as follows:

[0141] 1) Select images that contain fewer category samples in the original training data, and only label objects of fewer categories in these images.

[0142] 2) Only mark the objects of a smaller category in the data expanded in step 3.

[0143] 3) Mix the labeled data from 1) and 2) to obtain the training data for the secondary object detection model.

[0144] In step 2, the categories and positions of some of the targets of a smaller category have been obtained. In order to improve the detection efficiency and avoid repeated detection, the present application removes the targets of a smaller category Tar={tar0, tar1, ...} that have been detected in the above step 2) through the following steps:

[0145] 1) Calculate the sizes of several anchor boxes generated by yolov5;

[0146] 2) Calculate the intersection-over-union ratio of the target in Tar and the above anchor box;

[0147] 3) Remove the anchor boxes whose intersection-over-union ratio with the target in Tar is greater than th1.

[0148] In this application, based on practical experience, th1 can be set to 0.7, which is not limited here.

[0149] 5. Secondary target detection.

[0150] Using the yolov5 model trained with less category data in step 4 and removing some anchor boxes, perform secondary target detection on the image to be detected to obtain secondary detection results. In practical applications, there may be targets in the secondary detection results that are repeated in the primary detection results. Therefore, this application uses the following method to fuse the primary detection results and the secondary detection results to avoid repeated detection:

[0151] 1) Calculate the intersection-over-union ratio of each initial detection result frame and the secondary detection result frame.

[0152] 2) If the intersection-over-union ratio is greater than th2 and the two belong to the same category, the target position is expanded to the circumscribed rectangle of the two detection result boxes, and the category remains unchanged.

[0153] 3) If the intersection-over-union ratio is greater than th2 and the two belong to different categories, check the probability matrix in step 1. If the A corresponding to the two categories ij <exp(th3), the class with the larger number of samples is retained; otherwise, all classes are retained.

[0154] 4) If the intersection-over-union ratio is less than th2, all categories are retained.

[0155] In the present application, according to multiple experimental results, th2 can be set to 0.8 and th3 can be set to 0.5, which is not limited here.

[0156] Compared with the methods of related technologies, this application has the following beneficial effects:

[0157] 1. This application uses the scene information of the image to calculate the probability matrix of the simultaneous appearance of different categories, and uses the probability matrix to adjust the category detection results of the initial detection model, reducing the impact of sample imbalance.

[0158] 2. This application specifically trains a secondary detection model that only detects a few categories, and removes duplicate detections through the result fusion method, thereby improving the detection accuracy and recall rate of categories with fewer samples.

[0159] In order to implement the image detection method of the embodiment of the present application, the embodiment of the present application also provides an image detection device, Figure 4 Schematic diagram of the composition structure of the image detection device according to the embodiment of the present application. Figure 4 As shown, the image detection device comprises:

[0160] A first determining unit 41 is used to input the image to be detected into the first model to obtain a first detection result;

[0161] A second determining unit 42, configured to determine a second detection result based on the first detection result and the probability matrix;

[0162] A third determination unit 43 is used to input the image to be detected into a second model to obtain a third detection result; the second model is obtained by training the target sample data using the extended data and the specific category sample data of the first model as target sample data; the extended data represents data obtained by extending the specific category sample data;

[0163] The fourth determination unit 44 is used to determine a fourth detection result based on the second detection result and the third detection result; the fourth detection result at least includes all target categories in the image to be detected.

[0164] In one embodiment, the device further includes: a generating unit; wherein,

[0165] The generating unit is configured to generate a probability matrix before the second determining unit 42 determines the second detection result based on the first detection result and the probability matrix;

[0166] The generating unit is specifically used for:

[0167] Determine the number of objects of each category in the image to be detected, and the distribution of the objects of each category;

[0168] The probability matrix is ​​generated based on the number of targets of each category and the distribution of targets of each category.

[0169] In one embodiment, the generating unit is further specifically configured to:

[0170] Determine a first probability based on the number of targets of each category and the distribution of targets of each category; the first probability represents the probability of simultaneous occurrence of targets of each main category and targets of each sub-category;

[0171] Based on the first probability, the probability matrix is ​​generated.

[0172] In one embodiment, the second determining unit 42 is specifically configured to:

[0173] A first operation is performed on the first detection result and the probability matrix to obtain the second detection result.

[0174] In one embodiment, the device further includes: a fifth determining unit and an updating unit; wherein,

[0175] The fifth determination unit is used to determine the target loss function before the first determination unit 41 inputs the image to be detected into the first model to obtain the first detection result;

[0176] The updating unit is used to update the parameters of the first model using the target loss function until the loss value of the target loss function converges to obtain a trained first model.

[0177] In one embodiment, the fifth determining unit is specifically configured to:

[0178] Determine an interaction loss function; the interaction loss function is used to quantify the impact of different categories of targets appearing simultaneously in the image to be detected;

[0179] The target loss function is determined based on the interaction loss function and the original loss function corresponding to the first model.

[0180] In one embodiment, the device further includes: a selection unit and an expansion unit; wherein,

[0181] The selection unit is used to select the specific category sample data; the specific category sample data represents sample data of a relatively small category that appears in all sample data used to train the first model;

[0182] The expansion unit is used to expand the specific category sample data using the Internet to obtain the expanded data.

[0183] In one embodiment, the fourth determining unit 44 is specifically configured to:

[0184] The second detection result is combined with the third detection result to obtain the fourth detection result.

[0185] In one embodiment, the fourth determining unit 44 is further specifically configured to:

[0186] performing a second operation on the anchor frame of each second detection result and the anchor frame of each third detection result to obtain an intersection-over-union ratio of the anchor frame of the second detection result and the anchor frame of the third detection result;

[0187] Based on the intersection-over-union ratio, the fourth detection result is determined.

[0188] In one embodiment, the fourth determining unit 44 is further specifically configured to:

[0189] Comparing the intersection-over-union ratio with a first threshold to obtain a comparison result;

[0190] Based on the comparison result, the fourth detection result is determined.

[0191] In one embodiment, the fourth determining unit 44 is further specifically configured to:

[0192] When the comparison result indicates that the intersection-over-union ratio is greater than the first threshold, determining the fourth detection result based on the target category consistency between the second detection result and the third detection result;

[0193] When the comparison result indicates that the intersection-over-union ratio is less than or equal to the first threshold, all target categories of the second detection result and the third detection result are determined as the fourth detection result.

[0194] In actual application, the first determining unit 41, the second determining unit 42, the third determining unit 43 and the fourth determining unit 44 may be implemented by a processor in the image detection device.

[0195] It should be noted that: when the image detection device provided in the above embodiment performs image detection, only the division of the above program modules is used as an example. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the image detection device provided in the above embodiment belongs to the same concept as the image detection method embodiment. The specific implementation process is detailed in the image detection method embodiment, which will not be repeated here.

[0196] Based on the hardware implementation of the above program modules, and in order to implement the image detection method of the embodiment of the present application, the embodiment of the present application also provides an image detection device, Figure 5 FIG. 1 is a schematic diagram of the hardware structure of the image detection device according to an embodiment of the present application. Figure 5 As shown, the image detection device 50 includes:

[0197] Communication interface 51, capable of exchanging information with other devices;

[0198] The processor 52 is connected to the communication interface 51 to implement information exchange with other devices and is used to execute the above-mentioned image detection method when running a computer program, and the computer program is stored in the memory 53.

[0199] Specifically, the communication interface 51 is used to obtain the image to be detected;

[0200] The processor 52 is used to input the image to be detected into the first model to obtain a first detection result; determine the second detection result based on the first detection result and the probability matrix; input the image to be detected into the second model to obtain a third detection result; the second model is obtained by training the target sample data using the extended data and the specific category sample data of the first model as target sample data; the extended data represents the data obtained by expanding the specific category sample data; determine the fourth detection result based on the second detection result and the third detection result; the fourth detection result at least includes all target categories in the image to be detected.

[0201] In one embodiment, the processor 52 is further configured to generate a probability matrix before determining the second detection result based on the first detection result and the probability matrix;

[0202] The processor 52 is specifically configured to:

[0203] Determine the number of objects of each category in the image to be detected, and the distribution of the objects of each category;

[0204] The probability matrix is ​​generated based on the number of targets of each category and the distribution of targets of each category.

[0205] In one embodiment, the processor 52 is further specifically configured to:

[0206] Determine a first probability based on the number of targets of each category and the distribution of targets of each category; the first probability represents the probability of simultaneous occurrence of targets of each main category and targets of each sub-category;

[0207] Based on the first probability, the probability matrix is ​​generated.

[0208] In one embodiment, the processor 52 is specifically configured to:

[0209] A first operation is performed on the first detection result and the probability matrix to obtain the second detection result.

[0210] In one embodiment, the processor 52 is further configured to:

[0211] Before inputting the image to be detected into the first model to obtain the first detection result, determining the target loss function;

[0212] The target loss function is used to update the parameters of the first model until the loss value of the target loss function converges, thereby obtaining a trained first model.

[0213] In one embodiment, the processor 52 is specifically configured to:

[0214] Determine an interaction loss function; the interaction loss function is used to quantify the impact of different categories of targets appearing simultaneously in the image to be detected;

[0215] The target loss function is determined based on the interaction loss function and the original loss function corresponding to the first model.

[0216] In one embodiment, the processor 52 is further configured to:

[0217] Selecting the specific category sample data; the specific category sample data represents sample data of a relatively small category that appears in all sample data used to train the first model;

[0218] The specific category sample data is expanded by using the Internet to obtain the expanded data.

[0219] In one embodiment, the processor 52 is specifically configured to:

[0220] The second detection result is combined with the third detection result to obtain the fourth detection result.

[0221] In one embodiment, the processor 52 is further specifically configured to:

[0222] performing a second operation on the anchor frame of each second detection result and the anchor frame of each third detection result to obtain an intersection-over-union ratio of the anchor frame of the second detection result and the anchor frame of the third detection result;

[0223] Based on the intersection-over-union ratio, the fourth detection result is determined.

[0224] In one embodiment, the processor 52 is further specifically configured to:

[0225] Comparing the intersection-over-union ratio with a first threshold to obtain a comparison result;

[0226] Based on the comparison result, the fourth detection result is determined.

[0227] In one embodiment, the processor 52 is further specifically configured to:

[0228] When the comparison result indicates that the intersection-over-union ratio is greater than the first threshold, determining the fourth detection result based on the target category consistency between the second detection result and the third detection result;

[0229] When the comparison result indicates that the intersection-over-union ratio is less than or equal to the first threshold, all target categories of the second detection result and the third detection result are determined as the fourth detection result.

[0230] It should be noted that the specific processing process of the communication interface 51 and the processor 52 can be understood by referring to the above-mentioned image detection method.

[0231] Of course, in actual application, the various components in the image detection device 50 are coupled together through the bus system 54. It is understandable that the bus system 54 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 54 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 5 Various buses are labeled as bus system 54 .

[0232] The memory 53 in the embodiment of the present application is used to store various types of data to support the operation of the image detection device 50. Examples of such data include: any computer program used to operate on the image detection device 50.

[0233] The image detection method disclosed in the above embodiment of the present application can be applied to the processor 52, or implemented by the processor 52. The processor 52 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above image detection method can be completed by the hardware integrated logic circuit or software instructions in the processor 52. The above-mentioned processor 52 can be a general processor, a digital signal processor (DSP, DigitalSignal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 52 can implement or execute each image detection method, step and logic block diagram disclosed in the embodiment of the present application. A general processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the image detection method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in a memory 53, and the processor 52 reads the information in the memory 53 and completes the steps of the aforementioned image detection method in combination with its hardware.

[0234] In an exemplary embodiment, the image detection device 50 can be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned image detection method.

[0235] It can be understood that the memory 53 of the embodiment of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAMbus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 53 described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memory.

[0236] In an exemplary embodiment, the present application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, for example, a memory 53 storing a computer program, and the computer program can be executed by a processor 52 in an image detection device 50 to complete the steps of the image detection method described in the above embodiment of the present application. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface storage, optical disk, or CD-ROM.

[0237] It should be noted that: "first", "second", "third", etc. are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0238] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0239] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. An image detection method, characterized in that: The method comprises: Inputting the image to be detected into the first model to obtain a first detection result; Determine a second detection result based on the first detection result and the probability matrix; The image to be detected is input into a second model to obtain a third detection result; the second model is obtained by training the target sample data using the extended data and the specific category sample data of the first model as target sample data; the extended data represents data obtained by extending the specific category sample data; Based on the second detection result and the third detection result, a fourth detection result is determined; the fourth detection result at least includes all target categories in the image to be detected.

2. The method according to claim 1, characterized in that: Before determining the second detection result based on the first detection result and the probability matrix, the method further includes: Generate probability matrix; The generation probability matrix comprises: Determine the number of objects of each category in the image to be detected, and the distribution of the objects of each category; The probability matrix is ​​generated based on the number of targets of each category and the distribution of targets of each category.

3. The method according to claim 2, characterized in that The generating the probability matrix based on the number of the targets of each category and the distribution of the targets of each category includes: Determine a first probability based on the number of targets of each category and the distribution of targets of each category; the first probability represents the probability of simultaneous occurrence of targets of each main category and targets of each sub-category; Based on the first probability, the probability matrix is ​​generated.

4. The method according to claim 1, characterized in that: The determining a second detection result based on the first detection result and the probability matrix includes: A first operation is performed on the first detection result and the probability matrix to obtain the second detection result.

5. The method according to claim 1, characterized in that Before inputting the image to be detected into the first model to obtain the first detection result, the method further includes: Determine the target loss function; The target loss function is used to update the parameters of the first model until the loss value of the target loss function converges, thereby obtaining a trained first model.

6. The method according to claim 5, characterized in that Determining the target loss function includes: Determine an interaction loss function; the interaction loss function is used to quantify the impact of different categories of targets appearing simultaneously in the image to be detected; The target loss function is determined based on the interaction loss function and the original loss function corresponding to the first model.

7. The method according to claim 1, characterized in that The method further comprises: Selecting the specific category sample data; the specific category sample data represents sample data of a relatively small category that appears in all sample data used to train the first model; The specific category sample data is expanded using the Internet to obtain the expanded data.

8. The method according to claim 1, characterized in that The determining a fourth detection result based on the second detection result and the third detection result includes: The second detection result is combined with the third detection result to obtain the fourth detection result.

9. The method according to claim 8, characterized in that The fusing the second detection result with the third detection result to obtain the fourth detection result includes: performing a second operation on the anchor frame of each second detection result and the anchor frame of each third detection result to obtain an intersection-over-union ratio of the anchor frame of the second detection result and the anchor frame of the third detection result; Based on the intersection-over-union ratio, the fourth detection result is determined.

10. The method according to claim 9, characterized in that The determining the fourth detection result based on the intersection-over-union ratio includes: Comparing the intersection-over-union ratio with a first threshold to obtain a comparison result; Based on the comparison result, the fourth detection result is determined.

11. The method according to claim 10, characterized in that The determining the fourth detection result based on the comparison result includes: When the comparison result indicates that the intersection-over-union ratio is greater than the first threshold, determining the fourth detection result based on the target category consistency between the second detection result and the third detection result; When the comparison result indicates that the intersection-over-union ratio is less than or equal to the first threshold, all target categories of the second detection result and the third detection result are determined as the fourth detection result.

12. An image detection device, characterized in that: include: A first determination unit, used for inputting the image to be detected into the first model to obtain a first detection result; A second determining unit, configured to determine a second detection result based on the first detection result and the probability matrix; A third determining unit, used for inputting the image to be detected into the second model to obtain a third detection result; The second model is obtained by training the target sample data using the expanded data and the specific category sample data of the first model as target sample data; the expanded data represents data obtained by expanding the specific category sample data; a fourth determining unit, configured to determine a fourth detection result based on the second detection result and the third detection result; The fourth detection result at least includes all target categories in the image to be detected.

13. An image detection device, characterized in that: include: a processor and a memory for storing a computer program capable of running on said processor; Wherein, when the processor is used to run the computer program, it executes the steps of the method described in any one of claims 1 to 11.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Target detection model training method and device and computer readable storage medium

    CN115424032A

  • Distribution network operation supervision method and system based on video intelligent analysis

    CN117037021A