{"title":"Style-Based Neural Architectures for Real-Time Weather Classification","authors":"Hamed Ouattara, Pierre Duthon, Fr\u00e9d\u00e9ric Bernardin, Omar Ait Aider, Pascal Salmane","volume":228,"journal":"International Journal of Computer and Systems Engineering","pagesStart":523,"pagesEnd":533,"ISSN":"1307-6892","URL":"https:\/\/publications.waset.org\/pdf\/10014317","abstract":"<p>In this paper, we present three neural network&nbsp;architectures designed for real-time classification of weather&nbsp;conditions (sunny, rain, snow, fog) from images. These models,&nbsp;inspired by recent advances in style transfer, aim to capture&nbsp;the stylistic elements present in images. One model, called&nbsp;\u201cMulti-PatchGAN,\u201d is based on PatchGANs used in well-known&nbsp;architectures such as Pix2Pix and CycleGAN, but here adapted&nbsp;with multiple patch sizes for detection tasks. The second model,&nbsp;\u201cTruncated ResNet50,\u201d is a simplified version of ResNet50 retaining&nbsp;only its first nine layers. This truncation, determined by an&nbsp;evolutionary algorithm, facilitates the extraction of high-frequency&nbsp;features essential to capture subtle stylistic details. Finally, we&nbsp;propose \u201cTruncated ResNet50 with Gram Matrix and Attention,\u201d&nbsp;which computes Gram matrices for each layer during training&nbsp;and automatically weights them via an attention mechanism, thus&nbsp;optimizing the extraction of the most relevant stylistic expressions&nbsp;for classification. These last two models outperform the state of&nbsp;the art and demonstrate remarkable generalization capability on&nbsp;several public databases. Although developed for weather detection,&nbsp;these architectures are also suitable for other appearance-based&nbsp;classification tasks, such as animal species recognition, texture&nbsp;classification, disease detection in medical imaging, or industrial&nbsp;defect identification.<\/p>","references":"[1] Phillip Isola et al. Image-to-Image Translation with Conditional\r\nAdversarial Networks. arXiv preprint arXiv:1611.07004. 2018. arXiv:\r\n1611.07004 cs.CV. URL : https:\/\/arxiv.org\/abs\/1611.07004.\r\n[2] Jun-Yan Zhu et al. Unpaired Image-to-Image Translation\r\nusing Cycle-Consistent Adversarial Networks. arXiv preprint\r\narXiv:1703.10593. 2020. arXiv: 1703 . 10593 cs.CV. URL :\r\nhttps:\/\/arxiv.org\/abs\/1703.10593. [3] Taesung Park et al. Contrastive Learning for Unpaired\r\nImage-to-Image Translation. arXiv preprint arXiv:2007.15651. 2020.\r\narXiv: 2007.15651 cs.CV. URL : https:\/\/arxiv.org\/abs\/2007.15651.\r\n[4] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. \u201cImage style\r\ntransfer using convolutional neural networks\u201d. In: Proceedings of the\r\nIEEE conference on computer vision and pattern recognition. 2016,\r\npp. 2414\u20132423.\r\n[5] Izzeddin Teeti et al. Vision in adverse weather: Augmentation using\r\nCycleGANs with various object detectors for robust perception in\r\nautonomous racing. 2023. arXiv: 2201 . 03246 cs.CV. URL : https :\r\n\/\/arxiv.org\/abs\/2201.03246.\r\n[6] Yijie Xu and Arushi Goel. Cross-Domain Image Classification\r\nthrough Neural-Style Transfer Data Augmentation. 2019. arXiv: 1910.\r\n05611 cs.CV. URL : https:\/\/arxiv.org\/abs\/1910.05611.\r\n[7] Vishal Vinod et al. \u201cMulti-domain conditional image translation:\r\nTranslating driving datasets from clear-weather to adverse\r\nconditions\u201d. In: Proceedings of the IEEE\/CVF International\r\nConference on Computer Vision. 2021, pp. 1571\u20131582.\r\n[8] Zili Yi et al. \u201cDualgan: Unsupervised dual learning for\r\nimage-to-image translation\u201d. In: Proceedings of the IEEE\r\ninternational conference on computer vision. 2017, pp. 2849\u20132857.\r\n[9] Taeksoo Kim et al. \u201cLearning to discover cross-domain relations\r\nwith generative adversarial networks\u201d. In: International conference\r\non machine learning. PMLR. 2017, pp. 1857\u20131865.\r\n[10] Ming-Yu Liu, Thomas Breuel, and Jan Kautz. \u201cUnsupervised\r\nimage-to-image translation networks\u201d. In: Advances in neural\r\ninformation processing systems 30 (2017).\r\n[11] Xun Huang et al. \u201cMultimodal unsupervised image-to-image\r\ntranslation\u201d. In: Proceedings of the European conference on computer\r\nvision (ECCV). 2018, pp. 172\u2013189.\r\n[12] Yunjey Choi et al. \u201cStargan: Unified generative adversarial networks\r\nfor multi-domain image-to-image translation\u201d. In: Proceedings of the\r\nIEEE conference on computer vision and pattern recognition. 2018,\r\npp. 8789\u20138797.\r\n[13] Jun-Yan Zhu et al. \u201cToward multimodal image-to-image translation\u201d.\r\nIn: Advances in neural information processing systems 30 (2017).\r\n[14] Hao Tang et al. \u201cAttention-guided generative adversarial networks\r\nfor unsupervised image-to-image translation\u201d. In: 2019 International\r\nJoint Conference on Neural Networks (IJCNN). IEEE. 2019, pp. 1\u20138.\r\n[15] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. \u201cInstance\r\nnormalization: The missing ingredient for fast stylization\u201d. In: arXiv\r\npreprint arXiv:1607.08022 (2016).\r\n[16] Xun Huang and Serge Belongie. \u201cArbitrary style transfer in real-time\r\nwith adaptive instance normalization\u201d. In: Proceedings of the IEEE\r\ninternational conference on computer vision. 2017, pp. 1501\u20131510.\r\n[17] Dar-Yen Chen. ArtFusion: Controllable Arbitrary Style Transfer using\r\nDual Conditional Latent Diffusion Models. 2023. arXiv: 2306.09330\r\ncs.CV. URL : https:\/\/arxiv.org\/abs\/2306.09330.\r\n[18] Robin Rombach et al. High-Resolution Image Synthesis with Latent\r\nDiffusion Models. 2022. arXiv: 2112 . 10752 cs.CV. URL : https : \/ \/\r\narxiv.org\/abs\/2112.10752.\r\n[19] Alec Radford et al. Learning Transferable Visual Models From\r\nNatural Language Supervision. 2021. arXiv: 2103 . 00020 cs.CV.\r\nURL : https:\/\/arxiv.org\/abs\/2103.00020.\r\n[20] Leon A. Gatys, Alexander S. Ecker, and Matthias Bethge. Texture\r\nSynthesis Using Convolutional Neural Networks. 2015. arXiv: 1505.\r\n07376 cs.CV. URL : https:\/\/arxiv.org\/abs\/1505.07376.\r\n[21] Karen Simonyan and Andrew Zisserman. Very Deep Convolutional\r\nNetworks for Large-Scale Image Recognition. 2015. arXiv: 1409.1556\r\ncs.CV. URL : https:\/\/arxiv.org\/abs\/1409.1556.\r\n[22] Ian Goodfellow et al. \u201cGenerative adversarial nets\u201d. In: Advances in\r\nneural information processing systems 27 (2014).\r\n[23] Jascha Sohl-Dickstein et al. \u201cDeep unsupervised learning using\r\nnonequilibrium thermodynamics\u201d. In: International conference on\r\nmachine learning. PMLR. 2015, pp. 2256\u20132265.\r\n[24] Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising Diffusion\r\nProbabilistic Models. 2020. arXiv: 2006.11239 cs.LG. URL : https:\r\n\/\/arxiv.org\/abs\/2006.11239.\r\n[25] Mark Hamazaspyan and Shant Navasardyan. \u201cDiffusion-enhanced\r\npatchmatch: A framework for arbitrary style transfer with diffusion\r\nmodels\u201d. In: Proceedings of the IEEE\/CVF Conference on Computer\r\nVision and Pattern Recognition. 2023, pp. 797\u2013805.\r\n[26] Jaeseok Jeong, Mingi Kwon, and Youngjung Uh. \u201cTraining-free style\r\ntransfer emerges from h-space in diffusion models\u201d. In: arXiv preprint\r\narXiv:2303.15403 3 (2023). [27] Chen Henry Wu and Fernando De la Torre. \u201cUnifying diffusion\r\nmodels\u2019 latent space, with applications to cyclediffusion and\r\nguidance\u201d. In: arXiv preprint arXiv:2210.05559 (2022).\r\n[28] Serin Yang, Hyunmin Hwang, and Jong Chul Ye. \u201cZero-shot\r\ncontrastive loss for text-guided diffusion image style transfer\u201d. In:\r\nProceedings of the IEEE\/CVF International Conference on Computer\r\nVision. 2023, pp. 22873\u201322882.\r\n[29] Yuxin Zhang et al. \u201cInversion-based style transfer with diffusion\r\nmodels\u201d. In: Proceedings of the IEEE\/CVF conference on computer\r\nvision and pattern recognition. 2023, pp. 10146\u201310156.\r\n[30] Marco Introvigne et al. \u201cReal-Time Environment Condition\r\nClassification for Autonomous Vehicles\u201d. In: arXiv preprint\r\narXiv:2405.19305 (2024).\r\n[31] Jingming Xia et al. \u201cResNet15: weather recognition on traffic\r\nroad with deep convolutional neural network\u201d. In: Advances in\r\nMeteorology 2020.1 (2020), p. 6972826.\r\n[32] Mohammad Farid Naufal and Selvia Ferdiana Kusuma. \u201cWeather\r\nimage classification using convolutional neural network with transfer\r\nlearning\u201d. In: AIP Conference Proceedings. Vol. 2470. 1. AIP\r\nPublishing. 2022.\r\n[33] Orestis Papadimitriou et al. \u201cAdvancing weather image classification\r\nusing deep convolutional neural networks\u201d. In: 2023 18th\r\nInternational Workshop on Semantic and Social Media Adaptation\r\n& Personalization (SMAP) 18th International Workshop on Semantic\r\nand Social Media Adaptation & Personalization (SMAP 2023). IEEE.\r\n2023, pp. 1\u20136.\r\n[34] Manthan Patel, Sunav Das, and N Krishnaraj. \u201cWeather Image\r\nClassification Using Convolution Neural Network\u201d. In: Annals of the\r\nRomanian Society for Cell Biology (2021), pp. 4156\u20134166.\r\n[35] Shweta Mittal and Om Prakash Sangwan. \u201cClassifying weather\r\nimages using deep neural networks for large scale datasets\u201d.\r\nIn: International Journal of Advanced Computer Science and\r\nApplications 14.1 (2023).\r\n[36] Vinay Kukreja, Rishabh Sharma, and Rishika Yadav. \u201cMulti-Weather\r\nClassification using Deep Learning: A CNN-SVM Amalgamated\r\nApproach\u201d. In: 2023 World Conference on Communication &\r\nComputing (WCONF). IEEE. 2023, pp. 1\u20135.\r\n[37] Mohamed R Ibrahim, James Haworth, and Tao Cheng. \u201cWeatherNet:\r\nRecognising weather and visual conditions from street-level images\r\nusing deep residual learning\u201d. In: ISPRS International Journal of\r\nGeo-Information 8.12 (2019), p. 549.\r\n[38] Jose Carlos Villarreal Guerra et al. \u201cWeather Classification: A new\r\nmulti-class dataset, data augmentation approach and comprehensive\r\nevaluations of Convolutional Neural Networks\u201d. In: 2018 NASA\/ESA\r\nConference on Adaptive Hardware and Systems (AHS). IEEE. 2018,\r\npp. 305\u2013310.\r\n[39] Jing Li and Xueping Luo. \u201cA study of weather-image classification\r\ncombining VIT and a dual enhanced-attention module\u201d. In:\r\nElectronics 12.5 (2023), p. 1213.\r\n[40] Rella Usha Rani, Jagadeesh Kakarla, and B Sundar. \u201cWeather image\r\nclassification using EfficientNet and Dual Attention Block\u201d. In: 2023\r\n2nd International Conference on Smart Technologies and Systems for\r\nNext Generation Computing (ICSTSN). IEEE. 2023, pp. 1\u20134.\r\n[41] Wang Pikun and Wu Ling. \u201cImage-Based Self-attentive Multi-label\r\nWeather Classification Network\u201d. In: International Conference on\r\nImage, Vision and Intelligent Systems. Springer. 2022, pp. 497\u2013504.\r\n[42] Khouloud Dahmane. \u201cAnalyse d\u2019images par m\u00b4ethode de Deep\r\nLearning appliqu\u00b4ee au contexte routier en conditions m\u00b4et\u00b4eorologiques\r\nd\u00b4egrad\u00b4ees\u201d. PhD thesis. Universit\u00b4e Clermont Auvergne [2017-2020],\r\n2020.\r\n[43] Di Lin et al. \u201cRSCM: Region selection and concurrency model for\r\nmulti-class weather recognition\u201d. In: IEEE Transactions on Image\r\nProcessing 26.9 (2017), pp. 4154\u20134167.\r\n[44] Xinlei Chen, Saining Xie, and Kaiming He. An Empirical Study of\r\nTraining Self-Supervised Vision Transformers. 2021. arXiv: 2104 .\r\n02057 cs.CV. URL : https:\/\/arxiv.org\/abs\/2104.02057.\r\n[45] Zheng Zhang and Huadong Ma. \u201cMulti-class weather classification\r\non single images\u201d. In: 2015 IEEE International Conference on Image\r\nProcessing (ICIP). IEEE. 2015, pp. 4396\u20134400.\r\n[46] Wei-Ta Chu, Xiang-You Zheng, and Ding-Shiuan Ding.\r\n\u201cImage2weather: A large-scale image dataset for weather property\r\nestimation\u201d. In: 2016 IEEE Second International Conference on\r\nMultimedia Big Data (BigMM). IEEE. 2016, pp. 137\u2013144.\r\n[47] Qishen Ha, Bo Liu, and Fuxu Liu. Identifying Melanoma Images using\r\nEfficientNet Ensemble: Winning Solution to the SIIM-ISIC Melanoma\r\nClassification Challenge. 2020. arXiv: 2010 . 05351 cs.CV. URL :\r\nhttps:\/\/arxiv.org\/abs\/2010.05351","publisher":"World Academy of Science, Engineering and Technology","index":"Open Science Index 228, 2025"}