Target detection method, device, equipment and storage medium

By analyzing the correlation between the target object and the scene in the target detection through the preset gated loop unit, the category of the target object is updated, and the problem of low detection accuracy caused by the mismatch between the target object and the scene in the prior art is solved, and the target detection is improved accuracy.

CN111291785BActive Publication Date: 2024-11-19CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010045350.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-16
Publication Date
2024-11-19
Estimated Expiration
2040-01-16

AI Technical Summary

Technical Problem

Existing target detection technology cannot effectively combine the target object with its scene, resulting in low detection accuracy and high error detection rate.

Method used

The preset gated loop unit is used to analyze the correlation between the original graph structure information and the target scene information, and the category of the target object is updated through the graph structure pattern and matching probability, so as to improve detection accuracy.

Benefits of technology

The accuracy of target detection is improved and the false detection rate is reduced. By combining the target candidate box with scene information, a more accurate target object type is obtained.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111291785B_ABST
    Figure CN111291785B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence, and discloses a method, device, equipment and storage medium for target detection, and uses a preset gated loop unit to analyze the correlation between original graph structure information and target scene information, and updates the original graph structure information to obtain a more accurate target type, thereby improving the accuracy of target detection. The method of the present invention includes: obtaining an input image, and identifying the target scene information of the input image, the target scene information being the scene category of the location of the target object in the input image; in a target detection network, obtaining the original candidate frame in the input image, and obtaining the target candidate frame and the category of the target object based on the original candidate frame; scoring the target candidate frame, and eliminating duplicate target candidate frames based on the scoring results; converting the target candidate frame into a graph structure mode to obtain a graph node; obtaining the updated graph structure information on the graph node based on the target scene information and the preset gated loop unit, and obtaining the current target category.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a method, device, equipment and storage medium for target detection. Background Art

[0002] Object detection, also known as object extraction, is a kind of image segmentation based on the geometric and statistical features of the object. It combines the segmentation and recognition of the object into one. Its accuracy and real-time performance are important criteria for measuring the function of the entire object detection system. Especially in complex scenes, when multiple objects need to be processed in real time, automatic object extraction and recognition are particularly important.

[0003] With the development of computer technology and the widespread application of computer vision principles, it is a general trend to use computer image processing technology to conduct real-time tracking research on targets. At present, in terms of target detection, target recognition can be achieved through deep learning networks.

[0004] However, this target detection method cannot associate the detected target object with the scene where the target object is located, and cannot use the scene where the target object is located to analyze and infer the category of the target object. As a result, the category of the detected target object may not match the scene where the target object is located, resulting in low target detection accuracy. Summary of the invention

[0005] The present invention provides a method, device, equipment and storage medium for target detection, which are used to solve the problem of high false detection rate of target detection caused by failure to combine the target object with the scene where the target object is located for analysis during the target detection process, thereby improving the accuracy of target detection.

[0006] A method for target detection is provided for the first aspect of an embodiment of the present invention, comprising: obtaining an input image and identifying target scene information corresponding to the input image, wherein the target scene information is a scene category of a target object in the input image; in a target detection network, obtaining an original candidate frame in the input image, and obtaining a target candidate frame and a category of a target object based on the original candidate frame, wherein the target candidate frame includes a target object; scoring the target candidate frame, and eliminating duplicate target candidate frames based on the scoring result; converting the target candidate frame into a graph structure pattern to obtain a graph node, wherein the graph node carries the original graph structure information; obtaining updated graph structure information on the graph node based on the target scene information and a preset gated recurrent unit, and obtaining the category of the current target object.

[0007] Optionally, in a first implementation method of the first aspect of an embodiment of the present invention, in a preset gated loop unit, the original graph structure information of the graph nodes is hidden, and input graph structure information is obtained, the input graph structure information being the original graph structure information of other graph nodes; the original graph structure information related to the target scene information is saved; the input graph structure information related to the target scene information is saved; the saved original graph structure information is fused with the saved input graph structure information to obtain updated graph structure information, and the category of the current target object is obtained.

[0008] Optionally, in a second implementation method of the first aspect of the embodiment of the present invention, the matching probability between the original graph structure information and the target scene information is calculated, and the matching probability is the probability of the original graph structure information appearing in the target scene information; the size between the matching probability and the preset probability is judged; if the matching probability is greater than the preset probability, the original graph structure information is related to the target scene information, and the original graph structure information is saved.

[0009] Optionally, in a third implementation method of the first aspect of the embodiment of the present invention, in a target detection network, the original candidate box center coordinates, the original candidate box height, the original candidate box width, and the target category confidence of the original candidate box in the input image are obtained; the original candidate box center coordinates, the original candidate box height, the original candidate box width, and the target category confidence are regressed to obtain a target candidate box of the input image, wherein the target candidate box includes a target object; and the category of the target object is determined, wherein the category of the target object is the category corresponding to the target category confidence in the target candidate box.

[0010] Optionally, in a fourth implementation manner of the first aspect of the embodiment of the present invention, a feature vector x, y, w, h of the original candidate box is obtained, wherein x, y are respectively the horizontal coordinate and the vertical coordinate of the center point of the original candidate box, w is the width of the original candidate box, and h is the height of the original candidate box; the target category confidence of the original candidate box is calculated, and the three target category confidences c, d, and m with the largest values ​​are extracted; the loss function of the original candidate box is calculated by the feature vector, the target category confidence and a preset formula of the original candidate box, and the preset formula used is as follows:

[0011] loss=SoftMax(c,d,m)+s×d((x,y,h,w)-GT)

[0012] Where: d is the Euclidean distance, GT is the coordinates composed of the real movement values ​​of x, y, w, h obtained after a lot of training, and s is the weight between two points; the loss function of the original candidate box is combined with the feature vector of the original candidate box to obtain the target candidate box, which includes a target object.

[0013] Optionally, in a fifth implementation method of the first aspect of the embodiment of the present invention, the target candidate boxes are scored based on the target category confidence to obtain a scoring result; the target candidate box with the highest score in the scoring result is selected as the comparison candidate box; the overlap rate between the comparison candidate box and other target candidate boxes is calculated; if the overlap rate is greater than a threshold, the other target candidate boxes are eliminated.

[0014] Optionally, in a sixth implementation method of the first aspect of the embodiment of the present invention, the input image is adjusted according to a preset size to obtain a feature map; the feature map is mapped into a feature vector according to a preset rule; the feature vector is matched with the preset vector to obtain target scene information, the target scene information is the scene category of the location of the target object in the input image, and each preset vector corresponds to a category of target scene information.

[0015] A second aspect of an embodiment of the present invention provides a device for target detection, comprising: a first acquisition unit, used to acquire an input image and identify target scene information corresponding to the input image, wherein the target scene information is the scene category of the location of the target object in the input image; a second acquisition unit, used to acquire an original candidate frame in the input image in a target detection network, and obtain a target candidate frame and a category of the target object based on the original candidate frame, wherein the target candidate frame includes one of the target objects; a removal unit, used to score the target candidate frame and remove duplicate target candidate frames based on the scoring result; a conversion unit, used to convert the target candidate frame into a graph structure pattern to obtain a graph node, wherein the graph node carries the original graph structure information; an update unit, used to obtain the updated graph structure information on the graph node based on the target scene information and a preset gated loop unit, and obtain the category of the current target object.

[0016] Optionally, in a first implementation method of the second aspect of the embodiment of the present invention, the updating unit specifically includes: a hiding module, used to hide the original graph structure information of the graph nodes in the preset gated loop unit, and obtain input graph structure information, the input graph structure information is the original graph structure information of other graph nodes; a first saving module, used to save the original graph structure information related to the target scene information; a second saving module, used to save the input graph structure information related to the target scene information; a fusion module, used to fuse the saved original graph structure information with the saved input graph structure information to obtain updated graph structure information, and obtain the category of the current target object.

[0017] Optionally, in a second implementation method of the second aspect of the embodiment of the present invention, the first saving module is specifically used to: calculate the matching probability between the original graph structure information and the target scene information, the matching probability being the probability of the original graph structure information appearing in the target scene information; judge the size between the matching probability and the preset probability; if the matching probability is greater than the preset probability, the original graph structure information is related to the target scene information, and save the original graph structure information.

[0018] Optionally, in a third implementation manner of the second aspect of the embodiment of the present invention, the second acquisition unit is specifically used for: an acquisition module, used to obtain, in a target detection network, the original candidate box center coordinates, the original candidate box height, the original candidate box width, and the target category confidence of the original candidate box in the input picture; a regression module, used to regress the original candidate box center coordinates, the original candidate box height, the original candidate box width, and the target category confidence to obtain a target candidate box of the input picture, wherein the target candidate box includes a target object; a determination module, used to determine the category of the target object, wherein the category of the target object is the category corresponding to the target category confidence in the target candidate box.

[0019] Optionally, in a fourth implementation manner of the second aspect of the embodiment of the present invention, the regression module is specifically used to: obtain the feature vector x, y, w, h of the original candidate box, wherein x, y are the horizontal coordinate and the vertical coordinate of the center point of the original candidate box, respectively, w is the width of the original candidate box, and h is the height of the original candidate box; calculate the target category confidence of the original candidate box, and extract the three target category confidences c, d, and m with the largest values; calculate the loss function of the original candidate box through the feature vector, the target category confidence and the preset formula of the original candidate box, and the preset formula used is as follows:

[0020] loss=SoftMax(c,d,m)+s×d((x,y,h,w)-GT)

[0021] Where: d is the Euclidean distance, GT is the coordinates composed of the real movement values ​​of x, y, w, h obtained after a lot of training, and s is the weight between two points; the loss function of the original candidate box is combined with the feature vector of the original candidate box to obtain the target candidate box, which includes a target object.

[0022] Optionally, in a fifth implementation method of the second aspect of the embodiment of the present invention, the elimination unit is specifically used to: score the target candidate boxes according to the target category confidence to obtain a scoring result; select the target candidate box with the highest score in the scoring result as the comparison candidate box; calculate the overlap rate between the comparison candidate box and other target candidate boxes; if the overlap rate is greater than a threshold, eliminate other target candidate boxes.

[0023] Optionally, in a sixth implementation method of the second aspect of the embodiment of the present invention, the first acquisition unit is specifically used to: adjust the input image according to a preset size to obtain a feature map; map the feature map into a feature vector according to a preset rule; match the feature vector with the preset vector to obtain target scene information, the target scene information is the scene category of the location of the target object in the input image, and each preset vector corresponds to a category of target scene information.

[0024] A third aspect of an embodiment of the present invention provides a target detection device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the target detection method described in any of the above embodiments when executing the computer program.

[0025] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method described in the first aspect above.

[0026] It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages:

[0027] The embodiment of the present invention uses a preset gated recurrent unit to analyze the correlation between the original graph structure information and the target scene information, and updates the original graph structure information to obtain a more accurate type of the target object, thereby improving the accuracy of target detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A schematic diagram of an embodiment of a method for target detection in the present invention;

[0029] Figure 2 A schematic diagram of another embodiment of the method for target detection in the present invention;

[0030] Figure 3 A schematic diagram of an embodiment of a device for target detection in the present invention;

[0031] Figure 4 A schematic diagram of another embodiment of the device for target detection in the present invention;

[0032] Figure 5 A schematic diagram of an embodiment of a device for target detection in the present invention. DETAILED DESCRIPTION

[0033] The present invention provides a target detection method for solving the problem of high false detection rate of target detection caused by failure to analyze the target object in combination with the scene where the target object is located during the target detection process, thereby improving the accuracy of target detection.

[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0035] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0036] See also Figure 1 , an embodiment of the method for target detection in the embodiment of the present invention includes:

[0037] 101. Obtain an input image and identify target scene information corresponding to the input image, where the target scene information is a scene category of a location of a target object in the input image.

[0038] The server obtains an input image and identifies target scene information corresponding to the input image, where the target scene information is a scene category at a location of a target object in the input image.

[0039] It should be noted that before the server identifies the target scene information corresponding to the input image, it is necessary to preprocess the acquired input image. The preprocessing here is normalization. The input image after normalization can map the pixels on the input image to the range of 0-1, which is convenient for the server to process the input image later.

[0040] It is further explained that the server identifies the target scene information corresponding to the input image in order to better infer the category of the target object in the input image based on the target scene information. In the process of identifying the target scene information, the server first needs to treat the input image as a whole and adjust the input image according to the preset size to obtain a feature map; secondly, the server maps the feature map to a feature vector through a fully connected layer, and finally the server matches the mapped feature vector with the preset vector to obtain the target scene information. The target scene information here is the scene category of the target object in the input image. Each target scene information corresponds to a preset vector. When the feature vector matches the preset vector, the target scene information corresponding to the preset vector is the target scene information corresponding to the feature vector, that is, the scene information corresponding to the input image.

[0041] 102. In the target detection network, an original candidate frame in the input image is obtained, and a target candidate frame and a category of the target object are obtained according to the original candidate frame, and the target candidate frame includes a target object.

[0042] In the target detection network, the server obtains the original candidate box in the input image, and obtains the target candidate box and the category of the target object based on the original candidate box. The target candidate box includes a target object.

[0043] The target detection network here is the basic network in detection methods such as Faster RCNN, SSD, and YOLO, where the basic network can be a ResNet network structure, a VGG model, a darknet network framework, or a Mobilenet network structure. The ResNet network structure is also called a residual network. It uses residual blocks to reduce the training error in deep convolutional network training, which helps solve the problem of gradient disappearance and gradient explosion. While training a deeper network, it can ensure good performance and is often used for image recognition; the VGG model uses two different filters to construct a convolutional layer and a maximum pooling layer respectively to realize the recognition and detection of images. The most commonly used VGG model is the VGG-16 network. The VGG-16 network does not have a large number of hyperparameters. It is a simple network that only needs to focus on building a convolutional layer; the darknet network framework does not require any dependencies on the server, and the structure is clear. It uses simple and easy-to-operate source code and can be viewed and modified. It is easy to transplant programs and is also used by servers for image detection; the Mobilenet network structure sets two hyperparameters, width multiplier and resolution multiplier, which are mainly used to express the situation of network convergence, which not only reduces the model size, but also speeds up the model of reasoning speed. It is generally used for image reasoning detection. In the embodiment of the present invention, the target detection network is not limited.

[0044] It should be noted that the essence of detecting the input image is regression. For the candidate box, the purpose of regression is to find a relationship so that the input original candidate box can be mapped to a regression candidate box that is closer to the real candidate box. Here, regression is used to obtain a target candidate box that is more consistent with the target object.

[0045] Here, the category of the corresponding target object is obtained based on the selected target candidate box. Each target candidate box carries a target category confidence, and each target category confidence corresponds to a target object category. After the server obtains the target candidate box through calculation, the calculation result will carry a calculated confidence value. The target category confidence value closest to this value is the target category confidence of the target candidate box. The so-called target category confidence is the probability that the target object is a certain category, so each target category confidence must correspond to a target object category. Therefore, after the server obtains the target category confidence of the target candidate box, it can obtain the corresponding target object category.

[0046] 103. Score the target candidate frames, and eliminate duplicate target candidate frames based on the scoring results.

[0047] The server scores the target candidate frames and removes duplicate target candidate frames based on the scoring results. Specifically, the server scores the target candidate frames based on the target category confidence and obtains the scoring results; the server selects the target candidate frame with the highest score in the scoring results as the comparison candidate frame; the server calculates the overlap rate between the comparison candidate frame and other target candidate frames; if the overlap rate is greater than the threshold, the server removes other target candidate frames.

[0048] It should be noted that the non-maximum suppression algorithm (NMS) is used here, which suppresses elements that are not maximum values, which can be understood as a local maximum search. This local represents a neighborhood, and the neighborhood has two variable parameters: one is the dimension of the neighborhood, and the other is the size of the neighborhood.

[0049] For example, the server scores the target candidate frames according to the target category confidence, and sorts the target candidate frames from the highest score to the lowest score, for example: A, B, C, D, E, F target candidate frames; selects the target candidate frame with the highest score as the comparison candidate frame, for example: A target candidate frame has the highest score, and is retained and used as the comparison candidate frame; calculates the overlap rate between the comparison candidate frame and the remaining target candidate frames to be tested, for example: B, C, D, E, F target candidate frames to be tested are respectively overlapped with the comparison candidate frame A; if the overlap rate is greater than a threshold, the target candidate frame to be tested for which the overlap rate is calculated is eliminated, for example: assuming that the overlap rate between B and D target candidate frames to be tested and the comparison candidate frame A is greater than a threshold, the B and D target candidate frames to be tested are eliminated, and the elimination of duplicate target candidate frames is completed.

[0050] 104. Convert the target candidate box into a graph structure pattern to obtain a graph node, which carries the original graph structure information.

[0051] The server converts the target candidate box into a graph structure mode to obtain a graph node, which carries the original graph structure information.

[0052] It should be noted that the server converts the target candidate frame into a graph structure mode to facilitate the subsequent information transmission of the server and update the target object information. After the server extracts the corresponding target candidate frame, the category of the target object of the target candidate frame obtained by calculation alone is not accurate, so it is necessary to combine the target information in the target candidate frame with the scene information of the input image to determine the category of the target object.

[0053] 105. According to the target scene information and the preset gated recurrent unit, the updated graph structure information on the graph node is obtained, and the category of the current target object is obtained.

[0054] According to the target scene information and the preset gated recurrent unit, the server obtains the updated graph structure information on the graph node and obtains the category of the current target object.

[0055] It should be noted that the preset gated recurrent unit here refers to the gated recurrent neural network. The gated recurrent unit (GRU) is a lightweight and efficient gated recurrent neural network. The update gate and reset gate are used in the GRU. The server determines the final output information of the gated recurrent unit through two gating vectors. The special thing about these two gating mechanisms is that they can save information in long-term sequences and will not be cleared over time or removed because they are irrelevant to the prediction.

[0056] For each graph node, the key to mutual information exchange is to encode the information from the scene and other graph nodes. Since a single graph node will receive different input graph structure information, it is necessary to design a fusion function with a memory mechanism that can record the detailed information of the graph node itself and combine it with the input graph structure information to obtain a meaningful representation. Here, the server uses GRU to encode different information into the state of the target. For the encoding of the target scene information, the GRU is initialized with the feature map information with the target object and the feature map information is used as input. GRU can make the server ignore target object information that is not related to the scene, and use the target scene information to strengthen the recognition of the target object category. The server calculates the matching probability between the original graph structure information and the target scene information, and compares the matching probability with the preset probability to determine whether the original graph structure information is related to the target scene information; the server calculates the matching probability between the input graph structure information and the target scene information, and compares the matching probability with the preset probability to determine whether the input graph structure information is related to the target scene information. After determining whether the original graph structure information and the input graph structure information are related to the target scene information, the information related to the target scene information is fused to obtain the updated graph structure information. When the graph structure information is continuously updated, the category of the current target object related to the scene is obtained, thereby making the detected category of the target object more accurate.

[0057] The embodiment of the present invention uses a preset gated recurrent unit to analyze the correlation between the original graph structure information and the target scene information, and updates the original graph structure information to obtain a more accurate type of the target object, thereby improving the accuracy of target detection.

[0058] See also Figure 2 Another embodiment of the method for target detection in the embodiment of the present invention includes:

[0059] 201. Obtain an input image, and identify target scene information corresponding to the input image, where the target scene information is a scene category of a location of a target object in the input image.

[0060] The server obtains an input image and identifies the target scene information corresponding to the input image. The target scene information is the scene category of the location of the target object in the input image. Specifically, the server adjusts the input image according to a preset size to obtain a feature map; the server maps the feature map to a feature vector according to a preset rule; the server matches the feature vector with the preset vector to obtain the target scene information. The target scene information is the scene category of the location of the target object in the input image, and each preset vector corresponds to a category of target scene information.

[0061] It should be noted that before the server identifies the target scene information corresponding to the input image, it is necessary to preprocess the acquired input image. The preprocessing here is normalization. The input image after normalization can map the pixels on the input image to the range of 0-1, which is convenient for the server to process the input image later.

[0062] It is further explained that the server identifies the target scene information corresponding to the input image in order to better infer the category of the target object in the input image based on the target scene information. In the process of identifying the target scene information, the server first needs to treat the input image as a whole and adjust the input image according to the preset size to obtain a feature map; secondly, the server maps the feature map to a feature vector through a fully connected layer, and finally the server matches the mapped feature vector with the preset vector to obtain the target scene information. The target scene information here is the scene category of the target object in the input image. Each target scene information corresponds to a preset vector. When the feature vector matches the preset vector, the target scene information corresponding to the preset vector is the target scene information corresponding to the feature vector, that is, the scene information corresponding to the input image.

[0063] 202. In the target detection network, an original candidate box in the input image is obtained, and a target candidate box and a category of the target object are obtained according to the original candidate box, wherein the target candidate box includes a target object.

[0064] In the target detection network, the server obtains the original candidate box in the input image, and obtains the target candidate box and the target category based on the original candidate box, and the target candidate box includes a target. Specifically, in the target detection network, the server obtains the original candidate box center coordinates, the original candidate box height, the original candidate box width, and the target category confidence of the original candidate box in the input image; the server regresses the original candidate box center coordinates, the original candidate box height, the original candidate box width, and the target category confidence to obtain the target candidate box of the input image, and the target candidate box includes a target object; the server determines the category of the target object, and the target category is the category corresponding to the target category confidence in the target candidate box.

[0065] The server regresses the center coordinates, height, width and target category confidence of the original candidate box to obtain the target candidate box of the input image, where the target candidate box includes a target object, including: the server obtains the feature vector x, y, w, h of the original candidate box, where x and y are the horizontal and vertical coordinates of the center point of the original candidate box, w is the width of the original candidate box, and h is the height of the original candidate box; the server calculates the target category confidence of the original candidate box and extracts the three target category confidences c, d, and m with the largest values; the server calculates the loss function of the original candidate box through the feature vector, target category confidence and preset formula of the original candidate box, and the preset formula used is as follows:

[0066] loss=SoftMax(c,d,m)+s×d((x,y,h,w)-GT)

[0067] Where: d is the Euclidean distance, GT is the coordinates composed of the real movement values ​​of x, y, w, h obtained after a lot of training, and s is the weight between two points; the server combines the loss function of the original candidate box with the feature vector of the original candidate box to obtain the target candidate box, which includes a target object.

[0068] It should be noted that the essence of detecting the input image is regression. For the candidate box, the purpose of regression is to find a relationship so that the input original candidate box can be mapped to a regression candidate box that is closer to the real candidate box. Here, regression is used to obtain a target candidate box that is more consistent with the target object.

[0069] Here, the category of the corresponding target object is obtained based on the selected target candidate box. Each target candidate box carries a target category confidence, and each target category confidence corresponds to a target object category. After the server obtains the target candidate box through calculation, the calculation result will carry a calculated confidence value. The target category confidence value closest to this value is the target category confidence of the target candidate box. The so-called target category confidence is the probability that the target object is a certain category, so each target category confidence must correspond to a target object category. Therefore, after the server obtains the target category confidence of the target candidate box, it can obtain the corresponding target object category.

[0070] For example, the server uses a four-dimensional vector (x, y, w, h) to represent the original candidate box, where x and y are the horizontal and vertical coordinates of the center point of the original candidate box, respectively, w represents the width of the original candidate box, and h represents the height of the original candidate box. The classifier is used to calculate the maximum target category confidence. Taking the three largest target category confidences as an example, these three confidences are represented by c, d, and m respectively. The forward output result is (c, d, m, x, y, h, w), and the backward output result needs to be calculated using the loss function. The specific formula is:

[0071] loss=SoftMax(c,d,m)+s×d((x,y,h,w)-GT)

[0072] In the formula: d is the Euclidean distance, that is, the distance between two points, GT is the coordinate composed of the real movement values ​​of x, y, w, h obtained after a lot of training, s is the weight between the two points, and the server obtains the extracted target candidate box based on the results of the forward output and the repeated iteration of the backward output until convergence.

[0073] It should be noted that the SoftMax function here converts the output values ​​of multiple categories into relative probabilities, that is, the confidence of the target category, making the data easier to compare. The specific formula used is:

[0074]

[0075] In the formula: V i is the output of the previous output unit of the classifier, i is the category index, C is the total number of categories, S i is the ratio of the index of the current element to the sum of the indexes of all elements. Here, the server will preset the classification of scenes and target objects for the classifier to select. For example, the scene contains the target object (such as the street scene contains cars). When the server determines the classification of the target object, it must first determine the classification of the scene. The server presets the classified scenes, such as: living room, city streets, terminal, football field, sea view, etc., a total of 80 daily scenes; then the server uses the full image features to model and determine the scene category, such as: select 80,000 pictures from 4 million Internet pictures, and divide the pictures into 80 daily scene categories, each scene category contains 600-1100 pictures, use the picture set to train the scene classification model, and the server determines the scene category of the picture to be tested through the scene classification model; for each type of scene, the server will preset the target object category related to the scene, such as: city streets contain high-rise buildings, cars, pedestrians, etc., based on which the server can calculate the corresponding target object category through the target category confidence.

[0076] 203. Score the target candidate frames, and eliminate duplicate target candidate frames based on the scoring results.

[0077] The server scores the target candidate frames and removes duplicate target candidate frames based on the scoring results. Specifically, the server scores the target candidate frames based on the target category confidence and obtains the scoring results; the server selects the target candidate frame with the highest score in the scoring results as the comparison candidate frame; the server calculates the overlap rate between the comparison candidate frame and other target candidate frames; if the overlap rate is greater than the threshold, the server removes other target candidate frames.

[0078] It should be noted that the non-maximum suppression algorithm (NMS) is used here, which suppresses elements that are not maximum values, which can be understood as a local maximum search. This local represents a neighborhood, and the neighborhood has two variable parameters: one is the dimension of the neighborhood, and the other is the size of the neighborhood.

[0079] For example, the server scores the target candidate frames according to the target category confidence, and sorts the target candidate frames from the highest score to the lowest score, for example: A, B, C, D, E, F target candidate frames; selects the target candidate frame with the highest score as the comparison candidate frame, for example: A target candidate frame has the highest score, and is retained and used as the comparison candidate frame; calculates the overlap rate between the comparison candidate frame and the remaining target candidate frames to be tested, for example: B, C, D, E, F target candidate frames to be tested are respectively overlapped with the comparison candidate frame A; if the overlap rate is greater than a threshold, the target candidate frame to be tested for which the overlap rate is calculated is eliminated, for example: assuming that the overlap rate between B and D target candidate frames to be tested and the comparison candidate frame A is greater than a threshold, the B and D target candidate frames to be tested are eliminated, and the elimination of duplicate target candidate frames is completed.

[0080] 204. Convert the target candidate box into a graph structure mode to obtain a graph node, which carries the original graph structure information.

[0081] The server converts the target candidate frame into a graph structure mode to obtain a graph node, which carries the original graph structure information. It should be noted that the server converts the target candidate frame into a graph structure mode to facilitate the subsequent information transmission of the server and update the target information. After the server extracts the corresponding target candidate frame, the target category of the target candidate frame obtained by calculation alone is not accurate, so it is necessary to combine the target information in the target candidate frame with the scene information of the input image to determine the target category.

[0082] 205. In the preset gated recurrent unit, hide the original graph structure information of the graph node, and obtain input graph structure information, where the input graph structure information is the original graph structure information of other graph nodes.

[0083] In the preset gated recurrent unit, the server hides the original graph structure information of the graph nodes and obtains the input graph structure information, which is the original graph structure information of other graph nodes. It should be noted that the preset gated recurrent unit here refers to the gated recurrent neural network. The gated recurrent unit (GRU) is a lightweight and efficient gated recurrent neural network. The update gate and reset gate are used in the GRU. The server determines the final output information of the gated recurrent unit through two gating vectors. The special thing about these two gating mechanisms is that they can save information in long-term sequences and will not be cleared over time or removed because they are irrelevant to the prediction.

[0084] 206. Save the original graph structure information related to the target scene information.

[0085] The server saves the original graph structure information related to the target scene information. Specifically, the server calculates the matching probability between the original graph structure information and the target scene information, and the matching probability is the probability that the original graph structure information appears in the target scene information; the server determines the size between the matching probability and the preset probability; if the matching probability is greater than the preset probability, the server's original graph structure information is related to the target scene information, and saves the original graph structure information.

[0086] It should be noted that in step 202, the server obtains the category of the target object in the target detection frame, wherein the category of the target object is irrelevant to the scene in which the target object is located. This will, to a certain extent, lead to the category of the target object being inconsistent with the scene, and the accuracy of identifying the target object will be reduced. Therefore, the server needs to retain the original graph structure information related to the target scene information, and perform a further judgment to obtain a more accurate category of the identified target object.

[0087] 207. Save input graph structure information related to target scene information.

[0088] The server saves the input graph structure information related to the target scene information.

[0089] After saving the original graph structure information related to the target scene information, the server needs to retain the original graph structure information (input graph structure information) of other graph nodes related to the target scene information, so as to further enhance the accuracy of identifying the target category. The step of the server retaining the input graph structure information related to the target scene is the same as the step of the server saving the original graph structure information related to the target scene information, so it will not be repeated here.

[0090] 208. The saved original graph structure information is merged with the saved input graph structure information to obtain updated graph structure information, and the category of the current target object is obtained.

[0091] The server merges the saved original graph structure information with the saved input graph structure information to obtain updated graph structure information and acquires the category of the current target object.

[0092] It should be noted that the fusion process of the saved original graph structure information and the saved input graph structure information is realized by the update gate and reset gate in the preset gated recurrent unit. The update gate helps the model decide how much memory information to save, that is, how much information from the previous time step and the current time step needs to be passed on, using the following formula: t =σ(x t W (z) +h t-1 U (z) ), where: x t is the original graph structure information at the tth time, W (z) with U (z) are weight matrices, h t-1 is the original graph structure information at time t-1, and x t With h t-1 After a linear transformation, the update gate compresses the activation of these two information to between 0 and 1 for transmission. The reset gate helps the model decide how much memory information to forget, using the following formula: t =σ(x t W (r) +h t-1 U (r) ), where: x t is the original graph structure information at the tth time, W (r) with U (r) are weight matrices, h t-1 is the graph structure information at time t-1, and x t With h t-1 After a linear transformation, the reset gate compresses the activation of these two information to between 0 and 1 for transmission. The formula is the same as the expression of the update gate, except that the parameters and uses of the linear transformation are different. In the actual information iteration: the reset gate is used to hide the original graph structure information and input the new input graph structure information, using the following formula: t '=tanh(x t W (r) +r t ⊙h t-1 U (r)), because the calculated reset gate is a vector composed of 0 to 1, which measures the size of the gate opening, that is, controls whether the memory information is saved. For example, the gate value corresponding to an element is 0, which means that the information of this element is completely forgotten. The product of this formula will determine the previous information to be saved and forgotten. The information saved in the current unit is passed to the next unit through the update gate. The update gate determines the information to be collected in the original graph structure information and the input graph structure information, using the following formula: h t =z t ⊙h t-1 +(1-z t )⊙h' t , where: z t To update the activation result of the gate, control the inflow of new information in the form of gating, z t ⊙h t-1 It represents the information stored in the original graph structure information to the updated graph structure information. This information plus the information stored in the final memory of the input graph structure information is equal to the content output by the final preset gated recurrent unit.

[0093] The embodiment of the present invention uses a preset gated recurrent unit to analyze the correlation between the original graph structure information and the target scene information, and updates the original graph structure information to obtain a more accurate type of the target object, thereby improving the accuracy of target detection.

[0094] The above describes the target detection method in the embodiment of the present invention. The following describes the target detection device in the embodiment of the present invention. Figure 3 , an embodiment of the target detection device in the embodiment of the present invention includes:

[0095] The first acquisition unit 301 is used to acquire an input image and identify target scene information corresponding to the input image, where the target scene information is a scene category of a location of a target object in the input image;

[0096] A second acquisition unit 302 is used to acquire an original candidate frame in the input image in the target detection network, and obtain a target candidate frame and a category of the target object according to the original candidate frame, wherein the target candidate frame includes a target object;

[0097] A removal unit 303 is used to score the target candidate frames and remove duplicate target candidate frames according to the scoring results;

[0098] A conversion unit 304 is used to convert the target candidate box into a graph structure mode to obtain a graph node, and the graph node carries the original graph structure information;

[0099] The updating unit 305 is used to obtain updated graph structure information on the graph node according to the target scene information and the preset gated recurrent unit, and obtain the category of the current target object.

[0100] In an embodiment of the present invention, a first acquisition unit 301 is used to acquire an input image and identify target scene information corresponding to the input image, where the target scene information is the scene category of the location of the target object in the input image; a second acquisition unit 302 is used to acquire an original candidate frame in the input image in a target detection network, and obtain a target candidate frame and a category of the target object based on the original candidate frame, where the target candidate frame includes a target object; a removal unit 303 is used to score the target candidate frame, and remove duplicate target candidate frames based on the scoring result; a conversion unit 304 is used to convert the target candidate frame into a graph structure pattern to obtain a graph node, where the graph node carries the original graph structure information; an update unit 305 is used to obtain updated graph structure information on the graph node based on the target scene information and a preset gated loop unit, and obtain the category of the current target object.

[0101] The embodiment of the present invention uses a preset gated recurrent unit to analyze the correlation between the original graph structure information and the target scene information, and updates the original graph structure information to obtain a more accurate type of the target object, thereby improving the accuracy of target detection.

[0102] See also Figure 4 Another embodiment of the target detection device in the embodiment of the present invention includes:

[0103] The first acquisition unit 301 is used to acquire an input image and identify target scene information corresponding to the input image, where the target scene information is a scene category of a location of a target object in the input image;

[0104] A second acquisition unit 302 is used to acquire an original candidate frame in the input image in the target detection network, and obtain a target candidate frame and a category of the target object according to the original candidate frame, wherein the target candidate frame includes a target object;

[0105] A removal unit 303 is used to score the target candidate frames and remove duplicate target candidate frames according to the scoring results;

[0106] A conversion unit 304 is used to convert the target candidate box into a graph structure mode to obtain a graph node, and the graph node carries the original graph structure information;

[0107] The updating unit 305 is used to obtain updated graph structure information on the graph node according to the target scene information and the preset gated recurrent unit, and obtain the category of the current target object.

[0108] Optionally, the updating unit 305 specifically includes:

[0109] The hiding module 3051 is used to hide the original graph structure information of the graph node in the preset gated recurrent unit, and obtain the input graph structure information, where the input graph structure information is the original graph structure information of other graph nodes;

[0110] A first saving module 3052 is used to save original graph structure information related to the target scene information;

[0111] The second saving module 3053 is used to save the input graph structure information related to the target scene information;

[0112] The fusion module 3054 is used to fuse the saved original graph structure information with the saved input graph structure information to obtain updated graph structure information and acquire the category of the current target object.

[0113] Optionally, the first saving module 3052 is specifically used for:

[0114] Calculate the matching probability between the original graph structure information and the target scene information. The matching probability is the probability that the original graph structure information appears in the target scene information.

[0115] Determine the size between the matching probability and the preset probability;

[0116] If the matching probability is greater than the preset probability, the original graph structure information is related to the target scene information, and the original graph structure information is saved.

[0117] Optionally, the second acquiring unit 302 is specifically configured to:

[0118] An acquisition module 3021 is used to acquire the original candidate box center coordinates, the original candidate box height, the original candidate box width and the target category confidence of the original candidate box in the input image in the target detection network;

[0119] A regression module 3022 is used to regress the original candidate box center coordinates, the original candidate box height, the original candidate box width and the target category confidence to obtain a target candidate box of the input image, wherein the target candidate box includes a target object;

[0120] The determination module 3023 is used to determine the category of the target object, where the category of the target object is the category corresponding to the target category confidence in the target candidate frame.

[0121] Optionally, the regression module 3022 is specifically used for:

[0122] Get the feature vector x, y, w, h of the original candidate box, where x and y are the horizontal and vertical coordinates of the center point of the original candidate box, w is the width of the original candidate box, and h is the height of the original candidate box;

[0123] Calculate the target category confidence of the original candidate box and extract the three target category confidences c, d, and m with the largest values;

[0124] The loss function of the original candidate box is calculated by the feature vector of the original candidate box, the target category confidence and the preset formula. The preset formula used is as follows:

[0125] loss=SoftMax(c,d,m)+s×d((x,y,h,w)-GT)

[0126] Where: d is the Euclidean distance, GT is the coordinates of the real moving values ​​of x, y, w, h obtained through a large amount of training, and s is the weight between two points;

[0127] The loss function of the original candidate box is combined with the feature vector of the original candidate box to obtain a target candidate box, which includes a target object.

[0128] Optionally, the elimination unit 303 is specifically used for:

[0129] According to the confidence of the target category, the target candidate box is scored to obtain the scoring result;

[0130] Select the target candidate box with the highest score in the scoring results as the comparison candidate box;

[0131] Calculate the overlap rate between the comparison candidate box and other target candidate boxes;

[0132] If the overlap rate is greater than the threshold, other target candidate boxes are eliminated.

[0133] Optionally, the first acquiring unit 301 is specifically configured to:

[0134] Adjust the input image according to the preset size to obtain the feature map;

[0135] Mapping the feature map into a feature vector according to preset rules;

[0136] The feature vector is matched with the preset vector to obtain the target scene information. The target scene information is the scene category of the location of the target object in the input image. Each preset vector corresponds to a category of target scene information.

[0137] In the embodiment of the present invention, the first acquisition unit 301 is used to acquire an input image and identify target scene information of the input image, where the target scene information is the scene category of the target location in the input image; the second acquisition unit 302 is used to acquire the original candidate frame in the input image in the target detection network, and obtain the target candidate frame and the target category based on the original candidate frame, where the target candidate frame includes a target; the elimination unit 303 is used to score the target candidate frame and eliminate duplicate target candidate frames based on the scoring result; the conversion unit 304 is used to convert the target candidate frame into a graph structure mode to obtain a graph node, where the graph node carries the original graph structure information; the updating unit 305 is used to update the target candidate frame based on the target scene information. The information is stored in the preset gated loop unit to obtain the updated graph structure information on the graph node and obtain the current target category. Specifically, the hiding module 3051 is used to hide the original graph structure information of the graph node in the preset gated loop unit and obtain the input graph structure information, and the input graph structure information is the original graph structure information of other graph nodes; the first retaining module 3052 is used to retain the original graph structure information related to the target scene information; the second retaining module 3053 is used to retain the input graph structure information related to the target scene information; the fusion module 3054 is used to fuse the retained original graph structure information with the retained input graph structure information to obtain the updated graph structure information and obtain the current target category.

[0138] The embodiment of the present invention uses a preset gated recurrent unit to analyze the correlation between the original graph structure information and the target scene information, and updates the original graph structure information to obtain a more accurate type of the target object, thereby improving the accuracy of target detection.

[0139] above Figure 3 to Figure 4 The target detection device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The target detection device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0140] Combine the following Figure 5 The following is a detailed introduction to the various components of the target detection equipment:

[0141] Figure 5: is a schematic diagram of the structure of a target detection device provided by an embodiment of the present invention. The target detection device 500 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 501 (for example, one or more processors) and a memory 509, and one or more storage media 508 (for example, one or more mass storage devices) storing application programs 507 or data 506. Among them, the memory 509 and the storage medium 508 can be short-term storage or permanent storage. The program stored in the storage medium 508 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the sign-in management device. Furthermore, the processor 501 can be configured to communicate with the storage medium 508 to execute a series of instruction operations in the storage medium 508 on the target detection device 500.

[0142] The target detection device 500 may also include one or more power supplies 502, one or more wired or wireless network interfaces 503, one or more input and output interfaces 504, and / or one or more operating systems 505, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 5 The target detection device structure shown in the figure does not constitute a limitation on the target detection device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0143] Combine the following Figure 5 The following is a detailed introduction to the various components of the target detection equipment:

[0144] Processor 501 is the control center of the target detection device, and can be processed according to the target detection method. Processor 501 uses various interfaces and lines to connect various parts of the entire target detection device, and by running or executing software programs and / or modules stored in memory 509, and calling data stored in memory 509, uses preset gated loop units to analyze the correlation between the original graph structure information and the target scene information, updates the original graph structure information, obtains a more accurate type of target object, and improves the accuracy of target detection. Storage medium 508 and memory 509 are both carriers for storing data. In the embodiment of the present invention, storage medium 508 can refer to an internal memory with a small storage capacity but a fast speed, and memory 509 can be an external memory with a large storage capacity but a slow storage speed.

[0145] The memory 509 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing of the target detection device 500 by running the software programs and modules stored in the memory 509. The memory 509 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the target detection device, etc. In addition, the memory 509 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. The target detection program and the received data stream provided in the embodiment of the present invention are stored in the memory, and when needed, the processor 501 calls from the memory 509.

[0146] When loading and executing computer program instructions on a computer, a process or function according to an embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, a computer instruction may be transmitted from a website site, a computer, a server, or a data center to another website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, twisted pair) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer-readable storage media may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. Available media may be magnetic media, (e.g., floppy disk, hard disk, tape), optical media (e.g., optical disk), or semiconductor media (e.g., solid state disk (SSD)), etc.

[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0148] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

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

[0150] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0151] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0152] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for target detection, It is characterized in that include: Acquire an input image, and identify target scene information corresponding to the input image, wherein the target scene information is a scene category of a location of a target object in the input image; In the target detection network, an original candidate frame in the input image is obtained, and a target candidate frame and a category of the target object are obtained according to the original candidate frame, wherein the target candidate frame includes the target object; Scoring the target candidate frames, and eliminating duplicate target candidate frames according to the scoring results; Convert the target candidate box into a graph structure mode to obtain a graph node, where the graph node carries original graph structure information; According to the target scene information and the preset gated recurrent unit, the updated graph structure information on the graph node is obtained, and the category of the current target object is obtained; The step of acquiring updated graph structure information on the graph node according to the target scene information and the preset gated recurrent unit, and obtaining the category of the current target object includes: In the preset gated recurrent unit, the original graph structure information of the graph node is hidden, and input graph structure information is obtained, where the input graph structure information is the original graph structure information of other graph nodes; Saving the original graph structure information related to the target scene information; Saving the input graph structure information related to the target scene information; The saved original graph structure information is fused with the saved input graph structure information through the update gate and the reset gate in the preset gated recurrent unit to obtain the updated graph structure information, and acquire the category of the current target object.

2. The target detection method according to claim 1, It is characterized in that The storing of the original graph structure information related to the target scene information includes: Calculating a matching probability between the original graph structure information and the target scene information, wherein the matching probability is a probability that the original graph structure information appears in the target scene information; Determine the size of the matching probability and the preset probability; If the matching probability is greater than the preset probability, the original graph structure information is related to the target scene information, and the original graph structure information is saved.

3. The target detection method according to claim 1, It is characterized in that In the target detection network, an original candidate frame in the input image is obtained, and a target candidate frame and a category of a target object are obtained according to the original candidate frame. The target candidate frame includes a target object including: In the target detection network, obtaining the original candidate box center coordinates, the original candidate box height, the original candidate box width and the target category confidence of the original candidate box in the input image; Regressing the center coordinates of the original candidate box, the height of the original candidate box, the width of the original candidate box, and the target category confidence to obtain a target candidate box of the input image, wherein the target candidate box includes one of the target objects; Determine a category of a target object, where the category of the target object is a category corresponding to the target category confidence in the target candidate frame.

4. The target detection method according to claim 3, It is characterized in that The regressing the center coordinates of the original candidate box, the height of the original candidate box, the width of the original candidate box, and the target category confidence to obtain a target candidate box of the input image, wherein the target candidate box includes a target object, including: Obtain the feature vector x, y, w, h of the original candidate box, where x and y are the horizontal and vertical coordinates of the center point of the original candidate box, w is the width of the original candidate box, and h is the height of the original candidate box; Calculate the target category confidence of the original candidate box, and extract the three target category confidences c, d, and m with the largest values; The loss function of the original candidate box is calculated by using the feature vector of the original candidate box, the target category confidence and a preset formula. The preset formula used is as follows: Where: d is the Euclidean distance, GT is the coordinates of the real moving values ​​of x, y, w, h obtained through a large amount of training, and s is the weight between two points; The loss function of the original candidate box is combined with the feature vector of the original candidate box to obtain a target candidate box, wherein the target candidate box includes the target object.

5. The target detection method according to claim 3, It is characterized in that Scoring the target candidate frames and eliminating duplicate target candidate frames according to the scoring results includes: Scoring the target candidate box according to the target category confidence to obtain a scoring result; Selecting the target candidate frame with the highest score in the scoring results as the comparison candidate frame; Calculating the overlap rate between the comparison candidate frame and other target candidate frames; If the overlap rate is greater than a threshold, the other target candidate frames are removed.

6. The method for target detection according to any one of claims 1 to 5, It is characterized in that The step of acquiring an input image and identifying target scene information corresponding to the input image, wherein the target scene information is a scene category of a location of a target object in the input image, includes: Adjust the input image according to a preset size to obtain a feature map; Mapping the feature map into a feature vector according to a preset rule; The feature vector is matched with a preset vector to obtain target scene information, where the target scene information is a scene category of a location of a target object in the input image, and each preset vector corresponds to a category of the target scene information.

7. A device for target detection, It is characterized in that include: A first acquisition unit is used to acquire an input image and identify target scene information corresponding to the input image, where the target scene information is a scene category of a location of a target object in the input image; A second acquisition unit is used to acquire, in the target detection network, an original candidate frame in the input image, and obtain a target candidate frame and a category of the target object according to the original candidate frame, wherein the target candidate frame includes one of the target objects; A removal unit, used to score the target candidate frames and remove duplicate target candidate frames according to the scoring results; A conversion unit, used to convert the target candidate box into a graph structure mode to obtain a graph node, wherein the graph node carries original graph structure information; An updating unit, configured to obtain updated graph structure information on the graph node according to the target scene information and a preset gated recurrent unit, and obtain a category of a current target object; The updating unit specifically includes: A hiding module, used to hide the original graph structure information of the graph node in a preset gated recurrent unit, and obtain input graph structure information, where the input graph structure information is the original graph structure information of other graph nodes; A first saving module, used to save the original graph structure information related to the target scene information; A second saving module, used for saving the input graph structure information related to the target scene information; A fusion module is used to fuse the saved original graph structure information with the saved input graph structure information through an update gate and a reset gate in a preset gated recurrent unit to obtain updated graph structure information and acquire the category of the current target object.

8. The target detection device according to claim 7, It is characterized in that The first storage module is specifically used for: Calculating a matching probability between the original graph structure information and the target scene information, wherein the matching probability is a probability that the original graph structure information appears in the target scene information; Determine the size of the matching probability and the preset probability; If the matching probability is greater than the preset probability, the original graph structure information is related to the target scene information, and the original graph structure information is saved.

9. A device for object detection, It is characterized in that include: A memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instructions in the memory to enable the target detection device to perform the target detection method as described in any one of claims 1-6.

10. A computer-readable storage medium, It is characterized in that The method comprises instructions, which, when executed on a computer, enable the computer to execute the steps of the target detection method according to any one of claims 1 to 6.