# An Improved CrowdDet Algorithm for Traffic Congestion Detection in Expressway Scenarios
## 4 Experimental Results and Performance Analysis
### Using IBCDet to Implement Traffic Congestion Detection  
In traffic congestion detection, obtaining the number of vehicles is crucial. From the above experiments, it can be observed that the proposed IBCDet algorithm in this paper can more accurately detect vehicles under traffic congestion. Additionally, measuring vehicle speed is an essential parameter in traffic congestion detection. To validate the effectiveness of the proposed traffic congestion detection method based on the IBCDet algorithm, a specific segment of the Nanjing Raoyue expressway was selected for verification. This segment is a dual six-lane road with a design speed of 120 km/h. The monitoring video of the downstream section of this road was chosen for experimental validation within a two-hour timeframe. First, to validate the accuracy of speed measurement, this paper combines the YOLOv5 algorithm and the IBCDet algorithm with the DeepSort algorithm for vehicle tracking. The average speed of vehicles at various time intervals in the surveillance video is calculated using Equation (5) proposed in this paper. The accuracy of calculating is evaluated, and the results are presented in Table 7. It can be observed that the IBCDet algorithm achieves the best performance in terms of both vehicle count and vehicle speed accuracy. Further explanation is provided to demonstrate the effectiveness of our proposed traffic congestion detection method compared to other methods. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Method** & **AP\%** & **MR\({}^{-2}\)\%** & **JI\%** \\ \hline SSD & 89.30 & 54.00 & - \\ Faster RCNN & 90.36 & 49.00 & - \\ YOLOv5 & 94.91 & 34.00 & - \\ YOLOv7 & 95.69 & 30.00 & - \\ CrowdDet & 96.78 & 15.47 & 88.73 \\
**IBCDet (Ours)** & **97.49** & **14.38** & **90.43** \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Comparison of results between different methods on UA-DETRAC. The best results are highlighted in bold. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Method** & **AP\%** & **MR\({}^{-2}\)\%** & **JI\%** \\ \hline ResNet+FPN & 94.04 & 30.26 & 74.76 \\
**ResNet+BiFPN** & **95.19** & **27.20** & **75.07** \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Ablation experiments. The best results are highlighted in bold. Subsequently, the average speed of vehicles at different time points within the surveillance video is calculated by combining the IBCDet algorithm with the DeepSort algorithm, and Figure 8 is plotted accordingly. Based on Table 1, the entire process of vehicle congestion in Figure 8 is divided into five traffic states. The speed distribution and speed confidence intervals of the road segment are analyzed to determine the congestion threshold. Finally, based on the intensity of speed variations at each moment and the obtained speed threshold, the occurrence and dissipation of traffic congestion are determined. Among these states, State A represents the stable state, where vehicles can freely pass through with high speeds. State B indicates the congestion formation state, which is characterized by a rapid decrease in speed within a short period. During this state, some vehicles ahead decelerate, causing a backward propagation of the congestion wave. Rear vehicles alternate deceleration, and traffic flow gradually becomes disordered. When the speed falls below a certain threshold, the traffic flow is considered congested. The duration of congestion varies depending on the actual traffic volume. States C1 and C2 represent severe congestion and mild congestion, respectively. In State C1, the threshold is below 23.9 km/h, and the vehicle spacing is extremely small. In State C2, the threshold is below 38.5 km/h, and the vehicle spacing is very small, although the traffic flow can still proceed normally but with reduced mobility. State D represents the congestion dissipation state, where the speed quickly increases, and the vehicle mobility increases, gradually returning to the stable state. From Figure 8, it is evident when traffic congestion occurs and dissipates.