A context-aware object detection method

By designing a target detection method based on context awareness in complex scenes, and using the context awareness module to capture the characteristic information of the target and the surrounding environment in the convolutional neural network, it solves the problem of high false detection rate in the existing technology and achieves a higher detection accuracy and efficiency.

CN115100428BActive Publication Date: 2024-08-23TIANJIN UNIV
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202210766141.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-01
Publication Date
2024-08-23
Estimated Expiration
2042-07-01

AI Technical Summary

Technical Problem

In complex scenes, existing target detection technology is difficult to detect objects accurately and is prone to false detections. In particular, background objects are mistakenly detected as target objects due to the similarity between objects, resulting in incorrect information determination and huge human and financial resources. loss.

Method used

Design a target detection method based on context awareness, extract features through a convolutional neural network, and use the context awareness module between the backbone network and the feature pyramid network to capture the characteristic information of the target and the surrounding environment, reduce the false detection rate, and improve detection accuracy. .

Benefits of technology

It effectively reduces the false detection rate in complex scenes, improves detection accuracy, saves manpower and material resources with high efficiency, and significantly improves the accuracy of target category information and location information in images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115100428B
    Figure CN115100428B
Patent Text Reader

Abstract

The present invention provides a method for target detection using context awareness, including obtaining image data to be detected, and setting a training set and a test set; constructing a convolutional neural network based on context awareness; training the convolutional neural network to obtain a training model; inputting the test set image into the training model to obtain the position and category information of the target in the image. The present invention performs position positioning and category detection on the target in the image based on a deep learning method, provides object information for target detection applications in agriculture, military, security and other fields, and promotes the development and further research of many applications such as information monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer vision, and in particular relates to a target detection method using context perception. Background Art

[0002] Computer vision is the simulation of biological vision through computers and related equipment. In other words, it uses computers and cameras to replace human eyes to identify, detect, and track targets, and further process images so that the images are presented in a way that is more suitable for human observation. The ultimate research goal of computer vision is to enable computers to observe and understand the world through vision like humans, and have the ability to adapt to the environment autonomously.

[0003] In computer vision, object detection is a basic and core branch of computer vision. Its basic task is to detect the category and position of objects in images. With the rise of artificial intelligence and other fields, object detection has broad prospects in many application fields. At present, object detection has been widely used in many fields such as face recognition, smart cities, smart security, smart driving and smart medical care. Therefore, object detection has great application value.

[0004] With the rapid development of high-performance computers and deep learning technology, a large number of excellent detection models have emerged in the field of target detection. In target detection, deep learning represented by convolutional neural networks is the mainstream. The deep information extraction capability of convolutional neural networks makes the target detection algorithm based on deep learning far surpass the traditional target detection algorithm in terms of detection accuracy and stability. A series of classic network structures based on convolutional neural networks have been proposed one after another, and networks such as VGGNet, Inception, ResNet, and DenseNet have been widely used. In the target detection model, the first detector proposed and widely developed is the "two-stage detector". In the first stage, the two-stage detector focuses on finding the possible location of the target, and in the second stage, the two-stage detector focuses on the classification of the target. Generally speaking, the two-stage detector has the characteristics of high detection accuracy but time-consuming detection. Considering the needs of practical applications, researchers are committed to developing accurate and fast target detectors. With the continuous deepening of the target detection problem, the one-stage detector was proposed. The one-stage detector completes the prediction of object category and location at the same time, and the speed is faster than the two-stage detector. With the further deepening of research, the performance of the one-stage detector is getting higher and higher.

[0005] However, although excellent detection models have been proposed in the field of target detection, there are still some unresolved problems in the existing target detection technology, such as the problem that the complex types of images in multiple scenes make it difficult to detect. Considering the diverse and changeable characteristics of the target detection application field, the current large-scale public data sets are mostly collected from various complex scene images in daily life, and there are many types. In this case, the category detection of objects is very likely to be misclassified. In addition, there are cases where background objects are detected as target objects. The main reason for this error is that there are similarities between some objects, and this similarity is caused by the complex scenes in the image. Since in actual application scenarios, false detection will bring errors to the judgment of information, it is likely to cause huge losses in manpower and financial resources. Therefore, the study of image target detection in complex scenes is necessary and has great scientific value. Summary of the invention

[0006] In view of this, the present invention aims to propose a target detection method using context awareness. The method is a deep learning target detection method in complex scenes based on deep learning and a one-stage target detection network. By capturing the target's surrounding information, target detection in images in complex scenes is achieved, the detection accuracy is improved, and the phenomenon of false detection that the current deep learning-based target detection network is prone to occurs is alleviated.

[0007] To achieve the above object, the technical solution of the present invention is achieved as follows:

[0008] The present invention is an image target detection method based on context perception. The detection method implements the feature extraction part through a convolutional neural network, and designs a network structure and a loss function. The specific steps of the method are as follows:

[0009] Step 1: Computer reads data. Set up training sets and test sets, use a computer to read in image data, and perform data augmentation on the images in the training set.

[0010] Step 2: Construct a context-aware feature extraction network

[0011] The convolutional neural network extraction part of the present invention is mainly divided into four parts, namely the backbone network, the context perception module, the feature pyramid network and the target detection head network. Among them, the context perception module designed by the present invention is located between the backbone network and the feature pyramid network, connecting the corresponding layers of the backbone network and the feature pyramid network. The module processes the features of each layer respectively, and refines the relevant output features by using the context information, so that the neural network can better explore and utilize the feature information between the target and the surrounding environment.

[0012] Step 3: Train the convolutional neural network. In the Pytorch deep learning framework, send the training set images and corresponding labels to the convolutional neural network for training until the network achieves a relatively ideal effect and saves the corresponding model parameters.

[0013] Step 4: Image object detection. Using the model trained in step 3, input the test set image into the convolutional neural network to obtain the location and category information of the object in the image and display it on the original image.

[0014] The present invention also provides a context-aware object detection method, comprising:

[0015] The preprocessing module is used to obtain the image data to be detected and set the training set and the test set;

[0016] Network building module, used to construct context-aware convolutional neural networks;

[0017] The training module is used to train the convolutional neural network and obtain a training model;

[0018] The output module is used to input the test set images into the training model to obtain the location and category information of the target in the image.

[0019] The present invention also provides an electronic device, comprising

[0020] at least one processor, and

[0021] at least one memory in communication with the processor, wherein:

[0022] The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute any of the methods described above.

[0023] The present invention also provides a non-volatile computer-readable storage medium, which, when the computer-executable instructions are executed by one or more processors, enables the processors to execute any of the methods described above.

[0024] Compared with the prior art, the context-aware image object detection method described in the present invention has the following advantages:

[0025] The present invention designs a new context-aware image target detection method, which can effectively reduce the false detection rate in complex scenes and improve the detection accuracy. The model input is an image, and the output is the target category information and location information in the image. It has high efficiency and can greatly save manpower and material resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:

[0027] Figure 1 It is a target detection structure diagram designed by the present invention;

[0028] Figure 2 It is the context-aware module network structure;

[0029] Figure 3 It is a detection map of part of the optical remote sensing image;

[0030] Figure 4 It is a detection map of part of SAR remote sensing image. DETAILED DESCRIPTION

[0031] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0032] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0033] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.

[0034] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0035] The present invention is implemented in Python programming under the Pytorch deep learning framework. First, the network design part of target detection is completed and the relevant parameters are configured; then the training image and its corresponding label are sent to the neural network for training, and the tuned network weights are saved. Finally, the trained network weights are used to perform target detection on images in complex scenes.

[0036] The target detection structure diagram designed by the present invention is as follows Figure 1 As shown in the figure. After feature extraction, the features are output through the detection head network to output the location and category information of the target, as well as the center information. In the training phase, the target prediction is designed with loss functions for classification and location as well as the center of the anchor box. In the testing phase, non-maximum suppression is also included. The computer configuration used is Nvidia GeForce RTX 3080Ti. Figure 1 As shown, the target detection method of the present invention mainly comprises the following steps:

[0037] Step 1: The computer reads the data. The data sets used in the present invention include the optical remote sensing data set NWPU VHR-10 from Northwestern Polytechnical University, and the SAR remote sensing data set SSDD from RadarSat2, TreeaSAR-X and Sentinael-1. Among them, the NWPU VHR-10 data set contains 650 data containing targets, and the types of targets include airplanes, ships, oil storage tanks, baseball fields, tennis courts, basketball courts, track and field stadiums, seaports, bridges and vehicles, a total of 10 types of targets. The SSDD data set has a total of 1,160 images, including only one category of ships. The data set used in the present invention is randomly divided into a training set and a test set, with a ratio of 7:3. After reading in the data, the images are subjected to data augmentation processing during the training phase.

[0038] Step 2: Construct a context-aware feature extraction network.

[0039] like Figure 1The target detection structure diagram proposed by the present invention is shown, which mainly includes two parts: feature extraction and target prediction. Among them, feature extraction is composed of a backbone network, a context-aware module, a feature pyramid network and a target detection head network. A pre-trained model is used in the backbone network, so that the network can extract target features better at the beginning. From the depth of the convolution block, this part of the output corresponds to the hierarchical features of the 2nd to 4th network blocks, and these hierarchical features are represented as C3, C4, and C5 respectively. After the backbone network, the present invention designs a module to connect the backbone network and the feature pyramid network (FPN, Feature Pyramid Networks), which we call a "context-aware module" for context information modeling. This module processes each hierarchical feature separately and uses context information to refine the relevant output features. The above-mentioned FPN module is the third component of the deep neural network. The module learns features with different receptive fields from coarse to fine, which has been proven to be useful in predicting multi-scale objects. In the last part of the network, a detection head module with three branches is placed, including a classification branch for class identification, a regression branch for location prediction, and a centrality branch for low-quality object rejection of prediction.

[0040] The context-aware module designed in the feature extraction network is to cope with the challenge of false detection in complex scenes. The present invention summarizes that the main reason for false detection of targets is confusion with the background. In order to solve this problem, the present invention delves into this and explores two main contextual differences between targets and confusing backgrounds. One is the contextual distinction between an object and its adjacent spatial environment. For example, a ship cannot sail on a road, and a car cannot drive on water. The other difference is at the semantic level, which indicates whether an object should exist in certain scenes. For example, a bridge should not be completely located in an ocean area even if there is water nearby.

[0041] Based on the above analysis, the present invention believes that both differences can be used to enhance the discriminative feature learning of the target object. According to the concept of natural language processing, the former can be defined as "neighborhood context", which refers to the relationship between the target object and its neighboring areas. The latter context is defined as "semantic context", which indicates the possibility of the target object being under specified conditions.

[0042] The network structure of the context perception module designed by the present invention is as follows Figure 2As shown in the figure. This module is a two-branch network, which consists of a neighborhood context-aware branch and a long-distance context-aware branch. A regular convolution with a kernel size of 3 is placed on the neighborhood context-aware branch to learn neighborhood context information. The long-distance context-aware branch uses dilated convolutions to capture dependencies in different spaces to model semantic context. In this branch, two sets of parallel dilated convolutions are placed. The outputs of the two sets of dilated convolutions are connected through channels to achieve feature fusion. The information fusion between the two branches is weighted using the fusion factor, where the weighting factor is used to balance the relationship between the two context information.

[0043] In deep learning, network parameters are back-propagated through the gradient of the set loss function to complete the learning of target features. The loss function formula used in the model of the present invention is as follows:

[0044] L=L cls +L reg +L centerness (1)

[0045] L cls is the classification loss, and its specific formula is as follows:

[0046]

[0047] Among them, i is the index of the anchor box in a batch, p i is the classification value of the target prediction, α and γ are weight parameters, set to 0.25 and 2 respectively, N cls is the number of category boxes.

[0048] L reg is the positioning loss, and its specific formula is as follows:

[0049]

[0050] Among them, t i and are the true value box and predicted box of the target, s i Yes i and The minimum enclosing rectangle, N reg is the number of positive sample detection boxes.

[0051] L centerness is the center loss, and its specific formula is as follows:

[0052]

[0053] Among them, c i Represents the actual center of the anchor box, is the predicted centrality score.

[0054] Step 3: Train the convolutional neural network. Figure 1 After the neural network shown in the figure, the training set of images is input into the network under the Pytorch deep learning framework, and the gradient is propagated backward through the loss function to achieve the effect of network learning target features. When the training is stable, the optimal model weights are saved.

[0055] Step 4: Image object detection. Input the image data to be detected into the weights of the neural network model trained in step 3. The network calculates and outputs the detection image, which contains the location and category of the detection target and the corresponding score.

[0056] Experimental results: The data sets used in the present invention are the optical remote sensing data set NWPU VHR-10 data set and the SAR data set SSDD. The network designed by the present invention was compared and verified on both data sets, and its detection accuracy was improved to a certain extent, which demonstrated the effectiveness of the present invention. Table 1 and Table 2 respectively show the comparison results between the network model of the present invention and the comparison algorithm model on the optical remote sensing data set NWPUVHR-10 data set and the SAR data set SSDD. Among them, AP (Average precision) refers to the precision rate of a single class of targets, mAP is the average precision rate of multiple classes of targets, mAP_50 and mAP_75 refer to the average precision rates measured under different intersection-over-union ratio thresholds, and mAP_s, mAP_m, and mAP_L refer to the average precision rates of small, medium, and large objects, respectively. For the above-mentioned indicators for evaluating detection accuracy, the larger the value, the better the model.

[0057] In addition, the present invention visualizes the test results of some optical remote sensing images and SAR remote sensing images, on which the locations of the targets in the images, the types of targets and the corresponding confidence levels are marked, respectively. Figure 3 and Figure 4 As shown in the figure, it can be seen that the target detection result has a high classification confidence and accurate positioning result, and no false detection occurs, which proves the superiority of the present invention.

[0058] Table 1: Comparison results on the NWPUVHR10 dataset

[0059]

[0060] Table 2: Comparison results on the SSDD dataset

[0061]

[0062] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A context-aware object detection method, characterized in that: The steps include: Step 1: Obtain the image data to be detected and set the training set and test set; Step 2: Construct a context-aware convolutional neural network. The network parameters are back-propagated through the gradient of the set loss function to complete the learning of the target features. The context-aware convolutional neural network includes a feature extraction module and a target prediction module; The feature extraction module includes a backbone network, a context perception module, a feature pyramid network and a target detection head network, wherein the context perception module is located between the backbone network and the feature pyramid network, and connects the corresponding layers of the backbone network and the feature pyramid network; The context-aware module is used for context information modeling, processes each level feature separately, and refines the relevant output features using the context information; The network structure of the context-aware module is a two-branch network, which includes a neighborhood context-aware branch and a long-distance context-aware branch. A regular convolution with a kernel size of 3 is placed on the neighborhood context-aware branch to learn neighborhood context information; The long-distance context-aware branch uses dilated convolutions to capture dependencies in different spaces to model semantic context. Two sets of parallel dilated convolutions are placed in the long-distance context-aware branch, and the outputs of the two sets of dilated convolutions are connected through channels to achieve feature fusion. The information fusion between the two branches is weighted using the fusion factor, where the weighting factor is used to balance the relationship between the two context information; The object detection head network is a detection head module with three branches, including a classification branch for class recognition, a regression branch for position prediction, and a center branch for rejection of low-quality objects in prediction; The target prediction module designs loss functions for classification and positioning, and in the testing phase, also includes non-maximum suppression; Step 3: Train the convolutional neural network to obtain a training model; Step 4: Input the test set images into the training model to obtain the location and category information of the targets in the images.

2. The context-aware object detection method according to claim 1, characterized in that: The loss function formula used in the convolutional neural network is as follows: L=L cls +L reg +L centerness (1) L cls is the classification loss, and its specific formula is as follows: Among them, i is the index of the anchor box in a batch, p i is the classification value of the target prediction, α and γ are weight parameters, set to 0.25 and 2 respectively, N cls is the number of classification boxes; L reg is the positioning loss, and its specific formula is as follows: Among them, t i and are the true value box and predicted box of the target, s i Yes i and The minimum enclosing rectangle, N reg is the number of positive sample detection boxes; L centerness is the center loss, and its specific formula is as follows: Among them, c i Represents the actual center of the anchor box, is the predicted centrality score.

3. A context-aware object detection method, characterized in that: include The preprocessing module is used to obtain the image data to be detected and set the training set and the test set; The network building module is used to construct a context-aware convolutional neural network. The network parameters are back-propagated through the gradient of the set loss function to complete the learning of the target features. The context-aware convolutional neural network includes a feature extraction module and a target prediction module; The feature extraction module includes a backbone network, a context perception module, a feature pyramid network and a target detection head network, wherein the context perception module is located between the backbone network and the feature pyramid network, and connects the corresponding layers of the backbone network and the feature pyramid network; The context-aware module is used for context information modeling, processes each level feature separately, and refines the relevant output features using the context information; The network structure of the context-aware module is a two-branch network, which includes a neighborhood context-aware branch and a long-distance context-aware branch. A regular convolution with a kernel size of 3 is placed on the neighborhood context-aware branch to learn neighborhood context information; The long-distance context-aware branch uses dilated convolutions to capture dependencies in different spaces to model semantic context. Two sets of parallel dilated convolutions are placed in the long-distance context-aware branch, and the outputs of the two sets of dilated convolutions are connected through channels to achieve feature fusion. The information fusion between the two branches is weighted using the fusion factor, where the weighting factor is used to balance the relationship between the two context information; The object detection head network is a detection head module with three branches, including a classification branch for class recognition, a regression branch for position prediction, and a center branch for rejection of low-quality objects in prediction; The target prediction module designs loss functions for classification and positioning, and in the testing phase, also includes non-maximum suppression; The training module is used to train the convolutional neural network and obtain a training model; The output module is used to input the test set images into the training model to obtain the location and category information of the objects in the image.

4. An electronic device, characterized in that: include at least one processor, and at least one memory in communication with the processor, wherein: The memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1-2 by calling the program instructions.

5. A non-volatile computer-readable storage medium, when the computer-executable instructions are executed by one or more processors, causes the processors to perform the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Convolutional neural network-based remote sensing image target detection method

    CN110084195A

  • Image semantic segmentation method based on local and global feature enhancement modules

    CN111210435A

  • Monocular vision road target detection and distance estimation method based on improved YOLOv3

    CN111460919A

  • Road extraction method of high-resolution remote sensing image based on multi-branch cascaded cavity space pyramid

    CN111738111A

  • Graph neural network model and method for performing entity alignment based on relation context

    CN113157935A