The invention provides a
coal logistics park traffic flow statistical
system and method based on YOLOv8 and OpenCV, and the method comprises the following steps: S101, deploying high-definition monitoring equipment at a key intersection in a
coal logistics park, and configuring equipment parameters; s102, variables are initialized, a model is loaded, and a data
loader is configured; s103, acquiring camera video data in real time through the rtsp video
stream; s104, traversing the data frame, and carrying out
object detection and tracking; s105,
processing a detection result to realize
vehicle counting; and S106, deploying the model to a management end to display a result. According to the method, targeted training is carried out on the YOLOv8 model for the special environment of the
coal logistics park, the OpenCV and the vehicle tracking
algorithm are combined, efficient and accurate recognition, tracking and statistics of the vehicles are achieved, the detection problem caused by shielding, light change and other factors is solved, and a basis is provided for park
traffic management. In addition, the
system is flexible and expandable, a user can configure the
system according to needs, the system can be conveniently expanded to other logistics parks or traffic scenes, and large-range vehicle monitoring is achieved.