Aiming at the problems of low precision and high model complexity of crowded pedestrian detection algorithms, an improved crowded pedestrian detection algorithm YOLOv5_CDA was proposed based on YOLOv5. First, a C3CA module was designed in the backbone network, and the Coordinate Attention (CA) mechanism was introduced in the last layer to improve the network's ability of capturing local important features. Secondly, the α-IoU loss function was introduced to improve the model's focus on the high Intersection over Union (IoU) targets, thus improving regression accuracy of the bounding box. Thirdly, the detection scale in the neck network was changed to improve the algorithm's ability to detect dense small targets. Finally, the decoupled head was used to calculate the different branches respectively to improve the detection accuracy. Experimental results show that the YOLOv5_CDA algorithm has excellent test performance on the representative pedestrian detection dataset WiderPerson. It has the AP0.5 and AP0.5:0.95 of 90.3% and 63.7%, respectively, with improvements of 1.7% and 3.2% over the YOLOv5 algorithm, and the average missed detection rate decreased by 20%, and the number of parameters decreased by 25.3%. It can be seen that after the overall improvement of the network structure, the YOLOv5_CDA algorithm has the performance improved significantly, without consuming too much memory resources, and can be widely used in crowded pedestrian detection.