Pedestrian detection method based on YOLOv7
By improving the YOLOv7 network, adopting partial convolution and Shuffle Attention mechanisms, and combining the MPDIOU function optimization model, the accuracy and real-time problems of occluded pedestrian detection are solved, and lightweight and efficient pedestrian detection is achieved.
Patent Information
- Application Number
- CN202510775597.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-12
AI Technical Summary
Existing CNN-based pedestrian detection methods lack accuracy when dealing with occlusion situations, have large model parameters and high computational complexity, and are difficult to deploy on mobile devices and meet real-time detection requirements.
An improved YOLOv7 network is adopted. By introducing the PA_ELAN module with partial convolution and Shuffle Attention mechanism, the C_CBS module with coordinate convolution and the SPPCSPC_ATT module with Shuffle Attention, and combining the MPDIOU function as the loss function, the lightweight design of the model is optimized to improve the accuracy and real-time performance of occluded pedestrian detection.
It achieves efficient and accurate pedestrian detection in occlusion conditions, reduces the number of model parameters and computing requirements, is suitable for real-time detection on existing mobile devices, and reduces dependence on human resources.
Smart Images

Figure CN120635947A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a pedestrian detection method based on YOLOv7. Background Art
[0002] Intelligent surveillance is a crucial component of smart city development. The security monitoring systems formed by these cameras safeguard people's property and lives, but this also leads to a rapid increase in the amount of surveillance information. Traditional surveillance systems often require a significant amount of manpower to manually review massive amounts of video footage, lacking efficient and accurate search methods. This is not only time-consuming, but also easily leads to missed critical reconnaissance opportunities during the lengthy search process.
[0003] With the continuous advancement of deep learning technology and the gradual reduction of computational costs, automated detection methods based on convolutional neural networks (CNNs) have become the preferred technical approach for tackling pedestrian detection problems. However, in real-world scenarios, cameras are deployed in outdoor environments, where pedestrians are often obscured. Existing CNN-based pedestrian detection methods face significant challenges when processing such images, which directly impacts detection accuracy. While some methods have achieved high accuracy, their large number of model parameters and high computational complexity hinder deployment on existing mobile devices and fail to meet the requirements of real-time detection. While the traditional YOLOv7 method has made progress in model lightweighting, parameter reduction, and detection speed, enabling real-time detection of pedestrians, it still suffers from missed and false detections in some pedestrian detection processes. Therefore, a pedestrian detection method based on YOLOv7 is needed to address these issues. Summary of the Invention
[0004] The purpose of the present invention is to provide a pedestrian detection method based on YOLOv7 to solve the problems existing in the prior art proposed in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A pedestrian detection method based on YOLOv7, comprising the following steps:
[0007] S1: Construct dataset D and divide it into training set D LLVIP-train , test set D LLVIP-test and validation set D LLVIP-val ;
[0008] S2: Mosaic data enhancement technology is used to preprocess the images in the LLVIP dataset and unify the image size to obtain the LLVIP' dataset;
[0009] S3: Build the network model PCAM-YOLOv7;
[0010] S4: Input all images in the dataset LLVIP' into the network model PCAM-YOLOv7 in sequence, and obtain the prediction information of the bounding box of each image respectively;
[0011] S5: Use training set D LLVIP-train Train the network model PCAM-YOLOv7;
[0012] S6: Use the validation set D LLVIP-val Verify the performance of the trained model and output the average accuracy of the model for image detection in each round;
[0013] S7: Use the MPDIOU function as the bounding box loss function during training to calculate the loss value L MPDIOU ;
[0014] S8: When the loss value L MPDIOU On the validation set D LLVIP-val When the value does not decrease for x consecutive times, stop training, output the model weight file best.pt with the highest average accuracy, and go to step S9; otherwise, go to step S5 and retrain;
[0015] S9: Use the model weight file best.pt to detect pedestrian targets.
[0016] Preferably, the specific steps of constructing the network model PCAM-YOLOv7 in S3 are:
[0017] S31: Select the YOLOv7 network as the initial network model. The YOLOv7 network includes a backbone network, a neck network, and a head network. The backbone network includes M convolution blocks, N MP downsampling modules, and an ELAN module. The neck network fuses features in a bottom-up and top-down manner and consists of an SPPCSPC module, K upsampling modules and downsampling modules, M splicing modules, N ELANs, and an ELAN-H module. The head network includes N object detection heads.
[0018] S32: Improve the backbone network of YOLOv7 by introducing the ShuffleAttention module and partial convolution into the ELAN module in the YOLOv7 backbone network. Replace the 3×3 normal convolution in the ELAN module with partial convolution and construct the PA_ELAN module to obtain the new backbone network Backbone-PA, which is used to improve model performance and reduce memory access times.
[0019] S33: Improve the neck network of YOLOv7 by introducing coordinate convolution into the CBS module in the neck network of YOLOv7 to construct the C_CBS module; introduce the Shuffle Attention module into the SPPCSPC module to construct the SPPCSPC_ATT module to obtain the new Neck-C, which is used to improve the model's feature extraction capabilities;
[0020] S34: Improve the head network of YOLOv7. Introduce coordinate convolution to replace the original reparameterized convolution in the YOLOv7 head network to obtain a new head network Head-C, which improves the model's pedestrian detection ability.
[0021] Preferably, obtaining prediction information of a bounding box of an image in S4 comprises the following steps:
[0022] S41: Input the i-th image in the dataset LLVIP' into the backbone network Backbone-PA to generate the pedestrian feature map X * (i,j) ; Where i represents the i-th image in the dataset; j = 1, 2, 3, represents the channel dimension;
[0023] S42: feature map X * (i,j) Input into the neck network Neck-C to generate enhanced feature maps O1, O2, O3;
[0024] S43: Input the enhanced feature maps O1, O2, and O3 into the head network of the network module PCAM-YOLOv7;
[0025] S44: Use the object detection head in the head network to perform multi-scale prediction on the enhanced feature maps O1, O2, and O3, and output the prediction information of the i-th image bounding box.
[0026] Preferably, the specific steps of S41 are:
[0027] S411: The input image i is processed by M convolution blocks in the backbone network Backbone-PA, increasing the image channel dimension to 64;
[0028] S412: Obtain feature maps X(i, j) of different channel dimensions through the ELAN module, N MPs, and PA_ELAN combination modules in the backbone network Backbone-PA in sequence;
[0029] S413: Divide the feature map X(i,j) into g groups of sub-features along the channel dimension, that is, X(i,j) = [X1, X2, ... X g ]; Each sub-feature Xm It will be divided into two branch features X along the channel dimension m1 and X m2 , respectively input into the channel attention unit and the spatial attention unit;
[0030] S414: Use the channel attention module in the PA_ELAN module to m1 The channel attention coefficient c is obtained by processing, and the calculation formula is as follows:
[0031]
[0032] Where: H represents the height of the input feature map, W represents the width of the input feature map;
[0033] S415: X m1 Generate a nonlinear feature X through a Sigmoid m1 ', the generation formula is as follows:
[0034] X m1 '=σ(w c c+b c )·X m1
[0035] Where: w c represents the scaling factor of c, b c represents the offset coefficient of c, σ represents the Sigmoid operation;
[0036] S416: Use the spatial attention module in the PA_ELAN module to m2 The spatial attention coefficient s is obtained by processing, and the calculation formula is as follows:
[0037]
[0038] Where: ε represents a small constant, taking ε∈(0,1);
[0039] S417: Generate a nonlinear feature X by passing Xm2 through a Sigmoid m2 ', the generation formula is as follows:
[0040] X m2 '=σ(w s s+b s )·X m2
[0041] Where: w s represents the scaling factor of s, b s represents the offset coefficient of s, and σ represents the Sigmoid operation;
[0042] S418: X m1' and X m2 'Splice on the channel dimension and perform channel shuffling operation at the same time to obtain the final feature output X * (i,j) .
[0043] Preferably, the specific steps of generating the enhanced feature maps O1, O2, and O3 in S42 are:
[0044] S421: Input the global feature map X*(i,j) into the neck network Neck-C;
[0045] S422: Use the SPPCSPC_ATT module in the neck network Neck-C to perform a pooling operation on the feature map X*(i,3) and output a feature map A1 with rich multi-scale features;
[0046] S423: Feature map A1 is processed by C_CBS convolution block and upsampling, and is concatenated with feature map X*(i,2), and feature map A2 is obtained by E-ELAN module;
[0047] S424: Feature map A2 is processed by C_CBS convolution block and upsampling, and then concatenated with feature map X*(i,1) to obtain feature map S1. Feature map S1 is passed through E-ELAN module to obtain feature map O1.
[0048] S425: After the feature map O1 is downsampled by MP and spliced with the feature map A2, the feature map S2 is obtained. The feature map S2 is passed through the E-ELAN module to obtain the feature map O2;
[0049] S426: After the feature map O2 is downsampled by MP and spliced with the feature map A1, the feature map S3 is obtained. The feature map S3 is passed through the E-ELAN module to obtain the feature map O3.
[0050] Preferably, the prediction information of the image bounding box in S44 includes the category and coordinates of the detection target.
[0051] Preferably, the unified image size resolution in S2 is set to 640×640.
[0052] Preferably, L in S7 MPDIOU The calculation is as follows:
[0053]
[0054] Where: A and B are two arbitrary rectangles, representing the range covered by the true bounding box and the range covered by the predicted box respectively. Represents the distance between the two points in the upper left corner of the real bounding box and the predicted box, Represents the distance between the two points in the lower right corner of the true bounding box and the predicted box, and w and h represent the length and width of the input image.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] 1. This paper adopts the PA_ELAN module that integrates partial convolution and Shuffle Attention mechanism, the C_CBS module that integrates coordinate convolution, and the SPPCSPC_ATT module that integrates Shuffle Attention mechanism. It can not only efficiently and accurately identify occluded pedestrian targets, but also significantly improve the detection accuracy.
[0057] 2. This invention uses coordinate convolution to replace the heavy parameterized convolution in the original head network, and introduces the MPDIOU function as the target loss function, thereby further optimizing the lightweight design of the model, ensuring a low number of parameters and computing requirements, enabling it to be smoothly deployed on existing mobile devices, and realizing the real-time detection of pedestrians, reducing dependence on human resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 This is a flow chart of the pedestrian detection method based on YOLOv7 in the present invention.
[0059] Figure 2 This is the improved YOLOv7 network diagram in the present invention.
[0060] Figure 3 This is a partial convolution structure diagram in the present invention.
[0061] Figure 4 This is the coordinate convolution structure diagram of the present invention.
[0062] Figure 5 This is the structural diagram of the Shuffle Attention module in the present invention. DETAILED DESCRIPTION
[0063] In order to make the technical means, creative features, objectives and effects achieved by the present invention easier to understand, the present invention is further described below in conjunction with specific implementation methods.
[0064] See also Figure 1-5 , the present invention provides the following technical solutions:
[0065] A pedestrian detection method based on YOLOv7, characterized by comprising the following steps:
[0066] S1: Construct dataset D and divide it into training set D LLVIP-train , test set D LLVIP-test and validation set DLLVIP-val .
[0067] S2: Mosaic data enhancement technology is used to preprocess the images in the dataset LLVIP, unify the image size, and obtain the dataset LLVIP'. In a specific embodiment of the present invention, the unified image size resolution is set to 640×640.
[0068] S3: Build the network model PCAM-YOLOv7. The specific steps for building the network model PCAM-YOLOv7 are:
[0069] S31: Select the YOLOv7 network as the initial network model. The YOLOv7 network includes a backbone network, a neck network, and a head network. The backbone network includes M convolution blocks, N MP downsampling modules, and an ELAN module. The neck network fuses features in a bottom-up and top-down manner and consists of an SPPCSPC module, K upsampling modules and downsampling modules, M splicing modules, N ELANs, and an ELAN-H module. The head network includes N object detection heads.
[0070] S32: Improve the backbone network of YOLOv7 by introducing the ShuffleAttention module and partial convolution into the ELAN module in the YOLOv7 backbone network. Replace the 3×3 normal convolution in the ELAN module with partial convolution and construct the PA_ELAN module to obtain the new backbone network Backbone-PA, which is used to improve model performance and reduce memory access times.
[0071] S33: Improve the neck network of YOLOv7 by introducing coordinate convolution into the CBS module in the neck network of YOLOv7 to construct the C_CBS module; introduce the Shuffle Attention module into the SPPCSPC module to construct the SPPCSPC_ATT module to obtain the new Neck-C, which is used to improve the model's feature extraction capabilities;
[0072] S34: Improve the head network of YOLOv7. Introduce coordinate convolution to replace the original reparameterized convolution in the YOLOv7 head network to obtain a new head network Head-C, which improves the model's pedestrian detection ability.
[0073] S4: Input all images in the dataset LLVIP' into the network model PCAM-YOLOv7 in sequence, and obtain the prediction information of the bounding box of each image respectively; obtaining the prediction information of the bounding box of an image includes the following steps:
[0074] S41: Input the i-th image in the dataset LLVIP' into the backbone network Backbone-PA to generate the pedestrian feature map X *(i,j) ; where i represents the i-th image in the dataset; j = 1, 2, 3, represents the channel dimension; the specific steps of S41 are:
[0075] S411: The input image i is processed by M convolution blocks in the backbone network Backbone-PA, increasing the image channel dimension to 64;
[0076] S412: Obtain feature maps X(i, j) of different channel dimensions through the ELAN module, N MPs, and PA_ELAN combination modules in the backbone network Backbone-PA in sequence;
[0077] S413: Divide the feature map X(i,j) into g groups of sub-features along the channel dimension, that is, X(i,j) = [X1, X2, ... X g ]; Each sub-feature X m It will be divided into two branch features X along the channel dimension m1 and X m2 , respectively input into the channel attention unit and the spatial attention unit;
[0078] S414: Use the channel attention module in the PA_ELAN module to m1 The channel attention coefficient c is obtained by processing, and the calculation formula is as follows:
[0079]
[0080] Where: H represents the height of the input feature map, W represents the width of the input feature map;
[0081] S415: X m1 Generate a nonlinear feature X through a Sigmoid m1 ', the generation formula is as follows:
[0082] X m1 '=σ(w c c+b c )·X m1
[0083] Where: w c represents the scaling factor of c, b c represents the offset coefficient of c, σ represents the Sigmoid operation;
[0084] S416: Use the spatial attention module in the PA_ELAN module to m2 The spatial attention coefficient s is obtained by processing, and the calculation formula is as follows:
[0085]
[0086] Where: ε represents a small constant, taking ε∈(0,1);
[0087] S417: Generate a nonlinear feature X by passing Xm2 through a Sigmoid m2 ', the generation formula is as follows:
[0088] X m2 '=σ(w s s+b s )·X m2
[0089] Where: w s represents the scaling factor of s, b s represents the offset coefficient of s, and σ represents the Sigmoid operation;
[0090] S418: X m1 ' and X m2 'Splice on the channel dimension and perform channel shuffling operation at the same time to obtain the final feature output X * (i,j) .
[0091] S42: feature map X * (i,j) Input into the neck network Neck-C to generate enhanced feature maps O1, O2, O3; the specific steps for generating enhanced feature maps O1, O2, O3 are:
[0092] S421: Input the global feature map X*(i,j) into the neck network Neck-C;
[0093] S422: Use the SPPCSPC_ATT module in the neck network Neck-C to perform a pooling operation on the feature map X*(i,3) and output a feature map A1 with rich multi-scale features;
[0094] S423: Feature map A1 is processed by C_CBS convolution block and upsampling, and is concatenated with feature map X*(i,2), and feature map A2 is obtained by E-ELAN module;
[0095] S424: Feature map A2 is processed by C_CBS convolution block and upsampling, and then concatenated with feature map X*(i,1) to obtain feature map S1. Feature map S1 is passed through E-ELAN module to obtain feature map O1.
[0096] S425: After the feature map O1 is downsampled by MP and spliced with the feature map A2, the feature map S2 is obtained. The feature map S2 is passed through the E-ELAN module to obtain the feature map O2;
[0097] S426: After the feature map O2 is downsampled by MP and spliced with the feature map A1, the feature map S3 is obtained. The feature map S3 is passed through the E-ELAN module to obtain the feature map O3.
[0098] S43: Input the enhanced feature maps O1, O2, and O3 into the head network of the network module PCAM-YOLOv7;
[0099] S44: Use the target detection head in the head network to perform multi-scale prediction on the enhanced feature maps O1, O2, and O3, and output the prediction information of the i-th image bounding box. The prediction information of the image bounding box includes the category and coordinates of the detected target.
[0100] S5: Use training set D LLVIP-train Train the network model PCAM-YOLOv7.
[0101] S6: Use the validation set D LLVIP-val Verify the performance of the trained model and output the average accuracy of the model for image detection in each round.
[0102] S7: Use the MPDIOU function as the bounding box loss function during training to calculate the loss value L MPDIOU , to improve the generalization of the model, L MPDIOU The calculation is as follows:
[0103]
[0104] Where: A and B are two arbitrary rectangles, representing the range covered by the true bounding box and the range covered by the predicted box respectively. Represents the distance between the two points in the upper left corner of the real bounding box and the predicted box, Represents the distance between the two points in the lower right corner of the true bounding box and the predicted box, and w and h represent the length and width of the input image.
[0105] S8: When the loss value L MPDIOU On the validation set D LLVIP-val When the value does not decrease for x consecutive times, stop training, output the model weight file best.pt with the highest average accuracy, and go to step S9; otherwise, go to step S5 and retrain.
[0106] S9: Use the model weight file best.pt to detect pedestrian targets.
[0107] The present invention adds PA_ELAN, which includes partial convolution and Shuffle Attention modules, to the backbone network, so that the model focuses on pedestrian features during feature extraction and reduces the number of memory accesses. The SPPCSPC_ATT module including the Shuffle Attention mechanism and the C_CBS module including coordinate convolution are added to the neck network, so that the model further focuses on spatial and channel information when extracting features. Coordinate convolution is used to replace the original reparameterized convolution in the head network, so that the model focuses on pedestrian targets during detection. During the training process, the MPDIOU function is used as the bounding box loss function to improve the model's generalization ability.
[0108] The patent of this invention proposes a pedestrian detection method based on improved YOLOv7 for pedestrian detection. It uses the public dataset LLVIP as the dataset for training, and uses the trained model weights for pedestrian detection, which effectively reduces the manpower input in detecting pedestrian targets, improves the detection rate, and reduces the number of model parameters, thereby better meeting the needs of video pedestrian detection.
[0109] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A pedestrian detection method based on YOLOv7, characterized in that: The following steps are involved: S1: Construct dataset D and divide it into training set D LLVIP-train , test set D LLVIP-test and validation set D LLVIP-val ; S2: Mosaic data enhancement technology is used to preprocess the images in the LLVIP dataset and unify the image size to obtain the LLVIP' dataset; S3: Build the network model PCAM-YOLOv7; S4: Input all images in the dataset LLVIP' into the network model PCAM-YOLOv7 in sequence, and obtain the prediction information of the bounding box of each image respectively; S5: Use training set D LLVIP-train Train the network model PCAM-YOLOv7; S6: Use the validation set D LLVIP-val Verify the performance of the trained model and output the average accuracy of the model for image detection in each round; S7: Use the MPDIOU function as the bounding box loss function during training to calculate the loss value L MPDIOU ; S8: When the loss value L MPDIOU On the validation set D LLVIP-val When the value does not decrease for x consecutive times, stop training, output the model weight file best.pt with the highest average accuracy, and go to step S9; Otherwise, go to step S5 and retrain; S9: Use the model weight file best.pt to detect pedestrian targets.
2. A pedestrian detection method based on YOLOv7 according to claim 1, characterized in that: The specific steps for constructing the network model PCAM-YOLOv7 in S3 are: S31: Select the YOLOv7 network as the initial network model. The YOLOv7 network includes a backbone network, a neck network, and a head network. The backbone network includes M convolution blocks, N MP downsampling modules, and an ELAN module. The neck network fuses features in a bottom-up and top-down manner and consists of an SPPCSPC module, K upsampling modules and downsampling modules, M splicing modules, N ELANs, and an ELAN-H module. The head network includes N object detection heads. S32: Improve the backbone network of YOLOv7 by introducing the ShuffleAttention module and partial convolution into the ELAN module in the YOLOv7 backbone network. Replace the 3×3 normal convolution in the ELAN module with partial convolution and construct the PA_ELAN module to obtain the new backbone network Backbone-PA, which is used to improve model performance and reduce memory access times. S33: Improve the neck network of YOLOv7 by introducing coordinate convolution into the CBS module in the neck network of YOLOv7 to construct the C_CBS module; introduce the Shuffle Attention module into the SPPCSPC module to construct the SPPCSPC_ATT module to obtain the new Neck-C, which is used to improve the model's feature extraction capabilities; S34: Improve the head network of YOLOv7. Introduce coordinate convolution to replace the original reparameterized convolution in the YOLOv7 head network to obtain a new head network Head-C, which improves the model's pedestrian detection ability.
3. The pedestrian detection method based on YOLOv7 according to claim 1, characterized in that: Obtaining prediction information of a bounding box of an image in S4 includes the following steps: S41: Input the i-th image in the dataset LLVIP' into the backbone network Backbone-PA to generate the pedestrian feature map X * (i,j) ; Where i represents the i-th image in the dataset; j = 1, 2, 3, represents the channel dimension; S42: feature map X * (i,j) Input into the neck network Neck-C to generate enhanced feature maps O1, O2, O3; S43: Input the enhanced feature maps O1, O2, and O3 into the head network of the network module PCAM-YOLOv7; S44: Use the object detection head in the head network to perform multi-scale prediction on the enhanced feature maps O1, O2, and O3, and output the prediction information of the i-th image bounding box.
4. The pedestrian detection method based on YOLOv7 according to claim 3, characterized in that: The specific steps of S41 are: S411: The input image i is processed by M convolution blocks in the backbone network Backbone-PA, increasing the image channel dimension to 64; S412: Obtain feature maps X(i, j) of different channel dimensions through the ELAN module, N MPs, and PA_ELAN combination modules in the backbone network Backbone-PA in sequence; S413: Divide the feature map X(i,j) into g groups of sub-features along the channel dimension, that is, X(i,j) = [X1, X2, ... X g ]; Each sub-feature X m It will be divided into two branch features X along the channel dimension m1 and X m2 , respectively input into the channel attention unit and the spatial attention unit; S414: Use the channel attention module in the PA_ELAN module to m1 The channel attention coefficient c is obtained by processing, and the calculation formula is as follows: Where: H represents the height of the input feature map, W represents the width of the input feature map; S415: X m1 Generate a nonlinear feature X through a Sigmoid m1 ', the generation formula is as follows: X m1 ’=σ(w c c+b c )·X m1 Where: w c represents the scaling factor of c, b c represents the offset coefficient of c, σ represents the Sigmoid operation; S416: Use the spatial attention module in the PA_ELAN module to m2 The spatial attention coefficient s is obtained by processing, and the calculation formula is as follows: Where: ε represents a small constant, taking ε∈(0,1); S417: Generate a nonlinear feature X by passing Xm2 through a Sigmoid m2 ', the generation formula is as follows: X m2 ’=σ(w s s+b s )·X m2 Where: w s represents the scaling factor of s, b s represents the offset coefficient of s, and σ represents the Sigmoid operation; S418: X m1 ' and X m2 'Splice on the channel dimension and perform channel shuffling operation at the same time to obtain the final feature output X * (i,j) .
5. The pedestrian detection method based on YOLOv7 according to claim 3, characterized in that: The specific steps of generating the enhanced feature maps O1, O2, and O3 in S42 are as follows: S421: Input the global feature map X*(i,j) into the neck network Neck-C; S422: Use the SPPCSPC_ATT module in the neck network Neck-C to perform a pooling operation on the feature map X*(i,3) and output a feature map A1 with rich multi-scale features; S423: Feature map A1 is processed by C_CBS convolution block and upsampling, and is concatenated with feature map X*(i,2), and feature map A2 is obtained by E-ELAN module; S424: Feature map A2 is processed by C_CBS convolution block and upsampling, and then concatenated with feature map X*(i,1) to obtain feature map S1. Feature map S1 is passed through E-ELAN module to obtain feature map O1. S425: After the feature map O1 is downsampled by MP and spliced with the feature map A2, the feature map S2 is obtained. The feature map S2 is passed through the E-ELAN module to obtain the feature map O2; S426: After the feature map O2 is downsampled by MP and spliced with the feature map A1, the feature map S3 is obtained. The feature map S3 is passed through the E-ELAN module to obtain the feature map O3.
6. The pedestrian detection method based on YOLOv7 according to claim 3, characterized in that: The prediction information of the image bounding box in S44 includes the category and coordinates of the detected target.
7. The pedestrian detection method based on YOLOv7 according to claim 1, characterized in that: The uniform image size resolution in S2 is set to 640×640.
8. The pedestrian detection method based on YOLOv7 according to claim 1, characterized in that: The S7 L MPDIOU The calculation is as follows: Where: A and B are two arbitrary rectangles, representing the range covered by the true bounding box and the range covered by the predicted box respectively. Represents the distance between the two points in the upper left corner of the real bounding box and the predicted box, Represents the distance between the two points in the lower right corner of the true bounding box and the predicted box, and w and h represent the length and width of the input image.
Citation Information
Cited By
Pedestrian flow monitoring method and system for dense sitting posture scene
CN120877213A
A method and system for crowd supervision in dense sitting scenarios
CN120877213B