CSFNet
A real-time RGB-X semantic segmentation CNN that fuses the two modalities with cosine similarity attention.
Segmentation · 367 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Segmentation
- Parameters
- 19.4M
- Operations
- 367
- Framework
- PyTorch
- Recurrent
- No
- Published
- Engineering Applications of Artificial Intelligence (arXiv 2024)
- Cited by
- 5 (as of 29 October 2026)
- Authors
- Danial Qashqai, Emad Mousavian, Shahriar Baradaran Shokouhi, Sattar Mirzakuchaki
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m15188
- Graph hash
- 10af9124d464f751295d35a8dc6bfefca637543321cd2c6558946ceeee7d581b
- Skeleton hash
- 99290a5be1e6dd6edad8a941a0029fe6f3dd4fe532914375895f3b71237bf472
- Architecture hash
- 8db165eaa21f5daa5b3e88991bdbfb4081224591333ea28b3c2f041bdc3d544f
- Diagram SHA-256
- 55f614824c2d0497e141c4c282435a9a1da434c5c5bfad2d67ffe1592bb36837
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
CSFNet (Cosine Similarity Fusion Network) is a real-time semantic segmentation model for driving scenes that reads an RGB image together with a second modality X, which can be depth, thermal or polarization. The paper starts from the observation that multimodal segmentation methods gain accuracy but are expensive to compute and slow at inference.
To cut that cost, the encoder keeps two branches only for its first three stages and continues with a single branch for the last two. The branches are joined by the Cosine Similarity Attention Fusion Module (CS-AFM), which uses the cosine similarity between corresponding channels of the two modalities as an attention signal to rectify and fuse their features. The same module also fuses skip connections with decoder feature maps. Between encoder and decoder, a context module models long-range dependencies with 1D convolutional layers.
This model is CSFNet-2, which uses the STDC2 backbone, while the lighter CSFNet-1 uses STDC1. On Cityscapes at half resolution (1024×512), the paper reports an mIoU of 76.36% and a speed of 72.3 FPS for CSFNet-2.
Key idea. CSFNet fuses RGB and a second modality with a cosine similarity attention module in the lower encoder levels, which lets the higher levels run as a single branch.
- CSFNet
- Cosine Similarity Fusion Network
- CSFNet-2
- RGB-X semantic segmentation
- RGB-D segmentation
- RGB-thermal segmentation
- real-time semantic segmentation
- driving scenes
- multimodal fusion
- CS-AFM
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{qashqai2024csfnetcosinesimilarityfusion,
title={CSFNet: A Cosine Similarity Fusion Network for Real-Time RGB-X Semantic Segmentation of Driving Scenes},
author={Danial Qashqai and Emad Mousavian and Shahriar Baradaran Shokouhi and Sattar Mirzakuchaki},
year={2024},
eprint={2407.01328},
archivePrefix={arXiv},
primaryClass={cs.CV},
doi={https://doi.org/10.1016/j.engappai.2026.114362},
url={https://arxiv.org/abs/2407.01328},
}