Traffic signal lamp state monitoring system and method based on machine vision

By designing a machine vision -based traffic signal light status monitoring system, combined with OpenCV and deep learning models for image processing and status recognition, and reducing the direct influence of light sources by regulating mechanisms, solving the slow response of the existing system on the slow and direct influence of the light source through the influence of abnormal conditions. The problem has achieved efficient traffic management and clear image capture.

CN119342177APending Publication Date: 2025-01-21NANTONG BOYUAN INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411493535.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The existing machine vision-based traffic light status monitoring system lacks intelligent analysis, resulting in slow response to abnormal situations, improper resource allocation, and increased management costs; at the same time, the strong light direct camera will cause image overexposure and blur, affecting the monitoring effect.

Method used

A machine vision -based traffic signal light status monitoring system is designed. It adopts cameras, computing platforms and network modules, combined with OpenCV and deep learning models for image processing and state recognition to achieve real -time monitoring, status recognition, fault detection and data records. At the same time, by regulating agencies and protective agencies, the shading cover is automatically adjusted to reduce the effect of direct light source.

Benefits of technology

Through high -quality image capture and real -time monitoring, the system can effectively improve the intelligent level and security of traffic management, reduce the time of fault detection, optimize resource allocation, reduce management costs, and ensure that the image is clear under various light conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342177A_ABST
    Figure CN119342177A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic signal lamp state monitoring system and method based on machine vision, and relates to the technical field of traffic signal lamps. The traffic signal lamp state monitoring system based on the machine vision comprises the following steps of system architecture, system functions, a working process, technical implementation and an application scene. Through high-quality image capture and real-time monitoring, the system is widely applied to the fields of safety monitoring, traffic management, intelligent analysis and the like, and the safety and management efficiency of places are effectively improved. The integrated intelligent functions, such as face recognition and behavior analysis, not only support instant alarm of abnormal conditions, but also optimize resource configuration. Besides, due to the flexible installation mode and the remote maintenance capability, the camera system can meet diversified user requirements, the user experience is enhanced through a friendly operation interface, and the intelligent and safe development of the society is promoted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of traffic signal lights, and in particular to a traffic signal light state monitoring system and method based on machine vision. Background Art

[0002] Traffic light status monitoring based on machine vision uses a camera system installed at the intersection, using image processing and machine learning technology to identify and analyze the status of traffic lights (such as red, green or yellow lights) in real time to ensure their normal operation and detect faults in a timely manner. The implementation of this monitoring system helps improve traffic management efficiency, reduce the incidence of traffic accidents, and ensure smooth traffic. In addition, it can also provide data support for traffic management departments to optimize traffic signal timing and planning, and improve overall traffic safety and travel experience.

[0003] However, the inability of existing systems to perform intelligent analysis means that the response to abnormal situations becomes slow, making it difficult to achieve effective resource allocation, resulting in increased management costs. In addition, when strong sunlight or other light sources directly hit the camera, it may cause overexposure, glare or image blur, thereby affecting the monitoring effect and detail capture. In response to the above problems, the inventors proposed a traffic light status monitoring system and method based on machine vision to solve the above problems. Summary of the invention

[0004] In order to solve the problem that the system lacks intelligent analysis, resulting in slow response to abnormal situations and improper resource allocation, increasing management costs. At the same time, strong light directly shining on the camera will cause overexposure and blur of the image, affecting the monitoring effect; the purpose of the present invention is to provide a traffic light status monitoring system and method based on machine vision.

[0005] In order to solve the above technical problems, the present invention adopts the following technical solution: a traffic light status monitoring system based on machine vision, comprising the following steps: S1. System architecture: including hardware equipment and software functions; S2. System functions: including real-time monitoring, status identification, fault detection and data recording; S3, Workflow: including camera installation, data collection, image processing, status recognition, information recording and fault alarm; S4, technical implementation: image processing and recognition, data storage and communication; S5. Application scenario: urban traffic monitoring and rapid fault detection.

[0006] The hardware devices in S1 include cameras, computing platforms and network modules; Software features in the S1 include image processing libraries, machine learning models and data logging capabilities; Camera: used to shoot traffic lights in real time, it is recommended to use a webcam; Computing platform: You can use a regular PC or edge computing device equipped with basic image processing capabilities; Network module: ensures that the camera can transmit data to the server, using Wi-Fi or 5G network; Image processing library: use OpenCV to process images; Machine learning model: Use a simple deep learning model (such as TensorFlow Lite) to recognize traffic light status; Data logging: Use CSV files or a simple database such as SQLite to store status records.

[0007] Real-time monitoring in S2: collecting and processing traffic light images; collecting and processing traffic light images; State recognition in S2: Automatically recognize the state of the traffic light (red, yellow, green); Fault detection in S2: Check whether the signal light is working properly, and record and alarm if an abnormal state occurs; Data recording in S2: recording the status of the traffic lights detected in each round in a local file or database; Camera installation in S3: Install a webcam near a traffic light; Data collection in S3: The camera takes images of traffic lights at regular intervals; Image processing in S3: Use OpenCV to preprocess the acquired images (such as denoising and adjusting brightness); State recognition in S3: Identify the state of traffic lights through a simple deep learning model; Information recording in S3: Store the recognition results and timestamps in CSV files or SQLite databases; Fault alarm in S3: If the signal light status is abnormal, the abnormal status is recorded and notified to the management personnel through a simple notification (such as email or message push); Image processing and recognition in S4: Use OpenCV for image denoising, adjustment, and feature extraction, and apply trained models (such as CNN) to traffic light status recognition; Data storage in S4: Use CSV files or SQLite databases to store records for later query and analysis; Communication in S4: ability to upload data to a server via HTTP POST requests, or via simple local file storage; Urban traffic monitoring in S5: suitable for monitoring traffic lights in a small area, and can detect problems in time; Fast fault detection in S5: effectively reduces the need for manual inspections and improves the management efficiency of traffic lights.

[0008] A traffic light status monitoring system based on machine vision comprises a camera, wherein the camera comprises a body, a sunshade is installed on the top of the body, an adjustment mechanism is installed on the side of the body, the adjustment mechanism comprises a mounting frame, the mounting frame is rotatably mounted on the outside of the body, a protective mechanism is installed on the top of the mounting frame, and a connecting mechanism is installed on the bottom of the protective mechanism.

[0009] Preferably, the adjusting mechanism includes a rotating shaft, and the rotating shaft has two, and the two rotating shafts are rotatably mounted on both sides of the fuselage, and an adjusting box is installed on the outside of the fuselage, one of the rotating shafts is rotatably inserted in the adjusting box, and a worm is rotatably inserted in the adjusting box, and a worm gear is provided on the fixed sleeve outside the rotating shaft on one side of the adjusting box, and the worm gear and the worm gear are meshed with each other. A No. 1 motor is installed in the adjusting box, and an output end of the No. 1 motor is inserted through the adjusting box and fixedly connected to the worm gear. A symmetrically distributed fixing frame is fixed on the top of the mounting frame, and a threaded rod is rotatably provided in the fixing frame, and a threaded slider is provided on the threaded sleeve outside the threaded rod, and the bottom end of the threaded slider is fitted with the bottom end of the mounting frame, and connecting plates are rotatably provided on both sides of the two threaded sliders, and one end of the four connecting plates away from the threaded sliders is rotatably connected to the bottom end of the sunshade, and a No. 2 motor is installed on the outside of the two fixing frames, and the end of the output shaft of the No. 2 motor is inserted through the fixing frame and fixedly connected to the threaded rod.

[0010] A method used in a traffic light state monitoring system based on machine vision comprises the following steps: Step 1. Environment preparation: Install necessary software packages, including OpenCV, TensorFlow / PyTorch and other dependent libraries; Step 2: Camera connection and video stream acquisition: Get the video stream from the network camera, for example, using OpenCV's VideoCapture class; Step 3: Image acquisition and processing: Capture images regularly and pre-process each frame; Step 4: Traffic light status recognition: Use a pre-trained deep learning model to classify the traffic light status. You can use the Transfer Learning method to simplify model training and pass the captured image into the model for status recognition. Step 5: Fault detection and alarm: Determine whether the traffic light is abnormal based on the recognition results. If an abnormality occurs, record it and notify the management personnel by email or SMS; Step 6. Data recording: record each test result, timestamp and status into a CSV file; Step 7: Loop execution: put the above process into a loop and perform image acquisition and processing at a regular interval; Step 8: System termination and resource release: System termination and resource release.

[0011] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention is widely used in the fields of security monitoring, traffic management and intelligent analysis through high-quality image capture and real-time monitoring, effectively improving the safety of places and management efficiency. Its integrated intelligent functions, such as face recognition and behavior analysis, not only support instant alarm of abnormal situations, but also optimize resource allocation. In addition, the flexible installation method and remote maintenance capabilities enable the camera system to meet the diverse needs of users, and enhance the user experience through a friendly operation interface, promoting the intelligent and safe development of society; 2. In the present invention, the sunshade can be adjusted in angle by setting an adjustment mechanism, so that the front end of the camera can be shielded from light. Then, the sunshade can be rotated sideways through the protection mechanism. By rotating the baffle in all directions, the sunshade can be automatically adjusted according to the ambient light intensity to reduce the impact of direct sunlight on the monitoring effect, ensuring that the camera can obtain clear images under various lighting conditions; 3. This invention makes the design and implementation of a machine vision-based traffic light status monitoring system efficient and concise through simple steps and clear modularization. Using ready-made libraries and tools combined with deep learning models, the system can be quickly deployed and monitoring can begin. This approach is suitable for small applications and can also be gradually upgraded and optimized during continuous expansion. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0013] Figure 1 It is a schematic diagram of the overall structure of the present invention; Figure 2 It is a side schematic diagram of the overall structure of the present invention; Figure 3 It is a cross-sectional schematic diagram of the protective plate and its connection structure of the present invention; Figure 4 The structure of the present invention Figure 3 The enlarged schematic diagram at A in the middle; Figure 5 The structure of the present invention Figure 3 Enlarged schematic diagram of point B in the middle.

[0014] In the figure: 1. body; 101. sunshade; 2. adjustment mechanism; 201. rotating shaft; 202. mounting frame; 203. adjustment box; 204. worm; 205. worm wheel; 206. motor No. 1; 3. protection mechanism; 301. fixing frame; 302. threaded rod; 303. threaded slider; 304. connecting plate; 305. motor No. 2; 4. connecting mechanism. DETAILED DESCRIPTION

[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0016] like Figure 1-5 As shown, the present invention provides a traffic light state monitoring system based on machine vision, comprising the following steps: S1. System architecture: including hardware equipment and software functions; S2. System functions: including real-time monitoring, status identification, fault detection and data recording; S3, Workflow: including camera installation, data collection, image processing, status recognition, information recording and fault alarm; S4, technical implementation: image processing and recognition, data storage and communication; S5. Application scenario: urban traffic monitoring and rapid fault detection.

[0017] The hardware devices in S1 include cameras, computing platforms and network modules; Software features in the S1 include image processing libraries, machine learning models and data logging capabilities.

[0018] Camera: used to shoot traffic lights in real time, it is recommended to use a webcam; Computing platform: You can use a regular PC or edge computing device equipped with basic image processing capabilities; Network module: ensures that the camera can transmit data to the server, using Wi-Fi or 5G network; Image processing library: use OpenCV to process images; Machine learning model: Use a simple deep learning model (such as TensorFlow Lite) to recognize traffic light status; Data logging: Use CSV files or a simple database such as SQLite to store status records.

[0019] Real-time monitoring in S2: collecting and processing traffic light images; collecting and processing traffic light images; State recognition in S2: Automatically recognize the state of the traffic light (red, yellow, green); Fault detection in S2: Check whether the signal light is working properly, and record and alarm if an abnormal state occurs; Data recording in S2: The status of the traffic lights detected in each round is recorded in a local file or database.

[0020] Camera installation in S3: Install a webcam near a traffic light; Data collection in S3: The camera takes images of traffic lights at regular intervals; Image processing in S3: Use OpenCV to preprocess the acquired images (such as denoising and adjusting brightness); State recognition in S3: Identify the state of traffic lights through a simple deep learning model; Information recording in S3: Store the recognition results and timestamps in CSV files or SQLite databases; Fault alarm in S3: If the signal light status is abnormal, the abnormal status is recorded and notified to the management personnel through a simple notification (such as email or message push); Image processing and recognition in S4: Use OpenCV for image denoising, adjustment, and feature extraction, and apply trained models (such as CNN) to traffic light status recognition; Data storage in S4: Use CSV files or SQLite databases to store records for later query and analysis; Communication in S4: ability to upload data to a server via HTTP POST requests, or via simple local file storage; Urban traffic monitoring in S5: suitable for monitoring traffic lights in a small area, and can detect problems in time; Fast fault detection in S5: effectively reduces the need for manual inspections and improves the management efficiency of traffic lights.

[0021] By adopting the above technical solution, through simple and effective hardware configuration and basic technical implementation, it is possible to meet the real-time monitoring needs of traffic light status, improve the level of intelligent traffic management, and ensure traffic safety.

[0022] A traffic light state monitoring system based on machine vision includes a camera, wherein the camera includes a body 1, a sunshade 101 is installed on the top of the body 1, an adjustment mechanism 2 is installed on the side of the body 1, the adjustment mechanism 2 includes a mounting frame 202, the mounting frame 202 is used for fixed support, the mounting frame 202 is rotatably mounted on the outside of the body 1, a protective mechanism 3 is installed on the top of the mounting frame 202, a connecting mechanism 4 is installed on the bottom of the protective mechanism 3, and the connecting mechanism 4 is used to install and connect the device to the outside.

[0023] The adjusting mechanism 2 includes a rotating shaft 201, and there are two rotating shafts 201. The two rotating shafts 201 are rotatably mounted on both sides of the fuselage 1 respectively. An adjusting box 203 is installed on the outside of the fuselage 1, and one of the rotating shafts 201 is rotatably inserted in the adjusting box 203. A worm 204 is rotatably inserted in the adjusting box 203. A worm gear 205 is fixedly sleeved on the outside of the rotating shaft 201 on one side of the adjusting box 203. The worm 204 and the worm gear 205 are meshed with each other. A No. 1 motor 206 is installed in the adjusting box 203, and the output end of the No. 1 motor 206 is inserted through the adjusting box 203 and fixedly connected to the worm 204.

[0024] By adopting the above technical solution, the output end of the No. 1 motor 206 rotates to drive the sunshade 101 to rotate forward and backward, so that a stronger light source can be blocked, thereby improving the clarity of the image.

[0025] A symmetrically distributed fixing frame 301 is fixed on the top of the mounting frame 202, a threaded rod 302 is rotatably provided inside the fixing frame 301, a threaded slider 303 is threadedly sleeved on the outer side of the threaded rod 302, the bottom end of the threaded slider 303 is fitted with the bottom end of the mounting frame 202, connecting plates 304 are rotatably provided on both sides of the two threaded sliders 303, and one end of the four connecting plates 304 away from the threaded sliders 303 is rotatably connected to the bottom end of the sunshade 101, and a No. 2 motor 305 is installed on the outer side of the two fixing frames 301, and the end of the output shaft of the No. 2 motor 305 is inserted into the fixing frame 301 and fixedly connected to the threaded rod 302.

[0026] By adopting the above technical solution, the output shaft end of the second motor 305 is started to rotate, driving the sunshade 101 to rotate left and right, and the sunshade 101 rotates forward and backward, so that the sunshade 101 can be automatically adjusted according to the ambient light intensity to reduce the impact of direct sunlight on the monitoring effect, ensuring that the camera obtains clear images under various lighting conditions.

[0027] A method used in a traffic light state monitoring system based on machine vision comprises the following steps: Step 1. Environment preparation: Install necessary software packages, including OpenCV, TensorFlow / PyTorch and other dependent libraries; Step 2: Camera connection and video stream acquisition: Get the video stream from the network camera, for example, using OpenCV's VideoCapture class; Step 3: Image acquisition and processing: Capture images regularly and pre-process each frame; Step 4: Traffic light status recognition: Use a pre-trained deep learning model to classify the traffic light status. You can use the Transfer Learning method to simplify model training and pass the captured image into the model for status recognition. Step 5: Fault detection and alarm: Determine whether the traffic light is abnormal based on the recognition results. If an abnormality occurs, record it and notify the management personnel by email or SMS; Step 6. Data recording: record each test result, timestamp and status into a CSV file; Step 7: Loop execution: put the above process into a loop and perform image acquisition and processing at a regular interval; Step 8: System termination and resource release: System termination and resource release.

[0028] By adopting the above technical solutions, simple steps and clear modularization make the design and implementation of the traffic light status monitoring system based on machine vision efficient and concise. Using ready-made libraries and tools combined with deep learning models, the system can be quickly deployed and monitoring can begin. This approach is suitable for small applications and can also be gradually upgraded and optimized during continuous expansion.

[0029] Working principle: First, adjust the position of the sunshade 101 according to the intensity of the light source in the external environment, start the No. 1 motor 206, and make the No. 1 motor 206 start working. The worm 204 driven by the output shaft end of the No. 1 motor 206 rotates, and the rotation of the worm 204 drives the rotating shaft 201 to rotate. The rotation of the rotating shaft 201 drives the mounting bracket 202 to rotate. The rotation of the mounting bracket 202 can drive the sunshade 101 to rotate on the fuselage 1, so that the front and rear angles of the sunshade 101 can be adjusted. At the same time, one of the No. 2 motors 305 can be started, so that the No. 2 motor 305 starts working. The rotation of the end of the output shaft 305 drives the threaded rod 302 to rotate, and the rotation of the threaded rod 302 drives the threaded slider 303 to move laterally under the limit of the mounting frame 202. The movement of the threaded slider 303 drives the sunshade 101 to rotate sideways through the connecting plate 304, and then the sunshade 101 can be matched to rotate forward and backward. When the light source is located on which side, the second motor 305 on the opposite side can be started, so that the light source can be blocked by the sunshade 101, and then the sunshade 101 can be automatically adjusted according to the ambient light intensity to reduce the impact of direct sunlight on the monitoring effect and ensure that the camera obtains clear images under various lighting conditions.

[0030] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A traffic light status monitoring system based on machine vision, characterized in that: The following steps are involved: S1. System architecture: including hardware equipment and software functions; S2. System functions: including real-time monitoring, status identification, fault detection and data recording; S3, Workflow: including camera installation, data collection, image processing, status recognition, information recording and fault alarm; S4, technical implementation: image processing and recognition, data storage and communication; S5. Application scenario: urban traffic monitoring and rapid fault detection.

2. A traffic light status monitoring system based on machine vision as claimed in claim 1, characterized in that: The hardware devices in S1 include cameras, computing platforms and network modules; Software features in the S1 include image processing libraries, machine learning models and data logging capabilities.

3. A machine vision-based traffic light status monitoring system as claimed in claim 2, characterized in that: Camera: used to shoot traffic lights in real time, it is recommended to use a webcam; Computing platform: You can use a regular PC or edge computing device equipped with basic image processing capabilities; Network module: ensures that the camera can transmit data to the server, using Wi-Fi or 5G network; Image processing library: use OpenCV to process images; Machine learning model: Use a simple deep learning model to identify the status of traffic lights; Data logging function: Use CSV files or simple database to store status records.

4. The machine vision-based traffic light status monitoring system according to claim 1, characterized in that: Real-time monitoring in S2: collecting and processing traffic light images; collecting and processing traffic light images; State recognition in S2: Automatically recognize the state of the signal light; Fault detection in S2: Check whether the signal light is working properly, and record and alarm if an abnormal state occurs; Data recording in S2: The status of the traffic lights detected in each round is recorded in a local file or database.

5. The machine vision-based traffic light status monitoring system according to claim 1, characterized in that: Camera installation in S3: Install a webcam near a traffic light; Data collection in S3: The camera takes images of traffic lights at regular intervals; Image processing in S3: Use OpenCV to preprocess the acquired images; State recognition in S3: Identify the state of traffic lights through a simple deep learning model; Information recording in S3: Store the recognition results and timestamps in CSV files or SQLite databases; Fault alarm in S3: If the signal light status is found to be abnormal, the abnormal status is recorded and the management personnel are informed through simple notification; Image processing and recognition in S4: Use OpenCV for image denoising, adjustment, and feature extraction, and apply the trained model to traffic light status recognition; Data storage in S4: Use CSV files or SQLite databases to store records for later query and analysis; Communication in S4: ability to upload data to a server via HTTP POST requests, or via simple local file storage; Urban traffic monitoring in S5: suitable for monitoring traffic lights in a small area, and can detect problems in time; Fast fault detection in S5: effectively reduces the need for manual inspections and improves the management efficiency of traffic lights.

6. A machine vision-based traffic light status monitoring system as claimed in claim 2, comprising a camera, characterized in that: The camera comprises a body (1), a sunshade (101) is mounted on the top of the body (1), an adjustment mechanism (2) is mounted on the side of the body (1), the adjustment mechanism (2) comprises a mounting frame (202), the mounting frame (202) is rotatably mounted on the outside of the body (1), a protection mechanism (3) is mounted on the top of the mounting frame (202), and a connection mechanism (4) is mounted on the bottom of the protection mechanism (3).

7. A machine vision-based traffic light status monitoring system as claimed in claim 6, characterized in that: The adjustment mechanism (2) includes a rotating shaft (201), wherein there are two rotating shafts (201), and the two rotating shafts (201) are rotatably mounted on both sides of the fuselage (1). An adjustment box (203) is mounted on the outside of the fuselage (1), wherein one of the rotating shafts (201) is rotatably inserted in the adjustment box (203), and a worm (204) is rotatably inserted in the adjustment box (203). A worm wheel (205) is fixedly sleeved on the outside of the rotating shaft (201) at one side of the adjustment box (203), and the worm wheel (204) and the worm wheel (205) are meshed with each other. A first motor (206) is mounted in the adjustment box (203), and an output end of the first motor (206) is inserted through the adjustment box (203) and fixedly connected to the worm wheel (204).

8. The machine vision-based traffic light status monitoring system according to claim 6, characterized in that: A symmetrically distributed fixing frame (301) is fixedly provided at the top of the mounting frame (202), a threaded rod (302) is rotatably provided inside the fixing frame (301), a threaded slider (303) is threadedly sleeved outside the threaded rod (302), the bottom end of the threaded slider (303) is fitted with the bottom end of the mounting frame (202), connecting plates (304) are rotatably provided on both sides of two threaded sliders (303), one end of the four connecting plates (304) away from the threaded sliders (303) is rotatably connected to the bottom end of the sunshade (101), and a No. 2 motor (305) is installed outside the two fixing frames (301), and the end of the output shaft of the No. 2 motor (305) is inserted through the fixing frame (301) and fixedly connected to the threaded rod (302).

9. The method used in a machine vision-based traffic light status monitoring system according to any one of claims 1 to 8, characterized in that: The following steps are involved: Step 1. Environment preparation: Install necessary software packages, including OpenCV, TensorFlow / PyTorch and other dependent libraries; Step 2: Camera connection and video stream acquisition: Get the video stream from the network camera, for example, using OpenCV's VideoCapture class; Step 3: Image acquisition and processing: Capture images regularly and pre-process each frame; Step 4: Traffic light status recognition: Use a pre-trained deep learning model to classify the traffic light status. You can use the Transfer Learning method to simplify model training and pass the captured image into the model for status recognition. Step 5: Fault detection and alarm: Determine whether the traffic light is abnormal based on the recognition results. If an abnormality occurs, record it and notify the management personnel by email or SMS; Step 6. Data recording: record each test result, timestamp and status into a CSV file; Step 7: Loop execution: put the above process into a loop and perform image acquisition and processing at a regular interval; Step 8: System termination and resource release: System termination and resource release.