The task of high-density heterogeneous traffic flow scenarios presents several challenges, including insufficient monitoring accuracy, limited adaptability to complex environments, and low computational efficiency. Currently, most existing traffic flow monitoring models have enhanced their performance through optimized architectures and lightweight designs. However, they still struggle with issues, such as vulnerability to interference, instability in complex tracking scenarios, and inadequate cross-domain generalization. This paper proposes a novel approach that enhances object detection and tracking by integrating attention mechanisms and feature reuse strategies. Specifically, a Convolutional Block Attention Module (CBAM) is incorporated into a baseline object detection framework to dynamically weight channel and spatial features, thereby improving detection robustness under challenging conditions such as occlusion and low light. To further refine the tracking process, the backbone of the DeepSORT algorithm is replaced with a Densely Connected Convolutional Network (DenseNet), enabling multi-level feature reuse and richer target appearance representation. As a result, this approach effectively mitigates issues like identity switching and trajectory fragmentation when tracking vehicles and pedestrians. Although the proposed enhancements are demonstrated within a specific object detection and tracking framework, the fundamental contributions—namely, attention-enhanced detection and dense feature aggregation—are widely transferable and can be applied across various detection and tracking architectures. The experimental results indicate that the proposed model achieves an improvement in detection accuracy by 1.7% and a recall enhancement by 1.4%; while also significantly reducing the miss detection rate in scenarios characterized by multi-object overlap and complex urban environments. Our model strikes a balance between accuracy and real-time performance for traffic flow monitoring in intelligent transportation systems.