Method, System, Terminal and Medium for Detecting Abnormal Behaviors of Hazardous Chemical Transportation Vehicles
Through multi-objective detection model and deep learning technology, combined with image multi-layer feature information and clustering algorithm, the problem of inaccurate detection of abnormal behaviors of hazardous chemical transport vehicles is solved, efficient detection and early warning is achieved, and detection accuracy is improved.
Patent Information
- Application Number
- CN202310273606.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2043-03-20
AI Technical Summary
The existing technology has inaccurate detection of hazardous chemical transport vehicles and abnormal behaviors on key road sections, and cannot be promptly warned, resulting in high accident risk.
The multi-objective detection model is used to combine image multi-layer feature information, fusion clustering algorithm and Deep Sort algorithm to detect abnormal behaviors of hazardous chemical transport vehicles through deep learning, and features are extracted using DenseNet and Dense FPN models, and precise detection is performed by combining target detection and trajectory tracking.
It improves the accuracy of detection of abnormal behaviors of hazardous chemical transport vehicles, achieves timely warnings, and reduces the waste of human and material resources.
Smart Images

Figure CN116311097B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hazardous chemicals management and control in transportation, and in particular to a technology for automatic identification and control of abnormal behavior of hazardous chemical transport vehicles based on deep learning and image processing technology. Specifically, it relates to a method, system, terminal and medium for detecting abnormal behavior of hazardous chemical transport vehicles. Background Art
[0002] A complete and perfect transportation monitoring system is one of the important factors in safeguarding the safety of people's lives and property and national development.
[0003] With the rapid development of the petrochemical industry, the demand for hazardous chemicals (hereinafter referred to as hazardous chemicals) continues to rise in more and more fields. Due to the extremely uneven distribution of the production and sales locations of hazardous chemicals, the vast majority of hazardous chemicals production and sales require long-distance transportation from different locations. Compared to traffic accidents involving ordinary vehicles, traffic accidents involving hazardous chemical transport vehicles during road transportation pose a serious threat to the safety of vehicles traveling on the same road section. The accident has a wide range of impacts and can also have a serious impact on the surrounding ecological environment. The uncertainty of the time and frequency of the appearance of hazardous chemical transport vehicles requires a large amount of manpower and material resources to monitor hazardous chemical transport vehicles and abnormal behavior. How to quickly and efficiently detect hazardous chemical transport vehicles and abnormal vehicle behavior on key sections of road, provide timely warnings, and reduce the occurrence of secondary injuries that may be caused by accidents has become a matter of great significance. Summary of the Invention
[0004] In order to overcome the defects of the above-mentioned prior art, the purpose of the present invention is to provide a method, system, terminal and medium for detecting abnormal behavior of hazardous chemical transport vehicles, so as to solve the technical problem that the current technology is inaccurate in detecting hazardous chemical transport vehicles and abnormal behavior of vehicles on key sections and cannot provide early warning.
[0005] The present invention is achieved through the following technical solutions:
[0006] A method for detecting abnormal behavior of hazardous chemical transport vehicles comprises the following steps:
[0007] Step 1: Obtain original images of hazardous chemical transport vehicles and abnormal behavior, and establish a hazardous chemical vehicle dataset; input the hazardous chemical transport vehicle and abnormal behavior image files into the hazardous chemical vehicle dataset for preprocessing to obtain a hazardous chemical transport vehicle and abnormal behavior test set and training set;
[0008] Step 2: Build a multi-target detection model based on the established hazardous chemicals vehicle dataset and fuse multi-layer feature information of the image into the multi-target detection model;
[0009] Step 3: Input the training set of hazardous chemical transport vehicles and abnormal behaviors into the multi-target detection model for training, and adjust the parameters to obtain the optimal training model;
[0010] Step 4: Verify the optimal training model using a test set of hazardous chemical transport vehicles and abnormal behavior;
[0011] In step 5, the clustering algorithm and Deep Sort algorithm are integrated into the target detection algorithm of the verified optimal training model to analyze and detect abnormal behavior of hazardous chemicals, completing the abnormal behavior detection of hazardous chemical transport vehicles.
[0012] Preferably, in step 1, the specific steps are as follows:
[0013] Step 11: Using road surveillance videos, organize video clips containing vehicles transporting hazardous chemicals;
[0014] Step 12: Obtain original images of hazardous chemical transport vehicles and abnormal behaviors by capturing them in fixed frames;
[0015] Step 13: Create a hazardous chemical vehicle dataset. The original images of hazardous chemical transport vehicles and abnormal behaviors are input into the hazardous chemical vehicle dataset for preprocessing. The original images are annotated to obtain a label file for hazardous chemical vehicles.
[0016] Step 14: Set the correspondence between the label file and the original image objection, perform category classification to obtain the hazardous chemical transport vehicle and abnormal behavior test set and training set.
[0017] Preferably, in step 2, convolution and pooling operations are included in the multi-target detection model. The original image of the hazardous chemical vehicle dataset is convolved and pooled to obtain a feature map, and the feature map is passed through a fully connected layer to obtain the classification and coordinate information of the object; wherein the convolution and pooling operation steps are as follows:
[0018] The original images of the hazardous chemical vehicle dataset are subjected to DenseNet to extract features. A single-shot object detector using the feature pyramid DenseFPN as the base model is constructed, imitating the Dense network. Each layer of the feature pyramid Dense FPN is used as input and a feature pyramid Dense FPN is constructed. The constructed feature pyramid Dense FPN fuses the multi-layer feature information of the image.
[0019] Preferably, in step 3, the training set of hazardous chemical transport vehicles and abnormal behaviors is input into the multi-target detection model for training, wherein the specific steps are as follows:
[0020] Step 31: Build the environment required by the model, conduct comparative experiments to select the optimal parameters, and train the model with different learning rates under the same pre-trained model and other parameters.
[0021] Step 32: The trained model is tested on the test set, and the test results and evaluation indicators are compared;
[0022] Step 33: Under the same learning rate and other parameters, different pre-training models are selected to train the network, the trained models are tested, the test results and evaluation indicators are compared, and the final pre-training model is selected;
[0023] Step 34, comparing the detection results and evaluation indicators of step 32 and step 33 to obtain the optimal training model.
[0024] Preferably, in step 4, the optimal training model is verified using the average accuracy mean of the hazardous chemicals transport vehicle and abnormal behavior test set, wherein the steps are as follows:
[0025] Step 41, calculating the detection accuracy and recall rate of the model;
[0026] The formula for calculating the model detection accuracy is as follows:
[0027]
[0028] Among them, TP represents the number of correctly detected targets, and FP is the number of negative samples detected by the model as positive samples;
[0029] The calculation formula for recall is as follows:
[0030]
[0031] Among them, TP represents the number of correctly detected targets, and FN represents the number of positive samples that the model mistakenly identifies as negative samples;
[0032] Step 42: After obtaining the accuracy and recall of the model detection, a rectangular coordinate system is established with the recall rate and accuracy rate as the horizontal axis and vertical axis respectively. The experimental data is plotted into the coordinate system to obtain a curve. The area enclosed by this curve and the coordinate axis is the average accuracy (AP) of the model detection of a certain category. According to step 41, the AP of each category is calculated and then the average is obtained to obtain the mean average accuracy (mAP) of the model.
[0033] In step 43, the optimal training model is verified by the mean average precision (mAP) of the model.
[0034] Preferably, in step 5, the clustering algorithm and the Deep Sort algorithm are integrated into the target detection algorithm of the verified optimal training model to analyze and detect abnormal behavior of hazardous chemicals. The steps are as follows:
[0035] Step 51, using the object detection algorithm to analyze each input frame and identify objects belonging to a specific category, giving the classification and coordinates;
[0036] Step 52: using one or more feature extraction algorithms to extract appearance features, motion or interaction features, and using the trajectory to predict the next position of the target;
[0037] Step 53, the performance features and motion features can be used to calculate the similarity between the two objects;
[0038] In step 54 , the calculated similarity is used as a basis to associate the detection objects and trajectories belonging to the same target, and the detection objects are assigned the same ID as the trajectory.
[0039] Preferably, the target detection algorithm includes the error caused by the input shape dimension part, that is, the loss L caused by the prior frame box , the error caused by confidence is the loss L caused by the target to be detected obj And the error caused by the category, that is, the loss L caused by the class class ; The formula for total loss is as follows:
[0040] Loss = L box +L class +L obj
[0041]
[0042]
[0043]
[0044] Among them, L box is the prior box loss, L obj is the loss caused by the target to be detected, L class is the category error loss.
[0045] A system for detecting abnormal behavior of hazardous chemicals transport vehicles, comprising
[0046] The first processing module is used to obtain the original images of hazardous chemical transport vehicles and abnormal behavior and establish a hazardous chemical vehicle dataset; the hazardous chemical transport vehicle and abnormal behavior image files are input into the hazardous chemical vehicle dataset for preprocessing to obtain the hazardous chemical transport vehicle and abnormal behavior test set and training set;
[0047] A model building module is used to build a multi-target detection model based on the established hazardous chemical vehicle dataset and fuse multi-layer feature information of the image into the multi-target detection model;
[0048] The second processing module is used to input the training set of hazardous chemical transport vehicles and abnormal behaviors into the multi-target detection model for training and adjust the parameters to obtain the optimal training model;
[0049] Verification module, used to verify the optimal training model using hazardous chemical transport vehicles and abnormal behavior test sets;
[0050] The analysis and detection module is used to integrate the clustering algorithm and the Deep Sort algorithm into the target detection algorithm of the verified optimal training model to analyze and detect abnormal behaviors of hazardous chemicals, and complete the abnormal behavior detection of hazardous chemical transport vehicles.
[0051] A mobile terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for detecting abnormal behavior of hazardous chemical transport vehicles as described above are implemented.
[0052] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for detecting abnormal behavior of a hazardous chemical transport vehicle as described above.
[0053] Compared with the prior art, the present invention has the following beneficial technical effects:
[0054] The present invention provides a method for detecting abnormal behavior of hazardous chemical transport vehicles, which combines target detection and trajectory tracking to detect abnormal behavior of hazardous chemical vehicles. It can not only accurately detect hazardous chemical vehicles, but also track vehicles and judge and detect vehicle behavior; it fully utilizes the characteristics of the target, and each layer of feature map is used as output, which solves the problem of gradient disappearance; the present invention integrates target detection algorithm, clustering algorithm, and Deep Sort algorithm, improves the accuracy of detection of hazardous chemical transport vehicles and abnormal behavior of vehicles on key sections, and facilitates early warning. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is a flow chart of the method for detecting abnormal behavior of hazardous chemical transport vehicles in the present invention;
[0056] Figure 2 Label documents for vehicles transporting hazardous chemicals;
[0057] Figure 3 Flowchart for identifying vehicles transporting hazardous chemicals;
[0058] Figure 4 It is the DenseNet network structure;
[0059] Figure 5Schematic diagram of the DenseFPN structure;
[0060] Figure 6 This is the identification rendering of hazardous chemicals transport vehicles. DETAILED DESCRIPTION
[0061] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described 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 making creative efforts should fall within the scope of protection of the present invention.
[0062] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0063] The present invention is described in further detail below with reference to the accompanying drawings:
[0064] The purpose of the present invention is to provide a method, system, terminal and medium for detecting abnormal behavior of hazardous chemical transport vehicles, so as to solve the technical problem that the current technology is inaccurate in detecting hazardous chemical transport vehicles and abnormal behavior of vehicles on key sections and cannot provide early warning.
[0065] Specifically, according to Figure 1 As shown, the method for detecting abnormal behavior of hazardous chemical transport vehicles includes the following steps:
[0066] Step 1: Obtain original images of hazardous chemical transport vehicles and abnormal behavior, and establish a hazardous chemical vehicle dataset; input the hazardous chemical transport vehicle and abnormal behavior image files into the hazardous chemical vehicle dataset for preprocessing to obtain a hazardous chemical transport vehicle and abnormal behavior test set and training set;
[0067] Specifically, in step 11, using road surveillance videos to organize video clips containing vehicles transporting hazardous chemicals;
[0068] Step 12: Obtain the original images of hazardous chemicals transport vehicles and abnormal behaviors by intercepting them in fixed frames, with each segment lasting between 20s and 35s. Figure 6 As shown;
[0069] Step 13: Establish a hazardous chemical vehicle dataset. The original images of hazardous chemical transport vehicles and abnormal behaviors are input into the hazardous chemical vehicle dataset for preprocessing. The size of the collected original images is 4096×2160. The original images are annotated to obtain the label file of the hazardous chemical vehicle, such as Figure 2 As shown;
[0070] Step 14: Set the correspondence between the label file and the original image objection, perform category classification to obtain the hazardous chemical transport vehicle and abnormal behavior test set and training set.
[0071] Step 2, the overall process of the model is as follows Figure 3 As shown in the figure, a multi-target detection model is constructed based on the established hazardous chemical vehicle dataset, and multi-layer feature information of the image is fused into the multi-target detection model;
[0072] Specifically, the multi-target detection model includes convolution and pooling operations. The original image of the hazardous chemical vehicle dataset is convolved and pooled to obtain a feature map. The feature map is passed through a fully connected layer to obtain the object classification and coordinate information. The convolution and pooling operation steps are as follows:
[0073] The original images of the hazardous chemicals vehicle dataset are processed by DenseNet (such as Figure 4 As shown in the figure, features are extracted and a single-shot object detector based on the feature pyramid Dense FPN model is adopted. Each layer of the feature pyramid Dense FPN is taken as input in accordance with the Dense network, and a feature pyramid Dense FPN is constructed. The constructed feature pyramid Dense FPN fuses the multi-layer feature information of the image.
[0074] In this paper, a multi-target detection model based on YOLO is built. The model includes target detection and target tracking modules; a hazardous chemicals transport vehicle positioning module, which extracts feature images through DenseNet and adopts the advanced feature pyramid (Dense FPN such as Figure 5 As shown in the figure, a single-shot target detector based on the model is used. After processing by this module, a crack candidate box is generated.
[0075] The target detection model uses the DenseNet feature extraction skeleton to replace the original DarkNet53 skeleton. In the downstream task model, inspired by DenseNet, a DenseFPN model is constructed by adding skip connections to the original FPN model. The main purpose is to reduce gradient disappearance, fuse the features of each layer, and make full use of the feature maps of each layer, thereby improving the detection accuracy of the model.
[0076] Step 3: Input the training set of hazardous chemical transport vehicles and abnormal behaviors into the multi-target detection model for training, and adjust the parameters to obtain the optimal training model;
[0077] Specifically, the training set of hazardous chemical transport vehicles and abnormal behaviors is input into the multi-target detection model for training. The specific steps are as follows:
[0078] Step 31: Build the environment required for the model, conduct comparative experiments to select the optimal parameters, and train the model with different learning rates of 0.0001, 0.001, 0.002, 0.003, and 0.004, respectively, while ensuring the same pre-trained model and other parameters.
[0079] Step 32: The trained model is tested on the test set, and the test results and evaluation indicators are compared. The final learning rate is 0.003.
[0080] Step 33: Under the same learning rate and other parameters, different pre-training models are selected to train the network, namely DarkNet53, ResNet, and DenseNet. The trained models are tested, and the test results and evaluation indicators are compared to select the final pre-training model.
[0081] Step 34, comparing the detection results and evaluation indicators of step 32 and step 33 to obtain the optimal training model.
[0082] Step 4: Verify the optimal training model using a test set of hazardous chemical transport vehicles and abnormal behavior;
[0083] Specifically, the optimal training model is verified using the average accuracy of the hazardous chemicals transport vehicle and abnormal behavior test sets. The steps are as follows:
[0084] Step 41, calculating the detection accuracy and recall rate of the model;
[0085] The formula for calculating the model detection accuracy is as follows:
[0086]
[0087] Among them, TP represents the number of correctly detected targets, and FP is the number of negative samples detected by the model as positive samples;
[0088] The calculation formula for recall is as follows:
[0089]
[0090] Among them, TP represents the number of correctly detected targets, and FN represents the number of positive samples that the model mistakenly identifies as negative samples;
[0091] Step 42: After obtaining the accuracy and recall of the model detection, a rectangular coordinate system is established with the recall rate and accuracy rate as the horizontal axis and vertical axis respectively. The experimental data is plotted into the coordinate system to obtain a curve. The area enclosed by this curve and the coordinate axis is the average accuracy (AP) of the model detection of a certain category. According to step 41, the AP of each category is calculated and then the average is obtained to obtain the mean average accuracy (mAP) of the model.
[0092] In step 43, the optimal training model is verified by the mean average precision (mAP) of the model.
[0093] In step 5, the clustering algorithm and Deep Sort algorithm are integrated into the target detection algorithm of the verified optimal training model to analyze and detect abnormal behavior of hazardous chemicals, completing the abnormal behavior detection of hazardous chemical transport vehicles.
[0094] Specifically, the clustering algorithm and Deep Sort algorithm are integrated into the target detection algorithm of the verified optimal training model to analyze and detect abnormal behavior of hazardous chemicals. The steps are as follows:
[0095] Step 51, using the object detection algorithm to analyze each input frame and identify objects belonging to a specific category, giving the classification and coordinates;
[0096] Step 52: using one or more feature extraction algorithms to extract appearance features, motion or interaction features, and using the trajectory to predict the next position of the target;
[0097] Step 53, the performance features and motion features can be used to calculate the similarity between the two objects;
[0098] In step 54 , the calculated similarity is used as a basis to associate the detection objects and trajectories belonging to the same target, and the detection objects are assigned the same ID as the trajectory.
[0099] Among them, the target detection algorithm includes the error caused by the input shape dimension part, that is, the loss L caused by the prior frame box , the error caused by confidence is the loss L caused by the target to be detected objAnd the error caused by the category, that is, the loss L caused by the class class ; The formula for total loss is as follows:
[0100] Loss = L box +L class +L obj
[0101]
[0102]
[0103]
[0104] Among them, L box In fact, it refers to the difference between the length, width, XY axis offset and the predicted value after encoding. Here, we first need to convert the real box into the dimensional information relative to the grid in the image. The error L caused by the confidence obj Refers to the actual existing box. The confidence value in the prediction result is compared with 1. For the box that does not actually exist, you need to obtain the IOU value and compare it with 0. Here, you need to set the minimum threshold of the IOU value to 0.5. If it is less than this value, it is defaulted to a box that does not actually exist. class It is the comparison between the predicted results and actual results of different categories of frames that actually exist in the image. x, y, w, h are the coordinate information of the target frame, λ class ,λ noobj are the weight coefficients, c i and c′ i is the actual box and the predicted box. i (c) Ground truth box prediction results.
[0105] Step 6: Build an automatic identification platform for abnormal behavior of hazardous chemical transport vehicles. This platform detects the input video frames to determine whether there are vehicles carrying hazardous chemicals or whether the vehicles are engaging in abnormal behavior. If abnormal behavior is present, it is detected.
[0106] In summary, the present invention provides a method for detecting abnormal behavior of hazardous chemical transport vehicles, which belongs to the field of target detection and aims to improve detection accuracy and reduce manpower and material resources. The method comprises the following steps: creating a hazardous chemical vehicle dataset for deep learning model training; designing a detection model comprising target detection, DeepSort and clustering algorithms; training on the hazardous chemical vehicle dataset; conducting multiple experiments and adjusting various parameters to obtain the optimal model; testing the detection accuracy and abnormal behavior recognition of hazardous chemical transport vehicles; conducting comparative experiments based on the test results of different parameters; developing a detection platform for hazardous chemical transport vehicles based on the source code; and developing functions for loading models, camera detection, video detection, image detection, folder detection, target detection and target tracking on the platform. Ultimately, accurate identification and analysis of hazardous chemical transport vehicles are achieved. The present invention is a real-time detection method with the advantages of fast detection speed and high detection accuracy.
[0107] The present invention also provides a system for detecting abnormal behavior of hazardous chemical transport vehicles, comprising:
[0108] The first processing module is used to obtain the original images of hazardous chemical transport vehicles and abnormal behavior and establish a hazardous chemical vehicle dataset; the hazardous chemical transport vehicle and abnormal behavior image files are input into the hazardous chemical vehicle dataset for preprocessing to obtain the hazardous chemical transport vehicle and abnormal behavior test set and training set;
[0109] A model building module is used to build a multi-target detection model based on the established hazardous chemical vehicle dataset and fuse multi-layer feature information of the image into the multi-target detection model;
[0110] The second processing module is used to input the training set of hazardous chemical transport vehicles and abnormal behaviors into the multi-target detection model for training and adjust the parameters to obtain the optimal training model;
[0111] Verification module, used to verify the optimal training model using hazardous chemical transport vehicles and abnormal behavior test sets;
[0112] The analysis and detection module is used to integrate the clustering algorithm and the Deep Sort algorithm into the target detection algorithm of the verified optimal training model to analyze and detect abnormal behaviors of hazardous chemicals, and complete the abnormal behavior detection of hazardous chemical transport vehicles.
[0113] The present invention also provides a mobile terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, such as an abnormal behavior detection program for hazardous chemical transport vehicles.
[0114] When the processor executes the computer program, the steps of the above-mentioned method for detecting abnormal behavior of hazardous chemical transport vehicles are implemented, for example: Step 1, obtaining original images of hazardous chemical transport vehicles and abnormal behavior, and establishing a hazardous chemical vehicle dataset; inputting the hazardous chemical transport vehicle and abnormal behavior image files into the hazardous chemical vehicle dataset for preprocessing to obtain a hazardous chemical transport vehicle and abnormal behavior test set and training set;
[0115] Step 2: Build a multi-target detection model based on the established hazardous chemicals vehicle dataset and fuse multi-layer feature information of the image into the multi-target detection model;
[0116] Step 3: Input the training set of hazardous chemical transport vehicles and abnormal behaviors into the multi-target detection model for training, and adjust the parameters to obtain the optimal training model;
[0117] Step 4: Verify the optimal training model using a test set of hazardous chemical transport vehicles and abnormal behavior;
[0118] In step 5, the clustering algorithm and Deep Sort algorithm are integrated into the target detection algorithm of the verified optimal training model to analyze and detect abnormal behavior of hazardous chemicals, completing the abnormal behavior detection of hazardous chemical transport vehicles.
[0119] Alternatively, when the processor executes the computer program, the functions of each module in the above system are implemented, for example: a first processing module is used to obtain original images of hazardous chemical transport vehicles and abnormal behaviors and establish a hazardous chemical vehicle dataset; input the hazardous chemical transport vehicle and abnormal behavior image files into the hazardous chemical vehicle dataset for preprocessing to obtain a hazardous chemical transport vehicle and abnormal behavior test set and training set;
[0120] A model building module is used to build a multi-target detection model based on the established hazardous chemical vehicle dataset and fuse multi-layer feature information of the image into the multi-target detection model;
[0121] The second processing module is used to input the training set of hazardous chemical transport vehicles and abnormal behaviors into the multi-target detection model for training and adjust the parameters to obtain the optimal training model;
[0122] Verification module, used to verify the optimal training model using hazardous chemical transport vehicles and abnormal behavior test sets;
[0123] The analysis and detection module is used to integrate the clustering algorithm and the Deep Sort algorithm into the target detection algorithm of the verified optimal training model to analyze and detect abnormal behaviors of hazardous chemicals, and complete the abnormal behavior detection of hazardous chemical transport vehicles.
[0124] Exemplarily, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program in the mobile terminal. For example, the computer program can be divided into a first processing module, a model building module, a second processing module, a verification module, and an analysis and detection module. The specific functions of each module are as follows:
[0125] The first processing module is used to obtain the original images of hazardous chemical transport vehicles and abnormal behavior and establish a hazardous chemical vehicle dataset; the hazardous chemical transport vehicle and abnormal behavior image files are input into the hazardous chemical vehicle dataset for preprocessing to obtain the hazardous chemical transport vehicle and abnormal behavior test set and training set;
[0126] A model building module is used to build a multi-target detection model based on the established hazardous chemical vehicle dataset and fuse multi-layer feature information of the image into the multi-target detection model;
[0127] The second processing module is used to input the training set of hazardous chemical transport vehicles and abnormal behaviors into the multi-target detection model for training and adjust the parameters to obtain the optimal training model;
[0128] Verification module, used to verify the optimal training model using hazardous chemical transport vehicles and abnormal behavior test sets;
[0129] The analysis and detection module is used to integrate the clustering algorithm and the Deep Sort algorithm into the target detection algorithm of the verified optimal training model to analyze and detect abnormal behaviors of hazardous chemicals, and complete the abnormal behavior detection of hazardous chemical transport vehicles.
[0130] The mobile terminal may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The mobile terminal may include, but is not limited to, a processor and a memory.
[0131] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the mobile terminal and connects various parts of the entire mobile terminal using various interfaces and lines.
[0132] The memory may be used to store the computer programs and / or modules, and the processor implements various functions of the mobile terminal by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory.
[0133] The memory may mainly include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, the memory may include a high-speed random access memory and may also include a non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0134] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the method for detecting abnormal behavior of hazardous chemical transport vehicles.
[0135] If the module / unit integrated in the mobile terminal is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0136] Based on this understanding, the present invention can also implement all or part of the processes in the above-mentioned method by using a computer program to instruct relevant hardware. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of the above-mentioned method for detecting abnormal behavior of hazardous chemical transport vehicles. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form.
[0137] The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0138] It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.
Claims
1. A method for detecting abnormal behavior of hazardous chemical transport vehicles, characterized in that: The steps include: Step 1: Obtain original images of hazardous chemical transport vehicles and abnormal behavior, and establish a hazardous chemical vehicle dataset; input the hazardous chemical transport vehicle and abnormal behavior image files into the hazardous chemical vehicle dataset for preprocessing to obtain a hazardous chemical transport vehicle and abnormal behavior test set and training set; Step 2: Build a multi-target detection model based on the established hazardous chemicals vehicle dataset and fuse multi-layer feature information of the image into the multi-target detection model; The multi-target detection model includes convolution and pooling operations. The original image of the hazardous chemical vehicle dataset is convolved and pooled to obtain a feature map. The feature map is passed through a fully connected layer to obtain the object classification and coordinate information. The convolution and pooling operation steps are as follows: The original images of the hazardous chemical vehicle dataset were extracted using DenseNet. A single-shot object detector based on the feature pyramid Dense FPN model was constructed, taking each layer of the feature pyramid Dense FPN as input and imitating the Dense network. The constructed feature pyramid Dense FPN fuses the multi-layer feature information of the image. Step 3: Input the training set of hazardous chemical transport vehicles and abnormal behaviors into the multi-target detection model for training, and adjust the parameters to obtain the optimal training model; Step 4: Verify the optimal training model using a test set of hazardous chemical transport vehicles and abnormal behavior; Step 5: Integrate the clustering algorithm and Deep Sort algorithm into the target detection algorithm of the verified optimal training model to analyze and detect abnormal behavior of hazardous chemicals, completing the abnormal behavior detection of hazardous chemical transport vehicles; The clustering algorithm and Deep Sort algorithm are integrated into the target detection algorithm of the verified optimal training model to analyze and detect abnormal behavior of hazardous chemicals. The steps are as follows: Step 51, using the object detection algorithm to analyze each input frame and identify objects belonging to a specific category, giving the classification and coordinates; Step 52: using one or more feature extraction algorithms to extract appearance features, motion or interaction features, and using the trajectory to predict the next position of the target; Step 53, the performance features and motion features can be used to calculate the similarity between the two objects; In step 54 , the calculated similarity is used as a basis to associate the detection objects and trajectories belonging to the same target, and the detection objects are assigned the same ID as the trajectory.
2. The method for detecting abnormal behavior of hazardous chemical transport vehicles according to claim 1, characterized in that: In step 1, the specific steps are as follows: Step 11: Using road surveillance videos, organize video clips containing vehicles transporting hazardous chemicals; Step 12: Obtain original images of hazardous chemical transport vehicles and abnormal behaviors by capturing them in fixed frames; Step 13: Create a hazardous chemical vehicle dataset. The original images of hazardous chemical transport vehicles and abnormal behaviors are input into the hazardous chemical vehicle dataset for preprocessing. The original images are annotated to obtain a label file for hazardous chemical vehicles. Step 14: Set the correspondence between the label file and the original image objection, perform category classification to obtain the hazardous chemical transport vehicle and abnormal behavior test set and training set.
3. The method for detecting abnormal behavior of hazardous chemical transport vehicles according to claim 1, characterized in that: In step 3, the training set of hazardous chemical transport vehicles and abnormal behaviors is input into the multi-target detection model for training. The specific steps are as follows: Step 31: Build the environment required by the model, conduct comparative experiments to select the optimal parameters, and train the model with different learning rates under the same pre-trained model and other parameters. Step 32: The trained model is tested on the test set, and the test results and evaluation indicators are compared; Step 33: Under the same learning rate and other parameters, different pre-training models are selected to train the network, the trained models are tested, the test results and evaluation indicators are compared, and the final pre-training model is selected; Step 34, comparing the detection results and evaluation indicators of step 32 and step 33 to obtain the optimal training model.
4. The method for detecting abnormal behavior of hazardous chemical transport vehicles according to claim 1, characterized in that: In step 4, the optimal training model is verified using the mean accuracy of the hazardous chemicals transport vehicle and abnormal behavior test sets. The steps are as follows: Step 41, calculating the detection accuracy and recall rate of the model; The formula for calculating the model detection accuracy is as follows: Among them, TP represents the number of correctly detected targets, and FP is the number of negative samples detected by the model as positive samples; The calculation formula for recall is as follows: Among them, TP represents the number of correctly detected targets, and FN represents the number of positive samples that the model mistakenly identifies as negative samples; Step 42: After obtaining the accuracy and recall of the model detection, a rectangular coordinate system is established with the recall rate and accuracy rate as the horizontal axis and vertical axis respectively. The experimental data is plotted into the coordinate system to obtain a curve. The area enclosed by this curve and the coordinate axis is the average accuracy (AP) of the model detection of a certain category. According to step 41, the AP of each category is calculated and then the average is obtained to obtain the mean average accuracy (mAP) of the model. In step 43, the optimal training model is verified by the mean average precision (mAP) of the model.
5. A system for detecting abnormal behavior of hazardous chemical transport vehicles, characterized in that: A method for detecting abnormal behavior of a hazardous chemical transport vehicle according to any one of claims 1 to 4 is implemented, comprising: The first processing module is used to obtain the original images of hazardous chemical transport vehicles and abnormal behavior and establish a hazardous chemical vehicle dataset; the hazardous chemical transport vehicle and abnormal behavior image files are input into the hazardous chemical vehicle dataset for preprocessing to obtain the hazardous chemical transport vehicle and abnormal behavior test set and training set; A model building module is used to build a multi-target detection model based on the established hazardous chemical vehicle dataset and to fuse multi-layer feature information of the image into the multi-target detection model; The second processing module is used to input the training set of hazardous chemical transport vehicles and abnormal behaviors into the multi-target detection model for training and adjust the parameters to obtain the optimal training model; Verification module, used to verify the optimal training model using hazardous chemical transport vehicles and abnormal behavior test sets; The analysis and detection module is used to integrate the clustering algorithm and the Deep Sort algorithm into the target detection algorithm of the verified optimal training model to analyze and detect abnormal behaviors of hazardous chemicals, and complete the abnormal behavior detection of hazardous chemical transport vehicles.
6. A mobile terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method for detecting abnormal behavior of a hazardous chemical transport vehicle as described in any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for detecting abnormal behavior of a hazardous chemical transport vehicle as described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Illegal hazardous chemical transport vehicle identification method and system based on convolutional neural network
CN113469158A
Tunnel portal monitoring system and safety evaluation method
CN114964375A