Non-motor vehicle behavior real-time monitoring method and system integrated with deep learning
By integrating deep learning technology and Kalman filter algorithm, the non-motor vehicle behavior detection model is optimized, which solves the problems of existing systems in terms of computing resource consumption, large data volume processing and environmental sensitivity, and achieves efficient non-motor vehicle behavior monitoring. , which improves the real-time and adaptability of the system.
Patent Information
- Application Number
- CN202410631179.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2024-09-27
AI Technical Summary
Existing non-motor vehicle behavior monitoring systems have deficiencies in computing resource consumption, large data processing capabilities, environmental sensitivity and real-time processing capabilities. In particular, there are computing bottlenecks when deployed on low-cost hardware and large-scale applications, and the algorithm is adaptive. Poor performance and difficulty in handling complex and non-standard data.
Use integrated deep learning technology, combined with Kalman filter algorithm and edge computing, to optimize the non-motor vehicle behavior detection model, process images through compression-expansion convolution, dilated convolution and feature pyramid network structure, and introduce adaptive loss functions and multi-task learning , configured on edge node devices for real-time data processing, using 4G modules and data processing units for screening and analysis.
It significantly improves the reliability and overall performance of non-motor vehicle behavior monitoring, reduces computing resource consumption, enhances anti-interference capabilities and big data processing capabilities, improves real-time response capabilities and algorithm generalization capabilities, and adapts to different environmental conditions.
Smart Images

Figure CN118711142A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent traffic monitoring technology, and in particular to a real-time monitoring method and system for non-motor vehicle behavior integrating deep learning. Background Art
[0002] In line with the rapid development of modern society, the complexity of urban transportation systems is increasing. As an indispensable part of the urban transportation network, the safety management and monitoring of non-motor vehicles are becoming a key challenge in urban transportation planning and management. Traditional non-motor vehicle monitoring mainly relies on manual observation and fixed video monitoring equipment. This method has significant limitations in real-time and accuracy, and is difficult to cope with the rapidly changing urban traffic environment. In particular, in the face of real-time monitoring and analysis of non-motor vehicle violations, traditional methods often fail to effectively identify and respond in the first place due to the lack of intelligent processing mechanisms.
[0003] The rapid development of intelligent and automated technologies has provided new solutions for upgrading non-motor vehicle traffic monitoring systems. In recent years, artificial intelligence algorithms with deep learning technology as the core have made breakthrough progress in image recognition, data analysis and other fields, making it possible to achieve high-accuracy recognition and automated monitoring of non-motor vehicle behaviors in complex traffic scenarios. However, the existing intelligent traffic monitoring systems still face considerable technical challenges in the comprehensive application of these advanced technologies, such as how to ensure that the system processes a large amount of dynamic video stream data in real time, how to improve the adaptability and accuracy of the system under different environmental conditions, and other issues. The Chinese invention patent application with publication number CN117218610A discloses a non-motor vehicle violation behavior data generation algorithm based on an adversarial neural network, which can effectively overcome the defects of the existing technology that cannot accurately and efficiently detect and collect evidence of non-motor vehicle violations.
[0004] However, the existing methods still have the following technical problems: (1) High consumption of computing resources. Although some systems have reduced resource consumption through lightweight models and knowledge distillation algorithms, existing technologies still have computing bottlenecks on hardware with limited resources, especially in high-definition video data processing. This limits the deployment and large-scale application of the system on low-cost hardware. (2) There are occlusion problems and environmental sensitivity problems. Although existing systems can identify a series of violations, they are prone to missed detection in environments with severe occlusion or changes in light and weather. Even advanced denoising algorithms are difficult to completely overcome these problems, which is particularly evident in areas with dense traffic or variable lighting conditions. (3) Practical problems in large-scale data processing capabilities. For example, the improved RES-YOLO algorithm shows potential in processing large amounts of data, with a local optimal accuracy of up to 95% and an average accuracy of more than 86%, but training time and specificity in multiple scenarios remain challenges. (4) Insufficient real-time processing capabilities. Although current technologies can perform behavior recognition in expressway or urban traffic monitoring, processing speed and false alarm rate become key factors restricting real-time performance in the case of high-speed movement and a large number of targets, especially in early warning systems that require immediate response. (5) Poor algorithm adaptability. Adaptive algorithms and loss functions still have limitations in their ability to handle complex and non-standard data. In particular, when faced with new scenarios or new types of violations, the adaptability and generalization capabilities of these systems are challenged, which may lead to a decline in recognition performance. Summary of the invention
[0005] The purpose of the present invention is to provide a real-time monitoring method and system for non-motor vehicle behavior integrating deep learning to solve at least one technical problem existing in the above-mentioned background technology.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a method for real-time monitoring of non-motor vehicle behavior integrating deep learning, comprising:
[0008] Acquire a non-motorized vehicle lane traffic condition image to be processed;
[0009] The acquired non-motor vehicle lane traffic condition images to be processed are processed using a pre-trained non-motor vehicle behavior detection model to obtain a detection result of whether the non-motor vehicle behavior is illegal; wherein, training the non-motor vehicle behavior detection model includes: obtaining training data; wherein, the training data includes multiple non-motor vehicle lane traffic condition images and labels of motor vehicle violations in the annotated images; the non-motor vehicle behavior detection model is trained using the training data to obtain a non-motor vehicle behavior detection model, wherein the Kalman filter algorithm is used to optimize the model training parameters.
[0010] Optionally, in the non-motor vehicle behavior detection model, the introduction of compression-expansion convolution improves the utilization efficiency of parameters and optimizes the feature representation effect; adding hole convolution to the traditional convolution layer effectively increases the receptive field and captures a wider range of contextual information without additional computational cost; using the feature pyramid network structure and multi-scale feature fusion technology, it can process input images of different resolutions and maintain high detection accuracy.
[0011] Optionally, an adaptive loss function is introduced in the non-motor vehicle behavior detection model, using multi-task learning loss with weight decay to automatically adjust the importance of losses between different tasks and promote task balance in the learning process.
[0012] Optionally, the Kalman filter algorithm includes: starting with an initial state estimate and error covariance; predicting the next state and predicting the error covariance based on a system dynamic model; and correcting the prediction using new measurement data to obtain an improved estimate.
[0013] Optionally, the non-motor vehicle behavior detection model is configured in an edge node device. After the data stream reaches the edge node device, it is first preprocessed, and then object recognition and feature extraction are performed to finally form an operational instruction for response or decision support.
[0014] Optionally, a 4G module and a data processing unit are configured on the edge node to process the collected data through a real-time analysis algorithm, screen, classify and pre-analyze the data, and extract key information for decision-making.
[0015] In a second aspect, the present invention provides a non-motor vehicle behavior real-time monitoring system integrating deep learning, comprising:
[0016] An acquisition module, used for acquiring a non-motor vehicle lane traffic condition image to be processed;
[0017] A processing module is used to use a pre-trained non-motor vehicle behavior detection model to process the acquired non-motor vehicle lane traffic condition image to be processed, and obtain a detection result of whether the non-motor vehicle behavior is illegal; wherein, training the non-motor vehicle behavior detection model includes: obtaining training data; wherein, the training data includes multiple non-motor vehicle lane traffic condition images and labels of motor vehicle violations in the annotated images; using the training data to train the non-motor vehicle behavior detection model to obtain the non-motor vehicle behavior detection model, wherein the Kalman filter algorithm is used to optimize the model training parameters.
[0018] In a third aspect, the present invention provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by a processor, the real-time monitoring method of non-motor vehicle behavior integrating deep learning as described in the first aspect is implemented.
[0019] In a fourth aspect, the present invention provides a computer device comprising a memory and a processor, wherein the processor and the memory communicate with each other, the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the real-time monitoring method for non-motor vehicle behavior integrating deep learning as described in the first aspect.
[0020] In a fifth aspect, the present invention provides an electronic device comprising: a processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the real-time monitoring method for non-motor vehicle behavior integrating deep learning as described in the first aspect.
[0021] The beneficial effects of the present invention are as follows: it effectively solves the problems of existing monitoring devices in terms of computing resource consumption, anti-interference ability, big data processing, real-time response ability and algorithm generalization ability, and significantly improves the reliability and overall performance of non-motor vehicle behavior monitoring.
[0022] Additional advantages of the present invention will be more clearly given in the following description or learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0024] Figure 1 This is a flow chart of the real-time monitoring method of non-motor vehicle behavior integrating deep learning according to an embodiment of the present invention.
[0025] Figure 2 This is a specific flow chart of the main function of the data processing algorithm of the real-time monitoring method of non-motor vehicle behavior integrating deep learning described in an embodiment of the present invention.
[0026] Figure 3 A localized flowchart for reducing computing power for edge computing as described in an embodiment of the present invention.
[0027] Figure 4 This is a basic flow chart for implementing the Kalman filter algorithm described in an embodiment of the present invention.
[0028] Figure 5 This is a general flow chart of integrating edge computing and Kalman filtering algorithms as described in an embodiment of the present invention.
[0029] Figure 6 It is a schematic diagram of the SOTA model and a flow chart of the reasoning process described in an embodiment of the present invention.
[0030] Figure 7 This is a flowchart of the algorithm for updating the database according to an embodiment of the present invention.
[0031] Figure 8 This is a design diagram of an efficient communication and processing system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below by the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0033] It should be understood by those skilled in the art that unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this invention belongs.
[0034] It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have a meaning consistent with that in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless as defined herein.
[0035] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements and / or groups thereof.
[0036] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. Different embodiments or examples described in this specification and features of different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
[0037] To facilitate understanding of the present invention, the present invention is further explained below with reference to specific embodiments in conjunction with the accompanying drawings, and the specific embodiments do not constitute a limitation on the embodiments of the present invention.
[0038] Those skilled in the art should understand that the drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily necessary for implementing the present invention.
[0039] In response to the problem of computing bottlenecks in existing technologies on hardware with limited resources, the present invention integrates the latest lightweight deep learning model combined with the Kalman filter algorithm. This combination optimizes the computing process, reduces the data transmission delay through edge computing, and reduces the burden on the central processor. This strategy means that even high-definition video data processing can achieve efficient data throughput, which is particularly suitable for traffic monitoring occasions with high requirements for real-time response. The advanced image processing technology used in the present invention is combined with the machine learning algorithm to intelligently adjust the image quality and eliminate image interference caused by occlusion or extreme lighting conditions. The system can also intelligently adapt to different weather conditions to ensure that clear and stable image output can be maintained in the case of strong winds, rain or extreme lighting changes, ensuring the continuous and efficient operation of the monitoring system. Through the layered data processing architecture of the cloud and the edge, the present invention can easily cope with the processing requirements of large-scale data sets. The data is optimized by advanced compression technology before transmission, and the edge computing device pre-processes the data locally, and only uploads the necessary data to the cloud, which greatly improves the data processing speed and efficiency, and adapts to the needs of the big data era. The real-time data stream processing of this device adopts an optimized and efficient algorithm, which is specially designed for real-time monitoring of busy roads or urban traffic scenes. These algorithms can process and analyze a large number of dynamic targets in a short period of time, reduce the false alarm rate, and quickly and accurately identify various types of traffic participants. They are very suitable for early warning systems that require immediate response. In terms of adaptability to new scenarios or unknown types of violations, the present invention uses multi-task learning and transfer learning techniques to enhance the generalization ability of the algorithm. The application of these technologies allows the algorithm to quickly learn the characteristics of new scenarios and adaptively update model parameters, ensuring that the monitoring system can still accurately respond and handle unknown situations.
[0040] Example 1
[0041] In this embodiment 1, a non-motor vehicle behavior real-time monitoring system integrated with deep learning is first provided, including: an acquisition module, used to obtain a non-motor vehicle lane traffic condition image to be processed; a processing module, used to use a pre-trained non-motor vehicle behavior detection model to process the acquired non-motor vehicle lane traffic condition image to be processed, and obtain a detection result of whether the non-motor vehicle behavior is illegal; wherein, training the non-motor vehicle behavior detection model includes: obtaining training data; wherein, the training data includes multiple non-motor vehicle lane traffic condition images and labels of motor vehicle violations in the annotated images; using the training data to train the non-motor vehicle behavior detection model to obtain a non-motor vehicle behavior detection model, wherein the Kalman filter algorithm is used to optimize the model training parameters.
[0042] In this embodiment 1, the above-mentioned system is used to implement a real-time monitoring method for non-motor vehicle behavior integrated with deep learning, including: using an acquisition module to acquire a non-motor vehicle lane traffic condition image to be processed; using a processing module to process the acquired non-motor vehicle lane traffic condition image to be processed using a pre-trained non-motor vehicle behavior detection model to obtain a detection result of whether the non-motor vehicle behavior is illegal; wherein, training the non-motor vehicle behavior detection model includes: acquiring training data; wherein, the training data includes multiple non-motor vehicle lane traffic condition images and labels of motor vehicle violations in the annotated images; using the training data to train the non-motor vehicle behavior detection model to obtain a non-motor vehicle behavior detection model, wherein the Kalman filter algorithm is used to optimize the model training parameters. wherein, the acquisition module can be, for example, an image acquisition device, a sensor, etc. integrated on an edge device.
[0043] In this embodiment, in the non-motor vehicle behavior detection model, the compression-expansion convolution is introduced to improve the utilization efficiency of parameters and optimize the feature representation effect; the hole convolution is added to the traditional convolution layer to effectively increase the receptive field and capture a wider range of contextual information without additional computational cost; the feature pyramid network structure and multi-scale feature fusion technology are used to process input images of different resolutions and maintain high detection accuracy. In the non-motor vehicle behavior detection model, an adaptive loss function is introduced, and a multi-task learning loss with weight decay is used to automatically adjust the importance of losses between different tasks and promote task balance in the learning process. The Kalman filter algorithm includes: an initial state estimate and error covariance at the beginning; predicting the next state and prediction error covariance according to the system dynamic model; and correcting the prediction using new measurement data to obtain an improved estimate. The non-motor vehicle behavior detection model is configured in the edge node device. After the data stream arrives at the edge node device, it is first pre-processed, followed by object recognition and feature extraction, and finally forms an operation instruction for response or decision support. A 4G module and a data processing unit are configured on the edge node, and the collected data is processed by a real-time analysis algorithm, and the data is screened, classified and pre-analyzed to extract key information for decision-making.
[0044] Example 2
[0045] like Figures 1 to 8 As shown, this embodiment 2 discloses an advanced real-time monitoring system for non-motor vehicle violations, which is configured with the non-motor vehicle behavior detection model as described in embodiment 1. The core of the system is to use deep learning technology to perform accurate real-time image recognition and data processing.
[0046] a. Dataset construction and model training: At the beginning of the launch of this system, we have been committed to building a comprehensive non-motor vehicle violation data set, which collects a large amount of image and video materials and annotates them with labels. These materials cover a variety of non-motor vehicle violation scenarios, thus ensuring the quality of the data set and the breadth of model training. On this basis, we use cutting-edge deep learning technology to train the model and continuously improve its ability to adapt and respond to complex actual situations.
[0047] b. Hardware setup and video stream collection: To ensure efficient data collection, we designed an all-in-one terminal equipped with a high-performance Jetson Nano processor, which is specially customized for machine learning applications. This configuration not only ensures high efficiency of data processing, but also optimizes energy consumption. With the well-designed camera system, the terminal can perform long-term video collection in areas with heavy traffic and stably capture clear images under various lighting conditions.
[0048] c. Image recognition and violation detection: The video stream data collected in large quantities by the end-side devices will automatically select key frames at preset time intervals for analysis by the trained deep learning model, and identify various violations in real time, such as not wearing a helmet, running a red light, etc. The model converts video frames into a series of structured information, dynamically updates the database and generates an operational CSV file, laying the foundation for further data analysis.
[0049] d. Data upload and cloud platform analysis: Once the csv file in the local database is ready, it can be uploaded to the cloud platform. The platform has powerful data processing and analysis capabilities and can receive and analyze massive amounts of data from many terminals. Through cooperation with government traffic management departments, the cloud platform analysis results can not only guide traffic policy formulation, but also provide feedback on driving behaviors in different scenarios through social platforms such as WeChat, helping to ensure urban traffic safety.
[0050] The core of the acquisition module is the high-definition camera system. These cameras not only provide high-resolution quality for images, but are also designed to work stably under extreme lighting and climate conditions. The cameras can accurately capture the direction, speed, and even the acceleration of non-motor vehicles, providing strong data support for the identification of non-motor vehicle violations. These data are valuable resources for machine learning model training and subsequent processing.
[0051] like Figure 2 As shown in the figure, in this embodiment, through the careful collection of data sets in the early stage and the construction of a new SOTA model, the system has made great breakthroughs in data analysis, enabling it to accurately identify the driving path, speed changes and compliance with traffic rules of non-motor vehicles. The model is further developed on the basis of deep learning and integrates the latest computer vision technologies such as target tracking and scene understanding, which enables it to work stably in complex road environments.
[0052] After the data acquisition module completes the initial video data collection, a complex processing pipeline is adopted, including image capture, target tracking, real-time analysis and data recording.
[0053] (a) Image processing and target tracking:
[0054] Using Python and CUDA 11.8 deep learning library, efficient image processing functions are integrated. The capture and display logic of real-time video streams is built through PySide6 (Python implementation of Qt library).
[0055] The image capture process is controlled by the run() method in the CameraThread class, which calls cv2.VideoCapture to continuously read video frames.
[0056] For each frame, object detection is performed using a YOLO instance, and object tracking is achieved through DeepSort to ensure that each non-motor vehicle entity can be tracked coherently in the video.
[0057] (b) Real-time analysis:
[0058] As the YOLO instance analyzes a video frame, it outputs various statistics, including a breakdown of each identified object and its location in the image. In addition, the instance calculates speed via the estimate_speed() function, which is supported by the pixel-to-real-distance conversion logic.
[0059] PaddleOCR can be used to parse text in images, such as vehicle license plates. Combined with the high-precision entity recognition capabilities of deep learning models, it can further enrich the information recorded for non-motor vehicle violations.
[0060] (c) Data Records:
[0061] When a traffic violation is detected, the system can save a copy of the image with a warning label via cv2.imwrite.
[0062] In addition, through the preset conversion functions xyxy_to_tlwh() and compute_color_for_labels(), the system can draw the detection results on the output image and generate a real-time video stream with warning and speed labels.
[0063] Finally, the system stores all detected information in a CSV file, which is handled by csv.writer.
[0064] The above is a general process of a real-time monitoring method and system for non-motor vehicle behavior integrating deep learning.
[0065] The core technology of the data processing part in this embodiment is mainly divided into three parts: edge computing, Kalman filtering algorithm, and a new SOTA model.
[0066] (1) Edge computing:
[0067] like Figure 3 As shown in the figure, edge computing nodes are usually located near users or data generation locations, and can perform multi-task processing, such as data collection, preprocessing, and storage. The local processing flow of edge computing is as follows: When the data stream arrives at the edge node, it is first preprocessed, such as denoising, formatting, and compression, followed by real-time analysis, such as object recognition and feature extraction, and finally forms an operational instruction to respond or provide decision support.
[0068] The delay reduction can also be expressed by the formula ΔL = L * ΔL = Lcloud -L edge , where L cloud is the delay of uploading data to the cloud center, L edge The delay in edge node processing,the difference ΔL reflects the time advantage.
[0069] The edge computing framework allows data processing to occur closer to the data source or user. This effectively addresses the challenges of cloud computing due to network latency and bandwidth constraints, especially when processing large amounts of real-time data. For example, in an intelligent transportation system, edge devices deployed at each detection point can process traffic information in real time, providing the traffic control center with real-time and accurate data, making control decisions faster and more accurate.
[0070] In this embodiment, the edge computing framework is flexibly integrated into the non-motor vehicle supervision system, giving the system the ability to complete complex calculations near the data source. This configuration significantly improves the timeliness of data processing and ensures rapid response even in the face of network latency and bandwidth limitations. For intelligent traffic monitoring, it means that edge computing units deployed at various key nodes in the city can immediately process the flow information of passing non-motor vehicles and implement advanced behavioral analysis.
[0071] By introducing edge computing, the non-motor vehicle supervision system of this embodiment improves the response speed while ensuring data processing accuracy, providing regulatory authorities with immediate and accurate response suggestions, and bringing major innovations to the field of traffic safety management. By gradually replacing or supplementing the traditional centralized computing strategy, this technology can significantly reduce the overall response time of the system, making supervision actions more sensitive and accurate, and greatly improving the decision-making quality and execution efficiency of the current intelligent transportation system.
[0072] (2) Kalman filter algorithm:
[0073] (a) The implementation process of the Kalman filter algorithm is as follows Figure 4 As shown: Kalman filtering is an effective prediction and correction tool that can estimate the state of a dynamic system, even in the face of uncertain measurement data and noise. The Kalman filter algorithm can provide a new state estimate based on the system's past data and new observations, which is crucial for dynamic systems with time series data.
[0074] The basic algorithm steps are as follows: Initial estimation: Start with an initial state estimate and error covariance. Prediction step: Predict the next state and the prediction error covariance based on the system dynamics model. Update step: Use new measurement data to correct the prediction to obtain an improved estimate.
[0075] In dynamic systems, such as traffic monitoring or navigation systems, Kalman filtering can update and correct the position and speed of vehicles or moving objects in real time, reduce estimation errors, and improve the overall stability and reliability of the system.
[0076] (b) Integration with edge computing:
[0077] like Figure 5 As shown in the figure, the workflow of the integration of Kalman filter algorithm and edge computing can be roughly divided into the following processes: Data acquisition: Collect raw data from sensors and other data sources. Data transmission to edge nodes: Send the collected data to edge nodes that are physically close to the data source or user. Edge data processing: On the edge node, apply preprocessing algorithms such as data filtering, formatting, and denoising. Real-time data analysis: Use the Kalman filter algorithm to perform further precise analysis and state estimation on the preprocessed data. State prediction and update: Use the prediction-correction step in the Kalman filter algorithm to optimize the real-time response and decision correctness of the system. Action output: Generate response measures or operation instructions based on the corrected data and implement corresponding physical operations.
[0078] Kalman filtering technology, combined with edge computing, greatly improves the data processing capability of this embodiment, which can be specifically reflected in the following aspects:
[0079] Enhanced real-time performance: The deployment of edge computing significantly reduces the reliance on data centers. By localizing computing resources, the system can respond to environmental changes and data flows more quickly. Combined with Kalman filtering, even when the data quality is low or contains noise, it can ensure that the quality of information processing is not affected, which strongly supports the effective management of errors.
[0080] Comprehensive improvement in robustness: The Kalman filter algorithm enhances the data processing capabilities of edge computing nodes, enabling the system to accurately capture and analyze the behavior of non-motorized vehicles in uncertain environments. In this way, the system can provide stable and reliable monitoring and respond to potential dangers or abnormal situations in a timely manner.
[0081] Simultaneous optimization of efficiency and accuracy: The Kalman filter algorithm is directly integrated on the edge device, so that the vehicle flow monitoring system can efficiently perform complex data analysis and processing without having to transmit all data back to the cloud server, solving the real-time requirements, reducing information redundancy and transmission costs, and at the same time improving the accuracy of the entire monitoring system through the prediction model optimized by the Kalman filter.
[0082] In the monitoring system, the database processing and cloud platform upload modules play a vital role. The following is a detailed analysis of the process and the application description of the relevant code:
[0083] In this embodiment, a new SOTA model is used. The structural innovation of this lightweight deep learning model is improved as follows:
[0084] (a) Refined convolution block design: In order to achieve lightweight, the model uses carefully designed micro-convolution blocks and lightweight convolution layers to reduce the number of parameters and computational complexity. For example, the introduction of squeeze-and-excitation convolution improves the efficiency of parameter utilization, thereby optimizing the effect of feature representation. By adding dilated convolution to the traditional convolution layer, the receptive field is effectively increased and a wider range of contextual information is captured without additional computational cost. This model also uses the feature pyramid network (FPN) structure and multi-scale feature fusion technology to ensure that the model can handle inputs of different resolutions and maintain high detection accuracy. Through refined convolution block design and advanced computational optimization processes, a significant improvement in the accuracy of non-motor vehicle recognition has been successfully achieved, while minimizing the requirements for computing resources.
[0085] (b) Innovative loss functions and training strategies: Adaptive loss functions are introduced in the new SOTA model, such as using multi-task learning loss with weight decay to automatically adjust the importance of losses between different tasks and promote task balance in the learning process. End-to-end optimization technology is developed to optimize all layers simultaneously during training, reduce memory usage and improve computing efficiency, and ensure rapid convergence of the model.
[0086] (c) Model training and data enhancement: The SOTA model adopts a phased training strategy, first pre-training on a simple data set, and then gradually introducing complex data and tasks to refine the model capabilities. This SOTA model also applies a meta-learning framework to allow the model to quickly adapt to new tasks and achieve effective learning on a small number of samples, which is suitable for small-scale or transfer learning scenarios. The use of hierarchical training strategies and meta-learning methods allows the model to quickly adapt to specific monitoring scenarios and special tasks after obtaining a preliminary form on a general data set, which is particularly critical in processing the growing and diverse urban traffic data. Through the composite application of these technologies, the non-motor vehicle monitoring system of the present invention can quickly and accurately track and analyze the real-time behavior of non-motor vehicles, ensuring the advancement and practicality of the system in maintaining road safety and improving traffic efficiency.
[0087] (d) Description of the reasoning process: Advanced deep learning models adopt a modular and cascading design. While maintaining computational efficiency, they combine parameters and operation units of different scales to form feature extraction and analysis modules suitable for processing information of different levels and types. Figure 6 As shown, the general process is as follows:
[0088] Data collection and organization: Collect data from various sources (such as sensors, databases, etc.) and perform preliminary cleaning and organization. Data enhancement and preprocessing: Enhance the data set, such as random rotation, scaling, cropping, and color adjustment to enhance the generalization ability of the model. Model structure design: Adopt modular and lightweight network design, such as using deep separable convolution to reduce parameters and calculations. Loss function construction: Design loss functions suitable for multi-tasks and practical applications, such as combining balanced category weights and IOU metric losses. Training strategy optimization: Apply dynamic learning rate, regularization and other techniques to gradually optimize model parameters. Loss optimization and back propagation: Optimize the loss through the back propagation algorithm and adjust the network parameters to minimize the final loss. Model weight and hyperparameter update: Update the model weight and hyperparameters according to the results of back propagation. Model verification and fine-tuning: Test the model performance on the verification set and make necessary model fine-tuning based on the results. Inference and model deployment strategy: Implement efficient feedforward calculations in the inference stage, deploy models for practical applications, and optimize the operation strategy.
[0089] In this embodiment, the pymysql library is used to establish a connection with the mysql database by writing the relevant algorithm for database update. Database authentication information - including host address, database name, user name, password - is pre-defined in the DATABASE dictionary, which ensures safe access to the database. In the algorithm, using the f() function, the system continuously monitors and compares the new and old CSV files to determine whether there is new violation data that needs to be uploaded. During the comparison process, if it is found that there are data rows in the new CSV file that are not recorded in the old file, the specific information of these new records is parsed, and its fields include: illegal license plate number, location, time, speed, and violation type, etc.
[0090] Database table maintenance and violation data entry: If new violation data is detected, the system first verifies whether there is a data table for the corresponding location in the database. If not, the system will automatically create a new table. In the database, the new violation event record is inserted into the corresponding database table by executing the INSERT statement. Each record covers detailed violation information, such as speeding, occupying the road, not wearing a helmet, and illegal modification, and marks the specific time and location.
[0091] Automated task scheduling and real-time updates: Figure 7 As shown, in order to automate the updating process of violation data, the system uses sched.scheduler for task scheduling, which is implemented by executing the f() function at a fixed time (taking the setting of executing it every 5 seconds in this example) to ensure that the system can respond to new violations with high timeliness. After each execution of the f() function, if new data is inserted, the output prompt "Data update successful" is output for the system administrator to track the progress of the processing.
[0092] In this embodiment, 4G modules are used to achieve fast data transmission from remote sensors to edge nodes. Dynamic network conditions, such as network congestion and signal weakening, are adapted to maintain communication quality by adjusting signal transmission power and strategies. Combined with the distribution characteristics of edge computing nodes, data transmission paths are optimized to reduce communication delays.
[0093] like Figure 8 As shown, a 4G module and a data processing unit are configured on the edge node, such as a microcontroller with a real-time operating system or a server using a customized operating system. The collected data is processed by a real-time analysis algorithm, and the data is screened, classified, and pre-analyzed to extract key information for decision-making. A localized storage strategy is implemented to temporarily store necessary data in order to cope with network disconnection or performance bottlenecks. Based on the distribution advantages of edge computing nodes, this system optimizes the transmission path, significantly reduces the communication delay, and enhances the real-time responsiveness of the supervision system.
[0094] After the local data is compared, updated and successfully entered into the database, the latest violation data will be obtained by the cloud platform and can be used for subsequent analysis. The cloud platform uses these structured data to analyze traffic safety patterns and predict violation trends, and can feed back the analysis results to the traffic management department to assist it in optimizing traffic control measures and improving the overall safety of urban traffic.
[0095] The above describes the implementation details and operation logic of the system in terms of database processing and cloud platform uploading, highlighting its technical innovations of automation, real-time and wide application. Through this carefully constructed database conversion and Internet data processing steps, the monitoring system provides an efficient and reliable mechanism to support the supervision and management of large-scale non-motor vehicle violations.
[0096] In summary, in this embodiment, targeted loss function optimization is adopted to ensure that accuracy and robustness can be maintained under uneven data distribution. Through the specially set dynamic learning rate and early stopping strategy during the training period, the learning model converges quickly and reduces the risk of overfitting. The 4G long-distance communication and edge computing capabilities are innovatively integrated, and the seamless connection between data transmission and processing is achieved through the intelligent processing units deployed on key network nodes. This design greatly improves the speed and efficiency of data processing and ensures that near real-time response and decision support can be obtained at any time. The application of Kalman filtering technology is integrated into the hardware system, which significantly improves the accuracy of data processing under complex and changing environmental conditions. This technology can effectively combat data signal interference caused by environmental factors and enhance the robustness and stability of the system. It provides a complete set of data processing processes from front-end collection to cloud feedback, which reflects the comprehensive mastery of information processing in the era of big data. Not only does it strengthen the consistency of data management and use, but also through the powerful analysis capabilities of the cloud platform. Advanced deep learning technology and edge computing strategies are used to improve the real-time, accuracy and environmental adaptability of non-motor vehicle monitoring. By deploying optimized deep learning models at edge nodes, the system can achieve efficient real-time monitoring and analysis of non-motor vehicle behavior. In addition, combined with Kalman filtering technology, the tracking accuracy of target non-motor vehicles is further enhanced, especially in complex traffic environments. Intelligent system integrating long-distance communication and edge computing: In terms of integrating 4G communication capabilities, by optimizing data transmission protocols and algorithms, it provides better data rate and stability than existing technologies, further reduces latency, and improves the performance of real-time data processing. Existing systems usually process data in centralized data centers, while this embodiment sinks computing resources to the edge of the network, significantly improving the processing speed and reducing the complexity and cost of data processing. By adopting advanced data enhancement techniques and loss functions, such as algorithms that increase noise tolerance and context adaptability, it shows higher accuracy and adaptability when facing a changing data environment. The new SOTA model adopted surpasses existing models, especially in real-time processing of non-motor vehicle data. Compared with existing technologies, this significantly improves the practical application value and innovation of the model. In addition to multi-sensor data fusion technology, as an alternative, a single type of but highly sensitive sensor can be used with advanced signal processing software to improve environmental adaptability. Deep learning development framework documentation, edge computing platform information, HD camera specifications, smart fill light module instructions, environmental sensing sensor module information, data processing and user interaction platform development documentation.
[0097] Example 3
[0098] This embodiment 3 provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the method for real-time monitoring of non-motor vehicle behaviors integrated with deep learning as described above is implemented. The method includes:
[0099] Acquire a non-motorized vehicle lane traffic condition image to be processed;
[0100] The acquired non-motor vehicle lane traffic condition images to be processed are processed using a pre-trained non-motor vehicle behavior detection model to obtain a detection result of whether the non-motor vehicle behavior is illegal; wherein, training the non-motor vehicle behavior detection model includes: obtaining training data; wherein, the training data includes multiple non-motor vehicle lane traffic condition images and labels of motor vehicle violations in the annotated images; the non-motor vehicle behavior detection model is trained using the training data to obtain a non-motor vehicle behavior detection model, wherein the Kalman filter algorithm is used to optimize the model training parameters.
[0101] Example 4
[0102] This embodiment 4 provides a computer device, including a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions executable by the processor, the processor calls the program instructions to execute the above-mentioned non-motor vehicle behavior real-time monitoring method integrated with deep learning, the method comprising:
[0103] Acquire a non-motorized vehicle lane traffic condition image to be processed;
[0104] The acquired non-motor vehicle lane traffic condition images to be processed are processed using a pre-trained non-motor vehicle behavior detection model to obtain a detection result of whether the non-motor vehicle behavior is illegal; wherein, training the non-motor vehicle behavior detection model includes: obtaining training data; wherein, the training data includes multiple non-motor vehicle lane traffic condition images and labels of motor vehicle violations in the annotated images; the non-motor vehicle behavior detection model is trained using the training data to obtain a non-motor vehicle behavior detection model, wherein the Kalman filter algorithm is used to optimize the model training parameters.
[0105] Example 5
[0106] This embodiment 5 provides an electronic device, including: a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes instructions for implementing the method for real-time monitoring of non-motor vehicle behavior integrated with deep learning as described above, the method comprising:
[0107] Acquire a non-motorized vehicle lane traffic condition image to be processed;
[0108] The acquired non-motor vehicle lane traffic condition images to be processed are processed using a pre-trained non-motor vehicle behavior detection model to obtain a detection result of whether the non-motor vehicle behavior is illegal; wherein, training the non-motor vehicle behavior detection model includes: obtaining training data; wherein, the training data includes multiple non-motor vehicle lane traffic condition images and labels of motor vehicle violations in the annotated images; the non-motor vehicle behavior detection model is trained using the training data to obtain a non-motor vehicle behavior detection model, wherein the Kalman filter algorithm is used to optimize the model training parameters.
[0109] In summary, the real-time monitoring method and system of non-motor vehicle behavior integrated with deep learning described in the embodiment of the present invention realizes real-time monitoring of non-motor vehicle behavior and detection of violation behaviors by integrating deep learning technology with an edge computing platform, while realizing rapid data processing and feedback, thereby reducing the consumption of computing resources; by introducing Kalman filtering technology and optimizing deep learning algorithms, and adopting improved state estimation algorithms, the stability and accuracy of the system under complex environmental conditions such as illumination changes and occlusions are enhanced; by using the latest SOTA model integrated by the system and optimizing the network structure design, the model can efficiently process large-scale monitoring data; by optimizing the model reasoning process and the training data enhancement strategy, the system can respond quickly at the moment of receiving video data to realize real-time monitoring and early warning; by innovating in Loss calculation and training strategies, new loss functions and positive sample allocation strategies are introduced, thereby improving the adaptability of the model to different traffic scenarios.
[0110] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0111] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0114] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative work on the basis of the technical solution disclosed in the present invention should be included in the scope of protection of the present invention.
Claims
1. A real-time monitoring method for non-motor vehicle behavior integrating deep learning, characterized in that: include: Acquire a non-motorized vehicle lane traffic condition image to be processed; The acquired non-motor vehicle lane traffic condition images to be processed are processed using a pre-trained non-motor vehicle behavior detection model to obtain a detection result of whether the non-motor vehicle behavior is illegal; wherein, training the non-motor vehicle behavior detection model includes: obtaining training data; wherein, the training data includes multiple non-motor vehicle lane traffic condition images and labels of motor vehicle violations in the annotated images; the non-motor vehicle behavior detection model is trained using the training data to obtain a non-motor vehicle behavior detection model, wherein the Kalman filter algorithm is used to optimize the model training parameters.
2. The method for real-time monitoring of non-motor vehicle behaviors integrated with deep learning according to claim 1 is characterized in that: In the non-motor vehicle behavior detection model, the introduction of compression-expansion convolution improves the utilization efficiency of parameters and optimizes the feature representation effect; adding hole convolution to the traditional convolution layer effectively increases the receptive field and captures a wider range of contextual information without additional computational cost; using the feature pyramid network structure and multi-scale feature fusion technology, it can process input images of different resolutions and maintain high detection accuracy.
3. The method for real-time monitoring of non-motor vehicle behaviors integrated with deep learning according to claim 1 is characterized in that: In the non-motor vehicle behavior detection model, an adaptive loss function is introduced, and a multi-task learning loss with weight decay is used to automatically adjust the importance of losses between different tasks and promote task balance in the learning process.
4. The method for real-time monitoring of non-motor vehicle behaviors integrated with deep learning according to claim 1 is characterized in that: The Kalman filter algorithm includes: starting with an initial state estimate and error covariance; predicting the next state and prediction error covariance based on the system dynamic model; and correcting the prediction using new measurement data to obtain an improved estimate.
5. The method for real-time monitoring of non-motor vehicle behaviors integrated with deep learning according to claim 1 is characterized in that: The non-motor vehicle behavior detection model is configured in an edge node device. After the data stream reaches the edge node device, it is first preprocessed, then object recognition and feature extraction are performed, and finally an operation instruction for response or decision support is formed.
6. The method for real-time monitoring of non-motor vehicle behaviors integrated with deep learning according to claim 5 is characterized in that: The edge nodes are equipped with 4G modules and data processing units, which process the collected data through real-time analysis algorithms, screen, classify and pre-analyze the data, and extract key information for decision-making.
7. A real-time monitoring system for non-motor vehicle behavior integrating deep learning, characterized in that: include: An acquisition module, used for acquiring a non-motorized vehicle lane traffic condition image to be processed; A processing module is used to use a pre-trained non-motor vehicle behavior detection model to process the acquired non-motor vehicle lane traffic condition image to be processed, and obtain a detection result of whether the non-motor vehicle behavior is illegal; wherein, training the non-motor vehicle behavior detection model includes: obtaining training data; wherein, the training data includes multiple non-motor vehicle lane traffic condition images and labels of motor vehicle violations in the annotated images; using the training data to train the non-motor vehicle behavior detection model to obtain the non-motor vehicle behavior detection model, wherein the Kalman filter algorithm is used to optimize the model training parameters.
8. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by the processor, the real-time monitoring method of non-motor vehicle behavior integrated with deep learning as described in any one of claims 1-6 is implemented.
9. A computer device, characterized in that: It includes a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the real-time monitoring method of non-motor vehicle behavior integrating deep learning as described in any one of claims 1-6.
10. An electronic device, characterized in that: include: A processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the real-time monitoring method for non-motor vehicle behavior integrated with deep learning as described in any one of claims 1-6.
