A lightweight target recognition method and system that integrates location enhancement and adaptive labeling

By integrating location enhancement and adaptive label allocation, the problem of poor generalization ability of lightweight target recognition models under video surveillance perspective is solved, achieving efficient recognition and accurate positioning of small targets, which is suitable for edge devices.

CN116206241BActive Publication Date: 2026-05-05GUANGXI TAIHUA INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGXI TAIHUA INFORMATION TECH CO LTD
Filing Date
2023-02-17
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing lightweight target recognition models have poor generalization ability in video surveillance, resulting in inaccurate bounding box localization and low recognition rate, especially poor performance in extracting features from small targets.

Method used

We employ a method that combines location augmentation and adaptive label assignment. We assign anchors of different scales to the target through grouped anchor box clustering, extract feature maps using the ShuffleNetV2 lightweight network, perform feature fusion using location augmentation FPN, and perform target recognition by combining adaptive label assignment and SGD optimization algorithms.

Benefits of technology

It improves the accuracy and efficiency of target recognition from the perspective of video surveillance, adapts to the computing and storage resource limitations of edge devices, and achieves efficient recognition of small targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116206241B_ABST
    Figure CN116206241B_ABST
Patent Text Reader

Abstract

This invention discloses a lightweight target recognition method that integrates location enhancement and adaptive label assignment, belonging to the field of lightweight target recognition technology. Targeting target features from a video surveillance perspective, this invention extracts the target location by fusing shallow features rich in location information with deep features rich in context information through the target's contextual information and geometric offset relationship with anchors. Then, it combines multi-scale anchors obtained from group clustering with adaptive label assignment to match suitable anchors to the target, thereby achieving target recognition. This method conforms to target bounding box localization in edge devices, meets the characteristics of small target recognition, and provides reliable results with high processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of lightweight target recognition technology, and more specifically, relates to a lightweight target recognition method and system that integrates position enhancement and adaptive label allocation. Background Technology

[0002] Currently, industrial applications of object recognition typically involve acquiring video in real-time via online cameras and uploading it to cloud or local servers with deployed deep learning recognition models for identification. In recent years, with the development of edge computing, the computational tasks of the models have shifted to the edge of smart devices. Recognition models are directly deployed in edge devices, utilizing their computing resources to undertake a portion of the computational tasks, thereby improving real-time performance and alleviating the pressure on central servers. Lightweight object detection models need to be built in edge devices. Current methods for building lightweight models fall into two categories: manual design and model compression. Manually designed lightweight models are those with efficient feature extraction capabilities, designed manually within the constraints of computational power and model size, such as the MobileNet, ShuffleNet, and GostNet series. Model compression aims to reduce the computational load of the original model without compromising recognition accuracy, and includes methods such as pruning, knowledge distillation, and quantization.

[0003] Existing lightweight target recognition models generally perform well on open-source datasets, but their performance deteriorates when applied to data from video surveillance perspectives, exhibiting poor generalization ability. Compared to open-source benchmark datasets, video surveillance data is characterized by targets of varying scales and a large number of low-resolution targets. This leads to problems in current lightweight target recognition models, such as inaccurate bounding box localization, low recognition rates, and unreasonable selection of positive training samples. Therefore, a lightweight target recognition method specifically designed for video surveillance perspectives and the characteristics of small targets is urgently needed. Summary of the Invention

[0004] In response to the above-mentioned deficiencies or improvement needs of existing technologies, this invention proposes a lightweight target recognition method and system that integrates location enhancement and adaptive label allocation for edge devices with limited computing and storage resources, by combining small-scale target features.

[0005] To achieve the above objectives, the present invention provides a lightweight target recognition method that integrates location enhancement and adaptive label allocation, comprising:

[0006] The width and height of the target's true bounding box are compared with the width and height of the image from the video surveillance perspective. Anchor boxes are grouped and clustered according to the ratio, and anchors of different scales are assigned to the target.

[0007] The images from the video surveillance perspective are processed by a backbone network composed of a lightweight ShuffleNetV2 network, and the backbone network initially extracts the feature maps of the targets in the images.

[0008] Location-enhanced Feature Network (FPN) identifies multi-scale targets based on the target's feature map, and extracts the target location by fusing shallow and deep feature maps.

[0009] By combining anchors of different scales obtained from grouped anchor box clustering, adaptive label assignment is used to match the target anchor and type label;

[0010] Based on the anchor and type label assigned to each target, compare them with the ground truth bounding box of the target, and calculate the geometric offset and classification loss value between the anchor assigned to each target and the corresponding ground truth bounding box.

[0011] Based on the classification loss and regression loss values, and combined with the SGD optimization algorithm, the values ​​of all parameters in the network model are estimated until the calculated loss value reaches the minimum to complete the target recognition training. Subsequently, the label assignment and SGD optimization algorithm are discarded, the network model calculation process is repeated, and the non-maximum suppression algorithm (NMS) is used to complete the target recognition.

[0012] In some optional implementations, the step of comparing the width and height of the target's true bounding box with the width and height of the image from the video surveillance perspective, and grouping anchor boxes according to the ratio to assign anchors of different scales to the target includes:

[0013] The width ratio is obtained by comparing the width of the target's actual bounding box with the width of the image from the video surveillance perspective, and the height ratio is obtained by comparing the height of the target's actual bounding box with the height of the image from the video surveillance perspective.

[0014] The ground truth boxes whose minimum width-to-height ratio is less than the threshold α are clustered into n (n≥1) classes, and anchors of different scales are set for small-scale targets;

[0015] True bounding boxes whose minimum width-to-height ratio is greater than or equal to α are clustered into m (m≥1) classes, and anchors of different scales are set for medium-to-large scale targets.

[0016] In some optional implementations, the step of identifying multi-scale targets using location-enhanced FPN based on the target's feature map and extracting the target location by fusing shallow and deep feature maps includes:

[0017] For medium-to-large scale targets, the feature map obtained from the first ShuffleV2Block convolutional block is first downsampled to obtain C1. Then, C1 is fused with the feature map obtained from the third ShuffleV2Block convolutional block using Concat feature fusion to obtain C11. C11 is then convolved to extract the position of the medium-to-large scale target.

[0018] For small-scale targets, the result of the convolution of C11 is first upsampled to obtain C13. Then, the feature map obtained from the first ShuffleV2Block convolutional block is downsampled to obtain C2. The feature maps obtained from C2 and the second ShuffleV2Block convolutional block are fused by Concat feature fusion to obtain C21. C21 incorporates deep semantic information. C21 is then convolved to obtain C22. Finally, C22 and C13 are fused by Add feature fusion to extract the location of the small-scale target.

[0019] In some optional implementations, the assignment of anchors of different scales obtained by combining grouped anchor box clustering to target matching anchors via adaptive labeling includes:

[0020] By combining anchors of different scales obtained from grouped anchor box clustering, at least one anchor with a similar shape is assigned to small-scale and medium-to-large-scale targets through shape similarity matching;

[0021] If the anchors assigned based on shape similarity matching do not meet the minimum IoU matching, then the targets that do not meet the minimum IoU matching will participate in the label assignment of the next level to ensure that the ground truth bounding box of each target is assigned to an anchor.

[0022] In some alternative implementations, assigning at least one shape-similar anchor to small-scale and medium-to-large-scale targets through shape similarity matching includes:

[0023] At the same level, calculate the mean and standard deviation of the aspect ratio of the ground truth bounding box of each target and different anchors. By calculating the sum of the mean and standard deviation, use the sum of the mean and standard deviation as the upper boundary constraint value of the different anchors of the ground truth bounding box of each target, so as to ensure that the ground truth bounding box of each target is assigned to at least one anchor with a similar shape.

[0024] In some optional implementations, the upper boundary constraint value is: This represents the height of the i-th target's ground truth bounding box. This represents the height of the j-th anchor. This represents the width of the i-th target's true bounding box. This represents the width of the j-th anchor. This represents the ratio of the width of the j-th anchor of the i-th ground truth bounding box. This represents the ratio of the height of the j-th anchor to the height of the i-th ground truth bounding box, where m represents the number of anchors, and r... ij μ represents the maximum value of the width-to-height ratio of the j-th anchor of the i-th ground truth bounding box. i Let r represent the mean value of the i-th ground truth bounding box, and σ represent the mean value of the ground truth bounding box. i Let r represent the variance of the i-th true bounding box. This represents the upper boundary constraint value of the i-th ground truth bounding box.

[0025] In some alternative implementations, the minimum IoU value is matched as follows:

[0026] Calculate the mean and standard deviation of the IoU between the ground truth bounding box of each target and different anchors at the same level. Then, use the sum of the mean and standard deviation as the lower boundary constraint value of the IoU of the ground truth bounding box of each target.

[0027] In some optional implementations, the lower boundary constraint value is: Among them, IoU ij This represents the IoU between the i-th ground truth bounding box and the j-th anchor. Let represent the mean of all IoUs for the i-th ground truth bounding box. Let m represent the standard deviation of all IoUs for the i-th ground truth bounding box, and m represent the number of anchors. This represents the lower boundary constraint value of the i-th ground truth bounding box.

[0028] According to another aspect of the present invention, a lightweight target recognition system that integrates location enhancement and adaptive label allocation is provided, comprising:

[0029] The grouped anchor box clustering module is used to compare the width and height of the target's true bounding box with the width and height of the image from the video surveillance perspective, and to group anchor boxes according to the ratio, assigning anchors of different scales to the target;

[0030] The backbone network construction module is used to process images from the video surveillance perspective through a backbone network composed of a lightweight ShuffleNetV2 network, and the backbone network initially extracts feature maps of targets in the images.

[0031] The location enhancement module is used to identify multi-scale targets based on the target's feature map through the location enhancement FPN, and to extract the target location by fusing shallow and deep feature maps.

[0032] The adaptive label assignment module is used to combine anchors of different scales obtained from grouped anchor box clustering and assign them to the target matching anchors and type labels through adaptive label assignment.

[0033] The loss calculation module is used to compare the anchor and type label assigned to each target with the target ground truth bounding box, and calculate the geometric offset and classification loss value between the anchor assigned to each target and the corresponding target ground truth bounding box.

[0034] The target recognition module is used to estimate the values ​​of all parameters in the network model based on the classification loss value and the regression loss value, combined with the SGD optimization algorithm, until the calculated loss value reaches the minimum to complete the target recognition training. Subsequently, the label assignment and SGD optimization algorithm are discarded, the network model calculation process is repeated, and the non-maximum suppression algorithm (NMS) is used to complete the target recognition.

[0035] According to another aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.

[0036] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:

[0037] This invention targets target features from a video surveillance perspective. By fusing shallow features rich in location information with deep features rich in context information through contextual information and the geometric offset relationship between the target and anchors, the target location is extracted. Then, multi-scale anchors obtained from grouped clustering and adaptive label assignment are used to match suitable anchors to the target, thereby achieving target recognition. This method is suitable for target bounding box localization in edge devices, meets the characteristics of small target recognition, and offers reliable results and high processing efficiency. Attached Figure Description

[0038] Figure 1 This invention provides a lightweight target recognition model that integrates location enhancement and adaptive label allocation.

[0039] Figure 2 This is a schematic diagram of a method provided in an embodiment of the present invention;

[0040] Figure 3 This is a width-to-height ratio provided in an embodiment of the present invention;

[0041] Figure 4 This is a location-enhanced FPN provided in an embodiment of the present invention. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0043] This invention addresses the characteristics of small targets, video surveillance perspectives, and edge devices, requiring an understanding that small targets occupy fewer pixels after downsampling, and that the floating-point computational load should not be too high. Based on this idea, a lightweight target recognition method integrating location enhancement and adaptive label allocation is proposed, such as... Figure 1 The diagram illustrates a lightweight target recognition model that integrates location enhancement and adaptive label allocation, as provided in an embodiment of the present invention. It employs grouped anchor clustering, a Feature Pyramid Network (FPN) for location enhancement, and finally adaptive label allocation. The backbone network uses a ShuffleNetV2 network, the loss function is cross-entropy loss, the backpropagation algorithm uses stochastic gradient descent (SGD), and the post-prediction processing part uses non-maximum suppression (NMS). Figure 2 The diagram shown is a flowchart of a method provided by an embodiment of the present invention. The specific implementation steps include:

[0044] Step 1: Grouped anchor clustering strategy; grouped anchor box clustering is performed at the very beginning of the model, and this strategy introduces a threshold α. For example... Figure 3 As shown, the width and height of the target's ground truth bounding box (i.e., the true bounding box annotated by annotation software such as LabAME or LabelImag) are compared with the width and height of the image. Ground truth bounding boxes whose minimum ratio is less than a threshold α are clustered into n (n≥1) classes; ground truth bounding boxes whose minimum ratio is greater than α are clustered into m (m≥1) classes.

[0045]

[0046] This strategy allows for the assignment of anchors of different scales to small targets smaller than a threshold α. Similarly, medium-to-large-scale targets larger than the threshold α will also receive anchors of different scales. This strategy provides prior anchors for the subsequent label assignment strategy, ensuring that each target is assigned a more appropriate anchor and label during the label assignment phase. The threshold α can be set according to the distribution of small-scale targets. Regarding the setting of m and n values, YOLO series models typically cluster targets of different levels into 3 types of anchors. Therefore, in this embodiment of the invention, continuing the YOLO approach, n and m are both set to 3.

[0047] In this embodiment of the invention, targets whose actual bounding box width-to-height ratio is greater than 0.1 but less than 0.5 are classified as medium-scale targets, and targets whose ratio is greater than or equal to 0.5 are classified as large-scale targets.

[0048] In this embodiment of the invention, targets whose aspect ratios of the true bounding box and the image are both less than or equal to 0.1 are considered small-scale targets.

[0049] Step 2: Backbone Network; The backbone network adopts the existing ShuffleNetV2 lightweight network, which has low parameter count, low memory access, and strong feature extraction capabilities. The image first passes through this network, which initially extracts the feature information (i.e., feature maps) of the targets in the image. The feature maps obtained by downsampling by 8x, 16x, and 32x are input into the subsequent location-enhanced FPN structure.

[0050] Step 3: Location-enhanced FPN; such as Figure 4 As shown, Location Augmentation Network (FPN) is mainly used for multi-scale target recognition. This structure primarily introduces a shallow feature map (1 / 8 the size of the first ShuffleV2Block convolutional block) into the deep feature map for feature fusion. This is done to transfer the rich location information from the shallow layer to the fragmented location information of the deep feature map, ensuring accurate bounding box location information. In this structure, for medium-to-large scale targets, the feature map obtained from the first ShuffleV2Block convolutional block is first... Figure 4 First, C1 is downsampled by a factor of 2 to obtain C1. Then, C1 is fused with the feature map obtained from the third ShuffleV2Block convolutional block using Concat to obtain C11. C11 is then convolved with a 1×1 convolution to predict medium-to-large scale targets. For small-scale targets, the result of the convolution of C11 is first upsampled by a factor of 2 to obtain C13. Then, the feature map obtained from the first ShuffleV2Block convolutional block is... Figure 2After downsampling, we obtain C2. The feature maps obtained from C2 and the second ShuffleV2Block convolutional block are then fused using Concat to obtain C21. C21 incorporates deep semantic information. Therefore, after a 1×1 convolution, we obtain C22. Finally, C22 and C13 are fused using Add feature fusion to predict small targets. This Add feature fusion method fully integrates shallow and deep features, resulting in a fused feature map with rich target location information, enhancing the original model's target bounding box localization capability. This structure allows for the prediction of both large and small targets to benefit from the fusion of shallow features rich in location information, improving localization accuracy.

[0051] Step 4: Adaptive Label Assignment Strategy; This strategy assigns labels (i.e., anchor and type labels) to the targets in the two scale feature maps obtained in Step 3 for training and prediction. This strategy consists of shape similarity matching and minimum IoU (Intersection over Union) matching. Regarding shape, firstly, at the same level, the aspect ratio (r) between each ground truth bounding box and the anchors is calculated. w ,r H The mean and standard deviation of the shape similarity are calculated. The sum of the mean and standard deviation is used as the upper bounding constraint value (i.e., less than this threshold) for each ground truth bounding box's different anchors. This constraint ensures that each ground truth bounding box is assigned to at least one anchor with a similar shape. The upper bounding constraint value for shape similarity is calculated as follows:

[0052]

[0053]

[0054]

[0055]

[0056]

[0057] In (2)-(6), The height of the i-th target's ground truth bounding box; The height of the j-th anchor; The width of the i-th target's ground truth bounding box; The width of the j-th anchor; The ratio of the width of the j-th anchor of the i-th real bounding box; The ratio of the height of the j-th anchor in the i-th ground truth bounding box; m: number of anchors; r ij μ is the maximum value of the width-to-height ratio of the j-th anchor of the i-th ground truth bounding box. i : The mean r of the i-th ground truth bounding box; σ i: The variance r of the i-th true bounding box; The shape threshold of the i-th ground truth bounding box.

[0058] Regarding IoU, the mean and standard deviation of the IoU between each ground truth bounding box and anchors at the same level are calculated. The sum of the mean and standard deviation is used as the lower bound constraint value for the IoU of each ground truth bounding box. This constraint, combined with the shape similarity constraint, ultimately determines the positive sample anchors participating in training. If anchors assigned based on shape similarity do not meet the adaptive IoU threshold, they participate in the label assignment for the next level. This method ensures that each ground truth bounding box is assigned an anchor. The IoU lower bound threshold is calculated as follows:

[0059]

[0060]

[0061]

[0062] In (7)-(9), IoU ij : The IoU between the i-th ground truth bounding box and the j-th anchor; The mean of all IoUs of the i-th ground truth bounding box; The standard deviation of all IoUs of the i-th true bounding box; The IoU threshold for the i-th ground truth bounding box.

[0063] Step 5: Calculate the regression loss and classification loss values; based on the anchor and type label assigned to each target in Step 4, compare them with the target's ground truth bounding box, and calculate the geometric offset (such as width offset, height offset, center coordinate offset) and classification loss value between them.

[0064] Step 6: Backpropagation; Based on the loss value calculated in Step 5, and combined with the SGD optimization algorithm, estimate the values ​​of all parameters in the model until the loss value calculated in Step 5 reaches its minimum (i.e., convergence).

[0065] It should be noted that, depending on the implementation needs, the various steps / components described in this application can be broken down into more steps / components, or two or more steps / components or parts of the operation of steps / components can be combined into new steps / components to achieve the purpose of this invention.

[0066] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A lightweight target recognition method that integrates location enhancement and adaptive label assignment, characterized in that, include: The width and height of the target's true bounding box are compared with the width and height of the image from the video surveillance perspective. Anchor boxes are grouped and clustered according to the ratio, and anchors of different scales are assigned to the target. The images from the video surveillance perspective are processed by a backbone network composed of a lightweight ShuffleNetV2 network, and the backbone network initially extracts the feature maps of the targets in the images. Location-enhanced Feature Network (FPN) identifies multi-scale targets based on the target's feature map, and extracts the target location by fusing shallow and deep feature maps. By combining anchors of different scales obtained from grouped anchor box clustering, adaptive label assignment is used to match the target anchor and type label; Based on the anchor and type label assigned to each target, compare them with the ground truth bounding box of the target, and calculate the geometric offset and classification loss value between the anchor assigned to each target and the corresponding ground truth bounding box. Based on the classification loss and regression loss values, combined with the SGD optimization algorithm, the values ​​of all parameters in the network model are estimated until the calculated loss value reaches the minimum to complete the target recognition training. Subsequently, the label assignment and SGD optimization algorithm are discarded, the network model calculation process is repeated, and the non-maximum suppression algorithm NMS is used to complete the target recognition. The anchors of different scales obtained by combining grouped anchor box clustering are assigned as target matching anchors through adaptive labeling, including: By combining anchors of different scales obtained from grouped anchor box clustering, at least one anchor with a similar shape is assigned to small-scale and medium-to-large-scale targets through shape similarity matching; If the anchors assigned based on shape similarity matching do not meet the minimum IoU matching, then the targets that do not meet the minimum IoU matching will participate in the label assignment of the next level to ensure that the ground truth bounding box of each target is assigned to an anchor. The method of assigning at least one shape-similar anchor to small-scale and medium-to-large-scale targets through shape similarity matching includes: At the same level, calculate the mean and standard deviation of the aspect ratio of the ground truth bounding box of each target to different anchors. By calculating the sum of the mean and standard deviation, use the sum of the mean and standard deviation as the upper boundary constraint value of the ground truth bounding box of each target to different anchors, so as to ensure that the ground truth bounding box of each target is assigned to at least one anchor with a similar shape. The upper boundary constraint value is: , , , , , This represents the height of the i-th target's ground truth bounding box. This represents the height of the j-th anchor. This represents the width of the i-th target's true bounding box. This represents the width of the j-th anchor. This represents the ratio of the width of the j-th anchor of the i-th ground truth bounding box. This represents the ratio of the height of the j-th anchor to the height of the i-th ground truth bounding box. Indicates the number of anchors. This represents the maximum value of the width-to-height ratio of the j-th anchor of the i-th ground truth bounding box. This represents the mean r of the i-th ground truth bounding box. Let r represent the variance of the i-th true bounding box. This represents the upper boundary constraint value of the i-th ground truth bounding box.

2. The method according to claim 1, characterized in that, The process of comparing the width and height of the target's true bounding box with the width and height of the image from the video surveillance perspective, grouping anchor boxes based on the ratio, and assigning anchors of different scales to the target includes: The width ratio is obtained by comparing the width of the target's actual bounding box with the width of the image from the video surveillance perspective, and the height ratio is obtained by comparing the height of the target's actual bounding box with the height of the image from the video surveillance perspective. The ground truth boxes whose minimum width-to-height ratio is less than the threshold α are clustered into n classes, n≥1, and anchors of different scales are set for small-scale targets; True bounding boxes whose minimum width-to-height ratio is greater than or equal to α are clustered into m classes, where m ≥ 1. Anchors of different scales are set for medium-to-large scale targets.

3. The method according to claim 2, characterized in that, The method of using location-enhanced FPN to identify multi-scale targets based on their features, and extracting target locations by fusing shallow and deep feature maps, includes: For medium-to-large scale targets, the feature map obtained from the first ShuffleV2Block convolutional block is first downsampled to obtain C1. Then, C1 is fused with the feature map obtained from the third ShuffleV2Block convolutional block using Concat feature fusion to obtain C11. C11 is then convolved to extract the position of the medium-to-large scale target. For small-scale targets, the result of the convolution of C11 is first upsampled to obtain C13. Then, the feature map obtained from the first ShuffleV2Block convolutional block is downsampled to obtain C2. The feature maps obtained from C2 and the second ShuffleV2Block convolutional block are fused by Concat feature fusion to obtain C21. C21 incorporates deep semantic information. C21 is then convolved to obtain C22. Finally, C22 and C13 are fused by Add feature fusion to extract the location of the small-scale target.

4. The method according to claim 2, characterized in that, The lowest IoU value is matched as follows: Calculate the mean and standard deviation of the IoU between the ground truth bounding box of each target and different anchors at the same level. Then, use the sum of the mean and standard deviation as the lower boundary constraint value of the IoU of the ground truth bounding box of each target.

5. The method according to claim 4, characterized in that, The lower boundary constraint value is: , , ,in, This represents the IoU between the i-th ground truth bounding box and the j-th anchor. Let represent the mean of all IoUs for the i-th ground truth bounding box. This represents the standard deviation of all IoUs for the i-th true bounding box. Indicates the number of anchors. This represents the lower boundary constraint value of the i-th ground truth bounding box.

6. A lightweight target recognition system that integrates location enhancement and adaptive label allocation, characterized in that, include: The grouped anchor box clustering module is used to compare the width and height of the target's true bounding box with the width and height of the image from the video surveillance perspective, and to group anchor boxes according to the ratio, assigning anchors of different scales to the target; The backbone network construction module is used to process images from the video surveillance perspective through a backbone network composed of a lightweight ShuffleNetV2 network, and the backbone network initially extracts feature maps of targets in the images. The location enhancement module is used to identify multi-scale targets based on the target's feature map through the location enhancement FPN, and to extract the target location by fusing shallow and deep feature maps. The adaptive label assignment module is used to combine anchors of different scales obtained from grouped anchor box clustering and assign them to the target matching anchors and type labels through adaptive label assignment. The loss calculation module is used to compare the anchor and type label assigned to each target with the target ground truth bounding box, and calculate the geometric offset and classification loss value between the anchor assigned to each target and the corresponding target ground truth bounding box. The target recognition module is used to estimate all parameter values ​​in the network model based on the classification loss value and regression loss value, combined with the SGD optimization algorithm, until the calculated loss value reaches the minimum to complete the target recognition training. Subsequently, the label assignment and SGD optimization algorithm are discarded, the network model calculation process is repeated, and the non-maximum suppression algorithm NMS is used to complete the target recognition. The anchors of different scales obtained by combining grouped anchor box clustering are assigned as target matching anchors through adaptive labeling, including: By combining anchors of different scales obtained from grouped anchor box clustering, at least one anchor with a similar shape is assigned to small-scale and medium-to-large-scale targets through shape similarity matching; If the anchors assigned based on shape similarity matching do not meet the minimum IoU matching, then the targets that do not meet the minimum IoU matching will participate in the label assignment of the next level to ensure that the ground truth bounding box of each target is assigned to an anchor. The method of assigning at least one shape-similar anchor to small-scale and medium-to-large-scale targets through shape similarity matching includes: At the same level, calculate the mean and standard deviation of the aspect ratio of the ground truth bounding box of each target to different anchors. By calculating the sum of the mean and standard deviation, use the sum of the mean and standard deviation as the upper boundary constraint value of the ground truth bounding box of each target to different anchors, so as to ensure that the ground truth bounding box of each target is assigned to at least one anchor with a similar shape. The upper boundary constraint value is: , , , , , This represents the height of the i-th target's ground truth bounding box. This represents the height of the j-th anchor. This represents the width of the i-th target's true bounding box. This represents the width of the j-th anchor. This represents the ratio of the width of the j-th anchor of the i-th ground truth bounding box. This represents the ratio of the height of the j-th anchor to the height of the i-th ground truth bounding box. Indicates the number of anchors. This represents the maximum value of the width-to-height ratio of the j-th anchor of the i-th ground truth bounding box. This represents the mean r of the i-th ground truth bounding box. Let r represent the variance of the i-th true bounding box. This represents the upper boundary constraint value of the i-th ground truth bounding box.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Shape-adaptive rotating target detection method and system, medium and computing equipment

    CN113887605A

  • Document table detection method and device

    CN113901924A