A method and system for detecting armed personnel equipment based on dynamic neural networks

By using dynamic neural network models and data augmentation techniques, the problem of low efficiency of deep networks in the identification of armed personnel and equipment has been solved, achieving efficient and accurate long-distance identification, reducing computational redundancy, and improving identification efficiency.

CN115019096BActive Publication Date: 2026-03-06COMP APPL TECH INST OF CHINA NORTH IND GRP
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-08
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing deep networks are inefficient in identifying armed personnel and equipment, especially in accurately detecting small-scale features at long distances, and there is computational redundancy when shallow features are used to identify large targets.

Method used

A dynamic neural network model is adopted, including a first sub-network for detecting humans and a second sub-network for detecting equipment using classifiers of different network depths based on image resolution. The model combines images acquired by a zoom camera with data augmentation and model pruning to reduce redundant computation.

Benefits of technology

It improved the efficiency of equipment detection for armed personnel, reduced computational redundancy, and enhanced identification accuracy and model operating efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115019096B_ABST
    Figure CN115019096B_ABST
Patent Text Reader

Abstract

A method and system for detecting armed personnel and equipment based on a dynamic neural network is disclosed. The method includes the following steps: acquiring images of armed personnel at different distances using a high-resolution camera with variable zoom; labeling personnel and equipment in each image to form an equipment detection dataset; constructing a dynamic neural network model, which includes a first sub-network and a second sub-network, wherein the first sub-network is used to detect humans in the image; when the first sub-network detects humans in the image, extracting the human ROI and transmitting it to the second sub-network; the second sub-network is used to detect equipment using classifiers at different network depths according to different image resolutions; training the dynamic neural network model based on the equipment detection dataset to obtain a trained armed personnel and equipment detection model; and inputting the image to be detected into the armed personnel and equipment detection model to obtain the armed personnel and equipment detection result of the image to be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of armed personnel equipment detection technology, and in particular to an armed personnel equipment detection method and system based on dynamic neural networks. Background Technology

[0002] In actual reconnaissance work, armed personnel carry relatively small equipment, making them even more difficult to identify at distances of up to 1000 meters. Accurate identification requires complex deep networks. One of the challenges lies in efficiently employing deep networks for target identification.

[0003] In neural networks, low-resolution, small-scale features often need to be extracted at deeper levels. These features contain more semantic information and are more suitable for recognition. Traditional deep learning methods often indiscriminately input the target into the network for forward propagation and then output the result. However, for some high-resolution, large-sized targets captured at close range, shallow features can easily identify them. Inputting these targets into deeper layers often results in computational redundancy, impacting the efficiency of the recognition algorithm. Summary of the Invention

[0004] Based on the above analysis, the embodiments of the present invention aim to provide a method and system for detecting armed personnel equipment based on dynamic neural networks, in order to solve the problem of low detection efficiency of existing deep networks.

[0005] On one hand, embodiments of the present invention provide a method for detecting the equipment of armed personnel based on a dynamic neural network, comprising the following steps:

[0006] A high-resolution camera with variable zoom is used to acquire images of armed personnel at different distances. Personnel and equipment are labeled in each image to form an equipment detection dataset.

[0007] A dynamic neural network model is constructed, comprising a first sub-network and a second sub-network. The first sub-network is used to detect humans in an image. When the first sub-network detects a human in an image, the human ROI is extracted and transmitted to the second sub-network. The second sub-network is used to detect equipment using classifiers at different network depths based on different image resolutions. The dynamic neural network model is trained based on the equipment detection dataset to obtain a trained armed personnel equipment detection model.

[0008] The image to be detected is input into the armed personnel and equipment detection model to obtain the armed personnel and equipment detection result of the image to be detected.

[0009] Based on further improvements to the above technical solution, the second sub-network includes a backbone network unit, a Neck network unit, and a prediction unit; the backbone network unit is used to extract feature maps at different scales; the Neck network is used to upsample and fuse the feature maps at different scales extracted by the backbone network unit to obtain tensor data at different scales; the prediction unit includes multiple shallow classifiers for target detection based on tensor data at different scales.

[0010] The Neck network unit includes multi-level CSP and CBL combination blocks, and shallow classifiers are connected after the different levels of CSP and CBL combination blocks. The shallow classifiers are used to perform target detection based on tensor data at the current scale.

[0011] Furthermore, the shallow classifier includes a convolutional layer, a concat layer, and a sigmoid layer connected in sequence; the convolutional layer is used to extract image features, the concat layer is used to concatenate the features, and the sigmoid layer is used for classification; the convolutional kernel size and number are different in different levels of the shallow classifier.

[0012] Furthermore, personnel and equipment are labeled in each image to form an equipment detection dataset, including:

[0013] Use bounding boxes to label the personnel and equipment in the images of armed personnel;

[0014] The labeled images are augmented by methods such as bounding box scale distortion, bounding box mirroring, random image scaling, random image cropping, and / or random image arrangement to obtain an augmented dataset. The dataset before augmentation and the dataset after augmentation are used as the equipment detection dataset.

[0015] Furthermore, the prediction box loss function of the second sub-network is:

[0016]

[0017] Where dis_2 represents the Euclidean distance between the center points of the predicted bounding box and the label box, dis_C represents the diagonal distance between the minimum bounding rectangles of the predicted bounding box and the label box, and IOU represents the intersection-union ratio of the predicted bounding box and the label box.

[0018] Furthermore, after constructing the equipment detection dataset based on the images of the armed personnel and before constructing the dynamic neural network model, the method further includes: determining the initial anchor boxes of the dynamic neural network model based on the bounding boxes of all images in the dataset.

[0019] Further, based on the bounding boxes of all images in the dataset, the initial anchor boxes of the dynamic neural network model are determined, including:

[0020] Each image in the dataset is scaled proportionally to a specified size to obtain scaled bounding boxes;

[0021] The scaled bounding boxes are clustered, and a genetic algorithm is used to mutate each class of bounding boxes. The optimal bounding box is selected as the initial anchor box based on the prediction accuracy.

[0022] Furthermore, after training the dynamic neural network model based on the equipment detection dataset to obtain the trained armed personnel equipment detection model, the following steps are also included to prune the armed personnel equipment detection model:

[0023] The model is sparsified, and the scale factor of each channel after sparsification is calculated.

[0024] If the scaling factor is less than the preset threshold, the channel is removed; otherwise, the channel is retained.

[0025] The pruned model was retrained to obtain a well-trained armed personnel equipment detection model.

[0026] On the other hand, embodiments of the present invention provide an armed personnel equipment detection system based on a dynamic neural network, comprising the following modules:

[0027] The dataset construction module is used to acquire images of armed personnel at different distances using a high-resolution camera with variable zoom, and to annotate the personnel and equipment in each image to form an equipment detection dataset.

[0028] The model training module is used to construct a dynamic neural network model, which includes a first sub-network and a second sub-network. The first sub-network is used to detect humans in an image. When the first sub-network detects a human in an image, it extracts the human ROI and transmits it to the second sub-network. The second sub-network is used to detect equipment using classifiers at different network depths according to different image resolutions. The dynamic neural network model is trained based on the equipment detection dataset to obtain a trained armed personnel equipment detection model.

[0029] The equipment detection module is used to input the image to be detected into the armed personnel equipment detection model to obtain the armed personnel equipment detection result of the image to be detected.

[0030] Furthermore, the second sub-network includes a backbone network unit, a Neck network unit, and a prediction unit; the backbone network unit is used to extract feature maps at different scales; the Neck network is used to upsample and fuse the feature maps at different scales extracted by the backbone network unit to obtain tensor data at different scales; the prediction unit includes multiple shallow classifiers for target detection based on tensor data at different scales.

[0031] The Neck network unit includes multi-level CSP and CBL combination blocks, and shallow classifiers are connected after the different levels of CSP and CBL combination blocks. The shallow classifiers are used to perform target detection based on tensor data at the current scale.

[0032] Compared with existing technologies, this invention uses a dynamic neural network model to construct an armed personnel equipment detection model. For images with different resolutions, different network depths can be used for recognition, thereby reducing redundant calculations and improving detection efficiency.

[0033] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description

[0034] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.

[0035] Figure 1 This is a flowchart of an embodiment of the armed personnel equipment detection method based on a dynamic neural network according to the present invention;

[0036] Figure 2 This is a block diagram of an armed personnel equipment detection system based on a dynamic neural network, according to an embodiment of the present invention. Detailed Implementation

[0037] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0038] One embodiment of the present invention discloses a method for detecting the equipment of armed personnel based on a dynamic neural network, such as... Figure 1 As shown, it includes the following steps:

[0039] S1. Use a high-resolution camera with variable zoom to acquire images of armed personnel at different distances, and label the personnel and equipment in each image to form an equipment detection dataset;

[0040] S2. Construct a dynamic neural network model, which includes a first sub-network and a second sub-network. The first sub-network is used to detect humans in the image. When the first sub-network detects that the image contains humans, it extracts the human ROI and transmits it to the second sub-network. The second sub-network is used to detect equipment using classifiers at different network depths according to different image resolutions. The dynamic neural network model is trained based on the equipment detection dataset to obtain a trained armed personnel equipment detection model.

[0041] S3. Input the image to be detected into the armed personnel and equipment detection model to obtain the armed personnel and equipment detection result of the image to be detected.

[0042] By employing a dynamic neural network model to construct an armed personnel equipment detection model, different network depths can be used for recognition of images with different resolutions, thereby reducing redundant calculations and improving detection efficiency.

[0043] In actual reconnaissance work, the equipment carried by armed personnel is relatively small and difficult to identify at long distances. In order to accurately identify equipment at different distances, in step S1, a high-resolution camera with variable zoom is used to collect images of armed personnel at different distances to construct a training dataset.

[0044] Personnel and equipment are labeled in each of the acquired images to form an equipment detection dataset, which specifically includes:

[0045] S11. Use annotation boxes to annotate the personnel and equipment in the image of armed personnel.

[0046] Specifically, labeling personnel and equipment in an image involves using label boxes to mark the location of personnel and equipment in the image and to label the type of equipment.

[0047] S12. Perform data augmentation on the labeled images by using methods such as label box scale distortion, label box mirror flipping, random image scaling, random image cropping, and / or random image arrangement to obtain the augmented dataset. Use the dataset before augmentation and the dataset after augmentation as the equipment detection dataset.

[0048] To increase the size of the dataset and improve the model's detection capabilities, data augmentation is performed on the labeled images. Specifically, data augmentation includes applying techniques such as bounding box scale distortion, bounding box mirroring, random image scaling, random image cropping, and / or random image arrangement to augment the dataset, resulting in an enhanced dataset.

[0049] In practice, the scale distortion method is as follows: the origin of the annotation box remains unchanged, the image within the annotation box is scaled and then overlaid on the original target position, and the coordinates of the annotation box change with the scale transformation, resulting in a new image and corresponding annotation information.

[0050] In practice, the mirror flipping method is as follows: the origin of the annotation box remains unchanged, the image inside the annotation box is flipped and transformed accordingly and then covered on the original target position, the coordinates of the annotation box remain unchanged, and a new image and corresponding annotation information are obtained.

[0051] During implementation, the armed personnel were equipped with: balaclavas, firearms (including rifles, pistols, and rocket launchers), explosives, knives, and the humans themselves, totaling five target categories. The final detection dataset includes these five target categories; the dataset contains over 17,000 real-world images.

[0052] For a self-constructed dataset, it is necessary to determine the size of the initial anchor boxes for the detection model. Therefore, after constructing the equipment detection dataset based on the images of armed personnel and before constructing the dynamic neural network model, the process further includes: determining the initial anchor boxes for the dynamic neural network model based on the bounding boxes of all images in the dataset.

[0053] Specifically, based on the bounding boxes of all images in the dataset, the initial anchor boxes of the dynamic neural network model are determined, including:

[0054] S13. Scale each image in the dataset to a specified size proportionally to obtain the scaled bounding boxes;

[0055] For example, the size of all images in the self-built dataset is 1920×1080; the maximum width and height of each image are scaled proportionally to a specified size, for example, 1080×1080, and the smaller sides are also scaled accordingly; the bounding boxes corresponding to the scaled images are changed from relative coordinates to absolute coordinates, and the size of the scaled bounding boxes, i.e., the length and width of the bounding boxes, are calculated.

[0056] To filter out invalid data, the modified label boxes were filtered, keeping all label boxes with a width and height of no less than 2 pixels, and deleting the rest.

[0057] S14. Cluster the scaled bounding boxes, use a genetic algorithm to mutate each type of bounding box, and select the optimal bounding box as the initial anchor box based on the prediction accuracy.

[0058] Clustering is performed on all scaled bounding boxes. In practice, the k-means clustering algorithm can be used to cluster the bounding boxes to obtain k different classes of bounding boxes.

[0059] In object recognition tasks, since larger feature maps contain more information about smaller objects, it is often desirable to detect smaller objects within larger feature maps. Therefore, anchor boxes on large feature maps are typically set to smaller values, while anchor boxes on smaller feature maps are set to larger values. In implementation, if the dynamic neural network includes a four-level classifier, four sets of initial anchor boxes need to be set, each containing three pairs of values. Therefore, in the k-means clustering algorithm, k is set to 12.

[0060] For each type of bounding box obtained, a genetic algorithm is used for mutation, and the optimal bounding box is selected as the initial anchor box for that type based on the fitness function. Specifically, the bounding boxes are randomly mutated, that is, the length and width of the bounding boxes are randomly mutated to generate a cluster of anchor boxes for that type. For the generated cluster of anchor boxes, the prediction accuracy of each anchor box is calculated, and the anchor box with the highest prediction accuracy is selected as the initial anchor box for that type.

[0061] The prediction accuracy for each anchor box is calculated using the following formula: Where p i,j Let n represent the prediction accuracy of the j-th anchor box in the i-th class. i,j This represents the number of anchor boxes of type i with an intersection-union ratio (IU) greater than a threshold when they are paired with the annotation boxes of type i. i This represents the number of the i-th type of annotation boxes.

[0062] Specifically, the dynamic neural network model constructed in step S2 includes a first sub-network and a second sub-network. The first sub-network is used to detect humans in the image. When the first sub-network detects that the image contains humans, it extracts the human ROI and transmits it to the second sub-network. The second sub-network is used to detect equipment using classifiers at different network depths according to different resolutions of the image. The dynamic neural network model is trained based on the equipment detection dataset to obtain a trained armed personnel equipment detection model.

[0063] In implementation, the first sub-network can adopt the YOLOv3-tiny architecture, which is lightweight, easy to deploy, and highly accurate. It is suitable for simple person detection tasks. If the first sub-network detects a human in the image, it crops out the human ROI (Region of Interest) and transmits it to the second sub-network; otherwise, it stops forward propagation, thereby improving the model's detection efficiency.

[0064] The second sub-network is used to perform equipment detection using classifiers at different network depths based on different image resolutions. That is, equipment detection is performed at different network depths based on the resolution of the human ROI received from the first sub-network.

[0065] In implementation, the second sub-network can employ an improved YOLOv5L model. The second sub-network includes a backbone network unit, a Neck network unit, and a prediction unit. The backbone network unit extracts feature maps of different scales for human ROIs. The Neck network upsamples and fuses the feature maps extracted by the backbone network unit at different scales to obtain tensor data of different scales. The prediction unit includes multiple shallow classifiers for target detection based on the tensor data of different scales.

[0066] The Neck network unit includes multi-level CSP and CBL combination blocks, and shallow classifiers are connected after the different levels of CSP and CBL combination blocks. The shallow classifiers are used to perform target detection based on tensor data at the current scale.

[0067] To facilitate recognition and detection of samples at different resolutions, shallow classifiers at different network depths (corresponding to different levels of CSP and CBL combination blocks) are used, thereby improving model efficiency and reducing computational redundancy. Specifically, the Neck network unit includes multiple levels of CSP and CBL combination blocks. The higher the level, the deeper the network. By connecting multiple classifiers of the detection unit to CSP and CBL combination blocks at different levels, rapid recognition and detection of samples at different resolutions can be achieved, greatly reducing the amount of computation and saving computing resources.

[0068] The CBL block includes a fully connected layer, a batch normalization layer, and a Leaky ReLU layer. The CSP block is a CSP2_x structure block, used to divide the input into two branches. One branch first passes through the CBL, then through x residual structures, and then performs a convolution; the other branch performs a direct convolution. The two branches are then concatenated, and the result is output after passing through a BN layer and an activation layer.

[0069] For example, the fourth-to-last CSP and CBL combination block of the Neck network unit is followed by a classifier, which for ease of description is referred to as the first shallow classifier, the second shallow classifier, the third shallow classifier, and the fourth shallow classifier, respectively. The output of each CSP and CBL combination block is divided into two paths: one path connects to the corresponding shallow classifier at that level, and the other path continues forward propagation through the CBL layer and the concat layer to enter the next level of CSP and CBL combination block. The output of the CSP and CBL combination block is first evaluated for resolution. If the resolution is within a preset range, the feature map is input into the shallow classifier corresponding to the current level for detection and recognition, and forward propagation stops. Otherwise, the feature map continues forward propagation to further extract deeper features. For example, after the fourth-to-last CSP and CBL combination block, the resolution of the input image is first evaluated. If the resolution is greater than or equal to 400, the feature map is input into the first shallow classifier for detection and recognition; if the image resolution is less than 400, forward propagation continues to extract deeper features. After the third-to-last CSP and CBL combination block, the input image resolution is first determined. If the resolution is less than 400 but greater than or equal to 200, the feature map is input into the second shallow classifier for detection and recognition; otherwise, forward propagation continues to extract deeper features. After the second-to-last CSP and CBL combination block, the input image resolution is first determined again. If the resolution is less than 200 but greater than or equal to 50, the feature map is input into the third shallow classifier for detection and recognition; otherwise, forward propagation continues. After the last CSP and CBL combination block, no further determination is needed; the features are directly input into the corresponding classifier for detection and recognition. By connecting classifiers at different depths, samples of different resolutions will be processed at different depths, with only samples with a resolution less than 50 being processed in the deeper layers of the network. This significantly improves the model's efficiency and reduces computational redundancy.

[0070] Specifically, the shallow classifier includes a convolutional layer, a concat layer, and a sigmoid layer connected in sequence; the convolutional layer is used to extract image features, the concat layer is used to concatenate the features, and the sigmoid layer is used for classification; the size and number of convolutional kernels differ in shallow classifiers at different levels.

[0071] In practice, the convolutional layer of the first shallow classifier consists of 128 convolutional kernels, each with a size of 1 and a stride of 1.

[0072] The second shallow classifier's convolutional layer consists of 128 convolutional kernels, each with a size of 3 and a stride of 2.

[0073] The third shallow classifier's convolutional layer consists of 256 convolutional kernels, each with a size of 3 and a stride of 2.

[0074] The fourth shallow classifier's convolutional layer consists of 384 convolutional kernels, each with a size of 3 and a stride of 2.

[0075] In implementation, the concat layer of the shallow classifier is used to concatenate the features output by the convolutional layer with the features output by a certain layer in the backbone network, thereby fusing the features extracted by the backbone network and the features from region 1 of the neck network, making the classification more accurate. In implementation, a layer in the backbone network with the same output feature dimension as the convolutional layer output feature dimension of the shallow classifier is selected, and its output features are concatenated with the features output by the convolutional layer of the current classifier.

[0076] By setting convolution kernels of different sizes in classifiers of different depths, features at different depths can be extracted. For high-resolution images, it is not necessary to extract deep features to accurately detect and identify them, thereby reducing the amount of computation and improving detection efficiency.

[0077] After constructing the dynamic neural network model, it is trained based on the equipment detection dataset to obtain a trained armed personnel equipment detection model. Specifically, during model training, the detection box loss of the model is calculated using the following formula:

[0078]

[0079] Where dis_2 represents the Euclidean distance between the center points of the predicted bounding box and the label box, dis_C represents the diagonal distance between the minimum bounding rectangles of the predicted bounding box and the label box, and IOU represents the intersection-union ratio of the predicted bounding box and the label box.

[0080] The classification loss of the model uses the cross-entropy loss function:

[0081]

[0082] Where M represents the number of categories, for example, to identify four types of equipment, M = 4. ic y represents the confidence level that sample i belongs to class c. ic The variable is 0-1, taking the value 1 when the true class of sample i is c, and 0 otherwise. N represents the number of samples in a batch.

[0083] The final overall loss function of the model is:

[0084]

[0085] Based on the overall loss of the model, backpropagation is performed to optimize the model parameters, thereby obtaining a well-trained armed personnel equipment detection model.

[0086] The trained equipment recognition model contains a large number of invalid, inefficient, and redundant structures and parameters, making it difficult to further improve inference efficiency. Pruning is one of the methods to improve inference efficiency. By pruning inefficient branches and parameters, it can efficiently generate models that are smaller in size, have higher memory utilization, lower energy consumption, faster inference speed, and minimal loss of inference accuracy.

[0087] Specifically, after training the dynamic neural network model based on the equipment detection dataset to obtain the trained armed personnel equipment detection model, the following steps are also included to prune the armed personnel equipment detection model:

[0088] S21. Perform sparsification on each channel of the model and calculate the scale factor of each channel after sparsification.

[0089] Because different channels in the network have varying impacts on the model's recognition performance, the purpose of sparsification is to approximate the coefficients (also called scaling factors) of the BN layer in channels with smaller impacts to zero, thus obtaining sparsified scaling factors. During training, a regularization term is added to the scaling factors of the BN layer in each channel. For smaller scaling factors, they will be closer to zero after training, thereby achieving the goal of sparsifying the scaling factors.

[0090] S22. If the scaling factor is less than the preset threshold, then the channel is removed; otherwise, the channel is retained.

[0091] For example, if the pruning percentage is set to 55%, 55% of the channels will be pruned. Based on the percentage and all scaling factors in the model, a threshold is determined, and all channels with scaling factors less than the threshold are pruned (i.e., their corresponding scaling factors are set to 0), thus pruning the model.

[0092] S23. Retrain the pruned model to obtain a trained armed personnel equipment detection model.

[0093] After pruning, the model's recognition accuracy will inevitably decrease due to the reduced number of channels and parameters. Therefore, it needs to be retrained and fine-tuned to compensate for the accuracy loss caused by pruning. Once the accuracy reaches the preset value, training ends, resulting in the pruned armed personnel equipment detection model.

[0094] One embodiment of the present invention discloses an armed personnel equipment detection system based on a dynamic neural network, such as... Figure 2 As shown, it includes the following modules:

[0095] The dataset construction module is used to acquire images of armed personnel at different distances using a high-resolution camera with variable zoom, and to annotate the personnel and equipment in each image to form an equipment detection dataset.

[0096] The model training module is used to construct a dynamic neural network model, which includes a first sub-network and a second sub-network. The first sub-network is used to detect humans in an image. When the first sub-network detects a human in an image, it extracts the human ROI and transmits it to the second sub-network. The second sub-network is used to detect equipment using classifiers at different network depths according to different image resolutions. The dynamic neural network model is trained based on the equipment detection dataset to obtain a trained armed personnel equipment detection model.

[0097] The equipment detection module is used to input the image to be detected into the armed personnel equipment detection model to obtain the armed personnel equipment detection result of the image to be detected.

[0098] Preferably, the second sub-network includes a backbone network unit, a Neck network unit, and a prediction unit; the backbone network unit is used to extract feature maps at different scales; the Neck network is used to upsample and fuse the feature maps at different scales extracted by the backbone network unit to obtain tensor data at different scales; the prediction unit includes multiple shallow classifiers for target detection based on tensor data at different scales.

[0099] The Neck network unit includes multi-level CSP and CBL combination blocks, and shallow classifiers are connected after the different levels of CSP and CBL combination blocks. The shallow classifiers are used to perform target detection based on tensor data at the current scale.

[0100] The above-described method and system embodiments are based on the same principles, and their related aspects can be referenced from each other to achieve the same technical effects. For specific implementation processes, please refer to the foregoing embodiments, which will not be repeated here.

[0101] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0102] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. An armed personnel equipment detection method based on a dynamic neural network in counter-terrorism reconnaissance work, characterized in that, The method comprises the following steps: Collecting images of armed personnel at different distances by using a variable-focus high-resolution camera, and labeling personnel and equipment in each image to form an equipment detection dataset; A dynamic neural network model is constructed, which comprises a first subnetwork and a second subnetwork, the first subnetwork is used for detecting humans in an image, and when the first subnetwork detects that the image contains humans, the human ROI is extracted and transmitted to the second subnetwork, the second subnetwork is used for performing equipment detection by using classifiers at different network depths according to different resolutions of the image, the dynamic neural network model is trained based on the equipment detection dataset, the overall loss of the dynamic neural network model is back propagated, the parameters of the dynamic neural network model are optimized, and a trained armed personnel equipment detection model is obtained; An image to be detected is input into the armed personnel equipment detection model to obtain an armed personnel equipment detection result of the image to be detected; The second subnetwork comprises a backbone network unit, a Neck network unit and a prediction unit, the backbone network unit is used for extracting feature maps of different scales, the Neck network is used for up-sampling and feature fusion of the feature maps of different scales extracted by the backbone network unit to obtain tensor data of different scales, and the prediction unit comprises a plurality of shallow classifiers and is used for target detection according to the tensor data of different scales; The Neck network unit comprises a plurality of levels of CSP and CBL combination blocks, shallow classifiers are connected after the different levels of CSP and CBL combination blocks, and the shallow classifiers are used for target detection according to tensor data of a current scale; The CSP block is a CSP2_x structure block, which is used for dividing an input into two branches, one branch is subjected to a CBL block, x residual structures and a convolution operation again, the other branch is subjected to a convolution operation directly, the two branches are concatenated, and then subjected to a BN layer and an activation layer to output, and the CBL block comprises a full connection layer, a batch normalization layer and a Leaky Relu layer.

2. The method of claim 1, wherein the method is based on a dynamic neural network. The shallow classifier comprises a convolution layer, a concat layer and a sigmoid layer connected in sequence, the convolution layer is used for extracting image features, the concat layer is used for concatenating features, and the sigmoid layer is used for classification, and the convolution kernel size and the number of different levels of shallow classifiers are different.

3. The method of claim 1, wherein the method is based on a dynamic neural network. Labeling personnel and equipment in each image to form an equipment detection dataset, comprising: Labeling personnel and equipment in an armed personnel image by using a labeling box; Performing dataset enhancement on the labeled image by using labeling box scale distortion, labeling box mirror flipping, image random scaling, image random cropping and / or image random arrangement to obtain an enhanced dataset, and using the enhanced and unenhanced datasets as the equipment detection dataset.

4. The method of claim 3, wherein the method is characterized by, The prediction box loss function of the second subnetwork is: ; Where dis_2 represents the Euclidean distance between the center points of a prediction box and a labeling box, dis_C represents the diagonal distance of the minimum bounding rectangle of the prediction box and the labeling box, and IOU represents the intersection over union of the prediction box and the labeling box.

5. The method of claim 1, wherein the method is used in anti-terrorism reconnaissance work. Before constructing the equipment detection dataset based on the armed personnel image, before constructing the dynamic neural network model, further comprising: determining the initial anchor box of the dynamic neural network model according to the annotation box of all images in the dataset.

6. The method of claim 5, wherein the method further comprises: Determine the initial anchor box of the dynamic neural network model according to the annotation box of all images in the dataset, comprising: Scaling each image in the dataset to a specified size to obtain a scaled annotation box; Clustering the scaled annotation box, using a genetic algorithm to mutate each class of annotation box, and selecting the optimal annotation box as the initial anchor box based on the prediction accuracy.

7. The method of claim 1, wherein the method is used in anti-terrorism reconnaissance work. After training the dynamic neural network model based on the equipment detection dataset to obtain the trained armed personnel equipment detection model, further comprising pruning the armed personnel equipment detection model using the following steps: Sparse processing of each channel of the model to calculate the scale factor of each channel after sparse processing; If the scale factor is less than a predetermined threshold, the channel is pruned; otherwise, the channel is retained; Re-training the pruned model to obtain the trained armed personnel equipment detection model.

8. An armed personnel equipment detection system based on dynamic neural network in counter-terrorism reconnaissance work, characterized in that, Comprise the following modules: The dataset construction module is used to collect armed personnel images at different distances by using a variable-focus high-resolution camera, and to perform personnel and equipment annotation on each image to form an equipment detection dataset; The model training module is used to construct a dynamic neural network model, which includes a first sub-network and a second sub-network, the first sub-network is used to detect humans in the image; when the first sub-network detects that the image contains humans, the human ROI is extracted and transmitted to the second sub-network; the second sub-network is used to detect equipment according to different resolutions of the image using classifiers at different network depths; train the dynamic neural network model based on the equipment detection dataset, perform back propagation according to the overall loss of the dynamic neural network model, optimize the parameters of the dynamic neural network model, and obtain a trained armed personnel equipment detection model; The equipment detection module is used to input the image to be detected into the armed personnel equipment detection model to obtain the armed personnel equipment detection result of the image to be detected; The second sub-network includes a backbone network unit, a neck network unit, and a prediction unit; the backbone network unit is used to extract feature maps of different scales; the neck network is used to upsample and feature fuse the feature maps of different scales extracted by the backbone network unit to obtain tensor data of different scales; the prediction unit includes multiple shallow classifiers for target detection according to tensor data of different scales; The neck network unit includes a multi-level CSP and CBL combination block, and a shallow classifier is connected after the combination block at different levels, which is used for target detection according to the tensor data of the current scale; Wherein, the CSP block is a CSP2_x structure block, used for dividing the input into two branches, one branch first passes through a CBL block, then passes through x residual structures, and then performs convolution again; the other branch directly performs convolution; the two branches are concatenated, and then output after passing through a BN layer and an activation layer; the CBL block includes a full connection layer, a batch normalization layer and a Leaky Relu layer.

Citation Information

Patent Citations

  • Environmental semantic understanding-based body movement recognition method, apparatus, device, and storage medium

    WO2021114892A1