Detection and early warning method and system for scenic spot charcoal fire barbecue, medium and processor
By comprehensively utilizing odor sensors and camera data, combined with motion object detection algorithms and smoke detection models, timely detection and early warning of the carbon fire barbecue behavior in scenic spots is achieved, and the problems of inefficient management efficiency and high safety risks in the existing technology are solved.
Patent Information
- Application Number
- CN202510118521.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-16
AI Technical Summary
The scenic spots cannot promptly detect and issue early warnings on carbon fire barbecue behavior, resulting in increased environmental pollution, increased fire risks and affected tourists' experience.
A carbon fire barbecue detection and warning method is adopted in scenic spots. By obtaining the data of odor sensors and cameras, using the motion target detection algorithm and smoke detection model, comprehensively determine whether there is a carbon fire barbecue behavior, and an alarm signal is issued when the behavior is detected.
Timely detection and early warning of carbon fire barbecue behavior has been achieved, the risk of fires and other safety accidents has been reduced, and the efficiency and accuracy of scenic spot management have been improved.
Smart Images

Figure CN120014239A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of scenic area safety management, and in particular to a scenic area charcoal barbecue detection and early warning method, system, medium and processor. Background Art
[0002] With the rapid development of tourism, environmental protection and safety management in scenic spots have become important issues. Although charcoal barbecue is a common outdoor activity loved by tourists, its random conduct in non-designated areas will pollute the scenic environment, increase the risk of fire, and may affect the experience of other tourists.
[0003] At present, scenic spots’ management of charcoal barbecue activities mainly relies on manual inspections, which is inefficient and unable to detect and issue warnings in a timely manner. Summary of the invention
[0004] Aiming at the problem that the existing technology of scenic area management of charcoal fire barbecue cannot timely detect and warn, the present invention provides a scenic area charcoal fire barbecue detection and warning method, system, medium and processor. The specific technical scheme is as follows:
[0005] A scenic area charcoal barbecue detection and early warning method, comprising:
[0006] Obtain the odor monitoring results of the odor sensors installed in the prohibited charcoal barbecue area in the scenic area;
[0007] Obtain video data recorded by cameras set up in areas where charcoal barbecue is prohibited in scenic areas;
[0008] Preprocessing the video data;
[0009] Use the moving target detection algorithm to extract the suspected smoke area image in the processed video data;
[0010] Input the suspected smoke area image into a smoke detection model trained based on a smoke data set, and output a smoke detection result;
[0011] Based on the smoke detection results and odor monitoring results, comprehensively judge whether there is charcoal grilling behavior;
[0012] If it is determined that charcoal grilling is occurring, an alarm signal will be issued in areas of the scenic area where charcoal grilling is prohibited.
[0013] Preferably, the step of obtaining the odor monitoring result of an odor sensor disposed in a charcoal barbecue-prohibited area in the scenic area includes:
[0014] Acquire odor detection data of the odor sensor detecting odor of the surrounding environment at a preset sampling frequency;
[0015] Compare the odor detection data with a pre-established charcoal grilling odor characteristic database to determine whether the odor component generated by the charcoal grilling is detected;
[0016] If the judgment result is to confirm the odor component produced by charcoal grilling, then compare whether the concentration of the odor component exceeds the preset concentration threshold, and output the odor monitoring result.
[0017] Preferably, the comparing of the odor detection data with a pre-established charcoal grilling odor characteristic database to determine whether the odor component generated by charcoal grilling is detected comprises:
[0018] Extracting key features of odor from odor detection data according to the detection principle of the odor sensor;
[0019] The extracted key features of the odor are matched one by one with the odor features in the pre-established charcoal barbecue odor feature database;
[0020] Based on the feature matching results, it is determined whether the odor components generated by the charcoal grilling are detected.
[0021] Preferably, the preprocessing of the video data includes:
[0022] Extracting a continuous video frame sequence from the video data at a preset frame rate;
[0023] The Gaussian filtering method is used to filter out noise from the extracted continuous video frames to obtain processed continuous adjacent frame images.
[0024] Preferably, the extracting of the image of the suspected smoke area in the processed video data by using the moving target detection algorithm comprises:
[0025] The inter-frame difference method is used to calculate the difference of consecutive adjacent frame images obtained from the processed video data to obtain multiple difference images;
[0026] Binarization is performed on each difference image to obtain a first image that distinguishes a foreground area from a background area;
[0027] Using the ViBe algorithm to update the background of the continuous adjacent frame images obtained from the processed video data to obtain a second image;
[0028] According to the correspondence between the first image and the second image, a suspected smoke area image in the processed video data is obtained through a preset logical operation.
[0029] Preferably, the training method of the smoke detection model trained based on the smoke data set includes:
[0030] Obtain public smoke datasets, including video smoke data and image smoke data;
[0031] The smoke data set is input into a smoke detection model based on the YOLOv5 algorithm for learning and training to obtain a trained smoke detection model.
[0032] Preferably, the comprehensive determination of whether there is charcoal grilling behavior based on the smoke detection results and the odor monitoring results includes:
[0033] When both the smoke detection result and the odor monitoring result show that no response occurs, it is determined that there is no charcoal grilling behavior at present;
[0034] When only one of the smoke detection result and the odor monitoring result responds, the manual auxiliary judgment mechanism is activated;
[0035] When both the smoke detection result and the odor monitoring result respond, it is determined that charcoal grilling behavior exists.
[0036] A scenic area charcoal fire barbecue detection and early warning system, applied to the aforementioned scenic area charcoal fire barbecue detection and early warning method, comprising:
[0037] A first data acquisition unit is used to acquire odor monitoring results of odor sensors installed in areas where charcoal barbecue is prohibited in the scenic area;
[0038] The second data acquisition unit is used to acquire video data recorded by cameras set in areas where charcoal barbecue is prohibited in the scenic area;
[0039] A data processing unit, used for preprocessing the video data;
[0040] An image extraction unit, used to extract an image of a suspected smoke area in the processed video data using a moving target detection algorithm;
[0041] A smoke detection output unit, used to input the suspected smoke area image into a smoke detection model trained based on a smoke data set, and output a smoke detection result;
[0042] A judgment unit, used to comprehensively judge whether there is charcoal grilling behavior based on the smoke detection results and the odor monitoring results;
[0043] The early warning unit is used to send out an alarm signal in the area where charcoal grilling is prohibited in the scenic area when it is determined that charcoal grilling behavior exists.
[0044] A computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the aforementioned scenic area charcoal barbecue detection and early warning method.
[0045] A processor is used to run a program, wherein the program executes the aforementioned scenic area charcoal barbecue detection and early warning method when running.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] The present invention provides a method for detecting and warning charcoal barbecue in a scenic area by comprehensively utilizing the video data recorded by a camera to detect smoke conditions and the monitoring results of an odor sensor. Through this multi-dimensional real-time monitoring method, it is possible to timely detect charcoal barbecue behavior in the early stages of occurrence and send out an alarm signal, thereby gaining more processing time for scenic area management and reducing the risk of safety accidents such as fires caused by charcoal barbecue. In addition, the entire detection and warning process has a high degree of automation, and data collection, processing and analysis are achieved through computer algorithms and sensor technology, which reduces the workload of manual inspections and improves management efficiency. At the same time, through this multi-dimensional real-time monitoring method, the possible misjudgment or missed judgment of a single detection method is reduced, and the accuracy of detecting charcoal barbecue behavior is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.
[0049] Figure 1 The present invention is a flow chart of a method for detecting and warning charcoal barbecue in a scenic area.
[0050] Figure 2 This is a flow chart of another embodiment of a scenic area charcoal barbecue detection and early warning method of the present invention.
[0051] Figure 3 The present invention is a flow chart of another embodiment of a method for detecting and warning of charcoal barbecue in a scenic area.
[0052] Figure 4 For the present invention Figure 1 The present invention is a schematic diagram of a charcoal barbecue detection and early warning system for a scenic area. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0055] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0056] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0057] See the following examples Figures 1 to 4 .
[0058] The present application embodiment provides a scenic area charcoal barbecue detection and early warning method, comprising:
[0059] Step S1, obtaining the odor monitoring result of the odor sensor set in the area where charcoal barbecue is prohibited in the scenic area;
[0060] Arrange odor sensors based on factors such as the topography, size, and flow of people in areas where charcoal barbecue is prohibited in scenic spots. For example, set them up in open grasslands, wooded areas, and areas near water sources where illegal barbecues are likely to occur. Use odor sensors to monitor the gas composition in the surrounding air in real time and convert the detected odor data into electrical or digital signals. Transmit the collected odor data to the scenic spot monitoring center service end through wired or wireless communication.
[0061] Step S2, obtaining video data recorded by a camera set in a charcoal barbecue-prohibited area in the scenic area;
[0062] According to the layout and monitoring requirements of the area where charcoal barbecue is prohibited in the scenic area, the camera is installed by setting a suitable position and ensuring that the camera can cover the entire prohibited area and the field of view is not blocked. At the same time, the camera is debugged, including adjusting the focal length, angle, resolution and other parameters to obtain clear and stable video images. The captured video data is encoded and compressed, and the compressed video data is transmitted to the scenic area monitoring center server via wired or wireless methods.
[0063] Step S3, preprocessing the video data, including:
[0064] Extracting a continuous video frame sequence from the video data at a preset frame rate;
[0065] By presetting the frame rate according to the needs of scenic area monitoring. For example, during the peak tourist season, there are frequent activities in the scenic area, and illegal barbecue behaviors may occur and change quickly, so a higher frame rate can be set. On the contrary, during the off-season, the frame rate can be appropriately reduced.
[0066] The video data can be parsed with the help of a video processing library. Starting from the start frame of the video, continuous video frames are extracted in sequence according to a preset frame rate to form a continuous video frame sequence.
[0067] The Gaussian filtering method is used to filter out noise from the extracted continuous video frames to obtain processed continuous adjacent frame images.
[0068] According to the noise situation and characteristics of the video frame image, select the appropriate Gaussian kernel size and standard deviation. If the noise is serious, you can choose a larger Gaussian kernel and increase the standard deviation appropriately to enhance the filtering effect. For each frame image in the extracted continuous video frames, perform a convolution operation on the Gaussian kernel and the image. By processing the entire frame image, the noise is filtered out. After completing the Gaussian filter processing, the continuous adjacent frame images that have been subjected to noise reduction processing are obtained.
[0069] Step S4, using a moving target detection algorithm to extract an image of a suspected smoke area in the processed video data;
[0070] The moving target detection algorithm can effectively distinguish the background and foreground in the video and identify the dynamically changing parts. In the charcoal barbecue scene in the scenic area, smoke is usually a moving target. Through background modeling and foreground detection, the algorithm can accurately capture the dynamic characteristics of the smoke, eliminate the interference of the static background, and extract the image of the suspected smoke area.
[0071] Step S5, inputting the suspected smoke area image into a smoke detection model trained based on a smoke data set, and outputting a smoke detection result;
[0072] The training method of the smoke detection model trained based on the smoke data set includes:
[0073] Obtain public smoke datasets, including video smoke data and image smoke data;
[0074] By using professional data sharing platforms or academic databases, select datasets with accurate annotations, large data volumes, and rich scenes. The annotation information should clearly indicate the location, category, and other information of the smoke in the image or video. Rich scenes mean that the dataset should contain smoke samples in different environments (such as indoors, outdoors, industrial scenes, natural scenes, etc.), different lighting conditions (daytime, nighttime, strong light, weak light, etc.), and different smoke forms (light smoke, thick smoke, open flame smoke, smoldering smoke, etc.).
[0075] The smoke data set is input into a smoke detection model based on the YOLOv5 algorithm for learning and training to obtain a trained smoke detection model.
[0076] The YOLOv5 algorithm network includes four pre-trained models, namely YOLOv5s, YOLOv5m, YOLOv51 and YOLOv5x. Since smoke detection has high requirements for real-time performance, YOLOv5s is selected as the basic algorithm in this embodiment. At the same time, the training parameters of the model are configured, including learning rate, batch size, number of training rounds, etc. The acquired smoke data set is divided into training set, validation set and test set according to a certain ratio (such as 70%, 15%, 15%). The training set is used for model learning and parameter update, the validation set is used to evaluate the performance of the model during the training process, adjust the hyperparameters of the model, and the test set is used to finally evaluate the generalization ability of the model. The smoke detection model based on the YOLOv5s algorithm is trained using the divided training set. During the training process, the model minimizes the loss function between the prediction result and the annotation information by continuously adjusting its own parameters. Use the validation set to evaluate the model and record the performance indicators of the model (such as accuracy, recall, etc.). Adjust the hyperparameters of the model according to the evaluation results.
[0077] After optimization, the smoke detection model has efficient reasoning capabilities and can analyze the input suspected smoke area images and output detection results in a short time. The scenic area environment is dynamically changing, and new charcoal grilling behaviors may occur at any time. The model can process the continuously input suspected smoke area images in real time, continuously provide accurate detection results, and meet the dynamic monitoring needs of the scenic area.
[0078] Step S6, comprehensively judging whether there is charcoal grilling behavior based on the smoke detection results and the odor monitoring results; specifically including:
[0079] When both the smoke detection result and the odor monitoring result show that no response occurs, it is determined that there is no charcoal grilling behavior at present;
[0080] When only one of the smoke detection result and the odor monitoring result responds, the manual auxiliary judgment mechanism is activated;
[0081] When both the smoke detection result and the odor monitoring result respond, it is determined that charcoal grilling behavior exists.
[0082] Step S7: If it is determined that charcoal grilling occurs, an alarm signal is issued in the area of the scenic spot where charcoal grilling is prohibited.
[0083] By installing corresponding voice announcers in areas where charcoal grilling is prohibited in scenic spots, when it is determined that charcoal grilling behavior exists, the corresponding voice announcer is activated and a preset warning signal is issued.
[0084] In this embodiment, to detect the smell of charcoal grilling, it is necessary to select a sensor that can effectively identify the characteristic odor molecules produced during the charcoal grilling process. A semiconductor gas sensor can be selected, which has high sensitivity to various gases produced during the charcoal grilling process, such as carbon monoxide, carbon dioxide, hydrocarbons, etc. When these gases come into contact with the semiconductor material on the surface of the sensor, the conductivity of the material will change. By detecting the change in conductivity, the presence and concentration of the gas can be sensed. At the same time, the semiconductor gas sensor has a relatively low cost, a fast response speed, a long service life, and can work in a wide temperature and humidity range, suitable for use in outdoor scenic areas. An electrochemical gas sensor can also be selected, which accurately detects specific harmful gases produced by charcoal grilling, such as carbon monoxide. The redox reaction of the gas on the electrode generates a current, and the magnitude of the current is proportional to the gas concentration. The electrochemical gas sensor has high sensitivity and selectivity, can accurately measure the gas concentration, and has a fast response speed and good stability. In addition, according to actual needs, odor sensors other than metal oxide semiconductor sensors or photoionization gas sensors (PID) can be selected.
[0085] It should be noted that the order between step S1 and step S2 is not unique, and is only a division method in this embodiment. For example, according to actual needs, step S1 can be implemented first, or step S2 can be implemented first, or both steps can be implemented at the same time.
[0086] The present invention provides a method for detecting and warning charcoal barbecue in a scenic area by comprehensively utilizing the video data recorded by a camera to detect smoke conditions and the monitoring results of an odor sensor. Through this multi-dimensional real-time monitoring method, it is possible to timely detect charcoal barbecue behavior in the early stages of occurrence and send out an alarm signal, thereby gaining more processing time for scenic area management and reducing the risk of safety accidents such as fires caused by charcoal barbecue. In addition, the entire detection and warning process has a high degree of automation, and data collection, processing and analysis are achieved through computer algorithms and sensor technology, which reduces the workload of manual inspections and improves management efficiency. At the same time, through this multi-dimensional real-time monitoring method, the possible misjudgment or missed judgment of a single detection method is reduced, and the accuracy of detecting charcoal barbecue behavior is improved.
[0087] See also Figure 2 In a preferred embodiment of the present application, the acquisition of the odor monitoring results of the odor sensor set in the prohibited charcoal barbecue area in the scenic area includes:
[0088] Step S11, obtaining odor detection data of the odor sensor detecting odor of the surrounding environment at a preset sampling frequency;
[0089] Multiple high-performance odor sensors are evenly installed in areas where charcoal barbecues are prohibited in the scenic area, such as the edge of the forest, grassland leisure areas, etc. According to the actual situation and management needs of the scenic area, the sampling frequency of the odor sensor is set to once every 5 minutes. Every 5 minutes, the odor sensor will detect the odor in the surrounding environment and transmit the detected data to the monitoring center service end of the scenic area in the form of digital signals. For example, the sensor detects the concentration values of gases such as monoxide, carbon dioxide, and volatile organic compounds in the air, and sends these data out.
[0090] Step S12, comparing the odor detection data with a pre-established charcoal grilling odor characteristic database to determine whether the odor components generated by charcoal grilling are detected, specifically including:
[0091] Extracting key features of odor from odor detection data according to the detection principle of the odor sensor;
[0092] For example, the odor sensor used in the scenic spot is based on the principle of electrochemical detection, which can convert the concentration of a specific gas into an electrical signal through a chemical reaction. Different gases will produce different electrical signal characteristics on the sensor, and by analyzing these electrical signals, the key characteristics of the odor can be extracted.
[0093] At the same time, for odor detection data, by analyzing the concentration trend of various gas components, the concentration ratio relationship between different gases and other key features. For example, during the charcoal grilling process, the concentration of carbon monoxide and volatile organic compounds will increase significantly, and the peak value of the corresponding gas concentration, the concentration change trend and the ratio between them are extracted as the key features of the odor.
[0094] The extracted key features of the odor are matched one by one with the odor features in the pre-established charcoal barbecue odor feature database;
[0095] By collecting a large amount of odor data generated by charcoal grilling in different scenarios, and conducting detailed analysis and annotation, a charcoal grilling odor feature database was established. The database contains characteristic information such as the concentration range, concentration change trend, and gas ratio relationship of different gas components in various charcoal grilling scenarios. The key features extracted from the current odor detection data are compared one by one with the odor features in the database.
[0096] Based on the feature matching results, it is determined whether the odor components generated by the charcoal grilling are detected;
[0097] By presetting a feature matching threshold, when the degree of matching between the extracted key features of the odor and the features in the database exceeds the feature matching threshold, it is determined that the odor component generated by the charcoal grilling is detected.
[0098] Step S13: If the judgment result is that the odor component generated by charcoal grilling is confirmed, then compare whether the concentration of the odor component exceeds a preset concentration threshold, and output the odor monitoring result.
[0099] According to the environmental safety requirements of the scenic area, the preset concentration thresholds are set for the main odor components produced by charcoal grilling. For example, the preset concentration threshold of carbon monoxide is 20ppm. When the odor components produced by charcoal grilling are confirmed to be detected, the concentration of the detected odor components will be further compared with the preset concentration threshold. According to the concentration comparison results, the odor monitoring results are output. If the concentration of the odor component exceeds the preset threshold, the output is "Charcoal grilling behavior is detected, and the concentration of the odor component exceeds the standard"; if it does not exceed the threshold, the output is "Charcoal grilling related odor is detected, but the concentration of the odor component does not exceed the standard". At the same time, the output results are uploaded to the scenic area monitoring center server so that the scenic area managers can understand the situation in a timely manner and take corresponding measures.
[0100] See also Figure 3 In a preferred embodiment of the present application, the extraction of the image of the suspected smoke area in the processed video data by using the moving target detection algorithm includes:
[0101] Step S41, using an inter-frame difference method to perform difference calculation on consecutive adjacent frame images obtained from the processed video data to obtain a plurality of difference images;
[0102] The inter-frame difference method includes two-frame difference method, three-frame difference method and seven-frame difference method. In this embodiment, the seven-frame difference method is used for calculation. Assume that the continuous adjacent frame images of the processed video data are f1(x, y), f2(x, y), ..., f n (x,y), where (x,y) represents the coordinates of the pixel in the image.
[0103] The calculation process of the seven-frame difference method is as follows:
[0104] For each pixel (x, y), calculate the difference between the i-th frame and the i+7-th frame image to obtain the difference image D i (x,y), the formula is:
[0105] D i (x,y)=|f1(x,y)-f i+7 (x,y)|
[0106] Where i = 1, 2, ..., n-7 In this way, the difference between consecutive adjacent frame images is calculated to obtain multiple difference images. D1, D2, ..., D n-7 ,These difference images highlight the changes between the images with a time interval of 7 frames, which helps to capture the information of the ,moving target.
[0107] Step S42, performing binarization processing on each difference image to obtain a first image that distinguishes the foreground area and the background area;
[0108] Binarization is to divide the pixels in the difference image into foreground and background. Set a threshold T, for the difference image D i For each pixel (x,y) in (x,y), if D i (x,y)>T, then mark the pixel as a foreground pixel and assign a value of 255; if D i (x,y)≤T, then the pixel is marked as a background pixel and assigned a value of 0. It can be expressed as:
[0109]
[0110] Among them B i (x, y) represents the binary image. After processing, multiple binary images B1, B2, ..., B n-7 These images are the first images that distinguish the foreground area and the background area, and can intuitively show the area in the image where the moving target may exist.
[0111] Step S43, using the ViBe algorithm to perform background update on the processed video data to obtain continuous adjacent frame images, to obtain a second image;
[0112] The first N frames of processed video data (eg, N=20) are selected. For each pixel (x, y), M samples (eg, M=20) are randomly selected in its spatiotemporal neighborhood to form a background model M(x, y) of the pixel.
[0113] For each pixel point (x, y) in the current frame image f(x, y), calculate the distance between the pixel point and the sample in the background model M(x, y) (usually using the Euclidean distance). If the distance between the pixel point and the sample in the background model is less than the preset threshold, the pixel point is considered to belong to the background and the background model is updated; otherwise, the pixel point is considered to belong to the foreground. The updated background model is the second image, which can reflect the background changes in the video in real time. Assume V i (x, y) is the i-th frame image after being processed by the ViBe algorithm. It means that based on M(x, y), as the video frames are continuously input, it is gradually obtained by comparing and updating the current pixel with the background model M(x, y). In other words, we first have the background model M(x, y) of each pixel, and then we can judge whether the current pixel belongs to the background based on this model, and then generate V reflecting the background and foreground information. i (x,y).
[0114] Step S44: according to the correspondence between the first image and the second image, a preset logical operation is performed to obtain an image of the suspected smoke area in the processed video data.
[0115] In this embodiment, the preset logical operation may be an "AND" operation. i (x,y) and the second image V i (x, y), perform an “AND” operation on the pixels at the corresponding positions to obtain the final suspected smoke area image S i (x,y), the formula is:
[0116] S i (x,y)=B i (x,y)∩V i (x,y)
[0117] Through this logical operation, the motion area information obtained by the inter-frame difference method and the background update information obtained by the ViBe algorithm are combined to remove the false detection areas that may be caused by simple inter-frame difference (such as sudden changes in the background). At the same time, the sensitivity of inter-frame difference to moving targets is also utilized to more accurately extract the suspected smoke area image in the processed video data.
[0118] In this embodiment, the seven-frame difference method can capture motion information within a larger time interval. Compared with the two-frame difference method or the three-frame difference method, it can more effectively detect slow-moving targets and reduce missed detections caused by slow target movement. At the same time, the background update is combined with the ViBe algorithm to adapt to dynamic changes in the background, such as light changes, movement of background objects, etc., further improving the accuracy of detecting moving targets and reducing false detections. Smoke usually appears as a slowly diffusing moving target in the video. This embodiment can more accurately capture the motion characteristics of smoke by using the inter-frame difference method combined with the ViBe algorithm, and more effectively extract the image of the suspected smoke area. In scenes such as charcoal barbecue detection in scenic spots, the generation of smoke can be detected in time and an early warning can be issued.
[0119] See also Figure 4 The embodiment of the present application also provides a scenic area charcoal fire barbecue detection and early warning system, which is applied to the aforementioned scenic area charcoal fire barbecue detection and early warning method, including:
[0120] A first data acquisition unit is used to acquire odor monitoring results of odor sensors installed in areas where charcoal barbecue is prohibited in the scenic area;
[0121] The second data acquisition unit is used to acquire video data recorded by cameras set in areas where charcoal barbecue is prohibited in the scenic area;
[0122] A data processing unit, used for preprocessing the video data;
[0123] An image extraction unit, used to extract an image of a suspected smoke area in the processed video data using a moving target detection algorithm;
[0124] A smoke detection output unit, used to input the suspected smoke area image into a smoke detection model trained based on a smoke data set, and output a smoke detection result;
[0125] A judgment unit, used to comprehensively judge whether there is charcoal grilling behavior based on the smoke detection results and the odor monitoring results;
[0126] The early warning unit is used to send out an alarm signal in the area where charcoal grilling is prohibited in the scenic area when it is determined that charcoal grilling behavior exists.
[0127] The functional explanation of each unit in this embodiment is the same as that of a scenic area charcoal barbecue detection and early warning method, and the technical effect is the same, so it will not be repeated here.
[0128] An embodiment of the present application also provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the aforementioned scenic area charcoal barbecue detection and early warning method.
[0129] The technical effect of this embodiment is the same as the technical effect of a scenic area charcoal barbecue detection and early warning method in an embodiment, and will not be repeated here.
[0130] The present invention can be used in many general or special computer system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like.
[0131] An embodiment of the present application further provides a processor, which is used to run a program, wherein the program executes the aforementioned scenic area charcoal barbecue detection and early warning method when running.
[0132] The technical effect of this embodiment is the same as the technical effect of the method for detecting and warning charcoal barbecue in a scenic area in Embodiment 1, and will not be repeated here.
[0133] The processor in this embodiment may be a central processing unit (CPU), a controller, a microcontroller, or other data processing chips.
[0134] Those of ordinary skill in the art will appreciate that the units of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition of each example has been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0135] In the embodiments provided by the present invention, it should be understood that the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units can be combined into one unit, one unit can be split into multiple units, or some features can be ignored, etc.
[0136] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or 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 software functional units.
[0137] If the integrated unit 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. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-0nlyMemory), random access memory (RAM, RandomAccessMemory), mobile hard disk, magnetic disk or optical disk, etc., which can store program code.
[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
Claims
1. A method for detecting and warning charcoal barbecue in a scenic area, characterized in that: include: Obtain the odor monitoring results of the odor sensors installed in the prohibited charcoal barbecue area in the scenic area; Obtain video data recorded by cameras set up in areas where charcoal barbecue is prohibited in scenic areas; Preprocessing the video data; Use the moving target detection algorithm to extract the suspected smoke area image in the processed video data; Input the suspected smoke area image into a smoke detection model trained based on a smoke data set, and output a smoke detection result; Based on the smoke detection results and odor monitoring results, comprehensively judge whether there is charcoal grilling behavior; If it is determined that charcoal grilling is occurring, an alarm signal will be issued in areas of the scenic area where charcoal grilling is prohibited.
2. A scenic area charcoal barbecue detection and early warning method according to claim 1, characterized in that: The method of obtaining the odor monitoring result of the odor sensor set in the prohibited charcoal barbecue area in the scenic area includes: Acquire odor detection data of the odor sensor detecting odor of the surrounding environment at a preset sampling frequency; Compare the odor detection data with a pre-established charcoal grilling odor characteristic database to determine whether the odor component generated by the charcoal grilling is detected; If the judgment result is to confirm the odor component produced by charcoal grilling, then compare whether the concentration of the odor component exceeds the preset concentration threshold, and output the odor monitoring result.
3. A scenic area charcoal barbecue detection and early warning method according to claim 2, characterized in that: The odor detection data is compared with a pre-established charcoal grilling odor characteristic database to determine whether the odor component generated by charcoal grilling is detected, including: Extracting key features of odor from odor detection data according to the detection principle of the odor sensor; The extracted key features of the odor are matched one by one with the odor features in the pre-established charcoal barbecue odor feature database; Based on the feature matching results, it is determined whether the odor components generated by the charcoal grilling are detected.
4. A scenic area charcoal barbecue detection and early warning method according to claim 3, characterized in that: The preprocessing of the video data comprises: Extracting a continuous video frame sequence from the video data at a preset frame rate; The Gaussian filtering method is used to filter out noise from the extracted continuous video frames to obtain processed continuous adjacent frame images.
5. A scenic area charcoal barbecue detection and early warning method according to claim 2, characterized in that: The method of extracting the suspected smoke area image in the processed video data by using the moving target detection algorithm includes: Using the inter-frame difference method to calculate the difference of consecutive adjacent frame images obtained from the processed video data to obtain multiple difference images; performing binarization processing on each difference image to obtain a first image that distinguishes the foreground area and the background area; Using the ViBe algorithm to update the background of the continuous adjacent frame images obtained from the processed video data to obtain a second image; According to the correspondence between the first image and the second image, a suspected smoke area image in the processed video data is obtained through a preset logical operation.
6. A scenic area charcoal barbecue detection and early warning method according to claim 5, characterized in that: The training method of the smoke detection model trained based on the smoke data set includes: Obtain public smoke datasets, including video smoke data and image smoke data; The smoke data set is input into a smoke detection model based on the YOLOv5 algorithm for learning and training to obtain a trained smoke detection model.
7. A method for detecting and warning charcoal barbecue in a scenic area according to claim 6, characterized in that: The comprehensive judgment of whether there is charcoal grilling behavior based on the smoke detection results and the odor monitoring results includes: When both the smoke detection result and the odor monitoring result show that no response occurs, it is determined that there is no charcoal grilling behavior at present; When only one of the smoke detection result and the odor monitoring result responds, the manual auxiliary judgment mechanism is activated; When both the smoke detection result and the odor monitoring result respond, it is determined that charcoal grilling behavior exists.
8. A charcoal barbecue detection and early warning system in a scenic area, characterized in that: A method for detecting and warning charcoal barbecue in a scenic area as described in any one of claims 1 to 7, comprising: A first data acquisition unit is used to acquire odor monitoring results of odor sensors installed in areas where charcoal barbecue is prohibited in the scenic area; The second data acquisition unit is used to acquire the video data recorded by the camera set in the area where charcoal barbecue is prohibited in the scenic area; the data processing unit is used to pre-process the video data; An image extraction unit, used to extract an image of a suspected smoke area in the processed video data using a moving target detection algorithm; A smoke detection output unit, used to input the suspected smoke area image into a smoke detection model trained based on a smoke data set, and output a smoke detection result; A judgment unit, used to comprehensively judge whether there is charcoal grilling behavior based on the smoke detection results and the odor monitoring results; The early warning unit is used to send out an alarm signal in the area where charcoal grilling is prohibited in the scenic area when it is determined that charcoal grilling behavior exists.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute a scenic area charcoal barbecue detection and early warning method as described in any one of claims 1 to 7.
10. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes a scenic area charcoal barbecue detection and early warning method as described in any one of claims 1 to 7.