Dense pedestrian detection method based on improved YOLOv8

By improving YOLOv8's intensive pedestrian detection method, the problem of reduced pedestrian detection accuracy in complex environments is solved, the detection ability of small-size and occluded pedestrian objects is improved, and the model size is reduced.

CN119131886APending Publication Date: 2024-12-13ZHEJIANG SCI-TECH UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411077413.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing pedestrian detection methods have reduced the accuracy of pedestrian detection under crowded crowds, messy backgrounds, and different sizes and angles, making it difficult to accurately identify pedestrian targets.

Method used

The dense pedestrian detection method based on improved YOLOv8 is adopted, and the detection accuracy is improved by producing dense pedestrian detection data sets, adjusting the image size, extracting features, multi-scale feature fusion, and updating the YOLOv8 network weight.

Benefits of technology

Improve the pedestrian detection accuracy in complex environments, especially the detection ability of smaller sizes and occluded pedestrian objects, while reducing the model size.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131886A_ABST
    Figure CN119131886A_ABST
Patent Text Reader

Abstract

The invention discloses a dense pedestrian detection method based on improved YOLOv8. The method comprises the following steps: S1, making a dense pedestrian detection data set; s2, dividing the data set into a training set, a verification set and a test set; s3, inputting the training set in S2 into Backbone of YOLOv8 to extract features, and obtaining feature maps of different sizes; s4, inputting the feature map in the S3 into Neck of YOLOv8 to carry out multi-scale feature fusion; s5, inputting the feature map in the step S4 into Head of YOLOv8 for target detection and classification; s6, comparing the target detection and classification results in the step S5 with the real position information and category of the pedestrian object in the step S1, and updating the network weight of YOLOv8; s7, inputting the verification set in the step S2 into the YOLOv8 in the step S6, and calculating mAP; s8, judging whether the training round reaches a set round number or not, and if yes, executing S9; s7, if not, judging whether the mAP50 obtained in the S7 exceeds a set round and is not increased, if so, executing S9, and if not, returning to execute S3 to obtain trained YOLOv8; and S9, inputting a to-be-detected file into the YOLOv8 of the S8 for detection, and obtaining a result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of pedestrian detection, and in particular relates to a dense pedestrian detection method based on improved YOLOv8. Background Art

[0002] Pedestrian detection is a technology that uses computer vision technology to detect and locate pedestrians in images or videos. At present, pedestrian detection technology has been widely used in various scenarios including automobiles, drones, surveillance, etc. The use of pedestrian detection technology can greatly reduce the workload of manual monitoring and improve efficiency.

[0003] With the rapid development of the field of artificial intelligence and the enhancement of computer hardware computing power, some pedestrian detection methods have achieved a certain degree of accuracy and detection speed, but there are still some shortcomings: for example, when pedestrians appear in complex environments such as crowded crowds and cluttered backgrounds, the existing pedestrian detection methods are difficult to accurately identify pedestrian targets due to reasons such as blurred boundaries of pedestrians; at the same time, the size and angle of pedestrians in the image may change due to factors such as shooting distance and viewing angle, which will also affect the efficiency of pedestrian detection.

[0004] Therefore, it is necessary to design a dense pedestrian detection method to solve the above technical problems. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention provides a dense pedestrian detection method based on improved YOLOv8 to solve the problems of decreased pedestrian detection accuracy in crowded crowds, cluttered backgrounds, and pedestrians of different sizes and angles.

[0006] In order to achieve the above purpose, the technical solution adopted by the present invention is:

[0007] A dense pedestrian detection method based on improved YOLOv8, comprising the following steps:

[0008] S1. Create a dense pedestrian detection dataset and mark the real location information and category of pedestrian objects;

[0009] S2. Divide the dense pedestrian detection dataset into training set, validation set and test set;

[0010] S3. Resize the images in the training set of step S2 and input them into the Backbone part of YOLOv8 to extract features, and obtain feature maps of different sizes;

[0011] S4. Input the feature maps of different sizes obtained in step S3 into the Neck part of YOLOv8 for multi-scale feature fusion to obtain feature maps after multi-scale feature fusion of different sizes;

[0012] S5. Input the feature map obtained by fusion of multi-scale features of different sizes obtained in step S4 into the Head part of YOLOv8 for target detection and classification;

[0013] S6. Compare the target detection and classification results obtained in step S5 with the real position information and category of the pedestrian object in step S1 to perform bounding box regression, confidence score and category probability calculation, and update the network weights of YOLOv8 to obtain YOLOv8 after updating the network weights;

[0014] S7. Input the validation set in step S2 into the YOLOv8 after updating the network weights in step S6 and calculate mAP (mean average precision);

[0015] S8. Determine whether the training rounds have reached the set number of rounds. If so, execute step S9; if not, determine whether the mAP50 obtained in step S7 has not increased beyond the set number of rounds. If so, execute step S9; if not, return to execute step S3, and finally obtain the trained YOLOv8;

[0016] S9. Input the file to be detected into the trained YOLOv8 obtained in step S8 for detection and obtain the detection result.

[0017] Preferably, in step S1, a dense pedestrian detection dataset is produced, wherein the dense pedestrian detection dataset is composed of a number of image files containing a single or multiple pedestrians and their corresponding label files, wherein the label files mark the real location information and category of the pedestrian objects in the images.

[0018] Preferably, in step S2, the dense pedestrian detection dataset is randomly divided into a training set, a validation set and a test set in a ratio of 7:2:1, and saved in train, val and test files respectively, and a yaml file is created to save the pedestrian detection dataset parameters. The pedestrian detection dataset parameters saved in the yaml file include the path of the pedestrian detection dataset, the path of the train file, the path of the val file, the path of the test file and the detection target category, and the detection target category refers to pedestrians, named person.

[0019] Preferably, in step S3, the image size in the training set obtained in step S2 is adjusted to 640x640 and then input into the Backbone part of the improved YOLOv8 to extract features. The Backbone part of the improved YOLOv8 is a ten-layer network structure consisting of several Conv layers, C2f modules, C2fGhost modules and SPPF modules, and four feature maps of different sizes of 160x160, 80x80, 40x40 and 20x20 are obtained.

[0020] Preferably, in step S4, the feature maps of four different sizes obtained in step S3 are input into the Neck part of the improved YOLOv8 for multi-scale feature fusion, wherein the Neck part of the improved YOLOv8 is an eighteen-layer network structure consisting of several upsample layers, Concat layers, C2f modules, Conv layers and C2fGhost modules, and obtains feature maps after multi-scale feature fusion of four different sizes of 160x160, 80x80, 40x40 and 20x20.

[0021] Preferably, in step S5, the feature map obtained by fusing the multi-scale features of four different sizes obtained in step S4 is input into the Head part of the improved YOLOv8 for target detection and classification, and the Head part of the improved YOLOv8 is composed of several Detect modules.

[0022] Preferably, in step S7, the validation set in step S2 is input into the improved YOLOv8 after updating the network weights in step S6 and mAP is calculated, wherein the mAP includes mAP50 and mAP50-90.

[0023] Preferably, in step S9, the files to be detected are input into the trained improved YOLOv8 obtained in step S8 for detection and the detection results are obtained, wherein the files to be detected refer to several picture files or video files, and the detection results are several picture files or video files including the bounding box, category and confidence of the pedestrian object.

[0024] Furthermore, in step S3, the Backbone part of the improved YOLOv8 includes a first Conv layer, a second Conv layer, a first C2f module, a third Conv layer, a second C2f module, a fourth Conv layer, a third C2f module, a fifth Conv layer, a first C2fGhost module and an SPPF module connected in sequence.

[0025] Furthermore, in step S3, a feature map with a size of 160x160 is generated by the first C2f module, a feature map with a size of 80x80 is generated by the second C2f module, a feature map with a size of 40x40 is generated by the third C2f module, and a feature map with a size of 20x20 is generated by the SPPF module.

[0026] Further, in step S4, the improved Neck part of YOLOv8 includes a first upsample layer, a first Concat layer, a fourth C2f module, a second upsample layer, a second Concat layer, a fifth C2f module, a third upsample layer, a third Concat layer, a sixth C2f module, a sixth Conv layer, a fourth Concat layer, a seventh C2f module, a seventh Conv layer, a fifth Concat layer, a second C2fGhost module, an eighth Conv layer, a sixth Concat layer, and a third C2fGhost module.

[0027] Further, the Neck part of YOLOv8 is improved, the first upsample layer is connected to the SPPF module, the first Concat layer is connected to the first upsample layer and the third C2f module at the same time, the fourth C2f module is connected to the first Concat layer, the second upsample layer is connected to the fourth C2f module, the second Concat layer is connected to the second upsample layer and the second C2f module at the same time, the fifth C2f module is connected to the second Concat layer, the third upsample layer is connected to the fifth C2f module, the third Concat layer is connected to the third upsample layer and the first C2f module at the same time, the sixth C2f The module is connected to the third Concat layer, the sixth Conv layer is connected to the sixth C2f module, the fourth Concat layer is connected to the sixth Conv layer and the fifth C2f module at the same time, the seventh C2f module is connected to the fourth Concat layer, the seventh Conv layer is connected to the seventh C2f module, the fifth Concat layer is connected to the seventh Conv layer and the fourth C2f module at the same time, the second C2fGhost module is connected to the fifth Concat layer, the eighth Conv layer is connected to the second C2fGhost module, the sixth Concat layer is connected to the eighth Conv layer and the SPPF module at the same time, and the third C2fGhost module is connected to the sixth Concat layer.

[0028] Further, in step S4, the feature map after multi-scale feature fusion with a size of 160x160 is generated by the sixth C2f module, the feature map after multi-scale feature fusion with a size of 80x80 is generated by the seventh C2f module, the feature map after multi-scale feature fusion with a size of 40x40 is generated by the second C2fGhost module, and the feature map after multi-scale feature fusion with a size of 20x20 is generated by the third C2fGhost module.

[0029] Furthermore, the C2fGhost module uses GhostBottleneck instead of the Bottleneck of the original C2f module, and the GhostBottleneck includes two GhostConv layers, two optional DWConv layers and one optional Conv layer.

[0030] Further, in step S5, the Head part of YOLOv8 is improved, including a first Detect module, a second Detect module, a third Detect module and a fourth Detect module, the first Detect module is connected to the sixth C2f module to receive a feature map after multi-scale feature fusion with a size of 160x160, the second Detect module is connected to the seventh C2f module to receive a feature map after multi-scale feature fusion with a size of 80x80, the third Detect module is connected to the second C2fGhost module to receive a feature map after multi-scale feature fusion with a size of 40x40, and the fourth Detect module is connected to the third C2fGhost module to receive a feature map after multi-scale feature fusion with a size of 20x20.

[0031] Compared with the prior art, the advantages of the present invention are:

[0032] (1) The present invention further upsamples the feature map output by the fifth C2f module through the third upsample layer, then fuses the feature map generated by the first C2f through the third Concat layer, and refines and enhances the features through the sixth C2f module to generate a final feature map of size 160x160, which is input to the first Detect layer, thereby improving the detection capability of small-sized and obscured pedestrian objects.

[0033] (2) The present invention reduces the amount of calculation compared to the original C2f through the C2fGhost module, thereby reducing the size of the entire YOLOv8 model. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0035] Figure 1 This is a flowchart of a dense pedestrian detection method based on improved YOLOv8 in a preferred embodiment of the present invention;

[0036] Figure 2 A schematic diagram of a network structure involved in a preferred embodiment of the present invention;

[0037] Figure 3 This is a schematic diagram of the C2fGhost structure of a preferred embodiment of the present invention;

[0038] Figure 4 Schematic diagram of pedestrian detection effect of a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0040] The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0041] like Figure 1-Figure 4 As shown, a preferred embodiment of the present invention provides a dense pedestrian detection method based on improved YOLOv8, comprising the following steps:

[0042] S1. Create a dense pedestrian detection dataset;

[0043] Specifically: collect several pictures containing single or multiple pedestrians and save them as folders, import the folders into Roboflow to mark the real location information and categories of the pedestrian objects in the pictures, and save them after all the pictures are marked.

[0044] S2. Divide the dense pedestrian detection dataset;

[0045] Specifically: use Roboflow's "Split Images Between Train / Vaild / Test" to divide the dense pedestrian detection dataset saved in step S1 into a training set, a validation set, and a test set in a ratio of 7:2:1, and export a compressed package in the YOLOv8 format, the compressed package containing train, val, and test files, and then create a yaml file to save the pedestrian detection dataset parameters. The pedestrian detection dataset parameters saved in the yaml file include the path of the pedestrian detection dataset, the path of the train file, the path of the val file, the path of the test file, and the detection target category, the detection target category refers to pedestrians, named person.

[0046] S3. Input the training set into Backbone;

[0047] Specifically: Use the official training command of YOLOv8 to adjust the size of the images in the training set obtained in step S2 to 640x640 and then input them into the Backbone part of the improved YOLOv8 to extract features.

[0048] Furthermore, if Figure 2 As shown in the figure, the Backbone part of the improved YOLOv8 is a ten-layer network structure consisting of the first Conv layer, the second Conv layer, the first C2f module, the third Conv layer, the second C2f module, the fourth Conv layer, the third C2f module, the fifth Conv layer, the first C2fGhost module and the SPPF module connected in sequence. The function of the Conv layer is mainly to extract the local features of the image and reduce the spatial resolution. The function of the C2f module is mainly to extract the basic features of the image and enhance the features. The function of the C2fGhost module is mainly to reduce its computational cost based on the C2f module. The function of the SPPF module is mainly to process the features of images of different scales. Among them, the first C2f module generates a feature map with a size of 160x160, the second C2f module generates a feature map with a size of 80x80, the third C2f module generates a feature map with a size of 40x40, and the SPPF module generates a feature map with a size of 20x20.

[0049] Furthermore, Figure 3 As shown, in this embodiment, the C2fGhost module uses GhostBottleneck instead of the Bottleneck of the original C2f module, and the GhostBottleneck includes two GhostConv layers, two optional DWConv layers and one optional Conv layer, wherein the GhostConv layer and the optional Conv layer are used to adjust the number of channels, and the optional DWConv layer is used to reduce the amount of calculation and improve the calculation efficiency.

[0050] S4. Input the feature map to Neck;

[0051] like Figure 2As shown, the Neck part of the improved YOLOv8 is an 18-layer network structure consisting of a first upsample layer, a first Concat layer, a fourth C2f module, a second upsample layer, a second Concat layer, a fifth C2f module, a third upsample layer, a third Concat layer, a sixth C2f module, a sixth Conv layer, a fourth Concat layer, a seventh C2f module, a seventh Conv layer, a fifth Concat layer, a second C2fGhost module, an eighth Conv layer, a sixth Concat layer, and a third C2fGhost module. The upsample layer mainly serves to improve the spatial resolution, and the Concat layer serves to fuse the feature maps, wherein the sixth C2f module generates a feature map after multi-scale feature fusion with a size of 160x160, the seventh C2f module generates a feature map after multi-scale feature fusion with a size of 80x80, the second C2fGhost module generates the feature map after multi-scale feature fusion with a size of 40x40, and the third C2fGhost module generates a feature map after multi-scale feature fusion with a size of 20x20.

[0052] S5. Input the fused feature map to Head;

[0053] like Figure 2 As shown in the figure, the Head part of the improved YOLOv8 is composed of several Detect modules. The first Detect module is connected to the sixth C2f module to receive the feature map after multi-scale feature fusion with a size of 160x160; the second Detect module is connected to the seventh C2f module to receive the feature map after multi-scale feature fusion with a size of 80x80; the third Detect module is connected to the second C2fGhost module to receive the feature map after multi-scale feature fusion with a size of 40x40; the fourth Detect module is connected to the third C2fGhost module to receive the feature map after multi-scale feature fusion with a size of 20x20; the main function of the Detect module is to convert the feature map into the category, position and confidence information required for detection.

[0054] S6. Update network weights;

[0055] Specifically: comparing the target detection and classification results obtained in step S5 with the real position information and category of the pedestrian object in step S1 to perform bounding box regression, confidence score and category probability calculation, and updating the network weights of the improved YOLOv8;

[0056] Bounding box regression mainly predicts the position and size of the target object, and outputs the center coordinates (x, y) and width and length (w, h) of the corresponding bounding box; the confidence score mainly predicts whether each bounding box contains the target object, as well as the confidence of the target object; the category probability mainly predicts the probability that the target object belongs to each category.

[0057] S7. Input the validation set to the improved YOLOv8 after updating the weights;

[0058] Specifically: the validation set obtained in step S2 is input into the improved YOLOv8 after updating the network weights in step S6 and mAP is calculated, wherein mAP includes mAP50 and mAP50-90, and the main function of mAP is to judge the accuracy of the model.

[0059] S8. Determine whether the number of training rounds has reached the set number of rounds. If so, execute step S9; if not, determine whether the mAP50 obtained in step S7 has not increased beyond the set number of rounds. If so, execute step S9; if not, repeat steps S3 to S7 to finally obtain the improved YOLOv8 after training.

[0060] S9. Input the file to be detected into the improved YOLOv8 to obtain the result;

[0061] Specifically, use the official detection command of YOLOv8 to input the file to be detected into the trained improved YOLOv8 obtained in step S8 for detection and obtain the detection result.

[0062] The files to be detected refer to several image files or video files, such as Figure 4 As shown, the detection result is a plurality of picture files or video files including the bounding box, category and confidence of the pedestrian object.

[0063] In summary, the preferred embodiment of the present invention discloses a dense pedestrian detection method based on improved YOLOv8, which relates to the field of pedestrian detection. The method comprises the following steps: making a dense pedestrian detection data set, dividing the dense pedestrian detection data set, inputting the training set into Backbone, inputting the feature map into Neck, inputting the fused feature map into Head, updating the network weights, inputting the verification set into the improved YOLOv8 after updating the weights, judging whether the training rounds exceed 500 rounds and whether the mAP50 has not changed for more than 50 rounds, otherwise continue training, and finally input the file to be detected into the improved YOLOv8 to obtain the result. The present invention detects the additionally generated feature map of size 160x160 through the newly added third upsample layer, the third Concat layer, the sixth C2f module and the first Detect layer to improve the detection capability of pedestrian objects with smaller size and obstruction, and at the same time reduces the amount of calculation through the designed C2fGhost module, thereby reducing the size of the model.

[0064] It should be noted that, in this application, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0065] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A dense pedestrian detection method based on improved YOLOv8, characterized in that: The steps include: S1. Create a dense pedestrian detection dataset and mark the real location information and category of pedestrian objects; S2. Divide the dense pedestrian detection dataset into training set, validation set and test set; S3. Resize the images in the training set of step S2 and input them into the Backbone part of YOLOv8 to extract features, and obtain feature maps of different sizes; S4. Input the feature maps of different sizes obtained in step S3 into the Neck part of YOLOv8 for multi-scale feature fusion to obtain feature maps after multi-scale feature fusion of different sizes; S5. Input the feature map obtained by fusion of multi-scale features of different sizes obtained in step S4 into the Head part of YOLOv8 for target detection and classification; S6. Compare the target detection and classification results obtained in step S5 with the real position information and category of the pedestrian object in step S1 to perform bounding box regression, confidence score and category probability calculation, and update the network weights of YOLOv8 to obtain YOLOv8 after updating the network weights; S7. Input the validation set in step S2 into the YOLOv8 after updating the network weights in step S6 and calculate the mean average precision mAP; S8. Determine whether the training rounds have reached the set number of rounds. If so, execute step S9; if not, determine whether the mAP50 obtained in step S7 has not increased beyond the set number of rounds. If so, execute step S9; if not, return to execute step S3, and finally obtain the trained YOLOv8; S9. Input the file to be detected into the trained YOLOv8 obtained in step S8 for detection and obtain the detection result.

2. A dense pedestrian detection method based on improved YOLOv8 as claimed in claim 1, characterized in that: In step S1, the dense pedestrian detection dataset is composed of a number of image files containing a single or multiple pedestrians and their corresponding label files, and the label files mark the real position information and category of the pedestrian objects in the images.

3. A dense pedestrian detection method based on improved YOLOv8 as claimed in claim 1 or 2, characterized in that: In step S2, the dense pedestrian detection dataset is randomly divided into a training set, a validation set, and a test set in a ratio of 7:2:1, and saved in train, val, and test files, respectively. A yaml file is created to save the pedestrian detection dataset parameters. The pedestrian detection dataset parameters saved in the yaml file include the path of the pedestrian detection dataset, the path of the train file, the path of the val file, the path of the test file, and the detection target category. The detection target category refers to pedestrians, named person.

4. A dense pedestrian detection method based on improved YOLOv8 as claimed in claim 1, characterized in that: In step S3, the image size in the training set obtained in step S2 is adjusted to 640x640 and then input into the Backbone part of YOLOv8 to extract features. The Backbone part of YOLOv8 includes the first Conv layer, the second Conv layer, the first C2f module, the third Conv layer, the second C2f module, the fourth Conv layer, the third C2f module, the fifth Conv layer, the first C2fGhost module and the SPPF module connected in sequence, and four feature maps of different sizes of 160x160, 80x80, 40x40 and 20x20 are obtained.

5. A dense pedestrian detection method based on improved YOLOv8 as claimed in claim 4, characterized in that: In step S3, a feature map with a size of 160x160 is generated by the first C2f module, a feature map with a size of 80x80 is generated by the second C2f module, a feature map with a size of 40x40 is generated by the third C2f module, and a feature map with a size of 20x20 is generated by the SPPF module.

6. A dense pedestrian detection method based on improved YOLOv8 as claimed in claim 4, characterized in that: In step S4, the feature maps of four different sizes obtained in step S3 are input into the Neck part of YOLOv8 for multi-scale feature fusion, wherein the Neck part of YOLOv8 includes a first upsample layer, a first Concat layer, a fourth C2f module, a second upsample layer, a second Concat layer, a fifth C2f module, a third upsample layer, a third Concat layer, a sixth C2f module, a sixth Conv layer, a fourth Concat layer, a seventh C2f module, a seventh Conv layer, a fifth Concat layer, a second C2fGhost module, an eighth Conv layer, a sixth Concat layer, and a third C2fGhost module, and feature maps after multi-scale feature fusion of four different sizes of 160x160, 80x80, 40x40, and 20x20 are obtained.

7. A dense pedestrian detection method based on improved YOLOv8 as claimed in claim 6, characterized in that: The first upsample layer is connected to the SPPF module, the first Concat layer is connected to the first upsample layer and the third C2f module, the fourth C2f module is connected to the first Concat layer, the second upsample layer is connected to the fourth C2f module, the second Concat layer is connected to the second upsample layer and the second C2f module, the fifth C2f module is connected to the second Concat layer, the third upsample layer is connected to the fifth C2f module, the third Concat layer is connected to the third upsample layer and the first C2f module, and the sixth C2f module is connected to the third Conca The sixth Conv layer is connected to the sixth C2f module, the fourth Concat layer is connected to the sixth Conv layer and the fifth C2f module at the same time, the seventh C2f module is connected to the fourth Concat layer, the seventh Conv layer is connected to the seventh C2f module, the fifth Concat layer is connected to the seventh Conv layer and the fourth C2f module at the same time, the second C2fGhost module is connected to the fifth Concat layer, the eighth Conv layer is connected to the second C2fGhost module, the sixth Concat layer is connected to the eighth Conv layer and the SPPF module at the same time, and the third C2fGhost module is connected to the sixth Concat layer.

8. A dense pedestrian detection method based on improved YOLOv8 as claimed in claim 7, characterized in that: In step S4, the feature map after multi-scale feature fusion with a size of 160x160 is generated by the sixth C2f module, the feature map after multi-scale feature fusion with a size of 80x80 is generated by the seventh C2f module, the feature map after multi-scale feature fusion with a size of 40x40 is generated by the second C2fGhost module, and the feature map after multi-scale feature fusion with a size of 20x20 is generated by the third C2fGhost module.

9. A dense pedestrian detection method based on improved YOLOv8 as claimed in claim 7, characterized in that: The C2fGhost module uses GhostBottleneck, which includes two GhostConv layers, two optional DWConv layers and one optional Conv layer.

10. A dense pedestrian detection method based on improved YOLOv8 as described in any one of claims 7 to 9, characterized in that: In step S5, the Head part of YOLOv8 includes a first Detect module, a second Detect module, a third Detect module and a fourth Detect module. The first Detect module is connected to the sixth C2f module to receive a feature map after multi-scale feature fusion with a size of 160x160; the second Detect module is connected to the seventh C2f module to receive a feature map after multi-scale feature fusion with a size of 80x80; the third Detect module is connected to the second C2fGhost module to receive a feature map after multi-scale feature fusion with a size of 40x40; the fourth Detect module is connected to the third C2fGhost module to receive a feature map after multi-scale feature fusion with a size of 20x20.

Citation Information

Cited By

  • Dangerous chemical vehicle detection method and device based on CSSN structure and ESPPF, and medium

    CN118038383A

  • Lightweight book ladder mark detection method and system based on improved YOLOv8

    CN120783185A