Deep learning-based pedestrian image target detection method, system, device and storage medium

By improving the Backbone and Neck layers of the YOLOv8 model and adopting the C2f-DPS module and a hybrid multi-type attention module, the problems of missed detection and false detection in the YOLOv8 model for small pedestrian image target detection are solved, thus improving the detection accuracy.

CN120496173BActive Publication Date: 2026-02-27CHANGCHUN UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510559997.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2026-02-27
Estimated Expiration
2045-04-30

AI Technical Summary

Technical Problem

The existing YOLOv8 model is prone to missed detections and false detections when detecting small pedestrian images, and its feature extraction capability is insufficient.

Method used

In the Backbone and Neck layers of the YOLOv8 model, the C2f module is replaced with the C2f-DPS module, and a hybrid multi-type attention module is inserted between the upsampling and downsampling paths of the Neck layer to improve the target detection of small-target pedestrian images by the YOLOv8 model.

Benefits of technology

It improves the accuracy of detecting small pedestrian targets, reduces missed detections and false detections, and increases the detection accuracy in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120496173B_ABST
    Figure CN120496173B_ABST
Patent Text Reader

Abstract

The application discloses a pedestrian image target detection method, system and device based on deep learning and a storage medium, belongs to the technical field of computer vision, and solves the problem of missed detection and false detection caused by the insufficient small-size pedestrian image target feature extraction capability of an existing YOLOv8 model. The method comprises the following steps: S1, after obtaining a pedestrian image dataset, preprocessing the pedestrian image dataset; S2, constructing an improved YOLOv8 model, specifically, replacing a C2f module with a C2f-DPS module in a Backbone layer and a Neck layer of the YOLOv8 model, and inserting a mixed multi-type attention module between an up-sampling path and a down-sampling path in the Neck layer of the YOLOv8 model; S3, training the improved YOLOv8 model respectively to obtain a trained YOLOv8 model, and performing target detection on the preprocessed pedestrian image dataset based on the trained YOLOv8 model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer vision, in particular to a pedestrian image target detection method, system and device based on deep learning and a storage medium. BACKGROUND

[0002] Pedestrian detection is one of the core research directions in the field of computer vision, and its core task is to realize accurate identification and precise spatial positioning of pedestrians in digital images or video streams through algorithm models. This technology has multiple values in modern scenarios: it enables people flow statistics and danger warning in intelligent transportation systems, builds pedestrian trajectory prediction capabilities for autonomous vehicles, and supports customer flow heat analysis in commercial scenarios. In the face of challenges such as occlusion, light changes, and multi-scale targets in complex urban environments, this technology continues to evolve and iterate, integrating deep learning, multi-modal perception, and small sample learning, and continuously improving detection robustness in dense crowds, low light at night, and cross-camera scenarios.

[0003] In the prior art, the YOLOv8 architecture mainly includes four parts: Input layer, Backbone layer, Neck layer and Head layer. The Input layer is responsible for inputting the image to be detected into the network, the Backbone layer extracts features from the image, then the Neck layer is responsible for pooling and feature fusion of the input feature layer, and finally the Head layer outputs. Therefore, the YOLOv8 model supports image classification, target detection and instance segmentation tasks.

[0004] The most significant improvement of YOLOv8 is its excellent scalability, but when using the existing YOLOv8 for pedestrian image target detection, there are still the following problems: most pedestrian targets are small size targets, their pixel area is small and densely distributed, and they are prone to missed detection, false detection and other situations.

[0005] In summary, the existing YOLOv8 model applied to pedestrian image target detection has the problem of missed detection, false detection and other situations due to insufficient feature extraction capability for small size targets. SUMMARY

[0006] The present application solves the problem of missed detection, false detection and other situations caused by the insufficient feature extraction capability of the existing YOLOv8 model for small size pedestrian image targets.

[0007] The pedestrian image target detection method based on deep learning provided by the present application comprises the following steps:

[0008] Step S1, after obtaining the pedestrian image dataset, pre-process the pedestrian image dataset;

[0009] Step S2, construct an improved YOLOv8 model, specifically;

[0010] In the Backbone layer and the Neck layer of the YOLOv8 model, the C2f module is replaced by a C2f-DPS module, and a mixed multi-type attention module is inserted between the up-sampling and down-sampling paths in the Neck layer of the YOLOv8 model.

[0011] In step S3, the improved YOLOv8 model is trained to obtain a trained YOLOv8 model, and the preprocessed pedestrian image dataset is detected based on the trained YOLOv8 model.

[0012] Further, in an embodiment of the present application, in step S2, the C2f-DPS module specifically comprises:

[0013] After the pedestrian image passes through the Conv, it is divided into two paths by the Split layer, one path of pedestrian feature image is dynamically path-selected, and then concatenated with the other path of pedestrian feature image, and finally the feature fusion is performed through the DPS.

[0014] Further, in an embodiment of the present application, the one path of pedestrian feature image is dynamically path-selected, specifically:

[0015] The one path of pedestrian feature image generates a gate signal through the Dynamic Gate, and judges whether to activate the Bottleneck according to the gate signal, if the Bottleneck is activated, then multi-scale dilated convolution is performed, otherwise, the Gradient Mask is applied.

[0016] Further, in an embodiment of the present application, in step S2, the mixed multi-type attention module fuses the channel attention branch and the spatial attention branch through dynamic weight fusion.

[0017] Further, in an embodiment of the present application, the mixed multi-type attention module fuses the channel attention branch and the spatial attention branch through dynamic weight fusion, specifically:

[0018] The pedestrian image is divided into two paths, one path sequentially passes through the spatial attention branch, the global average pooling, the activation function, the full connection layer and the broadcast layer, and outputs the one path of pedestrian feature image, the other path sequentially passes through the channel attention branch, the Conv, the activation function and the broadcast layer, and outputs the other path of pedestrian feature image, the one path of pedestrian feature image and the other path of pedestrian feature image are jointly input into the dynamic weight feature fusion for fusion, and then the fused pedestrian feature image is output.

[0019] The pedestrian image target detection system based on deep learning provided by the present application comprises the following modules:

[0020] Module S1, after obtaining the pedestrian image dataset, pre-processing the pedestrian image dataset;

[0021] Module S2, constructing an improved YOLOv8 model, specifically,

[0022] In the Backbone layer and the Neck layer of the YOLOv8 model, the C2f module is replaced by the C2f-DPS module, and a mixed multi-type attention module is inserted between the up-sampling and down-sampling paths in the Neck layer of the YOLOv8 model;

[0023] Module S3, training the improved YOLOv8 model respectively, obtaining a trained YOLOv8 model, and performing target detection on the pre-processed pedestrian image dataset based on the trained YOLOv8 model.

[0024] The electronic device provided by the application comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are in communication with each other through the communication bus.

[0025] The memory is used for storing a computer program.

[0026] The processor is used for executing the program stored on the memory, so as to realize the method steps described above.

[0027] The computer readable storage medium provided by the application stores a computer program, and the computer program is executed by the processor to realize the method steps described above.

[0028] The application solves the problem of missing detection and false detection caused by the insufficient small-size pedestrian image target feature extraction capability of the existing YOLOv8 model.

[0029] 1. The pedestrian image target detection method based on deep learning provided by the application solves the problem of missing detection and false detection caused by the insufficient small-size pedestrian image target feature extraction capability of the existing YOLOv8 model.

[0030] 2. The pedestrian image target detection method based on deep learning provided by the present application, the existing C2f module has low segmentation accuracy for small target pedestrian images, thereby affecting the ability of small target feature extraction. To solve the above technical problems, the C2f-DPS module is designed in the present application. However, directly and simply combining the C2f module and the DPS module will affect the training stability of the C2f residual structure. To overcome the above technical difficulties, the present application applies a mask to the gradient of the unactivated branch during back propagation, avoiding invalid gradient interference with the main path, and adding L1 sparsity constraint to the gating weight to promote the stability of path selection. The C2f-DPS module can segment the image with high precision.

[0031] 3. The pedestrian image target detection method based on deep learning provided by the present application, the Neck layer in the existing YOLOv8 model will produce small target detection performance decline, complex background interference and false detection, and insufficient multi-scale target processing capability in complex scene or high precision demand detection task. To solve the above technical problems, the present application introduces an attention mechanism in the Neck layer of the YOLOv8 model. However, a single attention mechanism not only cannot handle complex scene or high precision demand detection tasks, but also has limitations. To overcome the above technical difficulties, the present application inserts a hybrid multi-type attention module between the up-sampling and down-sampling paths in the Neck layer of the YOLOv8 model. The hybrid multi-type attention module not only improves the detection accuracy of small target pedestrians in complex environments, but also solves the limitations of single attention mechanism. BRIEF DESCRIPTION OF DRAWINGS

[0032] The above aspects and / or additional aspects and advantages of the present application will become apparent and easy to understand from the following description of the embodiments, combined with the accompanying drawings, in which:

[0033] Figure 1 is a C2f-DPS module structure diagram according to embodiment two;

[0034] Figure 2 is a hybrid multi-type attention module structure diagram according to embodiment three;

[0035] Figure 3 is a comparison chart of detection results of the YOLOv8 model and the improved YOLOv8 model according to embodiment three;

[0036] Figure 4 is a comparison chart of detection results of the YOLOv8 model and the improved YOLOv8 model according to embodiment three;

[0037] Figure 5 is a comparison chart of detection results of the YOLOv8 model and the improved YOLOv8 model according to embodiment three. DETAILED DESCRIPTION

[0038] The various embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings. The embodiments described by reference to the drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application.

[0039] Embodiment one, the pedestrian image target detection method based on deep learning in the embodiment comprises the following steps:

[0040] Step S1, after obtaining the pedestrian image dataset, the pedestrian image dataset is preprocessed;

[0041] Step S2, an improved YOLOv8 model is constructed, specifically;

[0042] In the Backbone layer and the Neck layer of the YOLOv8 model, the C2f module is replaced by the C2f-DPS module, and a mixed multi-type attention module is inserted between the up-sampling and down-sampling paths in the Neck layer of the YOLOv8 model;

[0043] Step S3, the improved YOLOv8 model is trained respectively, and a trained YOLOv8 model is obtained, and the preprocessed pedestrian image dataset is detected based on the trained YOLOv8 model.

[0044] In the prior art, the pedestrian target image is mostly occluded, with varying light and multi-scale small targets in a complex urban environment. Directly using the existing YOLOv8 for small target detection will easily cause missed detection, false detection and other situations.

[0045] In order to solve the above technical problems, the present embodiment proposes a pedestrian image target detection method based on deep learning based on the improved YOLOv8, comprising the following steps:

[0046] Step S1, after obtaining the pedestrian image dataset, the pedestrian image dataset is preprocessed, specifically;

[0047] 1) Prepare the dataset:

[0048] The algorithm improved in the embodiment is trained and verified using the disclosed data set Crowd Human to evaluate its performance and effectiveness in pedestrian detection tasks. CrowdHuman is a standardized image database in the field of computer vision focusing on high-density pedestrian detection research. As the largest benchmark data set for crowd pedestrian detection, it consists of 24,370 high-quality labeled images, divided into three subsets: 15,000 training samples, 5,000 test samples, and 4,370 validation samples. Data collection covers typical high-traffic areas such as urban business districts, transportation hubs, and public event venues. The image materials are sourced from real-life shooting in multiple metropolises around the world, ensuring scene diversity covering day and night periods, different weather conditions, and multi-angle shooting requirements.

[0049] The difficulties of this data set are mainly reflected in: highly dense pedestrian distribution leading to severe occlusion between individuals (an average of 46 visible human targets per frame), diverse pedestrian poses (including walking, running, stationary, and other motion states), and target recognition problems under complex lighting conditions, which pose challenges for model training and evaluation.

[0050] 2) Preprocess the images in the data set:

[0051] The Mosaic image data augmentation method is a data preprocessing method. The model uses the Mosaic data augmentation method to preprocess the input data, which has the following advantages: first, it enriches the background information of the picture and increases the diversity of the sample; second, since four pictures are spliced into one picture, the targets in the four pictures are concentrated in 10 pictures, increasing the number of targets; third, four pictures are spliced together, indirectly increasing the batch size, which can better calculate the mean and variance when performing BN operation. The main operation steps of the Mosaic image data augmentation method are as follows: first, select the center point of the picture splicing as the position center for subsequent picture splicing; second, randomly read four pictures from the data set at once for scaling or cropping operation, then distribute the four preliminarily processed pictures in the order of top left, bottom left, bottom right, and top right; third, according to the size transformation method of each picture, the mapping relationship is corresponded to the picture label; fourth, according to the specified horizontal and vertical coordinates, the pictures are spliced, and the bounding box coordinates exceeding the boundary are processed. The pictures processed by the Mosaic data augmentation method not only have more complex background information, but also have a higher probability of containing small targets, improving the model's ability to detect small target pedestrians.

[0052] Step S2, build the improved YOLOv8 model, specifically:

[0053] In the Backbone layer and the Neck layer of the YOLOv8 model, the C2f module is replaced with a C2f-DPS module, and a mixed multi-type attention module is inserted between the up-sampling and down-sampling paths in the Neck layer of the YOLOv8 model.

[0054] The improved YOLOv8 model is improved on the basis of the existing YOLOv8 model, which includes a Backbone (main network), a Neck (feature fusion layer), and a Head (detection head), and the other parts are the existing YOLOv8 model, which will not be described here.

[0055] Step S3, the improved YOLOv8 model is trained respectively to obtain a trained YOLOv8 model, and the preprocessed pedestrian image dataset is detected based on the trained YOLOv8 model.

[0056] The model is pre-trained using the pre-trained weights provided by Ultralytics, the learning rate a is set to 0.01, the Adam optimizer is selected for optimization, the binary cross-entropy loss is used for classification loss, and the CioU LOSS is used for regression loss, the model is assigned to the GPU for mixed precision training, and the obtained weight is saved.

[0057] Therefore, the present embodiment improves the existing YOLOv8 model, detects small target pedestrian images based on the improved YOLOv8 model, avoids missing detection and false detection, and improves the accuracy of pedestrian detection in target detection.

[0058] Embodiment two, the present embodiment is a further limitation of the pedestrian image target detection method based on deep learning according to embodiment one, in step S2, the C2f-DPS module is specifically:

[0059] The pedestrian image is processed by Conv, then split into two paths, one path of pedestrian feature image is processed by dynamic path selection, then concatenated with another path of pedestrian feature image, and finally fused by DPS.

[0060] In the present embodiment, the one path of pedestrian feature image is processed by dynamic path selection, specifically:

[0061] The one path of pedestrian feature image generates a gate signal by Dynamic Gate, and determines whether to activate the Bottleneck according to the gate signal, if the Bottleneck is activated, it is processed by multi-scale dilated convolution, otherwise, Gradient Mask is applied.

[0062] The existing C2f module is used for target detection in images of small pedestrians, but its image segmentation accuracy is not high, which affects its ability to extract features from small targets.

[0063] To solve the above technical problems, such as Figure 1 As shown, this implementation improves upon the existing C2f module by proposing a C2f-DPS module. The input feature X is divided into Part A and Part B via Conv1×1. A dynamic gating mechanism is added, and Part B enters the dynamically gated branch, generating a gating signal g. The activation of the current Bottleneck is determined based on g. It should be noted that if the existing C2f module is simply combined with the DPS module (i.e., the existing dynamic convolution module) to form a module, the gating mechanism of this module will lead to insufficient gradient updates in some paths, especially when the gating value is close to 0, which will affect the training stability of the C2f module's residual structure. To solve this technical problem, this implementation applies a mask to the gradient of the inactive branch during backpropagation to avoid invalid gradients interfering with the main path. At the same time, L1 sparsity constraints are added to the gating weights to promote the stability of path selection. In Bottleneck, dilated convolutions are introduced to enhance the receptive field, enabling the output to dynamically select feature paths based on the input, i.e., adaptive feature fusion. Unimportant branches are closed, and the outputs of all branches are concatenated and fused through the DPS module, avoiding gradient interference from invalid paths, reducing computation by 20%, and improving training stability.

[0064] Therefore, this embodiment improves the existing C2f module to form the C2f-DPS module, which performs feature extraction in the Backbone and Neck layers of the YOLOv8 model and can segment images with high accuracy.

[0065] Implementation Method 3: This implementation method further defines the deep learning-based pedestrian image target detection method described in Implementation Method 1. In step S2, the hybrid multi-type attention module fuses channel attention branches and spatial attention branches through dynamic weight fusion.

[0066] In this embodiment, the hybrid multi-type attention module fuses channel attention branches and spatial attention branches through dynamic weight fusion, specifically as follows:

[0067] The pedestrian image is divided into two paths. One path passes through a spatial attention branch, global average pooling, activation function, fully connected layer, and broadcast layer in sequence, and outputs a pedestrian feature image. The other path passes through a channel attention branch, Conv, activation function, and broadcast layer in sequence, and outputs another pedestrian feature image. The pedestrian feature images from the two paths are input together into dynamic weight feature fusion for fusion, and the fused pedestrian feature image is output.

[0068] In the prior art, in the Neck layer in the YOLOv8 model, the three feature layers output in the Backbone are respectively denoted as P3 (80x80), P4 (40x40) and P5 (20x20). The main role of the SPPF is to fuse the high-dimensional features and low-dimensional features output in the Backbone. Firstly, the P5 is processed in parallel by a multi-scale maximum pooling layer (5x5, 9x9 and 13x13) to output P5' (20x20), enhance the receptive field, and the P5' is up-sampled, that is, convolution is performed to obtain P4 (40x40). The P5' and the P4 are concatenated to output N4_temp (40x40). In this way, the N4_temp output fuses high-dimensional and low-dimensional features, so that the feature information is more abundant. Secondly, the N4_temp is up-sampled to N3_temp (80x80), and the N3_temp and the P3 (80x80) are concatenated to output N3 (80x80 for detecting small targets). The bottom layer feature is returned, the N3 is down-sampled to N3_down (40x40), and the N3_down and the N4_temp (40x40) are concatenated to output N4 (40x40 for detecting medium targets). The N4 is 3x3 convoluted to N4_down (20x20), and the down-sampled N4_down and the P5' (20x20 for detecting large targets) are finally output. The three hierarchical feature maps: N3 (80x80) are used to detect small targets, N4 (40x40) is used to detect medium-sized targets, and N5 (20x20) is used to detect large targets such as pedestrians occupying the entire image. Therefore, although the Neck layer in the existing YOLOv8 model can fuse features and extract key feature information, in a complex scene or a high-precision detection task, the following problems may occur: such as the decline of small target detection performance, complex background interference and false detection, and insufficient multi-scale target processing capability.

[0069] To solve the above technical problems, the present embodiment proposes introducing an attention mechanism into the Neck layer in the YOLOv8 model. However, the existing single attention mechanism such as SENet and CBAM uses different weights in space and channel to enhance the attention of the target region, that is, introducing the existing single attention mechanism into the Neck layer in the YOLOv8 model not only cannot well handle complex background interference and false detection, but also has the problem of limitation.

[0070] To solve the above technical problems, as Figure 2As shown, the embodiment proposes to insert a hybrid multi-type attention module between the up-sampling and down-sampling paths in the Neck layer of the YOLOv8 model, which aims to utilize information in both channel and spatial dimensions, and dynamically fuse the two attention mechanisms through weights, the channel attention is used to learn the importance of different channels and enhance the response of key feature channels, and the spatial attention is used to learn the importance of spatial positions and focus on target regions, and the dynamic weight fusion automatically balances the contribution ratio of the two attentions through learnable parameters, avoiding artificial preset fixed weights.

[0071] The mathematical expression of the hybrid multi-type attention module is:

[0072] Let the input feature map be X∈T C×H×W , and the hybrid attention output be Y∈R C×H×W .

[0073] 1) Channel attention branch:

[0074] The channel attention weight W c ∈R C×1×1 :

[0075] W c =σ(Conv 1×1 (ReLU(Conv 1×1 (GAP(X)))));

[0076] Where GAP is global average pooling, output R C×1×1 , Conv 1×1 two fully connected layers (implemented by 1×1 convolution), with ReLU activation in between, and σ is the Sigmoid function, which normalizes the weight to [0,1].

[0077] 2) Spatial attention branch:

[0078] The spatial attention weight W s ∈R 1×H×W :

[0079] W s =σ(Conv 3×3 (X));

[0080] Where Conv 3×3 is a convolutional layer that compresses the channel number to 1, preserving spatial information, and σ is the Sigmoid function, generating a spatial weight map.

[0081] 3) Dynamic fusion:

[0082] The final weight W fused ∈R C×H×W :

[0083] Wfused = a · W c + (1 - a) · W s ;

[0084] where a is a learnable scalar parameter (initial value is 0.5) optimized by backpropagation.

[0085] 4) Output:

[0086]

[0087] where, denotes element-wise multiplication (broadcast mechanism).

[0088] By adjusting the dynamic weight a, the fixed ratio (such as the channel and spatial weights in CBAM which are hard-coded to be sequentially executed) can be avoided, and the adaptive adjustment according to the input content can be achieved.

[0089] Therefore, the present embodiment can not only solve the problems of the existing YOLOv8 model, such as the decline of small target detection performance, complex background interference and false detection, and insufficient multi-scale target processing capability in complex scene or high-precision detection tasks, but also solve the limitations of single attention mechanism, helping the model to better locate and identify targets. In addition, the introduced mixed multi-type attention module is computationally efficient, and compared with the existing CBAM, the parameter amount is only 1 scalar (a), and the FLOPs is almost the same.

[0090] In order to better illustrate the pedestrian image target detection method based on deep learning described in the above embodiment, the following examples are described in detail:

[0091] As shown in Figures 3-5 , it is a comparison chart of the detection results of the YOLOv8 model and the improved YOLOv8 model, wherein the left chart is the detection result chart of the YOLOv8 model, and the right chart is the detection result chart of the improved YOLOv8 model. As can be seen, the YOLOv8 model has good detection effect on nearby and unobstructed pedestrians, but it is prone to miss detection and false detection for distant and obstructed pedestrians. In comparison, the improved YOLOv8 model not only has good detection effect on nearby and unobstructed pedestrians, but also greatly reduces the problems of miss detection and false detection for distant and obstructed pedestrians.

[0092] Embodiment four, the pedestrian image target detection system based on deep learning described in the present embodiment comprises the following modules:

[0093] Module S1, after obtaining the pedestrian image dataset, the pedestrian image dataset is preprocessed.

[0094] Module S2, constructing an improved YOLOv8 model, specifically,

[0095] In the Backbone layer and the Neck layer of the YOLOv8 model, the C2f module is replaced by the C2f-DPS module, and a mixed multi-type attention module is inserted between the up-sampling and down-sampling paths in the Neck layer of the YOLOv8 model.

[0096] Module S3, training the improved YOLOv8 model respectively to obtain a trained YOLOv8 model, and performing target detection on the pre-processed pedestrian image dataset based on the trained YOLOv8 model.

[0097] Embodiment five, an electronic device according to the embodiment, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;

[0098] The memory is used to store a computer program.

[0099] The processor is used to execute the program stored on the memory, and realize the method steps of the embodiment one.

[0100] Embodiment six, a computer readable storage medium according to the embodiment, the computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the method steps of the embodiment one.

[0101] The above describes in detail the method, system, device and storage medium for pedestrian image target detection based on deep learning according to the present application. This paper applies specific examples to explain the principle and implementation of the present application. The above examples are only used to help understand the method and its core idea of the present application. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation and application range will be changed. In conclusion, the content of this specification should not be understood as a limitation of the present application.

Claims

1. A pedestrian image target detection method based on deep learning, characterized in that, The method comprises the following steps: Step S1, after obtaining a pedestrian image dataset, pre-processing the pedestrian image dataset; Step S2, constructing an improved YOLOv8 model, specifically, In the Backbone layer and the Neck layer of the YOLOv8 model, the C2f module is replaced by a C2f-DPS module, and a mixed multi-type attention module is inserted between the up-sampling and down-sampling paths in the Neck layer of the YOLOv8 model; Step S3, training the improved YOLOv8 model respectively to obtain a trained YOLOv8 model, and performing target detection on the pre-processed pedestrian image dataset based on the trained YOLOv8 model; In the step S2, the C2f-DPS module specifically comprises: After the pedestrian image passes through the Conv, it is divided into two paths by the Split layer, one path of pedestrian feature image is subjected to dynamic path selection, and then is concatenated with another path of pedestrian feature image, and finally the feature fusion is performed through the DPS; The one path of pedestrian feature image is subjected to dynamic path selection, specifically, The one path of pedestrian feature image generates a gate signal through the Dynamic Gate, and judges whether to activate the Bottleneck according to the gate signal, if the Bottleneck is activated, the multi-scale dilated convolution is performed, otherwise, the Gradient Mask is applied; In the step S2, the mixed multi-type attention module fuses the channel attention branch and the spatial attention branch through dynamic weight fusion. 2.The pedestrian image target detection method based on deep learning according to claim 1, characterized in that, The mixed multi-type attention module fuses the channel attention branch and the spatial attention branch through dynamic weight fusion, specifically, The pedestrian image is divided into two paths, one path of pedestrian feature image is output after sequentially passing through the spatial attention branch, the global average pooling, the activation function, the fully connected layer and the broadcast layer, and another path of pedestrian feature image is output after sequentially passing through the channel attention branch, the Conv, the activation function and the broadcast layer, and the one path of pedestrian feature image and the another path of pedestrian feature image are jointly input into the dynamic weight feature fusion for fusion, and then the fused pedestrian fusion feature image is output.

3. A pedestrian image object detection system based on deep learning, characterized by, The method comprises the following modules: Module S1, after obtaining a pedestrian image dataset, pre-processing the pedestrian image dataset; Module S2, constructing an improved YOLOv8 model, specifically, In the Backbone layer and the Neck layer of the YOLOv8 model, the C2f module is replaced by a C2f-DPS module, and a mixed multi-type attention module is inserted between the up-sampling and down-sampling paths in the Neck layer of the YOLOv8 model; Module S3, training the improved YOLOv8 model respectively to obtain a trained YOLOv8 model, and performing target detection on the pre-processed pedestrian image dataset based on the trained YOLOv8 model; In the module S2, the C2f-DPS module specifically comprises: The pedestrian image is subjected to Conv, and then is subjected to Split layer to be divided into two paths, one path of pedestrian feature image is subjected to dynamic path selection, and then is subjected to Concat with the other path of pedestrian feature image, and finally is subjected to feature fusion through DPS; The one path of pedestrian feature image is subjected to dynamic path selection, specifically: The one path of pedestrian feature image is subjected to Dynamic Gate to generate a gate signal, and whether to activate a bottleneck is judged according to the gate signal, if the bottleneck is activated, multi-scale hollow convolution is subjected to, otherwise, Gradient Mask is applied; In the module S2, the mixed multi-type attention module fuses the channel attention branch and the spatial attention branch through dynamic weight fusion.

4. An electronic device, comprising: The device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus. The memory is used for storing a computer program. The processor is used for executing the program stored on the memory, and realizes the steps of the method in any one of claims 1-2.

5. A computer readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the steps of the method in any one of claims 1-2.

Citation Information

Patent Citations

  • Garbage detection method in complex scene based on improved YOLOv8 model

    CN117710771A

  • Crab detection and counting method and device based on instance segmentation, medium and product

    CN118799716A