Traffic signal light monitoring method and device based on video
Through the combination of video processing and deep learning network models, the identification and tracking of traffic light targets is achieved, which solves the problem of target tracking that cannot be achieved with existing technology, improves monitoring efficiency and accuracy, and meets the needs of complex traffic environments.
Patent Information
- Application Number
- CN202410895052.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-05
AI Technical Summary
Existing traffic light monitoring methods cannot achieve target tracking and cannot meet the needs of complex traffic environments.
The video-based traffic light monitoring method is adopted to obtain the video uploaded by the camera gun device, decode and frame it, use key information extraction and deep learning network model (such as DeepSORT) for target recognition and tracking, and construct a target monitoring image sequence to achieve Recognize and track video targets, and store alarm events in the database.
It improves the efficiency and accuracy of the monitoring model, and can accurately identify and track traffic light targets in complex environments, determine their behavior and status, and report alarm events.
Smart Images

Figure CN118429948B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field related to smart transportation, and in particular to a video-based traffic light monitoring method and device. Background Art
[0002] Monitoring traffic lights can improve traffic efficiency, enhance traffic safety and support the development of intelligent transportation systems.
[0003] The current way to monitor traffic lights is often to use traditional surveillance cameras installed near traffic lights. These cameras are usually installed and maintained by traffic management departments, and can monitor the status of traffic lights and surrounding traffic conditions in real time. In addition, due to the development of technology, some methods have emerged that use image recognition to perform single-frame image recognition to determine traffic light anomalies. This method cannot achieve target tracking of traffic lights and cannot meet the needs of today's complex traffic environment. Summary of the invention
[0004] The purpose of the present invention is to solve at least one of the deficiencies of the prior art and to provide a method and device for monitoring traffic lights based on video.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] Specifically, a video-based traffic light monitoring method is proposed, including the following:
[0007] Obtaining a video uploaded by a camera gun device used to manage and maintain a highway section, and decoding the video to obtain a decoded video;
[0008] A time length T is preset, and the decoded video is divided into multiple video segments according to the time length T, and multiple video frames are obtained in each video segment, where the multiple video frames are continuous frames and the number of frames is preset to N;
[0009] Based on the key information extraction method, multiple video frames are integrated to form a target monitoring image associated with any video segment, and based on this, a target monitoring image sequence arranged in chronological order is obtained;
[0010] The target monitoring image sequence is input into a monitoring model constructed based on a deep learning network model and DeepSORT, and the recognition and tracking of video targets are realized through the monitoring model.
[0011] Further, specifically, the video uploaded by the camera gun device used to manage and maintain the highway section is obtained through the server deployment program in the local area network.
[0012] Further, specifically, based on the key information extraction method, multiple video frames are integrated to form a target monitoring image associated with any video segment, including:
[0013] For any number of video frames, a video frame image sequence is constructed in chronological order, and the pth sequence number element in the video frame image sequence is predefined, that is, the image matrix of the pth video frame image is Cp(p), and the pixel value of the pixel point in the wpth row and dpth column in Cp(p) is expressed as Cp(p, wp, dp);
[0014] Calculate the monitoring effectiveness standard (p, wp, dp) compared with its surrounding pixels, where standard (p, wp, dp) is given by and The ratio of is determined,
[0015] Among them, max(p, wp, dp) is the maximum value of the pixels around Cp(p, wp, dp), avg(p, wp, dp) and min(p, wp, dp) are the average value and minimum value of the pixels around Cp(p, wp, dp), respectively. The surrounding pixels refer to the 8-neighborhood pixels.
[0016] Calculate the monitoring performance area of all video frame images in the video frame image sequence based on the monitoring effectiveness;
[0017] Constructing a basic image, wherein the basic image is obtained by taking the pixel average value of the pixel points at the same position of all the video frame images in the video frame image sequence;
[0018] The monitoring expression areas of all the video frame images in the video frame image sequence are replaced with the corresponding areas of the basic image in sequence to obtain the target monitoring image associated with the video segment.
[0019] Further, specifically, based on the monitoring effectiveness, the monitoring performance areas of all video frame images in the video frame image sequence are calculated, including:
[0020] When p=1, that is, for the first sequence number element in the video frame image sequence, traverse the image matrix C1(1), find the two pixel points corresponding to the maximum value and the second maximum value of the monitoring effectiveness in C1(1), then connect the two pixel points corresponding to the maximum value and the second maximum value of the monitoring effectiveness to obtain the line segment segment(1), then find another pixel point with the maximum monitoring effectiveness other than the pixel point on segment(1) in C1(1) and assume it to be P, then connect P to the pixel points at the two vertices of the line segment segment(1) to obtain the monitoring performance area of C1(1);
[0021] When p>1, that is, for the elements after the first serial number in the video frame image sequence, calculate the pixel average value avg(p-1) in the monitoring performance area of Cp-1(p-1), traverse the image matrix Cp(p), find two random pixel points in Cp(p) whose monitoring effectiveness is greater than avg(p-1) and connect them to obtain the line segment segment(p), then find another pixel point in Cp(p) with the highest monitoring effectiveness except the pixel point on segment(p) and assume it to be Q, then connect Q to the pixel points at the two vertices of the line segment segment(p) to obtain the monitoring performance area of Cp(p).
[0022] Furthermore, the method further comprises:
[0023] The alarm events generated by the monitoring model's recognition and tracking of video targets are stored based on the MySQL database.
[0024] Further, specifically, the construction method of the monitoring model based on the deep learning network model and DeepSORT includes:
[0025] Input each frame of the target monitoring image sequence into the deep learning network model, the deep learning model processes the input image, and outputs the detection result, including the bounding box, confidence score, and class label of each target;
[0026] In the first frame, the detected targets are initialized into multiple trackers through DeepSORT, and each target corresponds to a unique tracker ID;
[0027] In subsequent frames, the Kalman filter is used to predict the position of each target.
[0028] To establish a connection between detection and tracking, DeepSORT uses the Hungarian algorithm to solve the target assignment problem;
[0029] For newly appeared or temporarily lost targets, DeepSORT uses target re-identification technology to identify and match targets through embedded features extracted by deep learning;
[0030] For the successfully matched target, its tracker state is updated through the Kalman filter;
[0031] For unmatched detection results, a new tracker is created; for unmatched trackers, it is determined that the target may be lost or leave the scene, and its status is maintained and managed for a period of time.
[0032] The present invention also proposes a video-based traffic signal light monitoring system, comprising:
[0033] A task management module, used to manage and maintain the camera gun equipment of the highway section, wherein the camera gun equipment is used to obtain the traffic light video of the highway section;
[0034] A video acquisition module is used to acquire the video uploaded by the camera gun device used to manage and maintain the highway section, and decode the video to obtain a decoded video;
[0035] A system detection and identification module, used to detect and identify the video, identify the traffic light target, track the traffic light target, identify and determine the behavior and state of the traffic light, and report the alarm event of the traffic light;
[0036] The data storage module is used to store reported traffic light alarm events.
[0037] Furthermore, specifically, the task management module is constructed based on a web system with separated front-end and back-end, and can realize web page operation and visual management of tasks.
[0038] Further, specifically, the video acquisition module acquires the video through a server deployment program in the local area network.
[0039] Further, specifically, the system detection and identification module first divides the decoded video into multiple video segments by a preset time length T, and obtains multiple video frames in each video segment, wherein the multiple video frames are continuous frames and the number of frames is preset to N;
[0040] Based on the key information extraction method, multiple video frames are integrated to form a target monitoring image associated with any video segment, and based on this, a target monitoring image sequence arranged in chronological order is obtained;
[0041] Finally, video target recognition and tracking are achieved based on target monitoring image sequences, deep learning network models and DeepSORT.
[0042] The beneficial effects of the present invention are:
[0043] The present invention proposes a traffic light monitoring method and device based on video, which processes the video uploaded by a camera gun device to obtain multiple video frames, and then integrates the multiple video frames into a target monitoring image associated with any video segment based on key information extraction, and obtains a target monitoring image sequence arranged in chronological order based on this, and inputs the target monitoring image into a monitoring model constructed based on a deep learning network model and DeepSORT. The monitoring model is used to realize recognition and tracking of video targets. On the one hand, the key information of the image frame in the video can be extracted to remove interference information; on the other hand, the monitoring model constructed based on the deep learning network model and DeepSORT can realize the tracking of traffic light targets, identify and judge the behavior and status of traffic lights, and report traffic light alarm events. Moreover, since the input monitoring model is the target monitoring image sequence after key information extraction, not only the monitoring efficiency of the monitoring model can be improved, but also the monitoring accuracy of the monitoring model can be greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The above and other features of the present disclosure will become more apparent by describing in detail the embodiments shown in the accompanying drawings. The same reference numerals in the accompanying drawings of the present disclosure represent the same or similar elements. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure. For those skilled in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work. In the accompanying drawings:
[0045] Figure 1 Shown is a flow chart of the video-based traffic light monitoring method of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the embodiments and drawings to clearly and completely describe the concept, specific structure and technical effects of the present invention, so as to fully understand the purpose, scheme and effect of the present invention. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other without conflict. The same reference numerals used throughout the drawings indicate the same or similar parts.
[0047] Example 1, reference Figure 1 The present invention proposes a video-based traffic light monitoring method, comprising the following steps:
[0048] Step 110: obtaining a video uploaded by a camera gun device used to manage and maintain a highway section, and decoding the video to obtain a decoded video;
[0049] Step 120: Preset a time length T, divide the decoded video into multiple video segments according to the time length T, and obtain multiple video frames in each video segment, wherein the multiple video frames are continuous frames and the number of frames is preset to N;
[0050] Step 130: Integrate multiple video frames to form a target monitoring image associated with any video segment based on key information extraction, and obtain a target monitoring image sequence arranged in chronological order based on this;
[0051] Step 140: Input the target monitoring image sequence into a monitoring model constructed based on a deep learning network model and DeepSORT, and realize recognition and tracking of video targets through the monitoring model.
[0052] In the present embodiment 1, a plurality of video frames are obtained by processing the video uploaded by the camera gun device, and then the plurality of video frames are integrated to form a target monitoring image associated with any segment of video based on the key information extraction method, and a target monitoring image sequence arranged in chronological order is obtained based on this, and the target monitoring image is input into the monitoring model constructed based on the deep learning network model and DeepSORT, and the video target is recognized and tracked by the monitoring model. On the one hand, the key information of the image frame in the video can be extracted to remove the interference information; on the other hand, the monitoring model constructed based on the deep learning network model and DeepSORT can realize the tracking of the traffic light target, identify and judge the behavior and status of the traffic light, and report the alarm event of the traffic light. Moreover, since the input monitoring model is the target monitoring image sequence after the key information is extracted, not only the monitoring efficiency of the monitoring model can be improved, but also the monitoring accuracy of the monitoring model can be greatly improved.
[0053] As a preferred implementation mode of the present invention, specifically, a program is deployed on a server in a local area network to obtain videos uploaded by a camera gun device used for managing and maintaining a highway section.
[0054] In this preferred embodiment, based on the analysis of the network environment of the camera gun equipment on the highway section, it is most stable and efficient to obtain the program by deploying the program on a server in the local area network.
[0055] As a preferred embodiment of the present invention, specifically, multiple video frames are integrated to form a target monitoring image associated with any video segment based on key information extraction, including:
[0056] For any number of video frames, a video frame image sequence is constructed in chronological order, and the pth sequence number element in the video frame image sequence is predefined, that is, the image matrix of the pth video frame image is Cp(p), and the pixel value of the pixel point in the wpth row and dpth column in Cp(p) is expressed as Cp(p, wp, dp);
[0057] Calculate the monitoring effectiveness standard (p, wp, dp) compared with its surrounding pixels, where standard (p, wp, dp) is given by and The ratio of is determined, that is, the calculation formula is,
[0058]
[0059] Among them, max(p, wp, dp) is the maximum value of the pixels around Cp(p, wp, dp), avg(p, wp, dp) and min(p, wp, dp) are the average value and minimum value of the pixels around Cp(p, wp, dp), respectively. The surrounding pixels refer to the 8-neighborhood pixels.
[0060] Calculate the monitoring performance area of all video frame images in the video frame image sequence based on the monitoring effectiveness;
[0061] Constructing a basic image, wherein the basic image is obtained by taking the pixel average value of the pixel points at the same position of all the video frame images in the video frame image sequence;
[0062] The monitoring expression areas of all the video frame images in the video frame image sequence are replaced with the corresponding areas of the basic image in sequence to obtain the target monitoring image associated with the video segment.
[0063] Specifically, based on the monitoring effectiveness, the monitoring performance areas of all video frame images in the video frame image sequence are calculated, including:
[0064] When p=1, that is, for the first sequence number element in the video frame image sequence, traverse the image matrix C1(1), find the two pixel points corresponding to the maximum value and the second maximum value of the monitoring effectiveness in C1(1), then connect the two pixel points corresponding to the maximum value and the second maximum value of the monitoring effectiveness to obtain the line segment segment(1), then find another pixel point with the maximum monitoring effectiveness other than the pixel point on segment(1) in C1(1) and assume it to be P, then connect P to the pixel points at the two vertices of the line segment segment(1) to obtain the monitoring performance area of C1(1);
[0065] When p>1, that is, for the elements after the first serial number in the video frame image sequence, calculate the pixel average value avg(p-1) in the monitoring performance area of Cp-1(p-1), traverse the image matrix Cp(p), find two random pixel points in Cp(p) whose monitoring effectiveness is greater than avg(p-1) and connect them to obtain the line segment segment(p), then find another pixel point in Cp(p) with the highest monitoring effectiveness except the pixel point on segment(p) and assume it to be Q, then connect Q to the pixel points at the two vertices of the line segment segment(p) to obtain the monitoring performance area of Cp(p).
[0066] In this preferred embodiment, the environment in which the traffic lights are located is relatively complex. On the one hand, it is prone to severe weather with a large degree of interference. On the other hand, traffic may also carry dust and other interference factors that may cause more interference to the traffic lights. In this way, if the video frame of the traffic light is directly input into the monitoring model, the calculation amount of the monitoring model will be greatly increased, and due to the large number of interference factors in the image frame, it is also very likely to cause inaccurate abnormal recognition results of the monitoring model. Therefore, the monitoring performance area is first extracted in the above manner to form a target monitoring image sequence. In this way, after the target monitoring image sequence is input into the monitoring model, it is possible to quickly and accurately track the target traffic light, identify and judge the behavior and status of the traffic light, and report the alarm event of the traffic light.
[0067] As a preferred embodiment of the present invention, the method further comprises:
[0068] The alarm events generated by the monitoring model's recognition and tracking of video targets are stored based on the MySQL database.
[0069] In this preferred embodiment, specifically, the construction method of the monitoring model based on the deep learning network model and DeepSORT includes:
[0070] Input each frame of the target monitoring image sequence into the deep learning network model, the deep learning model processes the input image, and outputs the detection result, including the bounding box, confidence score, and class label of each target;
[0071] In the first frame, the detected targets are initialized into multiple trackers through DeepSORT, and each target corresponds to a unique tracker ID;
[0072] In subsequent frames, the Kalman filter is used to predict the position of each target.
[0073] To establish a connection between detection and tracking, DeepSORT uses the Hungarian algorithm to solve the target assignment problem;
[0074] For newly appeared or temporarily lost targets, DeepSORT uses target re-identification technology to identify and match targets through embedded features extracted by deep learning;
[0075] For the successfully matched target, its tracker state is updated through the Kalman filter;
[0076] For unmatched detection results, a new tracker is created; for unmatched trackers, it is determined that the target may be lost or leave the scene, and its status is maintained and managed for a period of time;
[0077] In this preferred embodiment, the operating principle of the monitoring model includes the following:
[0078] Object Detection:
[0079] Input image: Input each frame of the video into the deep learning network model. Commonly used object detection models include YOLO (You Only Look Once), SSD (Single Shot MultiBox Detector) and FasterR-CNN.
[0080] Detection output: The deep learning model processes the input image and outputs the detection results, including the bounding box, confidence score, and class label of each target.
[0081] Target Tracking:
[0082] Initial tracker: In the first frame, DeepSORT (Deep Simple Online and Realtime Tracking) initializes the detected targets into multiple trackers, each corresponding to a unique tracker ID.
[0083] Kalman filter: In subsequent frames, the position of each target is predicted using a Kalman filter. The Kalman filter is a linear quadratic estimator that updates the target state using priors and observations, and is suitable for smoothing and predicting motion trajectories.
[0084] Hungarian Algorithm: To establish a link between detection and tracking, DeepSORT uses the Hungarian algorithm to solve the object assignment problem. The algorithm matches the detection results in the current frame with the previous tracking results based on the motion and appearance information of the object (such as color histogram or embedded features).
[0085] Re-ID: For newly appeared or temporarily lost targets, DeepSORT uses target re-identification technology to identify and match targets through embedded features (such as appearance features) extracted by deep learning.
[0086] Update Tracker:
[0087] Matching update: For a successfully matched target, its tracker state (position, velocity, etc.) is updated through the Kalman filter.
[0088] Unmatched processing: For unmatched detection results, a new tracker is created; for unmatched trackers, it is considered that the target may be lost or leave the scene, and its status is maintained and managed over a period of time.
[0089] A complete monitoring operation process is as follows:
[0090] Read video frames: Read images frame by frame from a video stream or video file.
[0091] Object detection: Input the current frame image into the object detection model to obtain the detection results, including the object's bounding box, category label, and confidence.
[0092] Target Tracking:
[0093] Prediction phase: Use Kalman filter to predict the next state of each existing tracker.
[0094] Matching stage: Use the Hungarian algorithm to associate and match the detection results with the prediction results.
[0095] Update phase: Update the tracker status according to the matching results, initialize new trackers for newly appeared targets, and manage lost targets.
[0096] Result output: Draw the detection and tracking results on the current frame, including the bounding box, category label, and tracker ID, and output or display the results.
[0097] Loop processing: Repeat the above steps until all video frames are processed.
[0098] The present invention also proposes a video-based traffic signal light monitoring system, comprising:
[0099] A task management module, used to manage and maintain the camera gun equipment of the highway section, wherein the camera gun equipment is used to obtain the traffic light video of the highway section;
[0100] A video acquisition module is used to acquire the video uploaded by the camera gun device used to manage and maintain the highway section, and decode the video to obtain a decoded video;
[0101] A system detection and identification module, used to detect and identify the video, identify the traffic light target, track the traffic light target, identify and determine the behavior and state of the traffic light, and report the alarm event of the traffic light;
[0102] The data storage module is used to store reported traffic light alarm events.
[0103] As a preferred implementation mode of the present invention, specifically, the task management module is constructed based on a web system with front-end and back-end separation, and can realize web page operation and visualized management tasks.
[0104] As a preferred implementation manner of the present invention, specifically, the video acquisition module acquires the video through a server deployment program in a local area network.
[0105] As a preferred embodiment of the present invention, specifically, the system detection and identification module first divides the decoded video by the time length T to obtain multiple video segments by a preset time length T, and obtains multiple video frames in each video segment, wherein the multiple video frames are continuous frames and the number of frames is preset to N;
[0106] Based on the key information extraction method, multiple video frames are integrated to form a target monitoring image associated with any video segment, and based on this, a target monitoring image sequence arranged in chronological order is obtained;
[0107] Finally, video target recognition and tracking are achieved based on target monitoring image sequences, deep learning network models and DeepSORT.
[0108] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0109] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or system that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0110] Although the description of the present invention has been quite detailed and specifically describes several described embodiments, it is not intended to be limited to any of these details or embodiments or any particular embodiment, but should be regarded as providing a broad possible interpretation of these claims in view of the prior art by reference to the appended claims, thereby effectively covering the intended scope of the present invention. In addition, the above description of the present invention is based on the embodiments foreseeable by the inventor, and its purpose is to provide a useful description, and those non-substantial changes to the present invention that have not yet been foreseen may still represent equivalent changes to the present invention.
[0111] The above is only a preferred embodiment of the present invention. The present invention is not limited to the above implementation. As long as the technical effect of the present invention is achieved by the same means, it should belong to the protection scope of the present invention. Within the protection scope of the present invention, its technical scheme and / or implementation method can have various modifications and changes.
Claims
1. A video-based traffic light monitoring method, characterized in that: These include: Obtaining a video uploaded by a camera gun device used to manage and maintain a highway section, and decoding the video to obtain a decoded video; A time length T is preset, and the decoded video is divided into multiple video segments according to the time length T, and multiple video frames are obtained in each video segment, where the multiple video frames are continuous frames and the number of frames is preset to N; Based on the key information extraction method, multiple video frames are integrated to form a target monitoring image associated with any video segment, and based on this, a target monitoring image sequence arranged in chronological order is obtained; Inputting the target monitoring image sequence into the monitoring model built based on the deep learning network model and DeepSORT, and realizing the recognition and tracking of the video target through the monitoring model; Specifically, multiple video frames are integrated to form a target monitoring image associated with any video segment based on key information extraction, including: For any number of video frames, a video frame image sequence is constructed in chronological order, and the pth sequence number element in the video frame image sequence is predefined, that is, the image matrix of the pth video frame image is Cp(p), and the pixel value of the pixel point in the wpth row and dpth column in Cp(p) is expressed as Cp(p, wp, dp); Calculate the monitoring effectiveness standard (p, wp, dp) compared with its surrounding pixels, where standard (p, wp, dp) is given by and The ratio of is determined, Among them, max(p, wp, dp) is the maximum value of the pixels around Cp(p, wp, dp), avg(p, wp, dp) and min(p, wp, dp) are the average value and minimum value of the pixels around Cp(p, wp, dp), respectively. The surrounding pixels refer to the 8-neighborhood pixels. Calculate the monitoring performance area of all video frame images in the video frame image sequence based on the monitoring effectiveness; Constructing a basic image, wherein the basic image is obtained by taking the pixel average value of the pixel points at the same position of all the video frame images in the video frame image sequence; Substituting the monitoring expression areas of all the video frame images in the video frame image sequence for the corresponding areas of the basic image in sequence to obtain the target monitoring image associated with the video segment; Specifically, the monitoring performance areas of all video frame images in the video frame image sequence are calculated based on the monitoring effectiveness, including: When p=1, that is, for the first sequence number element in the video frame image sequence, traverse the image matrix C1(1), find the two pixel points corresponding to the maximum value and the second maximum value of the monitoring effectiveness in C1(1), then connect the two pixel points corresponding to the maximum value and the second maximum value of the monitoring effectiveness to obtain the line segment segment(1), then find another pixel point with the maximum monitoring effectiveness other than the pixel point on segment(1) in C1(1) and assume it to be P, then connect P to the pixel points at the two vertices of the line segment segment(1) to obtain the monitoring performance area of C1(1); When p>1, that is, for the elements after the first serial number in the video frame image sequence, calculate the pixel average value avg(p-1) in the monitoring performance area of Cp-1(p-1), traverse the image matrix Cp(p), find two random pixel points in Cp(p) whose monitoring effectiveness is greater than avg(p-1) and connect them to obtain the line segment segment(p), then find another pixel point in Cp(p) with the highest monitoring effectiveness except the pixel point on segment(p) and assume it to be Q, then connect Q to the pixel points at the two vertices of the line segment segment(p) to obtain the monitoring performance area of Cp(p).
2. The video-based traffic light monitoring method according to claim 1, characterized in that: Specifically, the video uploaded by the camera gun device used to manage and maintain the highway section is obtained through the server deployment program in the local area network.
3. The video-based traffic light monitoring method according to claim 1, characterized in that: The method further comprises, The alarm events generated by the monitoring model's recognition and tracking of video targets are stored based on the MySQL database.
4. The video-based traffic light monitoring method according to claim 1, characterized in that: Specifically, the monitoring model based on the deep learning network model and DeepSORT is constructed in the following ways: Input each frame of the target monitoring image sequence into the deep learning network model, the deep learning model processes the input image, and outputs the detection result, including the bounding box, confidence score and class label of each target; In the first frame, the detected targets are initialized into multiple trackers through DeepSORT, and each target corresponds to a unique tracker ID; In subsequent frames, the Kalman filter is used to predict the position of each target. To establish a connection between detection and tracking, DeepSORT uses the Hungarian algorithm to solve the target assignment problem; For newly appeared or temporarily lost targets, DeepSORT uses target re-identification technology to identify and match targets through embedded features extracted by deep learning; For the successfully matched target, its tracker state is updated through the Kalman filter; For unmatched detection results, a new tracker is created; for unmatched trackers, it is determined that the target may be lost or leave the scene, and its status is maintained and managed for a period of time.
5. A video-based traffic light monitoring device, characterized in that: include: A task management module, used to manage and maintain the camera gun equipment of the highway section, wherein the camera gun equipment is used to obtain the traffic light video of the highway section; A video acquisition module is used to acquire the video uploaded by the camera gun device used to manage and maintain the highway section, and decode the video to obtain a decoded video; A system detection and identification module, used to detect and identify the video, identify the traffic light target, track the traffic light target, identify and determine the behavior and state of the traffic light, and report the alarm event of the traffic light; A data storage module, used to store reported traffic light alarm events; Specifically, the system detection and identification module first divides the decoded video into multiple video segments by a preset time length T, and obtains multiple video frames in each video segment, wherein the multiple video frames are continuous frames and the number of frames is preset to N; Based on the key information extraction method, multiple video frames are integrated to form a target monitoring image associated with any video segment, and based on this, a target monitoring image sequence arranged in chronological order is obtained; Finally, the recognition and tracking of video targets are realized based on the target monitoring image sequence, deep learning network model and DeepSORT; Specifically, multiple video frames are integrated to form a target monitoring image associated with any video segment based on key information extraction, including: For any number of video frames, a video frame image sequence is constructed in chronological order, and the pth sequence number element in the video frame image sequence is predefined, that is, the image matrix of the pth video frame image is Cp(p), and the pixel value of the pixel point in the wpth row and dpth column in Cp(p) is expressed as Cp(p, wp, dp); Calculate the monitoring effectiveness standard (p, wp, dp) compared with its surrounding pixels, where standard (p, wp, dp) is given by and The ratio of is determined, Among them, max(p, wp, dp) is the maximum value of the pixels around Cp(p, wp, dp), avg(p, wp, dp) and min(p, wp, dp) are the average value and minimum value of the pixels around Cp(p, wp, dp), respectively. The surrounding pixels refer to the 8-neighborhood pixels. Calculate the monitoring performance area of all video frame images in the video frame image sequence based on the monitoring effectiveness; Constructing a basic image, wherein the basic image is obtained by taking the pixel average value of the pixel points at the same position of all the video frame images in the video frame image sequence; Substituting the monitoring expression areas of all the video frame images in the video frame image sequence for the corresponding areas of the basic image in sequence to obtain the target monitoring image associated with the video segment; Specifically, the monitoring performance areas of all video frame images in the video frame image sequence are calculated based on the monitoring effectiveness, including: When p=1, that is, for the first sequence number element in the video frame image sequence, traverse the image matrix C1(1), find the two pixel points corresponding to the maximum value and the second maximum value of the monitoring effectiveness in C1(1), then connect the two pixel points corresponding to the maximum value and the second maximum value of the monitoring effectiveness to obtain the line segment segment(1), then find another pixel point with the maximum monitoring effectiveness other than the pixel point on segment(1) in C1(1) and assume it to be P, then connect P to the pixel points at the two vertices of the line segment segment(1) to obtain the monitoring performance area of C1(1); When p>1, that is, for the elements after the first serial number in the video frame image sequence, calculate the pixel average value avg(p-1) in the monitoring performance area of Cp-1(p-1), traverse the image matrix Cp(p), find two random pixel points in Cp(p) whose monitoring effectiveness is greater than avg(p-1) and connect them to obtain the line segment segment(p), then find another pixel point in Cp(p) with the highest monitoring effectiveness except the pixel point on segment(p) and assume it to be Q, then connect Q to the pixel points at the two vertices of the line segment segment(p) to obtain the monitoring performance area of Cp(p).
6. The video-based traffic light monitoring device according to claim 5, characterized in that: Specifically, the task management module is built based on a web system with separated front-end and back-end, and can realize web page operations and visualized management tasks.
7. The video-based traffic light monitoring device according to claim 5, characterized in that: Specifically, the video acquisition module acquires the video through a server deployment program in the local area network.
