RiWiX: Toward Automatic River Water Width Extraction From High-Resolution Satellite Imagery Using Swin Transformers
Abstract
Accurate extraction of water surface and width of river systems is essential for hydrological modeling, flood monitoring, and water resource management. Traditional field-based measurements are often labor-intensive, time-consuming, and error-prone. With advances in satellite imaging and geospatial data processing, automated methods are increasingly replacing manual approaches. Yet, remote sensing-based river width extraction remains challenging due to dynamic water levels, vegetation interference, variable discharge, spectral reflections, and heterogeneous surface appearance. Existing convolutional neural network (CNN)–based encoder-decoder models have performed well for large rivers but struggle with narrow ones due to limited high-level semantic representation. Recent transformer-based models capture long-range dependencies through self-attention but are computationally heavy and underexplored in remote sensing. This paper presentsRiWiX(River Water Width Extraction), a lightweight six-level segmentation model with an integrated width extraction module. Built upon the Swin Transformer architecture, RiWiX employs an efficient encoder-only design with a simple up-sampling module to restore the output mask, thereby improving computational efficiency. A graph-based algorithm further derives continuous water widths by generating a centerline and computing perpendicular distances along the flow direction, effectively generalizing complex river geometries. Experiments on a public water dataset demonstrate that RiWiX achieves competitive accuracy with reduced complexity compared to baseline methods. Tests on geo-referenced imagery yield a mean absolute error of 0.02%for wide rivers (width>500m), 0.06% for moderate rivers (50m < width < 70m), and 0.11% for narrow rivers (width < 20m), underscoring the robustness and scalability of the proposed framework for river-water-width extraction. The implementation process and code has been made publicly available for researchers to use and extend this work. The full repository is accessible at: https://github.com/FahimaHasanAthina/RiWIX.
Fields of Study & Subjects
Remote-Sensing Image Classification
Automated Road and Building Extraction
Flood Risk Assessment and Management
Publication details
- Journal / source
- IEEE Access
- Volume
- 14
- Pages
- 24139–24157
- Publication date
- 1 January 2026
- Language
- EN