Heuristic Style Transfer for Real-Time, Efficient Weather Attribute Detection

Hamed Ouattara, Pierre Duthon, Pascal Houssam Salmane, Frédéric Bernardin, Omar Ait Aider · 2026

Read Heuristic Style Transfer for Real-Time, Efficient Weather Attribute Detection by Hamed Ouattara, Pierre Duthon, Pascal Houssam Salmane, Frédéric Bernardin, Omar Ait Aider (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-13947.txt.

Introduction

Ouattara and colleagues detect weather from ordinary color images, predicting type plus 11 attributes across 53 classes. Style-inspired tools, including Gram matrices, a truncated ResNet-50, and PatchGAN variants, run in a multi-task setup with attention. Their released set holds 503,875 annotated images, and scores pass 96 percent on internal tests and pass 78 percent zero-shot elsewhere, with the compact PMG model running in real time.

Catalog record

CREATORHamed Ouattara, Pierre Duthon, Pascal Houssam Salmane, Frédéric Bernardin, Omar Ait Aider
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE59668
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2604.13947

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Heuristic Style Transfer for Real-Time, Efficient Weather Attribute Detection Hamed Ouattara, Pierre Duthon, Pascal Houssam Salmane, Frédéric Bernardin, Omar Ait Aider Abstract We present lightweight and efficient architectures to detect weather conditions from RGB images, predicting the weather type (sunny, rain, snow, fog) and 11 complementary attributes such as intensity, visibility, and ground condition. With a total of 53 classes distributed among the tasks. This work examines to what extent weather conditions manifest as variations in visual style. We investigate style-inspired techniques—Gram matrices, a truncated ResNet-50 (targeting lower/intermediate layers), and PatchGAN-style architectures—within a multi-task framework with attention mechanisms. Two families are introduced: RTM (ResNet50-Truncated-MultiTasks) and PMG (PatchGAN-MultiTasks-Gram), along with their variants. Contributions include: automation of Gram-matrix computation, integration of PatchGAN in supervised multi-task learning, and local style capture via local Gram for improved spatial coherence. We also release a dataset of 503 875 images annotated with 12 weather attributes, under a Creative Commons Attribution (CC-BY) license. The models achieve F1 scores above 96 % on our internal test set and beyond 78 % in zero-shot evaluation on several external datasets, confirming their generalization ability. The PMG architecture, with fewer than 5 million parameters, runs in real time with a small memory footprint, making it suitable for embedded systems. The overall modularity of the models allows tasks related to style or weather to be added or removed as needed. keywords Weather detection, classification, style transfer, PatchGAN, ResNet50 † † equal-contributors: These authors contributed equally to this work. † † equal-contributors: These authors contributed equally to this work. † † equal-contributors: These authors contributed equally to this work. † † equal-contributors: These authors contributed equally to this work. † † Funded by the European Union (grant no. 101069576). However, the opinions and points of view expressed are solely those of the author(s). Hamed Ouattara, Pierre Duthon, Frédéric Bernardin, and Pascal Salmane are with Cerema (I.T.S Team, France). Omar Ait Aider is with Institut Pascal, France. 1 Introduction Figure 1: Joint detection of 12 weather-related attributes with ResNet50-Truncated-MultiTasks (RTM). This example illustrates the simultaneous prediction of Weather Type, Visibility, etc. The aim is to describe the environment from the standpoint of weather and its effects, using 12 key characteristics (e.g., Ground Condition, useful for adapting speed on wet pavement) with a single real-time model. The architecture is modular: task heads can be disabled at inference to reduce computational cost, without impacting other tasks thanks to independent classifiers and attention mechanisms. Models capable of detecting in real time weather conditions and their effects ( ground state — wet, dry, snowy —, visibility, precipitation, glare )( Fig. 1 ) from RGB images captured by day and by night would open up new prospects for security, transport, energy, and climate. In transport, such a system would optimize autonomous driving and ADAS engstle2023adverse ; shahzad2024robustadasenhancingrobustness ; 8666747 by dynamically adapting speed, alerts, and signage to actual conditions ( rain, snow, fog ). Integrated into traffic management, it would help smooth traffic flow and reduce accident risk. In energy and climate, automated detection could facilitate regulation of renewable energy production ( solar, wind ) according to local weather, while improving the energy efficiency of infrastructure ( lighting, heating, signage ). Leveraging widely deployed road cameras would further provide continuous ultra-local monitoring of conditions, strengthening the accuracy of weather forecasts. Finally, thanks to their lightweight nature and speed, such models could be embedded in devices like dashcams or drones, offering a practical, low-power, and easily deployable solution. Despite these promises, visual weather detection remains challenging. As detailed in Section 2 , many current approaches are limited to recognizing the weather type ( sunny, rain, snow, fog ) without capturing secondary effects, or they rely on computational resources that are too heavy for real-time execution. In this paper, we address the detection of meteorological characteristics in an RGB image from the perspective of visual style. Our approach stems from the observation that certain style transfer algorithms, such as CycleGAN key2 or CUT key3 , can simulate different weather conditions, as illustrated in Fig. 2 . This suggests an exploitable relationship between weather conditions and visual style. We hypothesize that weather conditions often affect the appearance of objects in a scene in a way that can be interpreted as a change in visual “style”, and we investigate how far this intuition can be pushed in practice. In a sunny, clear scene, objects receive a broad portion of the solar light spectrum, revealing vivid, high-contrast colors. Conversely, during a storm under an overcast sky, the light is heavily filtered, which darkens the scene and softens the hues. Wet surfaces become more reflective (with water acting as a mirror), fog diffuses contours and reduces visibility, while snow homogenizes the scene under a light veil. Imagine the same scene observed under these different weather conditions ( Fig. 2 ): it becomes clear that they primarily alter the visual appearance of objects rather than their intrinsic nature. Much like a painter imprinting a personal touch on each work, every weather condition confers a distinctive stylistic signature on the scene. Moreover, several early works already suggest that weather can be inferred from an image’s overall appearance. Methods based on hand-crafted descriptors of brightness, contrast, sharpness, saturation, sky structure, reflections, or haze ship2024real ; zhao2011feature ; lu2014two ; roser2008classification show that it is possible to distinguish different weather types or estimate meteorological variables from simple illumination and texture cues. Although low-dimensional and non-deep, these approaches support the idea that weather conditions primarily manifest as appearance signatures—akin to what we refer to here as visual style . Figure 2: Simulation of weather conditions via style transfer with CycleGAN key2 . Left columns: real (source) images. Right columns: stylized outputs reproducing rain, snow, or fog at varying intensities. This example shows that an unpaired style-transfer model can simulate visual signatures of weather (rain streaks, luminous haze, color drift), illustrating that weather-related changes can be expressed as changes in visual style and motivating our investigation of this link. Our goal is not to formally prove that weather modifies the visual style of an image, but to start from an empirical observation: some style transfer algorithms can realistically reproduce different weather conditions. This behaviour suggests the existence of an exploitable link between meteorological characteristics and the visual style of a scene. In this work, we exploit this link to design models capable of automatically detecting weather conditions from images. The central question we ask is the following: are the stylistic properties of an image, by themselves, sufficiently informative to characterize its meteorological state? Our experiments do not provide a complete answer to this question, but the results show that a family of style-sensitive architectures already constitutes an effective tool for predicting several weather-related attributes. More precisely, we seek to understand why certain architectures learn representations that are sensitive to visual style, and how to use them to design models capable of identifying not only the weather type ( sunny, snow, fog, rain ), but also more specific attributes, as illustrated in Fig. 1 . This sensitivity to appearance and style is one of the motivations for our approach: as shown in Fig. 3 , models such as CycleGAN can reproduce realistic

Read the complete text