The invention discloses a multi-
pedestrian target detection method based on a YOLOCDG network in a complex scene, and aims to solve the problems of
small target missing detection, model redundancy and inaccurate positioning in multi-
pedestrian detection in a scene with dense people flow and serious shielding. The method comprises the following steps: firstly, based on YOLOv8, deleting a redundant
convolution fusion layer of a
backbone network, adjusting the size of a detection head, and simplifying a framework to reduce
small target feature
dilution; secondly, designing a context attention module CoAM and embedding the CoAM into a
backbone network, and enhancing feature distinction degree in a shielding scene by capturing cross-target context association of dense pedestrians; thirdly, an improved C2fG module is proposed to replace a neck C2f module, the parameter quantity is reduced, and the
detection performance and the edge deployment efficiency in a complex scene are balanced; then, an SPPFDSC multi-scale fusion layer containing depth separable
convolution is designed, an original SPPF layer is replaced, and fine-grained feature
perception of small-size pedestrians in the distance is enhanced; and finally, optimizing a bounding box
loss function by adopting WIOU v3, improving the target positioning precision in the dense people
stream, and finally constructing a multi-
pedestrian detection model.