Abstract
Visual data (e.g., images/videos) captured from outdoor visual devices are usually degraded by turbid media, such as haze, rain, or snow. Hence, weather conditions would usually disrupt or degrade proper functioning of vision-based applications, such as transportation systems or advanced driver assistance systems, as well as several other outdoor surveillance-based systems. To cope with these problems, removal of weather effects (or the so-called deweathering) from visual data has been critical and received much attention. Therefore, it is important to provide a preprocessing step to automatically decide the current weather condition for input visual data, and then the corresponding proper deweathering operations (e.g., removals of rain or snow) will be properly triggered accordingly. This paper presents an inception network-based weather image classification framework relying on the GoogLeNet by considering the two common weather conditions (with similar characteristics), including rain and snow, in outdoor scenes. For an input image, our method automatically classifies it into one of the two categories or none of them (e.g., sunny or others). We also evaluate the possible impact on image classification performance derived from the image preprocessing via filtering. Extensive experiments conducted on open weather image datasets with/without preprocessing are conducted to evaluate the proposed method and the feasibility has been verified.
This work was supported in part by Ministry of Science and Technology (MOST), Taiwan, under the Grant MOST 105-2628-E-224-001-MY3. This work was also financially supported by the “Artificial Intelligence Recognition Industry Service Research Center” from The Featured Areas Research Center Program within the framework of the Higher Education Sprout Project by the Ministry of Education (MOE) in Taiwan.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
- Weather images
- Preprocessing
- Filtering
- Classification
- Recognition
- Deep learning
- Convolutional neural networks
- Inception networks
- GoogLeNet
1 Introduction
Different weather conditions, such as haze, rain, or snow would cause unpleasing visual effects in visual data (e.g., images/videos) [1]. Such effects may significantly degrade the performances of several outdoor vision systems, such as outdoor surveillance-based object detection, tracking, and recognition, scene analysis and classification, as well as vision-assisted transportation systems and advanced driver assistance systems (ADAS) applications [2]. To cope with the problems, removal of weather effects (or the so-called deweathering) from images/videos has been recently important and received much attention [3,4,5] (e.g., dehazing, i.e., removal of haze [6,7,8,9,10], deraining, i.e., removal of rain [11,12,13,14,15,16,17,18,19,20,21,22,23,24], and desnowing, i.e., removal of snow [11, 24, 25]). To promptly apply the proper deweathering operation for an input image captured by outdoor visual devices, it is important to first correctly decide the weather condition in the image. Hence, weather image classification is essential for vision-based outdoor applications [26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41]. Based on our explorations of the state-of-the-art approaches, a key technique in the literature consists of the three main steps. The first step is to extract the regions of interests (ROIs) from a weather image (e.g., extraction of the sky region). Then, the second stage is usually to extract some features or descriptors to represent each ROI, followed by the third step applying some classifier to achieve classification of the weather condition for this image. Such approaches may work well for images with clear and easily extracted ROIs. However, for an image without specific or easily-extracted ROI region(s) for describing the weather condition of the image, such approaches may not work well.
To achieve better weather classification performance, deep learning techniques [42,43,44] have been successfully applied to the applications of weather image classification recently [33, 36, 37, 39,40,41]. For example, a deep learning-based weather image classification framework based on AlexNet [42] was presented in [33] to classify an input weather image into one of the two classes including sunny and cloudy. Furthermore, a two-class (sunny or cloudy) weather image classification framework based on collaborative learning was presented in [36], where the data-driven convolutional neural network (CNN) feature and well-selected weather-specific features are combined. In addition, a CNN-based multi-task framework was developed in [39] which aims to concurrently tackle weather category classification task and weather-cues segmentation task. In this paper, by considering currently most popular deweathering operations, including deraining [11,12,13,14,15,16,17,18,19,20,21,22,23,24] and desnowing [11, 24, 25], we present a preprocessing framework for weather image classification by considering the three classes of rainy, snowy, and the one (e.g., sunny) for none of the two aforementioned classes. That is, our goal is to automatically online decide the weather condition for an input image captured by any outdoor sensors equipped with deweathering functionalities, and properly trigger the corresponding deweathering operation.
Inspired by the great success achieved by deep learning in numerous perceptual tasks [42,43,44], we propose to apply the inception network-based deep learning to perform weather image classification relying on GoogLeNet [43]. The main idea of the inception network [43] is based on finding out how an optimal local sparse structure in a CNN can be approximated and covered by readily available dense components. The key is to simultaneously deploy multiple convolution operations with multiple filters and pooling layers in parallel within the same layer. As a result, both of the depth and width of the network are increased while keeping the computational budget constant. On the other hand, before feeding an image into the deep network, we also study the possible impact on classification performance by applying pre-filtering operation [45] to the image for possibly facilitate to extract weather cues.
2 Proposed Inception Network-Based Weather Image Classification Framework
2.1 Problem Formulation and Preprocessing
The main goal of this paper is to learn a classifier to classify each input image to one of the three classes, including rainy, snowy, and other (or none of above). Inspired by the preprocessing of image filtering applied in several image denoising applications, such as image deraining [12,13,14,15,16,17,18,19,20,21,22,23,24] and image deblocking [46,47,48,49], we propose to first apply the low-pass filtering to an input image I to obtain the low-frequency part of I, denoted by ILF. Then, we calculate the high-frequency part of I as IHF = I – ILF. That is, it is expected that some weather cues, such as rain streaks or snow streaks, would be included in the high-frequency part of the image, while the other image basic components are included in the low-frequency part. Based on the suggestion of [46,47,48,49], the BM3D (block-matching and 3D filtering) algorithm [45] is selected as the low-pass filter in our method is, which is based on an enhanced sparse representation in transform domain, achieved by grouping similar 2D image fragments (blocks) into 3D data arrays. In our framework, all of the training and testing images are preprocessed via the above-mentioned filtering process to obtain their corresponding high-frequency images while the low-frequency parts are ignored. By collecting a set of N preprocessed training images \( \left\{ {x^{\left( i \right)} } \right\} \) with corresponding labels \( \left\{ {y^{\left( i \right)} } \right\} \), i = 1, 2, …, N, our goal is to learn a classifier by optimizing the cross-entropy loss function defined as:
where C denotes the number of classes considered (C = 3 is used in this paper), I is an indicator function, \( y^{\left( i \right)} = c \) denotes that the i-th training image belongs to the c-th class, \( \varvec{P}\left( {y^{\left( i \right)} = c|x^{\left( i \right)} ;\omega } \right) \) is the predicted probability of the class c given the image \( x^{\left( i \right)} \), and \( \omega \) is the weighting parameter set to be learned, and \( \lambda \) is a regularization parameter.
2.2 Network Learning
To realize our inception network-based weather image classification framework, we apply GoogLeNet [43] to be the core of our method. The concept of the inception network mainly comes from the “network in network” presented in [50], which increases the representational power of neural networks with deeper nets needed for image classification purpose. In our method, we directly apply GoogLeNet with modification of output size set to be 3 (the original size of 1,000 was set for the ILSVRC2014 classification contest of 1,000 image classes). Different from the weather classification task presented in 33 with fine-tuning AlexNet 42 to achieve two-class weather classification, this paper proposes to fine-tune GoogLeNet to achieve three-class weather classification.
To train our inception network, we selected the images for training from the Rainy Image Dataset provided by [22, 23], and the Snow100K dataset provided by [25]. In addition, for the other class (not in both of rain and snow classes), we used the related images from the Multi-class Weather Image (MWI) Dataset provided by [34, 35]. Examples of training images are shown in Fig. 1. To optimize the cross-entropy loss function defined in Eq. (1). The proposed model was trained by the back-propagation algorithm with batch SGD (stochastic gradient descend) [51], such that the softmax loss is minimized.
3 Experimental Results
To evaluate the performance of the proposed weather image classification framework, we used the built-in pre-trained GoogLeNet deep architecture within the Caffe software of version 0.15.13 [52] on a PC equipped with Intel® Core™ Core i5-4590 processor, 12 GB memory, and NVIDIA GeForce GTX 1060 GPU. In addition, to establish our training and testing datasets, we randomly extracted 75% of the images from our collected images (from Rainy Image Dataset, [22, 23], Snow100 K dataset [25], and MWI Dataset [34, 35]) for training our deep model, and the rest 25% images were used for testing. The process was performed several times to obtain the final classification accuracy. During the training process, the learning rate is set to 0.01, and our network is trained with a batch-size of 128 in 100 epochs. The weather image classification accuracies of different epochs with and without applying the pre-filtering process obtained by the proposed method were shown in Fig. 2. It can be observed from Fig. 2 that the accuracies with pre-filtering process used are better than those without applying the pre-filtering process before the 30th epoch. That is, the pre-filtering process based on BM3D [45] might be useful for extracting some weather cues for the types of weather conditions revealing high-frequency property, such as rain streaks and snow streaks. Therefore, better classification accuracies would be achieved in earlier epochs with the assistant of the preprocessing. However, with the number of epochs increased, the deep network would learn better features for classification with higher accuracies, and the advantage of the pre-filtering operation would be non-obvious.
4 Conclusions
In this paper, we have proposed an inception network-based weather image classification framework with pre-filtering process for classifying each input image into one of the three classes, including rainy, snowy, and other. By applying the GoogLeNet deep CNN model to achieve efficient weather image classification with pre-filtering operation, we found that the pre-filtering process would be useful for extracting some weather cues for the types of weather conditions revealing high-frequency property (e.g., rain streaks and snow streaks), resulting in better accuracies in earlier training epochs. Such preprocessing technique is compatible to several recent state-of-the-art methods for removing weather effects (e.g., [12,13,14,15,16,17,18,19,20,21,22,23,24]). This property might be useful for designing a complete system for weather effect detection and removal, which is worthy to be investigated further.
References
Nayar, S.K., Narasimhan, S.G.: Vision in bad weather. In: IEEE International Conference on Computer Vision, pp. 820–827 (1999)
Shehata, M.S., et al.: Video-based automatic incident detection for smart roads: the outdoor environmental challenges regarding false alarms. IEEE Trans. Intell. Transp. Syst. 9, 349–360 (2008)
Narasimhan, S.G., Nayar, S.K.: Interactive deweathering of an image using physical models. In: IEEE Workshop on Color and Photometric Methods in Computer Vision (2003)
Kumari, A., Sahoo, S.K.: Real time image and video deweathering: the future prospects and possibilities. Optik-Int. J. Light Electron Opt. 127, 829–839 (2016)
Li, Y., You, S., Brown, M.S., Tan, R.T.: Haze visibility enhancement: a survey and quantitative benchmarking. Comput. Vis. Image Underst. 165, 1–16 (2017)
He, K., Sun, J., Tang, X.: Single image haze removal using dark channel prior. IEEE Trans. Pattern Anal. Mach. Intell. 33, 2341–2353 (2011)
Yeh, C.H., Kang, L.W., Lin, C.Y., Lin, C.Y.: Efficient image/video dehazing through fog density analysis based on pixel-based dark channel prior. In: IEEE International Conference on Information Security and Intelligent Control (2012)
Yeh, C.H., Kang, L.W., Lee, M.S., Lin, C.Y.: Haze effect removal from image via haze density estimation in optical model. Opt. Express 21, 27127–27141 (2013)
Cai, B., Xu, X., Jia, K., Qing, C., Tao, D.: DehazeNet: an end-to-end system for single image haze removal. IEEE Trans. Image Process. 25, 5187–5198 (2016)
Yeh, C.H., Huang, C.H., Kang, L.W., Lin, M.H.: Single image dehazing via deep learning-based image restoration. In: APSIPA Annual Summit and Conference (2018)
Barnum, P.C., Narasimhan, S., Kanade, T.: Analysis of rain and snow in frequency space. Int. J. Comput. Vis. 86, 256–274 (2010)
Fu, Y.H., Kang, L.W., Lin, C.W., Hsu, C.T.: Single-frame-based rain removal via image decomposition. In: IEEE International Conference on Acoustics, Speech, and Signal Processing (2011)
Kang, L.W., Lin, C.W., Fu, Y.H.: Automatic single-image-based rain streaks removal via image decomposition. IEEE Trans. Image Process. 21, 1742–1755 (2012)
Kang, L.W., Lin, C.W., Lin, C.T., Lin, Y.C.: Self-learning-based rain streak removal for image/video. In: IEEE International Symposium on Circuits and Systems (2012)
Huang, D.A., Kang, L.W., Yang, M.C., Lin, C.W., Wang, Y.C.F.: Context-aware single image rain removal. In: IEEE International Conference on Multimedia and Expo (2012)
Chen, D.Y., Chen, C.C., Kang, L.W.: Visual depth guided image rain streaks removal via sparse coding. In: IEEE International Symposium on Intelligent Signal Processing and Communication Systems (2012)
Huang, D.A., Kang, L.W., Wang, Y.C.F., Lin, C.W.: Self-learning based image decomposition with applications to single image denoising. IEEE Trans. Multimedia 16, 83–93 (2014)
Liu, P.H., Lin, C.Y., Yeh, C.H., Kang, L.W., Lo, K.S.H., Hwang, T.H.: Rain removal using single image based on non-negative matrix factorization. In: International Computer Symposium. Frontiers in Artificial Intelligence and Applications. IOS Press (2014)
Chen, D.Y., Chen, C.C., Kang, L.W.: Visual depth guided color image rain streaks removal using sparse coding. IEEE Trans. Circuits Syst. Video Technol. 24, 1430–1455 (2014)
Kang, L.W., Yeh, C.H., Chen, D.Y., Lin, C.T.: Self-learning-based signal decomposition for multimedia applications: a review and comparative study. In: APSIPA Annual Summit and Conference (2014)
Kang, L.W., Yu, C.M., Lin, C.Y., Yeh, C.H.: Image and video restoration and enhancement via sparse representation. In: Biometrics: Concepts, Methodologies, Tools, and Applications, pp. 501–528. IGI Global (2017)
Fu, X., Huang, J., Zeng, D., Huang, Y., Ding, X., Paisley, J.: Removing rain from single images via a deep detail network. In: IEEE Conference on Computer Vision and Pattern Recognition (2017)
Fu, X., Huang, J., Ding, X., Liao, Y., Paisley, J.: Clearing the skies: a deep network architecture for single-image rain removal. IEEE Trans. Image Process. 26, 2944–2956 (2017)
Wang, Y., Liu, S., Chen, C., Zeng, B.: A hierarchical approach for rain or snow removing in a single color image. IEEE Trans. Image Process. 26, 3936–3950 (2017)
Liu, Y.F., Jaw, D.W., Huang, S.C., Hwang, J.N.: DesnowNet: context-aware deep network for snow removal. IEEE Trans. Image Process. 27, 3064–3073 (2018)
Kurihata, H., et al.: Rainy weather recognition from in-vehicle camera images for driver assistance. In: IEEE Intelligent Vehicles Symposium, pp. 205–210 (2005)
Roser, M., Moosmann, F.: Classification of weather situations on single color images. In: IEEE Intelligent Vehicles Symposium, pp. 798–803 (2008)
Yan, X., Luo, Y., Zheng, X.: Weather recognition based on images captured by vision system in vehicle. In: International Symposium on Neural Networks, pp. 390–398 (2009)
Shen, L., Tan, P.: Photometric stereo and weather estimation using Internet images. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 1850–1857 (2009)
Bossu, J., Hautiere, N., Tarel, J.: Rain or snow detection in image sequences through use of a histogram of orientation of streaks. Int. J. Comput. Vision 93, 348–367 (2011)
Chen, Z., Yang, F., Lindner, A., Barrenetxea, G., Vetterli, M.: How is the weather: automatic inference from images. In: IEEE International Conference on Image Processing, pp. 1853–1856 (2012)
Lu, C., Lin, D., Jia, J., Tang, C.K.: Two-class weather classification. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 3718–3725 (2014)
Elhoseiny, M., Huang, S., Elgammal, A.M.: Weather classification with deep convolutional neural networks. In: IEEE International Conference on Image Processing, pp. 3349–3353 (2015)
Zhang, Z., Ma, H.: Multi-class weather classification on single images. In: IEEE International Conference on Image Processing, pp. 4396–4400 (2015)
Zhang, Z., Ma, H., Fu, H., Zhang, C.: Scene-free multi-class weather classification on single images. Neurocomputing 207, 365–373 (2016)
Lu, C., Lin, D., Jia, J., Tang, C.K.: Two-class weather classification. IEEE Trans. Pattern Anal. Mach. Intell. 39, 2510–2524 (2017)
Lin, D., Lu, C., Huang, H., Jia, J.: RSCM: region selection and concurrency model for multi-class weather recognition. IEEE Trans. Image Process. 26, 4154–4167 (2017)
Chu, W.T., Zheng, X.Y., Ding, D.S.: Camera as weather sensor: estimating weather information from single images. J. Vis. Commun. Image Represent. 46, 233–249 (2017)
Li, X., Wang, Z., Lu, X.: A multi-task framework for weather recognition. In: ACM Multimedia, pp. 1318–1326 (2017)
Guerra, J.C.V., Khanam, Z., Ehsan, S., Stolkin, R., McDonald-Maier, K.: Weather classification: a new multi-class dataset, data augmentation approach and comprehensive evaluations of convolutional neural networks. arXiv:1808.00588 (2018)
Kang, L.W., Chou, K.L., Fu, R.F.: Deep learning-based weather image recognition. In: IEEE International Symposium on Computer, Consumer and Control (2018)
Krizhevsky, A., Sutskever, I., Hinton, G.E.: ImageNet classification with deep convolutional neural networks, p. 25. Adv. Neural Inf. Process, Syst (2012)
Szegedy, C., et al.: Going deeper with convolutions. In: IEEE Conference on Computer Vision and Pattern Recognition (2015)
LeCun, Y., Bengio, Y., Hinton, G.E.: Deep learning. Nature 521, 436–444 (2015)
Dabov, K., Foi, A., Katkovnik, V., Egiazarian, K.: Image denoising by sparse 3D transform-domain collaborative filtering. IEEE Trans. Image Process. 16, 2080–2095 (2007)
Chiou, Y.W., Yeh, C.H., Kang, L.W., Lin, C.W., Fan-Jiang, S.J.: Efficient image/video deblocking via sparse representation. In: IEEE Visual Communication and Image Processing Conference (2012)
Kang, L.W., Chuang, B.C., Hsu, C.C., Lin, C.W., Yeh, C.H.: Self-learning-based single Image super-resolution of a highly compressed image. In: IEEE International Workshop on Multimedia Signal Processing (2013)
Yeh, C.H., Kang, L.W., Chiou, Y.W., Lin, C.W., Fan Jiang, S.J.: Self-learning-based post-processing for image/video deblocking via sparse representation. J. Vis. Commun. Image Represent. 25, 891–903 (2014)
Kang, L.W., Hsu, C.C., Zhuang, B., Lin, C.W., Yeh, C.H.: Learning-based joint super-resolution and deblocking for a highly compressed image. IEEE Trans. Multimedia 17, 921–934 (2015)
Lin, M., Chen, Q., Yan, S.: Network in network. CoRR abs/1312.4400 (2013)
LeCun, Y., et al.: Backpropagation applied to handwritten zip code recognition. Neural Comput. 1, 541–551 (1989)
Jia, Y., et al.: Caffe: convolutional architecture for fast feature embedding. In: ACM Multimedia, pp. 675–678 (2014)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Kang, LW., Feng, TZ., Fu, RH. (2019). Inception Network-Based Weather Image Classification with Pre-filtering Process. In: Chang, CY., Lin, CC., Lin, HH. (eds) New Trends in Computer Technologies and Applications. ICS 2018. Communications in Computer and Information Science, vol 1013. Springer, Singapore. https://doi.org/10.1007/978-981-13-9190-3_38
Download citation
DOI: https://doi.org/10.1007/978-981-13-9190-3_38
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-13-9189-7
Online ISBN: 978-981-13-9190-3
eBook Packages: Computer ScienceComputer Science (R0)