CN-115457312-B - Target detection method and device
Abstract
The invention provides a target detection method and device, the method comprises the steps of obtaining an image to be detected and inputting the image to be detected into a pre-trained target detection model to obtain a target detection result output by the image to be detected through the detection model, wherein the target detection model is used for carrying out target detection on the image to be detected based on a preset first class object and a preset second class object respectively, and the detection results of the first class object and the second class object are combined to obtain a target detection result of the image to be detected. According to the method and the device for detecting the targets, the targets of the images to be detected are detected based on the preset first-class objects and the preset second-class objects by classifying the objects to be identified in the images to be detected, so that the accuracy and the efficiency of target detection can be effectively improved.
Inventors
- LU QIANG
Assignees
- 嬴彻星创智能科技(上海)有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20220823
Claims (6)
- 1. A method of detecting an object, comprising: Acquiring an image to be detected and inputting the image to be detected into a pre-trained target detection model to obtain a target detection result of the image to be detected, which is output by the detection model; The target detection model is used for carrying out target detection on the image to be detected based on a preset first class object and a preset second class object respectively, and obtaining target detection results of the image to be detected after combining detection results of the first class object and the second class object; The target detection model comprises a first detection module and a second detection module, the first detection module is used for obtaining the target detection result of the first type of objects preset in the image to be detected, the second detection module is used for obtaining the target detection result of the second type of objects preset in the image to be detected, The detection precision of the first class object in the preset classification detection model is higher than a preset precision threshold value, and the detection precision of the second class object in the preset classification detection model is lower than the preset precision threshold value; the first detection module comprises: The first feature extraction layer is used for extracting primary features of the image to be detected; the first prediction layer is used for acquiring a target detection result of the first class object according to the primary characteristics; The second detection module comprises: the second feature extraction layer is used for extracting the aggregation features of the input image to be detected according to the image to be detected and the primary features output by the first detection module; And the second prediction layer is used for acquiring a target detection result of the second-class object according to the aggregation characteristics.
- 2. The method of claim 1, wherein the first feature extraction layer comprises: the backbone network is used for extracting the multi-level characteristics of the image to be detected; and the feature fusion network is used for acquiring primary features of the image to be detected according to the multi-level features extracted by the backbone network.
- 3. The method of claim 1, wherein the second feature extraction layer comprises: the area candidate network is used for acquiring a target frame prediction result of the second-class object according to the primary characteristics extracted by the first detection module; and the feature aggregation network is used for acquiring aggregation features according to the target frame prediction result and the image to be detected.
- 4. The method of claim 1, wherein the second feature extraction layer comprises: The area candidate network is used for acquiring a target frame prediction result of the second class object according to the primary characteristics extracted by the first detection module; the original image extraction network is used for acquiring original image characteristics according to the target frame prediction result and the image to be detected; And the feature aggregation network is used for acquiring the aggregation features according to the target frame prediction result and the original image features.
- 5. An object detection apparatus, comprising: The target detection unit is used for acquiring an image to be detected and inputting the image to be detected into a pre-trained target detection model to obtain a target detection result of the image to be detected, which is output by the detection model; the target detection model is used for carrying out target detection on the image to be detected based on a preset first object and a preset second object respectively, and merging detection results of the first object and the second object to obtain a target detection result of the image to be detected; The target detection model comprises a first detection module and a second detection module, the first detection module is used for obtaining the target detection result of the first type of objects preset in the image to be detected, the second detection module is used for obtaining the target detection result of the second type of objects preset in the image to be detected, The detection precision of the first class object in the preset classification detection model is higher than a preset precision threshold value, and the detection precision of the second class object in the preset classification detection model is lower than the preset precision threshold value; the first detection module comprises: The first feature extraction layer is used for extracting primary features of the image to be detected; the first prediction layer is used for acquiring a target detection result of the first class object according to the primary characteristics; The second detection module comprises: the second feature extraction layer is used for extracting the aggregation features of the input image to be detected according to the image to be detected and the primary features output by the first detection module; And the second prediction layer is used for acquiring a target detection result of the second-class object according to the aggregation characteristics.
- 6. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the object detection method according to any one of claims 1 to 4 when executing the program.
Description
Target detection method and device Technical Field The present invention relates to the field of image processing technologies, and in particular, to a target detection method and apparatus. Background Target detection, also called target extraction, is an image segmentation based on target geometry and statistical features. With the development of computer technology and the wide application of computer vision principle, the real-time tracking research of targets by using computer image processing technology is getting more and more popular, and the dynamic real-time tracking positioning of targets has wide application value in the aspects of intelligent traffic systems, intelligent monitoring systems, military target detection, surgical instrument positioning in medical navigation surgery and the like. For example, in some specific monitoring scenes, such as an automatic driving scene, detection of a target object type and a target object bounding box needs to be performed on a road surface image acquired by the scene, so as to send out early warning in time. The currently adopted target detection algorithm comprises a one-stage target detection algorithm and a two-stage target detection algorithm, wherein the one-stage detection algorithm has high detection speed but low detection precision, the two-stage detection algorithm has high detection precision but low detection speed, and when the target detection is carried out, only one target detection algorithm can be adopted to carry out identification detection on an object in an image, the two detection algorithms are difficult to balance in detection speed and detection precision, and the detection requirements of high detection speed and high detection precision cannot be met simultaneously. Disclosure of Invention Aiming at the problems existing in the prior art, the invention provides a self-adaptive holographic functional screen modulation method and device. The invention provides a target detection method, which comprises the following steps: Acquiring an image to be detected and inputting the image to be detected into a pre-trained target detection model to obtain a target detection result of the image to be detected, which is output by the detection model; the target detection model is used for carrying out target detection on the image to be detected based on a preset first class object and a preset second class object respectively, and obtaining target detection results of the image to be detected after combining detection results of the first class object and the second class object. According to the target detection method provided by the invention, the target detection model comprises a first detection module and a second detection module, the first detection module is used for acquiring the target detection result of the first type of objects preset in the image to be detected, the second detection module is used for acquiring the target detection result of the second type of objects preset in the image to be detected, The detection precision of the first class object in the preset classification detection model is higher than a preset precision threshold, and the detection precision of the second class object in the preset classification detection model is lower than the preset precision threshold. According to the target detection method provided by the invention, the first detection module comprises the following components: The first feature extraction layer is used for extracting primary features of the image to be detected; and the first prediction layer is used for acquiring a target detection result of the first class object according to the primary characteristics. According to the object detection method provided by the invention, the first feature extraction layer comprises the following steps: The backbone network is used for extracting the multi-level characteristics of the image to be detected; and the feature fusion network is used for acquiring primary features of the image to be detected according to the multi-level features extracted by the backbone network. According to the target detection method provided by the invention, the second detection module comprises the following components: The second feature extraction layer is used for extracting the aggregation features of the image to be detected; And the second prediction layer is used for acquiring a target detection result of the second-class object according to the aggregation characteristics. According to the target detection method provided by the invention, the second detection module comprises the following components: the second feature extraction layer is used for extracting the aggregation features of the input image to be detected according to the image to be detected and the primary features output by the first detection module; And the second prediction layer is used for acquiring a target detection result of the second-class object according to the aggregat