Train fire monitoring method, device, terminal and storage medium
Through the combination of video surveillance technology and YOLO and SVM models, real-time monitoring and accurate judgment of train fire conditions are achieved, which solves the problems of low manual detection efficiency and inability to monitor non-station sections in the existing technology, and improves the safety and security of train operation. Transportation efficiency.
Patent Information
- Application Number
- CN201910377069.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-07
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2039-05-07
AI Technical Summary
In the existing technology, train fire safety monitoring mainly relies on manual detection, which is inefficient and cannot conduct real-time monitoring on non-station sections, resulting in safety hazards and detection delays.
Using video surveillance technology, the YOLO target detection algorithm is used to continuously acquire multiple images of the train while it is running, input the pre-trained SVM model to identify the fire, and combine the image position consistency to determine whether the fire occurred on the train and output an alarm. information.
It achieves real-time fire monitoring on non-station sections, improves train operation safety, reduces the risk of manual errors, improves work efficiency and railway transportation efficiency, ensures the accuracy of fire reports, and avoids false alarms and false alarms. .
Smart Images

Figure CN110263622B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video monitoring, and in particular to a train fire monitoring method, device, terminal and storage medium. Background Art
[0002] After more than 20 years of development, my country's high-speed railway and high-speed train technology has achieved gratifying and impressive results. However, due to the large scale of my country's railway network, the wide coverage area, and the long transportation lines, the operation safety of trains has become an important issue to be solved in the development of national railways. Once a train safety accident occurs, it will bring immeasurable losses and disasters to the country and the people. Train fire safety prevention is the focus of train safety prevention and has become an important research topic for the country and various research institutions.
[0003] At present, train operation safety and fire safety monitoring are carried out purely manually, relying on manual on-site inspection to obtain relevant data information. Manual inspection consumes a lot of time and manpower, and the inspection efficiency is low and prone to errors. In addition, manual inspection is not possible on non-station sections.
[0004] Therefore, it is necessary to provide a technical solution for monitoring the train fire condition in non-station sections without relying on manual work. Summary of the invention
[0005] In view of the above, it is necessary to propose a train fire monitoring method, device, terminal and storage medium, which can continuously obtain multiple images of the train in non-station sections through video surveillance technology, and analyze the multiple images to determine whether a fire has occurred on the train, providing an effective auxiliary technical means for train safety monitoring and improving the safety of train operation.
[0006] A first aspect of the present invention provides a train fire monitoring method, the method comprising:
[0007] Continuously acquire multiple images during the train's travel;
[0008] The YOLO target detection algorithm is used to detect multiple candidate contour areas in each image;
[0009] Inputting the plurality of candidate contour regions into a pre-trained SVM model, and identifying by the SVM model whether a fire has occurred in at least one of the candidate contour regions;
[0010] When a fire occurs in at least one of the candidate contour regions, it is determined by the SVM model whether positions of the candidate contour regions where the fire occurs are consistent in the multiple images;
[0011] When it is determined that the positions of the candidate contour regions where the fire has occurred in each image are inconsistent, a result indicating that there is a fire on the train is output.
[0012] Preferably, the determining whether the positions of the candidate contour areas where the fire has occurred in the multiple images are consistent includes:
[0013] Taking the candidate contour area where the fire has occurred as the first target contour area;
[0014] Acquire a preset number of consecutive images from the multiple images;
[0015] Determining whether the displacement of the first target contour area in the consecutive preset number of images has changed;
[0016] When it is determined that the displacement of the first target contour area in the consecutive preset number of images has changed, the method further includes: determining that the position of the candidate contour area where the fire has occurred in each image is inconsistent, and determining that the fire is a fire on the train;
[0017] When it is determined that the displacement of the first target contour area in the consecutive preset number of images has not changed, the method also includes: determining that the position of the candidate contour area where the fire has occurred is consistent in each image, and determining that the fire is not a fire on the train.
[0018] Preferably, the training process of the SVM model includes:
[0019] Obtain multiple images of fire as positive sample sets, and multiple images of red objects as negative sample sets;
[0020] Generate positive and negative sample training sets and positive and negative sample test sets according to the obtained positive and negative sample sets;
[0021] Inputting the positive and negative sample training sets into SVM for training to obtain an SVM model;
[0022] Inputting the positive and negative sample test sets into the SVM model for testing to obtain a test pass rate;
[0023] If the test pass rate is greater than or equal to a preset pass rate threshold, determining that the SVM model training is completed;
[0024] If the test pass rate is less than the preset pass rate threshold, the number of positive and negative sample training sets is increased, and the SVM model is retrained.
[0025] Preferably, generating positive and negative sample training sets and positive and negative sample test sets according to the acquired positive and negative sample sets includes:
[0026] A random number generation algorithm is adopted to randomly select a first preset number of images from the positive and negative sample sets as the positive and negative sample training sets, and randomly select a second preset number of images as the positive and negative sample test sets.
[0027] Preferably, when the SVM model identifies that a fire has occurred in none of the candidate contour regions; or when the SVM model identifies that a fire has occurred in at least one of the candidate contour regions, but the positions of the candidate contour regions where the fire has occurred are consistent in each image, the method further includes:
[0028] Output the result that there is no fire on the train.
[0029] Preferably, after outputting the result that the train has a fire, the method further comprises:
[0030] sending a warning message to a train driver of the train;
[0031] At the same time, an alarm message containing the locomotive number of the train is sent to the dispatching room of the forward station.
[0032] Preferably, after continuously acquiring a plurality of images during the running of the train, the method further comprises:
[0033] Performing illumination or contrast normalization processing on the multiple images;
[0034] A bilateral filtering algorithm is used to perform noise reduction on the multiple images after the normalization process.
[0035] A second aspect of the present invention provides a train fire monitoring device, the device comprising:
[0036] An acquisition module, used for continuously acquiring multiple images during the running of the train;
[0037] A detection module is used to detect multiple candidate contour areas in each image using a YOLO target detection algorithm; a recognition module is used to input the multiple candidate contour areas into a pre-trained SVM model, and identify whether a fire has occurred in at least one of the candidate contour areas through the SVM model;
[0038] A judgment module is used to judge whether the positions of the candidate contour areas where the fire has occurred are consistent in each image when the recognition module recognizes that a fire has occurred in at least one of the candidate contour areas through the SVM model; an output module is used to output the result that there is a fire on the train when the judgment module determines that the positions of the candidate contour areas where the fire has occurred are inconsistent in each image.
[0039] A third aspect of the present invention provides a terminal, the terminal comprising a processor, the processor being configured to implement the train fire monitoring method when executing a computer program stored in a memory.
[0040] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the train fire monitoring method when executed by a processor.
[0041] In summary, the train fire monitoring method, device, terminal and storage medium described in the present invention continuously acquire multiple images during the train running process, and then use the YOLO target detection algorithm to detect multiple candidate contour areas in each image, and finally input the multiple candidate contour areas into the pre-trained SVM model for identification, so as to obtain whether there is a fire in the multiple candidate contour areas. When it is determined that a fire has occurred in a candidate contour area, it is further determined whether the position of the candidate contour area where the fire has occurred is fixed. When the position is determined to be fixed, the result of the fire on the train is output. It provides effective auxiliary technical means for the safety detection of trains and pedestrians, breaks the mechanism of passively judging whether a fire has occurred on the train by purely artificial vision, hearing, and touch, avoids the risk of easy errors in manual operation, greatly reduces the workload of on-site staff, improves the safety of train operation, improves the work efficiency of staff, realizes effective control of transportation safety production, and provides effective high-definition image basis for the train dispatching room. Secondly, combined with the location, it is further ensured whether the fire is a fire on the train, avoids the occurrence of parking and delay events caused by false alarms or misreporting, and improves the efficiency of railway transportation. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0043] Figure 1 It is a flow chart of the train fire monitoring method provided in the first embodiment of the present invention.
[0044] Figure 2 It is a structural diagram of a train fire monitoring device provided in Embodiment 2 of the present invention.
[0045] Figure 3 It is a schematic diagram of the structure of a terminal provided in Embodiment 3 of the present invention.
[0046] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0047] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0048] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. The embodiments described are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0050] Embodiment 1
[0051] Figure 1 It is a flow chart of the train fire monitoring method provided in the first embodiment of the present invention.
[0052] In this embodiment, the train fire monitoring method can be applied to a terminal. For a terminal that needs to perform train fire monitoring, the train fire monitoring function provided by the method of the present invention can be directly integrated into the terminal, or run in the terminal in the form of a software development kit (Software Development Kit, SKD).
[0053] like Figure 1 As shown, the train fire monitoring method is applied to this specific scenario during train travel. The train fire monitoring method specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some can be omitted.
[0054] S11: Continuously acquire multiple images during the train's travel.
[0055] The train in this embodiment is composed of more than ten or even dozens of container carriages, each of which is about 35-40 meters long. The train generally includes a head and a tail, the head being located at the front end of the first carriage and the tail being located at the end of the last carriage.
[0056] In this embodiment, multiple images of the train during its travel can be obtained through a high-definition digital image acquisition device. Since the train runs at a high speed, which can be as high as several hundred meters per second, and a single image cannot accurately determine whether a fire has occurred on the train, a high-speed continuous shooting digital photography technology can be used. When the train passes by, the high-definition digital image acquisition device can quickly take continuous shots of the train to obtain multiple high-definition digital images including the train. Alternatively, a video stream can be collected through a high-definition digital image acquisition device, and multiple images can be obtained by extracting frames from the video stream, so as to comprehensively identify whether a fire has occurred on the train through multiple continuous images.
[0057] In this embodiment, the high-definition digital image acquisition device may include multiple high-definition cameras, which are installed on at least one support frame set along the train travel route on both sides of the monitored train track. Specifically, multiple high-definition cameras can be installed on the top beam and two columns of the rail gantry respectively, and real-time video images of the top and both sides of the train are obtained and sent to the streaming media storage device. Of course, in other embodiments, the high-definition camera can also have other installation positions, as long as it can clearly obtain clear images of the top and both sides of the train.
[0058] The high-definition digital image acquisition equipment can send the collected high-definition images to the indoor video analysis server in each station dispatching room through dedicated video optical terminals, wired networks and other technologies, so that the train management department can grasp the operation status of the train at any time through the indoor video analysis server.
[0059] Preferably, after continuously acquiring a plurality of images during the running of the train, the method further comprises:
[0060] Preprocessing is performed on the multiple images.
[0061] In this embodiment, preprocessing the multiple images includes: performing illumination or contrast normalization processing on the multiple images; and performing noise reduction processing on the multiple images after the normalization processing by using a bilateral filtering algorithm.
[0062] Since the monitoring object is the train operation status of all-weather (different time periods, different light intensities, and different climate characteristics), after pre-processing multiple high-definition images, the illumination or contrast normalization of images under different time periods and lighting conditions can be solved, thereby optimizing and highlighting the features of the parts that need to be recognized in the image, and weakening the features of the remaining parts that do not need to be recognized, so as to improve the accuracy and speed of image recognition.
[0063] The bilateral filtering algorithm can effectively remove noise, for example, salt and pepper noise generated by a high-definition digital image acquisition device, and at the same time, has good edge detail preservation capability. The processing process of the bilateral filtering algorithm is prior art, and the present invention will not be described in detail here.
[0064] It should be noted that, in this embodiment, there is no need to perform grayscale normalization processing on the multiple images, that is, the multiple images or the multiple images after preprocessing are color images.
[0065] S12: Use the YOLO target detection algorithm to detect multiple candidate contour areas in each image.
[0066] In this embodiment, after obtaining multiple images including the train, it is necessary to detect multiple targets in each image according to a preset YOLO target detection algorithm. The YOLO (You Only Look Once: Better, Faster, Stronger) target detection algorithm is a fast multi-target detection algorithm that can detect multiple candidate targets at the same time, and select the contour area of each candidate target in the form of a rectangular frame. The contour area of the candidate target is called a candidate contour area.
[0067] The target in this embodiment is a red area, for example, a red area corresponding to a fire on a train, a red area corresponding to a red bag hooked outside a train compartment, or a red area corresponding to a fire in other areas along the railway.
[0068] S13: Input the multiple candidate contour regions into a pre-trained SVM model, and use the SVM model to identify whether a fire has occurred in at least one of the candidate contour regions.
[0069] In this embodiment, after a plurality of candidate contour areas are detected, it is necessary to screen out a target contour area representing a possible fire from the plurality of candidate contour areas, and subsequently further determine whether a fire has actually occurred in the target contour area.
[0070] Pre-trained Support Vector Machine (SVM) model, Support Vector Machine (SVM) as a classification model, has a good binary classification effect, and is usually used for pattern recognition, classification and regression analysis. The main idea of SVM is: First, analyze the linearly separable case. For the linearly inseparable case, use a nonlinear mapping algorithm to transform the linearly inseparable samples in the low-dimensional input space into a high-dimensional feature space to make them linearly separable, so that it is possible to use a linear algorithm in the high-dimensional feature space to perform linear analysis on the nonlinear features of the samples.
[0071] The support vector machine model is used to identify whether a fire has occurred in at least one candidate contour area. When the SVM model outputs that a fire has occurred in a candidate contour area, it indicates that there is a high possibility that a fire has occurred on the train. When the SVM model identifies that no fire has occurred in all candidate contour areas, that is, when the SVM model identifies that no fire has occurred in any candidate contour area, it indicates that no fire has occurred on the train.
[0072] Preferably, the training process of the SVM model includes:
[0073] 131) obtaining a plurality of images of fire as a positive sample set and a plurality of images of red objects as a negative sample set;
[0074] Since most areas in the images obtained when a fire occurs are red, and most areas in the images of red objects are also red, and since images of red objects are very easily misjudged as images of fire, a large number of images of fires can be obtained in advance as positive sample sets, and a large number of images of red objects without fire can be obtained as negative sample sets.
[0075] 132) generating a positive and negative sample training set and a positive and negative sample test set according to the obtained positive and negative sample sets;
[0076] In this preferred embodiment, the idea of cross validation can be used when training the SVM model, and the obtained positive and negative sample sets can be divided into positive and negative sample training sets and positive and negative sample test sets according to a suitable ratio. The suitable division ratio is, for example, 6:4.
[0077] Specifically, generating a positive and negative sample training set and a positive and negative sample test set according to the acquired positive and negative sample sets includes:
[0078] A random number generation algorithm is adopted to randomly select a first preset number of images from the positive and negative sample sets as the positive and negative sample training sets, and randomly select a second preset number of images as the positive and negative sample test sets.
[0079] The positive and negative sample training sets are used to train the SVM model, and the positive and negative sample test sets are used to test the performance of the trained SVM model. If the test accuracy is higher, it indicates that the performance of the trained SVM model is better; if the test accuracy is lower, it indicates that the performance of the trained SVM model is poor.
[0080] If the total number of divided positive and negative sample training sets is still large, that is, all positive and negative sample training sets are used to participate in the training of the SVM model, the cost of finding the optimal parameters corresponding to the SVM model will be high. Therefore, a first preset proportion of samples can be randomly selected from the generated positive and negative sample training sets to participate in the training, thereby reducing the number of samples participating in the training.
[0081] In this preferred embodiment, in order to increase the randomness of the positive and negative sample training sets participating in the training, a random number generation algorithm can be used for random selection.
[0082] In this preferred embodiment, the first preset number can be a preset fixed value, for example, 40, that is, 40 samples are randomly selected from the generated positive and negative sample training sets to participate in the training of the SVM model. The first preset number can also be a preset ratio value, for example, 1 / 10, that is, 1 / 10 of the samples are randomly selected from the generated positive and negative sample training sets to participate in the training of the SVM model.
[0083] 133) inputting the positive and negative sample training sets into SVM for training to obtain an SVM model;
[0084] 134) inputting the positive and negative sample test sets into the SVM model for testing to obtain a test pass rate;
[0085] 135) If the test pass rate is greater than or equal to the preset pass rate threshold, determine that the SVM model training is completed; if the test pass rate is less than the preset pass rate threshold, increase the number of positive and negative sample training sets and re-train the SVM model.
[0086] In this embodiment, the positive sample training set can be marked with a first identifier, and the negative sample training set can be marked with a second identifier. After that, the part of the positive sample training set carrying the first identifier and the part of the negative sample training set carrying the second identifier are trained to obtain the SVM model. When testing, the output identifier of the SVM model can be used to determine whether a fire has occurred in the candidate contour area. For example, if the first identifier is output, it can be determined that a fire has occurred in the candidate contour area. If the second identifier is output, it can be determined that no fire has occurred in the candidate contour area.
[0087] If the SVM model identifies that a fire has occurred in at least one of the candidate contour regions, S14 is executed; if the SVM model identifies that a fire has occurred in none of the candidate contour regions, S16 is executed.
[0088] S14: Determine whether the positions of the candidate contour regions where the fire has occurred are consistent in each image.
[0089] In this embodiment, even if a fire is identified in at least one of the candidate contour areas according to the pre-trained SVM model, it cannot be ensured that the fire is definitely on the train. It is also possible that a fire has occurred in other equipment along the railway and was photographed when the train arrived. It is necessary to further determine whether the position of the candidate contour area where the fire has occurred is consistent in each image to determine whether the fire identified by the SVM model is a fire on the train to avoid false alarms or wrong alarms.
[0090] Preferably, the determining whether the positions of the candidate contour areas where the fire has occurred in the multiple images are consistent includes:
[0091] Taking the candidate contour area where the fire has occurred as the first target contour area;
[0092] Acquire a preset number of consecutive images from the multiple images;
[0093] It is determined whether the displacement of the first target contour area in the consecutive preset number of images has changed.
[0094] Whether the positions of the candidate contour areas where the fire has occurred in the multiple images are consistent is determined by judging whether the displacement of the candidate contour areas where the fire has occurred in the multiple images obtained in a preset number of consecutive images has changed. When it is judged that the displacement of the first target contour area in the preset number of consecutive images has changed, it is determined that the positions of the candidate contour areas where the fire has occurred in each image are inconsistent, and it is considered that the fire is a fire on the train; when it is judged that the displacement of the first target contour area in the preset number of consecutive images has not changed, it is determined that the positions of the candidate contour areas where the fire has occurred in each image are consistent, and it is considered that the fire is not a fire on the train.
[0095] For example, suppose that 4 images are acquired, and the LOYO target detection algorithm is used to detect 3 candidate contour areas in each image. Among these 3 candidate contour areas, some may be fire areas, and some may be red objects. Through the pre-trained SVM image, it can be clearly identified that there are 2 candidate contour areas where fire has occurred, and there is no fire in the other candidate contour area. At this time, it is impossible to accurately determine whether the fire in the 2 candidate contours is a fire on the train or a fire on other equipment along the railway. Therefore, it is necessary to further determine whether there are target contour areas in the 2 candidate contour areas that are inconsistent in position in the 4 images. When at least one of the target contour areas in the 2 candidate contour areas is inconsistent in position in the 4 images, it is considered that the fire is on the train. When the positions of the 2 candidate contour areas in the 4 images are consistent, it is considered that the fire is not on the train, but on other equipment along the railway.
[0096] It should be understood that the position described in this embodiment refers to the relative position, that is, the contour area on each image is relative to the image. If the fire is on the train, then the fire should move with the train, and the relative position in multiple images will change; if the fire is not on the train, then the fire should be fixed, and the relative position in multiple images is fixed and remains consistent.
[0097] When it is determined that the positions of the candidate contour regions where a fire has occurred are inconsistent in each image, S15 is executed; when it is determined that the positions of the candidate contour regions where a fire has occurred are consistent in each image, S16 is executed.
[0098] S15: Output the result that there is a fire on the train.
[0099] In this embodiment, when the SVM model identifies that a fire has occurred in at least one of the candidate contour regions, and the positions of the candidate contour regions where the fire has occurred are inconsistent in each image, a result indicating that there is no fire on the train is output.
[0100] S16: Output the result that there is no fire on the train.
[0101] In this embodiment, when the SVM model identifies that a fire has not occurred in any of the candidate contour areas; or when the SVM model identifies that a fire has occurred in at least one of the candidate contour areas, but the positions of the candidate contour areas where the fire has occurred are consistent in each image, the result that there is no fire on the train is output.
[0102] Further, after outputting the result that there is a fire on the train, the method further includes:
[0103] sending a warning message to a train driver of the train;
[0104] At the same time, an alarm message containing the locomotive number of the train is sent to the dispatching room of the forward station.
[0105] In this embodiment, the locomotive number is a number that permanently identifies the train, including: model and serial number, and the locomotive number is unique within the jurisdiction of the entire railway. When a fire is discovered, an alarm message is sent to the train driver and the dispatching room of the forward station at the same time. Sending an alarm message to the train driver allows the driver to understand the status of the running train in real time, and serves to remind the driver to stop the train in time to deal with the fire, so as to avoid further spread of the fire and cause greater losses; and sending an alarm message containing the locomotive number of the train to the forward station allows the staff of the forward station to rush to the location of the train where the fire occurred in time for rescue. That is, it has a double guarantee effect of timely rescue of the train that has caught fire.
[0106] In summary, the train fire monitoring method of the present invention continuously acquires multiple images during the running of the train, and then uses the YOLO target detection algorithm to detect multiple candidate contour areas in each image. Finally, the multiple candidate contour areas are input into the pre-trained SVM model for identification, so as to obtain whether there is a fire in the multiple candidate contour areas. When it is determined that a fire has occurred in a candidate contour area, it is further determined whether the position of the candidate contour area where the fire has occurred is fixed. When it is determined that the position is fixed, the result of the fire on the train is output. It provides effective auxiliary technical means for the safety detection of trains and pedestrians, breaks the mechanism of passively judging whether a fire has occurred on the train by purely artificial vision, hearing, and touch, avoids the risk of easy errors in manual operation, greatly reduces the workload of on-site staff, improves the safety of train operation, improves the work efficiency of staff, realizes effective control of transportation safety production, and provides effective high-definition image basis for train dispatching rooms. Secondly, combined with the location, it can further ensure whether the fire is on the train, avoid the occurrence of parking and delays due to false alarms or wrong reports, and improve the efficiency of railway transportation; thirdly, real-time alarms are issued for trains with fires, which can control the fire in time and avoid further expansion of the fire.
[0107] Embodiment 2
[0108] Figure 2 It is a structural diagram of a train fire monitoring device provided in Embodiment 2 of the present invention.
[0109] In some embodiments, the train fire monitoring device 20 may include a plurality of functional modules composed of program code segments. The program code of each program segment in the train fire monitoring device 20 may be stored in the memory of the terminal and executed by the at least one processor to execute (see Figure 1 Description) Monitor for the presence of train fire.
[0110] In this embodiment, the train fire monitoring device 20 operates in the specific scenario of the train running process, and can be divided into multiple functional modules according to the functions it performs. The functional modules may include: an acquisition module 201, a preprocessing module 202, a detection module 203, an identification module 204, an output module 205, a judgment module 206, a determination module 207 and a sending module 208. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0111] The acquisition module 201 is used to continuously acquire multiple images during the running of the train.
[0112] The train in this embodiment is composed of more than ten or even dozens of container carriages, each of which is about 35-40 meters long. The train generally includes a head and a tail, the head being located at the front end of the first carriage and the tail being located at the end of the last carriage.
[0113] In this embodiment, multiple images of the train during its travel can be obtained through a high-definition digital image acquisition device. Since the train runs at a high speed, which can be as high as several hundred meters per second, and a single image cannot accurately determine whether a fire has occurred on the train, a high-speed continuous shooting digital photography technology can be used. When the train passes by, the high-definition digital image acquisition device can quickly take continuous shots of the train to obtain multiple high-definition digital images including the train. Alternatively, a video stream can be collected through a high-definition digital image acquisition device, and multiple images can be obtained by extracting frames from the video stream, so as to comprehensively identify whether a fire has occurred on the train through multiple continuous images.
[0114] In this embodiment, the high-definition digital image acquisition device may include multiple high-definition cameras, which are installed on at least one support frame set along the train travel route on both sides of the monitored train track. Specifically, multiple high-definition cameras can be installed on the top beam and two columns of the rail gantry respectively, and real-time video images of the top and both sides of the train are obtained and sent to the streaming media storage device. Of course, in other embodiments, the high-definition camera can also have other installation positions, as long as it can clearly obtain clear images of the top and both sides of the train.
[0115] The high-definition digital image acquisition equipment can send the collected high-definition images to the indoor video analysis server in each station dispatching room through dedicated video optical terminals, wired networks and other technologies, so that the train management department can grasp the operation status of the train at any time through the indoor video analysis server.
[0116] Preferably, after the acquisition module 201 continuously acquires a plurality of images during the train travel, the train fire monitoring device 20 further includes:
[0117] The preprocessing module 202 is used to preprocess the multiple images.
[0118] In this embodiment, preprocessing the multiple images includes: performing illumination or contrast normalization processing on the multiple images; and performing noise reduction processing on the multiple images after the normalization processing by using a bilateral filtering algorithm.
[0119] Since the monitoring object is the train operation status of all-weather (different time periods, different light intensities, and different climate characteristics), after pre-processing multiple high-definition images, the illumination or contrast normalization of images under different time periods and lighting conditions can be solved, thereby optimizing and highlighting the features of the parts that need to be recognized in the image, and weakening the features of the remaining parts that do not need to be recognized, so as to improve the accuracy and speed of image recognition.
[0120] The bilateral filtering algorithm can effectively remove noise, for example, salt and pepper noise generated by a high-definition digital image acquisition device, and at the same time, has good edge detail preservation capability. The processing process of the bilateral filtering algorithm is prior art, and the present invention will not be described in detail here.
[0121] It should be noted that, in this embodiment, there is no need to perform grayscale normalization processing on the multiple images, that is, the multiple images or the multiple images after preprocessing are color images.
[0122] The detection module 203 is used to detect multiple candidate contour regions in each image using the YOLO target detection algorithm.
[0123] In this embodiment, after obtaining multiple images including the train, it is necessary to detect multiple targets in each image according to a preset YOLO target detection algorithm. The YOLO (You Only Look Once: Better, Faster, Stronger) target detection algorithm is a fast multi-target detection algorithm that can detect multiple candidate targets at the same time, and select the contour area of each candidate target in the form of a rectangular frame. The contour area of the candidate target is called a candidate contour area.
[0124] The target in this embodiment is a red area, for example, a red area corresponding to a fire on a train, a red area corresponding to a red bag hooked outside a train compartment, or a red area corresponding to a fire in other areas along the railway.
[0125] The identification module 204 is used to input the multiple candidate contour areas into a pre-trained SVM model, and identify whether a fire has occurred in at least one of the candidate contour areas through the SVM model.
[0126] In this embodiment, after a plurality of candidate contour areas are detected, it is necessary to screen out a target contour area representing a possible fire from the plurality of candidate contour areas, and subsequently further determine whether a fire has actually occurred in the target contour area.
[0127] Pre-trained Support Vector Machine (SVM) model, Support Vector Machine (SVM) as a classification model, has a good binary classification effect, and is usually used for pattern recognition, classification and regression analysis. The main idea of SVM is: First, analyze the linearly separable case. For the linearly inseparable case, use a nonlinear mapping algorithm to transform the linearly inseparable samples in the low-dimensional input space into a high-dimensional feature space to make them linearly separable, so that it is possible to use a linear algorithm in the high-dimensional feature space to perform linear analysis on the nonlinear features of the samples.
[0128] The support vector machine model is used to identify whether a fire has occurred in at least one candidate contour area. When the SVM model outputs that a fire has occurred in a candidate contour area, it indicates that there is a high possibility that a fire has occurred on the train. When the SVM model identifies that no fire has occurred in all candidate contour areas, that is, when the SVM model identifies that no fire has occurred in any candidate contour area, it indicates that no fire has occurred on the train.
[0129] Preferably, the training process of the SVM model includes:
[0130] 131) obtaining a plurality of images of fire as a positive sample set and a plurality of images of red objects as a negative sample set;
[0131] Since most areas in the images obtained when a fire occurs are red, and most areas in the images of red objects are also red, and since images of red objects are very easily misjudged as images of fire, a large number of images of fires can be obtained in advance as positive sample sets, and a large number of images of red objects without fire can be obtained as negative sample sets.
[0132] 132) generating a positive and negative sample training set and a positive and negative sample test set according to the obtained positive and negative sample sets;
[0133] In this preferred embodiment, the idea of cross validation can be used when training the SVM model, and the obtained positive and negative sample sets can be divided into positive and negative sample training sets and positive and negative sample test sets according to a suitable ratio. The suitable division ratio is, for example, 6:4.
[0134] Specifically, generating a positive and negative sample training set and a positive and negative sample test set according to the acquired positive and negative sample sets includes:
[0135] A random number generation algorithm is adopted to randomly select a first preset number of images from the positive and negative sample sets as the positive and negative sample training sets, and randomly select a second preset number of images as the positive and negative sample test sets.
[0136] The positive and negative sample training sets are used to train the SVM model, and the positive and negative sample test sets are used to test the performance of the trained SVM model. If the test accuracy is higher, it indicates that the performance of the trained SVM model is better; if the test accuracy is lower, it indicates that the performance of the trained SVM model is poor.
[0137] If the total number of divided positive and negative sample training sets is still large, that is, all positive and negative sample training sets are used to participate in the training of the SVM model, the cost of finding the optimal parameters corresponding to the SVM model will be high. Therefore, a first preset proportion of samples can be randomly selected from the generated positive and negative sample training sets to participate in the training, thereby reducing the number of samples participating in the training.
[0138] In this preferred embodiment, in order to increase the randomness of the positive and negative sample training sets participating in the training, a random number generation algorithm can be used for random selection.
[0139] In this preferred embodiment, the first preset number can be a preset fixed value, for example, 40, that is, 40 samples are randomly selected from the generated positive and negative sample training sets to participate in the training of the SVM model. The first preset number can also be a preset ratio value, for example, 1 / 10, that is, 1 / 10 of the samples are randomly selected from the generated positive and negative sample training sets to participate in the training of the SVM model.
[0140] 133) inputting the positive and negative sample training sets into SVM for training to obtain an SVM model;
[0141] 134) inputting the positive and negative sample test sets into the SVM model for testing to obtain a test pass rate;
[0142] 135) If the test pass rate is greater than or equal to the preset pass rate threshold, determine that the SVM model training is completed; if the test pass rate is less than the preset pass rate threshold, increase the number of positive and negative sample training sets and re-train the SVM model.
[0143] In this embodiment, the positive sample training set can be marked with a first identifier, and the negative sample training set can be marked with a second identifier. After that, the part of the positive sample training set carrying the first identifier and the part of the negative sample training set carrying the second identifier are trained to obtain the SVM model. When testing, the output identifier of the SVM model can be used to determine whether a fire has occurred in the candidate contour area. For example, if the first identifier is output, it can be determined that a fire has occurred in the candidate contour area. If the second identifier is output, it can be determined that no fire has occurred in the candidate contour area.
[0144] The output module 205 is used to output a result that there is no fire on the train when the recognition module 204 recognizes through the SVM model that no fire has occurred in any of the candidate contour areas.
[0145] The judgment module 206 is used to judge whether the positions of the candidate contour regions where the fire has occurred are consistent in each image when the recognition module 204 recognizes that a fire has occurred in at least one of the candidate contour regions through the SVM model.
[0146] In this embodiment, even if a fire is identified in at least one of the candidate contour areas according to the pre-trained SVM model, it cannot be ensured that the fire is definitely on the train. It is also possible that a fire has occurred in other equipment along the railway and was photographed when the train arrived. It is necessary to further determine whether the position of the candidate contour area where the fire has occurred is consistent in each image to determine whether the fire identified by the SVM model is a fire on the train to avoid false alarms or wrong alarms.
[0147] Preferably, the judging module 206 judges whether the positions of the candidate contour areas where the fire has occurred in the multiple images are consistent, including:
[0148] Taking the candidate contour area where the fire has occurred as the first target contour area;
[0149] Acquire a preset number of consecutive images from the multiple images;
[0150] It is determined whether the displacement of the first target contour area in the consecutive preset number of images has changed.
[0151] Whether the positions of the candidate contour areas where the fire has occurred in the multiple images are consistent is determined by determining whether the displacement of the candidate contour areas where the fire has occurred in the multiple images obtained in the consecutive preset number of images has changed. When it is determined that the displacement of the first target contour area in the consecutive preset number of images has changed, the determination module 207 is used to determine that the positions of the candidate contour areas where the fire has occurred in each image are inconsistent, and it is considered that the fire is a fire on the train; when it is determined that the displacement of the first target contour area in the consecutive preset number of images has not changed, the determination module 207 is also used to determine that the positions of the candidate contour areas where the fire has occurred in each image are consistent, and it is considered that the fire is not a fire on the train.
[0152] For example, suppose that 4 images are acquired, and the LOYO target detection algorithm is used to detect 3 candidate contour areas in each image. Among these 3 candidate contour areas, some may be fire areas, and some may be red objects. Through the pre-trained SVM image, it can be clearly identified that there are 2 candidate contour areas where fire has occurred, and there is no fire in the other candidate contour area. At this time, it is impossible to accurately determine whether the fire in the 2 candidate contours is a fire on the train or a fire on other equipment along the railway. Therefore, it is necessary to further determine whether there are target contour areas in the 2 candidate contour areas that are inconsistent in position in the 4 images. When at least one of the target contour areas in the 2 candidate contour areas is inconsistent in position in the 4 images, it is considered that the fire is on the train. When the positions of the 2 candidate contour areas in the 4 images are consistent, it is considered that the fire is not on the train, but on other equipment along the railway.
[0153] It should be understood that the position described in this embodiment refers to the relative position, that is, the contour area on each image is relative to the image. If the fire is on the train, then the fire should move with the train, and the relative position in multiple images will change; if the fire is not on the train, then the fire should be fixed, and the relative position in multiple images is fixed and remains consistent.
[0154] The output module 205 is also used to output the result that there is no fire on the train when the recognition module 204 recognizes that a fire has occurred in at least one of the candidate contour areas through the SVM model, but the judgment module 206 determines that the candidate contour areas where the fire has occurred are located in the same position in each image.
[0155] The output module 205 is further configured to output a result that there is a fire on the train when the determination module 206 determines that the candidate contour regions where a fire has occurred are located inconsistently in each image.
[0156] Further, after outputting the result that there is a fire on the train, the train fire monitoring device 20 further includes:
[0157] A sending module 208, configured to send warning information to the train driver of the train;
[0158] The sending module 208 is further used to send an alarm message including the locomotive number of the train to the dispatching room of the forward station.
[0159] In this embodiment, the locomotive number is a number that permanently identifies the train, including: model and serial number, and the locomotive number is unique within the jurisdiction of the entire railway. When a fire is discovered, an alarm message is sent to the train driver and the dispatching room of the forward station at the same time. Sending an alarm message to the train driver allows the driver to understand the status of the running train in real time, and serves to remind the driver to stop the train in time to deal with the fire, so as to avoid further spread of the fire and cause greater losses; and sending an alarm message containing the locomotive number of the train to the forward station allows the staff of the forward station to rush to the location of the train where the fire occurred in time for rescue. That is, it has a double guarantee effect of timely rescue of the train that has caught fire.
[0160] In summary, the train fire monitoring device of the present invention continuously acquires multiple images during the running of the train, and then uses the YOLO target detection algorithm to detect multiple candidate contour areas in each image. Finally, the multiple candidate contour areas are input into the pre-trained SVM model for identification, so as to obtain whether there is a fire in the multiple candidate contour areas. When it is determined that a fire has occurred in a candidate contour area, it is further determined whether the position of the candidate contour area where the fire has occurred is fixed. When it is determined that the position is fixed, the result of the fire on the train is output. It provides effective auxiliary technical means for the safety detection of trains and pedestrians, breaks the mechanism of passively judging whether a fire has occurred on the train by purely artificial vision, hearing, and touch, avoids the risk of easy errors in manual operation, greatly reduces the workload of on-site staff, improves the safety of train operation, improves the work efficiency of staff, realizes effective control of transportation safety production, and provides effective high-definition image basis for the train dispatching room. Secondly, combined with the location, it can further ensure whether the fire is on the train, avoid the occurrence of parking and delays due to false alarms or wrong reports, and improve the efficiency of railway transportation; thirdly, real-time alarms are issued for trains with fires, which can control the fire in time and avoid further expansion of the fire.
[0161] Embodiment 3
[0162] See also Figure 3FIG. 2 is a schematic diagram of the structure of a terminal provided in Embodiment 3 of the present invention. In a preferred embodiment of the present invention, the terminal 3 includes a memory 31 , at least one processor 32 , at least one communication bus 33 and a transceiver 34 .
[0163] Those skilled in the art should understand that Figure 3 The structure of the terminal shown does not constitute a limitation of the embodiments of the present invention, and may be a bus structure or a star structure. The terminal 3 may also include more or less other hardware or software than shown in the figure, or a different arrangement of components.
[0164] In some embodiments, the terminal 3 includes a terminal that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The terminal 3 may also include client devices, which include but are not limited to any electronic product that can interact with the client through a keyboard, mouse, remote control, touchpad, or voice control device, such as a personal computer, tablet computer, smart phone, digital camera, etc.
[0165] It should be noted that the terminal 3 is only an example, and other existing or future electronic products that are suitable for the present invention should also be included in the protection scope of the present invention and included here by reference.
[0166] In some embodiments, the memory 31 is used to store program codes and various data, such as the train fire monitoring device 20 installed in the terminal 3, and to achieve high-speed and automatic access to programs or data during the operation of the terminal 3. The memory 31 includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0167] In some embodiments, the at least one processor 32 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The at least one processor 32 is the control core (Control Unit) of the terminal 3, and uses various interfaces and lines to connect various components of the entire terminal 3, and executes or executes programs or modules stored in the memory 31, and calls data stored in the memory 31 to execute various functions of the terminal 3 and process data, such as executing the function of train fire monitoring.
[0168] In some embodiments, the at least one communication bus 33 is configured to implement connection and communication between the memory 31 and the at least one processor 32, etc.
[0169] Although not shown, the terminal 3 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 32 through a power management device, so that the power management device can manage charging, discharging, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The terminal 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0170] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0171] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, terminal, or network device, etc.) or a processor to execute a part of the method described in each embodiment of the present invention.
[0172] In a further embodiment, in combination Figure 2 The at least one processor 32 can execute the operating device of the terminal 3 and various installed application programs (such as the train fire monitoring device 20), program codes, etc., for example, the above-mentioned modules.
[0173] The memory 31 stores program codes, and the at least one processor 32 can call the program codes stored in the memory 31 to execute related functions. For example, Figure 2 The various modules described are program codes stored in the memory 31 and are executed by the at least one processor 32, thereby realizing the functions of the various modules to achieve the purpose of train fire monitoring.
[0174] In one embodiment of the present invention, the memory 31 stores a plurality of instructions, and the plurality of instructions are executed by the at least one processor 32 to implement the function of train fire monitoring.
[0175] Specifically, the specific implementation method of the at least one processor 32 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0176] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0177] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0178] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0179] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0180] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A train fire monitoring method, characterized in that: The method comprises: Continuously acquire multiple images during the train's travel; The YOLO target detection algorithm is used to detect multiple candidate contour areas in each image; Inputting the plurality of candidate contour regions into a pre-trained SVM model, and identifying by the SVM model whether a fire has occurred in at least one of the candidate contour regions; When a fire occurs in at least one of the candidate contour regions, it is determined by the SVM model whether positions of the candidate contour regions where the fire occurs are consistent in the multiple images; The determining whether the positions of the candidate contour areas where the fire has occurred in the multiple images are consistent includes: taking the candidate contour area where the fire has occurred as a first target contour area, acquiring a preset number of consecutive images from the multiple images, wherein the first target contour area is included in the preset number of consecutive images, and when the displacement of the first target contour area in the preset number of consecutive images changes, determining that the relative positions of the candidate contour area where the fire has occurred in each image are inconsistent, and determining that the fire is a fire on the train, or when the displacement of the first target contour area in the preset number of consecutive images does not change, determining that the relative positions of the candidate contour area where the fire has occurred in each image are consistent, and determining that the fire is not a fire on the train, wherein the multiple images are acquired by an image acquisition device located on a support frame on the track side of the train; When it is determined that the positions of the candidate contour regions where the fire has occurred in each image are inconsistent, a result indicating that there is a fire on the train is output.
2. The method according to claim 1, characterized in that The training process of the SVM model includes: Obtain multiple images of fire as positive sample sets, and multiple images of red objects as negative sample sets; Generate positive and negative sample training sets and positive and negative sample test sets according to the obtained positive and negative sample sets; Inputting the positive and negative sample training sets into SVM for training to obtain an SVM model; Inputting the positive and negative sample test sets into the SVM model for testing to obtain a test pass rate; If the test pass rate is greater than or equal to a preset pass rate threshold, determining that the SVM model training is completed; If the test pass rate is less than the preset pass rate threshold, the number of positive and negative sample training sets is increased, and the SVM model is retrained.
3. The method according to claim 2, characterized in that Generating positive and negative sample training sets and positive and negative sample test sets according to the acquired positive and negative sample sets includes: A random number generation algorithm is adopted to randomly select a first preset number of images from the positive and negative sample sets as the positive and negative sample training sets, and randomly select a second preset number of images as the positive and negative sample test sets.
4. The method according to claim 1, characterized in that When the SVM model identifies that a fire has occurred in none of the candidate contour regions; or when the SVM model identifies that a fire has occurred in at least one of the candidate contour regions, but the positions of the candidate contour regions where the fire has occurred are consistent in each image, the method further includes: Output the result that there is no fire on the train.
5. The method according to claim 1, characterized in that After outputting the result that the train has a fire, the method further includes: sending a warning message to a train driver of the train; At the same time, an alarm message containing the locomotive number of the train is sent to the dispatching room of the forward station.
6. The method according to any one of claims 1 to 5, characterized in that After continuously acquiring a plurality of images during the running of the train, the method further includes: Performing illumination or contrast normalization processing on the multiple images; A bilateral filtering algorithm is used to perform noise reduction on the multiple images after the normalization process.
7. A train fire monitoring device, the device being used to implement the train fire monitoring method as claimed in any one of claims 1 to 6, characterized in that: The device comprises: An acquisition module, used for continuously acquiring multiple images during the running of the train; A detection module is used to detect multiple candidate contour areas in each image using a YOLO target detection algorithm; a recognition module is used to input the multiple candidate contour areas into a pre-trained SVM model, and identify whether a fire has occurred in at least one of the candidate contour areas through the SVM model; A judgment module is used to judge whether the positions of the candidate contour areas where the fire has occurred are consistent in each image when the recognition module recognizes that a fire has occurred in at least one of the candidate contour areas through the SVM model; an output module is used to output the result that there is a fire on the train when the judgment module determines that the positions of the candidate contour areas where the fire has occurred are inconsistent in each image.
8. A terminal, characterized in that: The terminal includes a processor, and the processor is used to implement the train fire monitoring method as described in any one of claims 1 to 6 when executing the computer program stored in the memory.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the train fire monitoring method as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Fire hazard probe system and its fire hazard detection method
CN101334924A
Large-range fire disaster analyzing and early warning system
CN101833838A
Fast target detection method, electronic device, storage medium and system
CN108664970A
YOLO-based vehicle information detection and tracking method and device, and computer storage medium
CN108875600A
Automatic detection method, apparatus and system of flame, smoke and object movement based on real time images
KR101581162B1
