Abstract
This article contributes a novel technique based on cascade classifiers for smoke detection by utilizing the image processing method. It has been a difficult issue for ten years or so due to its variety in shape, texture, and color. In this article, a machine learning methodology is represented to tackle this issue and simulated with MATLAB software. The smoke detection issue acted like a classification issue. The solution is demonstrated as a binary classification issue. Hence, the support vector machine (SVM) is represented for classification. In order to train and test the SVM classifier, both samples of positive and negative are gathered. Two SVM classifiers are utilized in the cascade. The first classifier distinguishes the presence of smoke if smoke presents in a provided input image; the second classifier is utilized to find the locale of smoke in a provided input image. The size of the window is set to 32 × 32 and slided across the whole image to identify the smoke in a zone of the window. The novel technique is a training dataset and utilizing linear kernel function. In this manner, the novel technique is tested with a test dataset. The first SVM classifier obtained 100% accuracy in training and 96% accuracy in testing. A training accuracy of 96% and a test accuracy of 93.6% were obtained by the second SVM classifier. This novel technique proved to be more proficient and cost-savvy than the traditional strategies.
1 Introduction
Smoke is an underlying phase of extreme fires. It has tremendous consequences for human well-being, nature, and the environment. In the event that we identify the presence of smoke, at that point we can undoubtedly forestall the event of a fire. Along these lines, a proficient strategy to recognize smoke is needful. That is the reason why we proposed a cascade classifier strategy to detect smoke. This study is to find the smoke before it becomes a stove. Smoke could be a noticeable source of carbon or various particles in the air that are released by the consumption of substances. It is normally related to undesirable side-effects of fires. Inhaled smoke is the primary cause for most passing in indoor flames. A few mixes of smoke area unit are highly poisonous and harmful. The principal peril is the CO that causes CO harming. People who breathe in an enormous measure of smoke rapidly lose awareness. Additionally, a haze of smoke joining with the district component has the capability of being touched off either by another open fire in the area or by its own temperature. This leads to impacts like fiery surge and discharge [1].
The current procedures for smoke detection include the utilization of some type of hardware and this hardware changes from fancy smoke alarms to infrared sensors. Optical smoke alarms have an outrageously high reaction time, however, they create perfect outcomes; anyway, the outcomes do not appear to be low-cost as placing them in public territories may be cherished and would require appropriate hardware management as they are anything but difficult to get tempered [2]. In this article, a technique is proposed which is more proficient and cost-savvy than the traditional strategies. This is achieved by utilizing the SVM classifier, which is divided into two stages, i.e., images with smoke (positive images) and images without smoke (negative images). These images are utilized to train our own classifiers. They are provided as an input to SVM classifier 1. At that point, 32 × 32 patches of images are provided as input to train SVM classifier 2. To test classifier 1 these images are fed in to SVM classifier 1, which expects them to be 1 or 0. The expected smoke images are provided to classifier 2. By utilizing window sliding, it finds the patches of smoke zones. Finally, it features the smoke area in the image.
2 Related works with their drawbacks
Article [1] provided a novelty to fire and smoke detection utilizing image measure. The paradigm utilizes entirely different color models for flame and smoke together. The images extracted via statistical analysis are separated into very surprising sort of video sequences and pictures. The extricated paradigms can be used in the entire flame/smoke detection framework which blends color information with movement analysis. For smoke detection, a statistical analysis is carried out by this article based on the idea that the smoke shows grayish color with different illuminations and the RGB input images filled with smoke. The article is based on statistical analysis which is more complex with accuracy equal to 93.9%.
In [2], the authors submitted a method for automatic observing frameworks to locate an early flame place and smoke is demonstrated, it utilizes movement history detection algorithm to enroll achievable smoke and flame place locations provided in a video and investigate the spectrum, spatial and transient features inside the stream of images. The possible flame and smoke candidate area is determined by weighing the statistical distribution of the spectral and spatial probability density with the fuzzy reasoning method. The input RGB images in this article are loaded with a medium amount of smoke, and it uses a fuzzy logic to extract actual flame and smoke to verify the accuracy of existing flame and smoke but by using the fuzzy logic with the statistical calculations it makes the proposed technique complex and the accuracy of this technique equals 77.5%.
The above two articles do not permit the utilization of the temporal features, spatial logic, and the detection is achieved in one image. In article [2] the spectral probability density is represented by comparing the flame and smoke histogram paradigm, where HIS color space is utilized.
Article [3] submitted a procedure of smoke detection utilizing spatial and transient analysis. The extended algorithmic guideline gives greater pliability to smoke detection procedures and extra efficiency to figure under quite various conditions. The proposed spatial-temporal analysis based Wavelet series, which is a representation of a square-integrable (real- or complex-valued) function by some orthonormal series provided by a wavelet and combining with Support Vector Machine (SVM) and Alarm Decision Unit (ADU) to make the result more reliable, was used in this article. It has been shown that this article is based on complex mathematics and machine learning because it used SVM to improve its results, moreover the article used very high smoke images with accuracy equal to 92%. In [4] the authors proposed a methods of smoke detection in fixed camera video utilizing the numerous choices of smoke. It does it in three stages, the first stage uses the YUV model for color filtering, the second stage includes extracting the feature choices, and finally, they are fed into SVM (Support Vector Machine) classifier that settles on the choice of up-and-comer smoke locale. The final step is to decide if each blob of the current input frame is smoke, using temporal information of color and shape in the detected blobs, by determining if the detected Region of Input (ROI) is smoke, using the k-temporal information of its color and shape extracted from the ROI. This article used a large smoke in image for forest fire images with low accuracy.
Article [5] projected a framework where any place a smoke detector senses smoke it actuates its caution, imparts an incidental voltage signal to any or any remaining smoke alarms inside the neighborhood. This low voltage signal enacts the individual transfers inside the elective smoke detectors making them radiate a tone that cautions inhabitants that one of the smoke detectors senses smoke. This system is a device based Arduino by means of a practical device and operates on a limited distance, maximum 3 m, with an accuracy of 98%.
In reference [6], the authors P. Morerio., et.al, projected an approach for smoke detection that is mainly works on color features extraction and dynamics analysis. It includes five main modules: a] change detection, b] motion detection, c] fire feature extraction, d] smoke feature extraction, e] chaotic feature extraction. This module gives a very known subtraction based algorithm to get pixels which are different than normal pixels of the background picture. The traditional methodology of smoke detection needed hardware like sensors and had several shortcomings like lifetime of hardware, battery of sensingelement, substantial quantity of smoke for detection, proximity of smoke to the sensing element as mentioned in P. Morerio, et.al, and G. Kong, [6, 7].
As well as in [7], the camera-world mapping is approximated using a GPS-based learning calibration technique, and a new Wavelet-based model of fire’s frequency signature is proposed. The model’s applicability to real-life applications is demonstrated by a 92.7% accuracy success rate at a processing rate of 10 Hz. The Wavelet-based mathematics used in this article is complex, also it used very high smoke images.
In the above technique, the principal issue with smoke detection is the tangling issue that is determining if an area of pixels contains a smoke locale or not as discussed in [8]. This issue emerges due to the foundation present in any image.
In article [9], the authors depicted flame detection innovation dependent on video images as of late. The above technique for flame and smoke detection in both indoor and outdoor living areas can be arranged into two fundamental classifications:
The characteristic detection of smoke and flame. The framework performance can be improved by utilizing ideal algorithms for identifying smoke zone and separating detecting flam.
The spatial paradigms for detecting smoke as examined in [10] which are exceptionally significant for tangling issue as it helps in contemplating the structure of smoke, this reference [10] discusses the different impacts of the environmental scattering and attenuation excreta. Table 1 below summarizes a comparison in technique, complexity, memory storage, and accuracy of recent related works
Comparison of related works
References | Technique | Complexity | Memory storage | Accuracy |
Celik.T. et al., 2011 [1] | Statistical analysis | High | High | 93.9% |
Chao-Ching Ho., 2013 [2] | Statistical analysis with fuzzy logic | Very high | Very high | 77.5% |
Chen-Ye Lee et al., 2014 [3] | Wavelet based mathematics with machine learning | Very high | Very high | 92% |
Calderara, S. et al., 2015 [4] | Mathematical morphology with machine learning | Very high | Very high | Not Available (N/A) but its Low |
Kim D. and Wang F., 2016 [5] | Practical | Low | Medium | 98% with distance=3m |
Morerio P. and Maracenaro L., 2017 [6] | Neural networks | High | Medium | N/A = Not available |
Kong G., 2018 [7] | Wavelet-based mathematics | High | High | 92.7% |
3 The proposed novel technique of smoke detection
A flowchart of the proposed novel technique of smoke detection is presented in Fig. 1.
4 Novel technique operation
4.1 Input images
The input images include both positive and negative images. Fig. 2 shows the information images provided to SVM classifier 1. The dataset for regions without and with smoke is not accessible anywhere. So by utilizing real-time videos, those images are executed and cropped as well as saved in the folder as positive and negative images. These images are provided to linear SVM classifier 1 to train the image by marking it. For linear SVM classifier 2, the patches from the positive images are cropped and stored as again positive and negative patches. These patches are marked and provided to linear SVM classifier 2.
4.2 Training SVM classifier 1
The images that will be provided as information are converted into numpy array. Next, we will mark the information. On the off chance that there is smoke in the image, at that point it is marked as “1” or else it is marked as “0”. At that point comes the detection of the state of the numpy array. There are N images that we utilized to train SVM classifier 1 and it is of the greatest size 2^N. To examine if the image is appropriately marked or not we stochastically got a few images with the mark. Fig. 3 considers input images from dataset training. From those images, we can unquestionably state that the images are trained appropriately.
4.3 Training SVM classifier 2
For linear SVM classifier 2, there are N patches provided to the classifier and all images of the most extreme size of 2^N. For classifier 2 we provided a little bit of the smoke images with smoke and without smoke patches. This patch may include the window size of 32 × 32 and each includes intense smoke zones, the slope of smoke, and the region without smoke. This is provided as an input to classifier 2. The smoke regions are labeled as 1 and regions without smoke are labeled as 0. This is called LABELING. Fig. 4 showed the patches of information images to SVM classifier 2. To examine the linear SVM classifier 2 is effectively labeled or not we stochastically got a few images from N images and showed the label.
4.4 Testing SVM classifier 1
The trained images are stored as pickle format. At that point, we announce the sliding window with its size and step size with expanding requests. At that point we read the image that needs to be tested in the type of RGB. At that point it is anticipate whether it is 0 or 1. On the off chance that it is 0, at that point it is image without smoke. In the event that it is 1, at that point by utilizing window sliding the patch of the slope movement of the smoke in the image is detected.
The input images are provided to the linear SVM classifier 1 and examined if the information images include smoke. On the off chance that it includes smoke, at that point expectation will be 1, and on the off chance that it does not include smoke, at that point, the expectation will be 0.
In the event that the expectation is 1, at that point it will show as “SMOKE” and in the event that the expectation is 0, at that point it will show as “NO SMOKE”. Fig. 5 showed SVM classifier 1 output. The training is nearly ideal in linear SVM classifier 1 so the testing image output is shown as expected. On the off chance that once we provide input images to test if it includes smoke or not, linear SVM classifier 1 examines it with the trained image. It will display “SMOKE” if it is roughly equal to the compared smoke image and it will display “NO SMOKE” if it does not equal to the compared smoke image.
4.5 Testing SVM classifier 2
On the off chance that there is a smoke expectation in classifier 1, at that point it will move to classifier 2. It will at that point crop the image segment into 32 × 32 and expect that the patch is 0 or 1. At long last, after this window sliding, it will present the slop segment of the image. Fig. 6 gives SVM classifier 2 output.
In the event that smoke is available in SVM classifier 1, at that point it is provided to SVM classifier 2. This linear SVM classifier 2 detects the patches by 1 or 0. At last, it appears whether the patches are 1 or 0. By utilizing SVM classifier 1 and SVM classifier 2, the region of the smoke in the provided image was labeled. Fig. 7 shows that smoke in the image has been highlighted.
5 Results and discussion
By storing 500 images randomly which include 250 images with smoke and 250 images without smoke in a MATLAB Database Toolbox 2021 and then these images will be as inputs and then converted into numpy array to SVM Classifier 1. Next we are going to label the data. If there is a smoke in the image then it is labeled as “1” or otherwise it is labeled as “0”. Then we find out the shape of the numpy array. There are N images that we used to train SVM classifier 1 and it is of maximum size 2^N. Depending on Confusion matrix, Table 2 below shows performance measures of Trained SVM classifier 1. From this table we can surely tell that the images are trained properly, where exactly 250 positive images and 250 negative images were detected, respectively. The accuracy of this technique is determined by = [(Number of detected positive images + Number of detected negative images)/Total Number of images] *100%. And the Recall refers to the percentage of total relevant results correctly classified by this technique and it is determined by = [Number of detected positive images/(Number of detected positive images + Number of False negative images)*100%. Then the accuracy of Trained SVM classifier 1 = 100% and the Recall = 100%.
Performance measure of Trained SVM classifier 1
500 Images | Positive detected | Negative detected |
Positive | True positive = 250 | False negative = 0 |
Negative | False positive = 0 | True negative = 250 |
After that SVM classifier 1 must be tested. The trained images are stored in the form of pickle format. Then we declare the sliding window with window size and step size with increasing order. Once we give input images to test whether they contain smoke or not, linear SVM classifier 1 compares them with the trained image. Table 3 below shows the performance measure of Tested SVM classifier 1. Only 241 positive images and 238 negative images were detected and 9 positive images with 12 negative images were not detected.
Performance measure of Tested SVM classifier 1
500 Images | Positive detected | Negative detected |
Positive | True positive = 241 | False negative = 12 |
Negative | False positive = 9 | True negative = 238 |
Accuracy = [(241+238)/500] *100% = 96% and Recall = [241/(241+12)]*100% = 95%
For linear SVM classifier 2 there are N patches1 given to the classifier and all images of maximum size of 2^N. For classifier 2 we are given the small portion of the smoke images (250 positives only) with smoke and without smoke patches. This patch = 32pixels × 32pixels, 1 pixel = 0.026458333 cm, that means 1 patch (Windows 23 × 32) = 0.84 cm × 0.84 cm = 1.68 cm2. Table 4 below shows the performance measure of Trained SVM Classifier 2 and Table 5 shows the performance measure of Tested SVM Classifier 2.
Performance measure of Trained SVM Classifier 2
250 Patches/Images | Positive detected | Negative detected |
Positive | True positive = 121 | False negative = 4 |
Negative | False positive = 6 | True negative = 119 |
Performance measure of tested SVM Classifier 2
250 Patches/Images | Positive detected | Negative detected |
Positive | True positive = 116 | False negative = 9 |
Negative | False positive = 7 | True negative = 118 |
Accuracy = [(121+119)/250] * 100% = 96% and Recall = [121/(121+4)] * 100% = 97%
Accuracy = [(116+118)/250] * 100% = 93.6% and Recall = [116/(116+9)] * 100% = 93%. It has been shown by these results that the proposed approach based machine learning is simple in complexity, requires low memory storage with a high accuracy compared with the recent related works in Table 1.
6 Conclusion
The issue of smoke detection was developed as a binary classification problem. The cascade classifier based on SVM was developed to detect the presence of smoke in a provided image and simulated it by MATLAB software. On 500 images, the technique was trained and tested. The SVM classifier 1 model conducted accuracy in training and testing of 100% and 96%, respectively. The SVM classifier 2 model accomplished 96% and 93.6% accuracy in training and testing, respectively. This proposed approach based machine learning is simple in complexity, requires low memory storage with a high accuracy compared with the recent related works in Table 1.
Acknowledgment
The author would like to thank Mustansiriyah University (www.uomustansiriyah.edu.iq) Baghdad – Iraq for its support in the present work.
References
- [1]↑
T. Celik, H. Ozkaramanly, and H. Demire, “Fire and smoke detection without sensors: image processing approach,” European Signal Processing Conference EUSIPCO, 2011.
- [2]↑
C.-C. Ho, “Machine vision based real- time early flame and smoke detection,” Meas. Sci. Technol., vol. 2, no. 4, 2013.
- [3]↑
C.-Y. Lee, C.-T. Lin, C.-T. Hong, and M.-T. Su, Smoke Detection Using Spatial and Temporal Analysis, Taiwan: Department of Electrical Engineering, National Chiao Tung University, 2014.
- [4]↑
D. Kim and Y. F. Wang, “Smoke detection in video,” World Congress on Computer Science and Information Engineering, Conference Paper, January, 2015.
- [5]↑
D. Kim and F. Wang, “Wireless smoke detection system”, Computer Sci. Inf. Eng. WRI World Congress, vol. 7, 2016.
- [6]↑
P. Morerio and L. Maracenaro, “Early fire and smoke detection based on colour features and motion analysis,” in Image Processing (ICIP), 19th IEEE International Conference, 2017.
- [7]↑
G. Kong, “Fast fire flame detection in surveillance video using logistic regression and temporal smoothing”, Fire Saf. J., vol. 4, no. 2, 2018.
- [8]↑
S. Ye, “An effective algorithm to detect both smoke and flame using color and wavelet analysis”, Pattern Recognition Image Anal., vol. 27, no. 1, 2018.
- [9]↑
T. Celik, H. Demirel, H. Ozkaramanli, and M. Uyguroglu, “Fire detection in video sequences using statistical color model,” in Proc. IEEE Int. Conf. Acoust. Speech Signal Process, vol. 2, Toulouse, France, May 2006.
Image patch is a container of pixels in larger form. A pixel is encoded by a RGB vector, whose values are easy to be noised, and a pixel itself is not very meaningful. Meanwhile, a patch is more meaningful than a pixel and can be mapped to certain microstructures, which are explainable with words. The proposed technique assumed that there was only one patch per image.