A Lightweight Countermeasure Enhancement-Based Method for Detecting Logistics Violations in Noisy Environments

By introducing the GhostC3 module, LAconv module, and CIOU loss function into the YOLOv5 network, the problems of high cost and low accuracy in logistics violation detection are solved, and efficient detection in complex noise environments is achieved.

CN116188842BActive Publication Date: 2026-05-05BEIJING INSTITUTE OF GRAPHIC COMMUNICATION
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING INSTITUTE OF GRAPHIC COMMUNICATION
Filing Date
2022-12-29
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing technologies for detecting violations in logistics operations suffer from high detection costs, low accuracy, and are not suitable for complex and noisy environments.

Method used

Using the YOLOv5 network as the framework, combined with the GhostC3 module, LAconv module and CIOU loss function, a lightweight adversarial enhancement method is used to detect logistics violations. This method includes feature map scaling, global average pooling, channel attention and adversarial learning, and network parameters are optimized to improve detection accuracy and speed.

Benefits of technology

It achieves high-precision and low-cost detection of logistics violations in complex and high-noise environments, reducing the number of model parameters and detection time, and improving detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116188842B_ABST
    Figure CN116188842B_ABST
Patent Text Reader

Abstract

The application provides a logistics violation operation detection method in a strong noise environment based on lightweight adversarial enhancement. The method takes YOLOv5 as a basic framework, proposes a lightweight GhostC3 module, uses the idea of adversarial learning to propose a lightweight adversarial module LAconv module, modifies the C3 module in the original structure to the lightweight GhostC3 module, modifies the Conv module to the LAconv module, and modifies the positioning loss to the CIOU loss. Finally, through experimental verification, the method has excellent detection effect for logistics violation operation in a complex strong noise background. Compared with YOLOv5 detection, the average precision is improved by 1.69%, the model parameter quantity is reduced by 45.14%, and the detection speed is improved by 2.46%. The method has the characteristics of low parameter quantity, fast detection speed and high precision, and has certain advancement and practicality for the detection of logistics violation operation in a complex strong noise background, and fully meets the detection requirements of logistics violation operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent identification in express logistics, and in particular to a lightweight, enhanced method for detecting logistics violations in noisy environments. Background Technology

[0002] With the development of the logistics industry, problems such as damage and breakage of parcels during logistics operations have become particularly serious. The direct cause of this phenomenon is the violation of regulations in logistics operations. Violations refer to the rough handling of parcels by personnel throughout the entire logistics process, including pickup, transshipment, warehousing, and delivery. These violations are especially prominent in the express delivery industry. Logistics violations are very common in the express delivery sector, with at least 16.1% of express parcels suffering varying degrees of damage. A December 2021 report on postal service user complaints showed that damaged parcels accounted for 21.8% of all express delivery service complaints.

[0003] Currently, there are two main technical approaches to identifying logistics violations: the first is a sensor cluster-based method, and the second is a video and image-based method. The sensor cluster-based method embeds inertial and vibration sensors within packages, using dedicated hardware and cloud platforms to analyze and process violations. A representative example is the express delivery rough handling identification method proposed by Ding Ao et al., based on acceleration distribution characteristics, which effectively identifies and classifies package violations and is significant for monitoring the entire package process. However, this method requires a relatively cumbersome and space-consuming installation of dedicated detection terminals. Furthermore, the need for lithium batteries for these terminals can negatively impact safety in transportation modes such as aviation. Therefore, sensor cluster-based logistics violation detection has certain drawbacks. In recent years, methods for detecting target behavior based on video and images have developed rapidly and are widely used in agriculture, medicine, industrial manufacturing, and many other fields. Scholars have conducted in-depth research on the identification of logistics violations. The express delivery violent sorting detection system proposed by Wu Pengbo et al., based on LSTM+Attention and MobileSSD models, can perform behavior recognition through pose data. Shang Shuling et al. used wavelet packet analysis to effectively extract behavioral features from collected logistics sorting images, providing a basis for identifying logistics violations. Deng Xiuqin et al. also proposed a computer vision-based violent sorting behavior recognition method for logistics violations. However, the detection performance and stability of the above methods are relatively low, and the model training and detection costs are high. Therefore, lightweight and stable detection methods have significant theoretical and practical implications. Summary of the Invention

[0004] To address the challenge of effectively identifying logistics violations in complex and noisy environments, this invention proposes a lightweight adversarial enhancement method for detecting such violations. This invention utilizes the YOLOv5 network as the primary framework to propose a lightweight adversarial detection method for complex and noisy backgrounds, overcoming the problems of high detection costs and poor accuracy, and effectively reducing the workload of manual intervention. The specific technical solution adopted in this invention is as follows:

[0005] A method for detecting logistics violations in noisy environments based on lightweight adversarial enhancement, the method comprising the following steps:

[0006] (1) Collect images of three types of abnormal express delivery operations: kicking, throwing, and stomping. Use these abnormal operation images as input feature maps X∈R. Cin×H×W Cin represents the number of channels, H represents the height, and W represents the width; the input feature map is processed by the function f' conv After reducing the number of channels by a scaling factor s and removing redundant channels, the output feature map Y' is obtained:

[0007] Y'=X×f' conv

[0008] f' conv =∑Ax+B

[0009] Where x is the input, A is the weight matrix, and B is the bias matrix;

[0010] Then, a completely new feature map is obtained through linear operations.

[0011]

[0012] Where y i It is the i-th feature map in Y', the function It refers to the j-th linear operation, Y ij It is an element of the output feature set, C out The number of dimensions of the matrix;

[0013] (2) Given an input feature map X∈R Cin×H×W The feature matrix is ​​compressed using global average pooling, resulting in a channel-dimensional vector u = [u1, u2, u3, ... u2]. Cin FC1() and FC2() are linear transformation functions. The calculation formulas for the fully connected layer and the activation function are as follows:

[0014] V=σ2(FC2(σ1(FC1(u))))

[0015] Where σ1 is the ReLU activation function and σ2 is the Sigmoid activation function, calculated as follows:

[0016] σ1(x) = max(0,x)

[0017]

[0018] (3) Consider the aspect ratio and the relationship between the predicted bounding box and the ground truth bounding box, and set the loss function.

[0019]

[0020] CIOU_Loss = 1 - CIOU

[0021]

[0022]

[0023] Where IOU is the intersection-union ratio loss function, ρ(b,b) gt To minimize the Euclidean distance between the center points of the ground truth bounding box and the center point of the predicted bounding box, w gt h gt represents the width and height of the target bounding box, respectively; w and h represent the width and height of the target bounding box, respectively.

[0024] (4) According to step (3), each image is input into the network to obtain a predicted label, and the training loss is obtained by comparing it with the real label. The loss is backpropagated to optimize the parameters that can be optimized in the network. The above steps are repeated until the set number of training rounds ends. Finally, the prediction is completed, the image is input into the network, and no loss backpropagation is performed.

[0025] Preferably, the method further includes the following steps:

[0026] (5) Calculation of model evaluation index

[0027] Calculate the proportion P of prediction boxes that actually contain violations and are predicted to contain abnormal behavior.

[0028]

[0029] Calculate the proportion R of predicted bounding boxes that actually contain violations and are predicted to contain violations out of manually labeled bounding boxes.

[0030]

[0031] Where TP represents the number of positive samples identified as positive, FP represents the number of positive samples identified as negative, and FN represents the number of negative samples identified as negative.

[0032] Calculate the mean average accuracy (mAP) for the three types of footwork: kicking, throwing, and stomping.

[0033]

[0034] In the formula, AP is the area enclosed by the curves formed by P and R, and n is the number of the three types of behaviors: kicking, throwing, and stomping.

[0035] The present invention has the following beneficial effects:

[0036] Based on the YOLOv5 framework, this invention proposes the GhostC3 and LAconv modules, modifying the localization loss function to CIOU loss. Applied to logistics violation detection, the method has been experimentally validated. With the support of the proposed lightweight modules and adversarial learning, this invention achieves excellent detection performance even in complex and noisy environments. Furthermore, this method outperforms YOLOv5 in terms of mAP, parameter count, and inference speed, effectively addressing the problems of unidentifiable and difficult-to-identify logistics violations, thus significantly improving detection performance and reducing the cost of manual intervention.

[0037] The method proposed in this invention has the characteristics of low parameter quantity, fast detection speed and high accuracy. It has certain advanced and practical features for detecting logistics violations under complex and noisy backgrounds, and fully meets the needs of logistics violation detection. Attached Figure Description

[0038] Figure 1 This is a schematic diagram of a lightweight anti-tank module.

[0039] Figure 2 This is a flowchart of the method of the present invention.

[0040] Figure 3 These are images depicting delivery scenarios in foggy weather, under intense light, and at night. Detailed Implementation

[0041] The YOLO series of algorithms are typical one-stage algorithms, characterized by their simplicity, speed, and wide applicability. YOLOv5 has made a series of improvements based on the YOLO series of algorithms, further enhancing its performance. The YOLOv5 network model mainly consists of four parts: Input, Backbone, Neck, and Head.

[0042] On the input side, YOLOv5 primarily employs mosaic data augmentation, adaptive anchor box calculation, and adaptive image scaling. Mosaic data augmentation involves combining randomly selected images through random scaling, cropping, and arrangement, improving the model's generalization ability and preventing overfitting. During network training, the network automatically calculates the optimal anchor boxes for the current dataset; clustered anchor boxes allow for faster and more accurate predictions. To facilitate network training and meet the image size requirements of different datasets, adaptive image scaling resizes the original images to a uniform size before inputting them into the network for training.

[0043] YOLOv5 employs Conv modules, C3 structures, and SPPF pooling pyramid structures in its backbone network. The Conv module, a combination of convolutional layers, Batch Normalization (BN) layers, and activation functions, plays a crucial role in the entire network. The Bottleneck module, an important residual component within the C3 module, reduces the number of computational parameters and improves feature extraction efficiency to some extent.

[0044] A Pooling Pyramid (SPPF) structure exists between the backbone and head. The SPPF structure expands the receptive field of the backbone network by performing continuous max-pooling downsampling on the input feature maps and then concatenating the output feature maps. After the input image passes through the backbone network, to meet the requirements of different scale targets in downstream tasks, the feature fusion stage employs a Feature Pyramid Network (FPN) and a Path Aggregation Network (PAN) structure. FPN is a structure that fuses high-level and low-level feature maps. The PAN network is an improvement on FPN, adding a bottom-up feature fusion scheme to better integrate semantic information from different levels. The PANet feature fusion stage significantly improves the detection performance of targets at different scales in the image, enabling the network to learn both deep semantic features and the overall object distribution information of the image. Yolov5 uses the GIOU function as the localization loss function at the output. Furthermore, in the post-processing of detection, the non-maximum suppression (NMS) method is used to filter the target boxes, which effectively improves the detection capability of the model.

[0045] To address the information redundancy in feature maps obtained from some channels using traditional convolution operations, a lightweight GhostC3 module is proposed, referencing the Ghostnet network. Since some channels fail to learn valuable features during training, this module aims to resolve channel information redundancy and obtain more information with fewer parameters.

[0046] Feature maps with multiple information. The Conv module in the C3 structure is changed to the Ghostconv module.

[0047] Given an input feature map X∈R Cin×H×W The Ghostconv module, as shown in formula (2), processes the input feature map through the function f' conv After reducing the number of channels by a scaling factor s and removing redundant channels, a new feature map is obtained through linear operation using formula (3), where y i It is the i-th feature map in Y', the function It refers to the j-th linear operation, C out Y represents the number of dimensions of the matrix. ij These are the elements of the output feature set. Finally, the feature map with reduced channel count and the feature map obtained by linear operation are concatenated to obtain the final feature map.

[0048] f' conv =∑Wx+B

[0049] Where x is the input, W is the weight matrix, and B is the bias matrix;

[0050] Y'=X×f' conv (2)

[0051]

[0052] The Conv module in the Bottleneck module is replaced with a Ghostconv module and applied to the GhostC3 module. The Bottleneck module's stride is set to 1, and the input feature map is passed through two Ghostconv modules and then added to itself to obtain the output feature map. Simultaneously, the Bottleneck module is modified in the C3 module, and the output Conv module is replaced with a Ghostconv module. The modified GhostC3 module is applied to both the Backbone and Head modules. Furthermore, GhostC3 uses a shortcut, while GhostC3 in the Neck module does not use a shortcut.

[0053] To improve the detection capability of networks under noisy data, the idea of ​​adversarial learning is introduced. Generative Adversarial Network (GAN) mainly consists of two parts: a generator (G) and a discriminator (D). The generator and discriminator form an adversarial relationship, and the generator and discriminator can be functions of any nonlinear mapping.

[0054] In a generative adversarial network (GAN), the generator is responsible for generating data G(z) from noise z that randomly follows a Gaussian distribution, and the discriminator is responsible for judging the input features X. in Is it a real sample or a sample generated by the generator? The generator needs to continuously and promptly optimize the generated data to match the real data distribution P. real and the generated data distribution P fake The data should be as similar as possible to the discriminator, so that the discriminator cannot distinguish it as generated data. The discriminator aims to improve its discrimination ability and better distinguish between real and fake data. Therefore, its optimization formula can be expressed as equation (4).

[0055]

[0056] To improve the network's detection performance in noisy images, a channel attention module is introduced. This module can assess the importance of different channels in the feature map. During network training, the channel attention module increases the weights of channels containing important semantic information and decreases the weights of channels with redundant information. The channel attention module structure consists of Global Average Pooling (GAP), several fully connected layers (FC), and activation functions.

[0057] Given an input feature map X∈R Cin×H×W Global average pooling is used to compress the height and width of the feature matrix, and the output is a channel-dimensional vector u = [u1, u2, u3, ... u2]. Cin The calculation process of the fully connected layer and activation function can be expressed as formula (5). FC1() and FC2() are linear transformation functions, which first reduce the channel dimension and then increase the channel dimension. Among them, σ1 is the ReLU activation function and σ2 is the Sigmoid activation function. The calculation formula is as shown in formula (6-7). The final output is the product of the channel weight and the original feature map.

[0058] V=σ2(FC2(σ1(FC1(u)))) (5)

[0059] σ1(x)=max(0,x) (6)

[0060]

[0061] Therefore, to enhance the feature learning ability and improve the network's noise resistance, a method combining adversarial learning and channel attention modules is proposed. Figure 1 The Lightweight Adversarial Conv (LAconv) module modifies the Conv modules in Backbone and Neck into LAconv modules. It uses the linear transformation from the Ghostconv module as the generator G and the channel attention module as the discriminator D. In the Lightweight Adversarial Conv, the linear transformation of generator G generates fake feature maps resembling real feature maps, which are then concatenated with the real feature maps with reduced channels. This concatenation is then fed into the channel attention module as a discriminator to distinguish between genuine and fake generated data, thus establishing an adversarial relationship between the two.

[0062] YOLOv5's loss function consists of three parts: classification loss, localization loss, and confidence loss. The classification and confidence losses use Binary Cross-Entropy Loss (BCELoss). The localization loss uses GIOU loss (see Equation 8-9) instead of IOU (Intersection over Union) loss, solving the problem of loss not being backpropagated when the predicted and ground truth boxes do not intersect. It focuses not only on overlapping regions but also on other non-overlapping regions, better reflecting the degree of overlap. However, when the predicted and ground truth boxes are not well aligned, GIOU loss can lead to an increase in the area of ​​the minimum bounding box, thus decreasing the GIOU value and hindering model optimization.

[0063]

[0064] GIOU_Loss = 1 - GIOU (9)

[0065] To address the shortcomings of the aforementioned localization loss, the GIOU loss is adjusted to the CIOU loss as shown in formulas (10-13). Specifically, the adjustment is as follows: First, the minimum bounding rectangle of the penalty term in GIOU is modified to minimize the Euclidean distance ρ(b,b) between the center points of the ground truth bounding box and the predicted bounding box, as shown in formula (10). gt The calculation is revised by adding the square of the diagonal length of the minimum bounding box between the two bounding boxes. Simultaneously, the diagonal distance of the minimum closure region that can simultaneously contain both the predicted and ground truth boxes is added. Furthermore, to fully account for the impact of aspect ratio on prediction, a penalty term as shown in formulas (13-14) is added, where w... gt h gt...

[0066]

[0067] CIOU_Loss = 1 - CIOU (11)

[0068]

[0069]

[0070] The YOLOv5 network itself is characterized by its fast detection speed and wide applicability. Using the YOLOv5 network as the main framework, the C3 module was modified to a GhostC3 module, the Conv module to a LAconv module, and the localization loss function was changed to CIOU loss. The improved network features excellent detection performance, rapid inference, and lightweight design, meeting the requirements for detecting violations in complex and noisy logistics environments.

[0071] During training, the network is input with images of logistics violations (RGB three channels, i.e., three matrices, such as the input feature map X∈RCin×H×W where cin is the number of channels, H is the height, and w is the width) and annotation information (as shown in Table 3). Next, each image is input into the network to obtain a predicted label, which is then compared with the true label (containing category information – three types of violations, and location information: center point xy, height, and width hw) to obtain the training loss. This loss is backpropagated to optimize the network's optimizable parameters. The above steps are repeated until the set number of training rounds (one for loop) ends. Finally, during inference (prediction), the image is input into the network without loss backpropagation; only the prediction result is received. The overall process is as follows: Figure 2 As shown.

[0072] Experiments and Analysis

[0073] (1) Experimental Environment

[0074] The processing environment used in the experiment consisted of an NVIDIA Tesla K80 graphics card, three Xeon E5-2678v3 CPUs, an Ubuntu 18.04 operating system, and the PyTorch deep learning framework. The specific configuration is shown in Table 1 below.

[0075] Table 1 Hardware Environment Configuration

[0076]

[0077] During training, the SGD optimizer was used to optimize the network, Mosaic data augmentation was used, the batch size was adjusted to 64, the initial learning rate was set to 0.001, the momentum was 0.937, the weight decay coefficient was 0.0005, the number of iterations was set to 500, the model depth coefficient was 0.33, and the width coefficient was 0.5. The specific parameters are shown in Table 2 below.

[0078] Table 2 Model Training Parameters

[0079]

[0080] To verify the model's effectiveness, data on logistics violation operations was used for validation. Due to the difficulty of collecting such data in real-world logistics environments, the dataset required for the experiment was generated by the authors of this invention using a TP-LINK high-definition camera to simulate abnormal behaviors of delivery personnel, including three common abnormal delivery behaviors: kicking, throwing, and trampling. A total of 1215 images were collected, including 344 kicking images, 531 throwing images, and 340 trampling images. The acquired dataset was processed using the OpenCV library as follows: Figure 3 The foggy, high-exposure, and nighttime scenes shown represent the same percentage of each scene type for each action.

[0081] (2) Data labeling

[0082] Image data of different categories were labeled using the Labelimg data annotation tool. Logistics violations were categorized into three types: kicking, throwing, and trampling. Category 0 represents kicking, labeled "kick"; category 1 represents throwing, labeled "throw"; and category 2 represents trampling, labeled "trample". The files annotated according to the examples in Table 3 represent the labeled categories, the center coordinates of the normalized manually annotated bounding boxes, and the width and height of the bounding boxes. Finally, the dataset was randomly allocated into training and testing sets in an 8:2 ratio to obtain the dataset required for the experiment.

[0083] Table 3. Examples of Data Labeling

[0084]

[0085]

[0086] (3) Model evaluation indicators

[0087] Precision (P) and recall (R) are important metrics for evaluating model training results. Precision is the proportion of predicted bounding boxes that actually contain and are predicted to contain abusive behavior out of all predicted bounding boxes. Recall is the proportion of predicted bounding boxes that actually contain and are predicted to contain abusive behavior out of manually labeled bounding boxes. The formulas for calculating P and R are as follows (14-15), where TP represents the number of positive samples identified as positive, FP represents the number of positive samples identified as negative, and FN represents the number of negative samples identified as negative.

[0088]

[0089]

[0090] Average Precision (AP) and mean Average Precision (mAP) are important metrics for evaluating the performance of object detection models. Their calculation formulas are shown in equations (16-17). In these equations, AP represents the area enclosed by the PR curves, which reflect the relationship between precision and recall; mAP is the mean of the average precision for the three categories of kicking, throwing, and stomping.

[0091]

[0092]

[0093] (4) Experimental Results and Analysis

[0094] (i) Ablation experiment

[0095] To verify the effectiveness of the network modifications, the improvements were compared sequentially in Table 4. Here, "base" represents the unmodified YOLOv5 base version; Improvement 1 involves changing the C3 module to the GhostC3 module; Improvement 2 involves changing the Conv module to the LAconv module; and Improvement 3 involves changing the GIOU loss function to the CIOU loss function.

[0096] Table 4 Comparison of ablation experiments

[0097]

[0098] As shown in Table 4 above, the method of this invention has the highest mAP (96.1%), the smallest number of parameters (3.67M), and the fastest detection speed (16.7ms) for Improvement 1. Improvement 1 reduces mAP by 1.6%, reduces the number of parameters by 1.98M, and reduces detection time by 3.6ms compared to the base version; Improvement 2 increases mAP by 2.1%, reduces the number of parameters by 1.02M, and increases detection time by 2.6ms compared to the base version; Improvement 3 increases mAP by 1% compared to the base version, reduces the number of parameters by the same amount, and increases detection time by 0.3ms; the method of this invention increases mAP by 1.6%, reduces the number of parameters by 3.02%, and reduces detection time by 0.5ms compared to the base version. Therefore, the method of this invention significantly outperforms the base version and other improved methods in terms of mAP and parameter reduction, and effectively improves the algorithm performance for complex, high-noise images.

[0099] (ii) Comparative Experiment

[0100] To better demonstrate the advantages of the improved network model, it was trained using the same violation dataset under the same experimental environment. The training results are shown in Table 5.

[0101] (1) In terms of recognition accuracy, the mAP detected by the method of the present invention is 96.1%, which is higher than that of YOLOv3-tiny, YOLOx-tiny, YOLOv3, YOLOv3-spp, SSD, Centernet and YOLOv5, which are 14.3%, 3.5%, 6.7%, 5.8%, 7%, 5.7% and 1.6%, respectively;

[0102] (2) In terms of the number of parameters, the number of parameters in the method of the present invention is 3.67M, which is lower than that of YOLOv3-tiny, YOLOx-tiny, YOLOv3, YOLOv3-spp, SSD, Centernet and YOLOv5, which are 1.17M, 4.6M, 54.67M, 55.45M, 20.86M, 28.04M and 3.02M respectively.

[0103] (3) In terms of detection speed, the detection speed of a single image by the method of the present invention is 19.8ms, which is lower than that of YOLOv3, YOLOv3-spp, SSD, Centernet and YOLOv5 (62.5ms, 68.5ms, 73.2ms, 59ms and 0.5ms respectively), and slightly higher than that of YOLOv3-tiny and YOLOx-tiny (6.9ms and 5.7ms respectively).

[0104] (4) Regarding the accuracy of identifying single-type violations, the mAP of the method of this invention for kick detection is higher than that of YOLOv3-tiny, YOLOx-tiny, YOLOv3, YOLOv3-spp, SSD, and Centernet by 15.7%, 5.6%, 8.9%, 6.9%, 9.6%, and 5.4%, respectively, but slightly lower than that of the YOLOv5 algorithm by 2.6%. The mAP of the method of this invention for throwing detection is higher than that of YOLOv3-tiny, YOLOx-tiny, YOLOv3, YOLOv3-spp, SSD, Centernet, and YOLOv5 by 18.8%, 3.2%, 4.6%, 4.3%, 9.3%, 6.9%, and 5.4%, respectively. The mAP of the method of this invention for step detection is higher than that of YOLOv3-tiny, YOLOv3, YOLOv3-spp, SSD, and Centernet by 6.7%, 5%, 4.5%, 0.03%, and 3%, respectively.

[0105] A comparison of the proposed method with YOLOv3-tiny, YOLOx-tiny, YOLOv3, YOLOv3-spp, SSD, Centernet, and YOLOv5 in terms of mAP, single-image detection speed, model parameter count, and single-class violation recognition accuracy reveals that the proposed method achieves the highest mAP of 96.1%. Its single-class violation recognition accuracy, except for the foot kick violation, is generally higher than other algorithms. It has the smallest parameter count of 3.67M, and its single-image detection speed is slightly higher than YOLOv3-tiny and YOLOx-tiny, at 19.8ms. Therefore, the network structure of this invention achieves excellent detection results for complex, high-noise images, effectively reducing model parameter count and detection speed while maintaining improved mAP.

[0106] Table 5 Comparison of Single-Class Detection Results

[0107]

Claims

1. A method for detecting logistics violations in a noisy environment based on lightweight adversarial enhancement, characterized in that, The method includes the following steps: (1) Collect images of three types of abnormal express delivery operations: kicking, throwing, and trampling. Use these abnormal operation images as input feature maps. X ∈ R Cin×H×W Cin represents the number of channels, H represents the height, and W represents the width; the input feature map is processed by a function f ' conv The output feature map Y is obtained by reducing the number of channels and removing redundant channels after scaling factor s. ' : Where x is the input, A is the weight matrix, and B is the bias matrix; Then, a new feature map is obtained through linear operations. in y i yes Y' The i-th feature map in the function It refers to the j-th linear operation. Y ij It is an element of the output feature set, C out The number of dimensions of the matrix; (2) Given the input feature map X ∈ R Cin×H×W Global average pooling is used to compress the height H and width W of the feature matrix, and the output is a channel-dimensional vector. u= [ u 1, u 2, u 3,… u Cin ], FC 1 ( ) and FC 2 ( ) The formulas for calculating the fully connected layer and activation function are: (where is a linear transformation function) Where σ1 is the ReLU activation function and σ2 is the Sigmoid activation function, calculated as follows: The Conv module in Backbone and Neck is modified to LAconv module. The linear transformation in Ghostconv module is used as generator G, and the channel attention module is used as discriminator D. In the lightweight adversarial module, the linear transformation of generator G is used to generate a fake feature map similar to the real feature map and concatenate it with the real feature map with reduced channels. The fake feature map is then input into the channel attention module as a discriminator to distinguish the authenticity of the generated data. The two form an adversarial relationship. (3) Consider the aspect ratio and the relationship between the predicted box and the ground truth box, and set the loss function. Where IOU is the intersection-union ratio loss function. ρ ( b , b gt To minimize the Euclidean distance between the center points of the ground truth bounding box and the center point of the predicted bounding box, w gt 、h gt These represent the width and height of the target bounding box, respectively. w、h These represent the width and height of the target bounding box, respectively. (4) According to step (3), each image is input into the network to obtain a predicted label, and compared with the real label to obtain the training loss. The loss is backpropagated to optimize the parameters that can be optimized in the network. The above steps are repeated until the set number of training rounds ends. Finally, the prediction is completed, the image is input into the network, and no loss backpropagation is performed.

2. The method for detecting logistics violations in a high-noise environment based on lightweight anti-countermeasure enhancement as described in claim 1, characterized in that, The method also includes the following steps: (5) Calculation of model evaluation index Calculate the proportion P of all predicted bounding boxes that actually exhibited violations and were predicted to contain abnormal behavior. Calculate the proportion R of predicted bounding boxes that actually contain violations and are predicted to contain violations out of manually labeled bounding boxes. Where TP represents the number of positive samples identified as positive, FP represents the number of positive samples identified as negative, and FN represents the number of negative samples identified as negative. Calculate the mean average accuracy (mAP) for the three types of footwork: kicking, throwing, and stomping. In the formula, AP is the area enclosed by the curves formed by P and R, and n is the number of the three types of behaviors: kicking, throwing, and stomping.

Citation Information

Patent Citations

  • Lightweight YOLOv4 pedestrian detection method under view angle of unmanned aerial vehicle

    CN115359376A

  • Method for object detection and recognition based on neural network

    US20220292311A1