BEFUnet
BEFUnet segments medical images by fusing a Swin Transformer body encoder with a convolutional edge encoder.
Medical imaging · 959 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
- Medical imaging
- Parameters
- 41.7M
- Operations
- 959
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2024
- Cited by
- 88 (as of 24 November 2026)
- Authors
- Omid Nejati Manzari, Javad Mirzapour Kaleybar, Hooman Saadat, Shahin Maleki
- Source
- GitHub: omid-nejati/befunet
- 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
- m14824
- Graph hash
- 41910de9f4a85bd258e7001ef770d0500d1fcabfb2ce1a162920d81aa3cffd9a
- Skeleton hash
- 73ad79c7cee76c3a11b828e4b7913904bf347851ae08bd353a11f5a78e1ba8a4
- Architecture hash
- 6c192b099a1ec7fd302811520c0ecb1d3c7b6d3518a42929c8bc5036d7eb284b
- Diagram SHA-256
- 197823ed7ec1566c2d338144ab4b6ceb697816ac699ea76a0385f8dcac87f1bd
- 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
BEFUnet is a U-shaped network for medical image segmentation that runs two encoders side by side, one for the body of a structure and one for its edges, and fuses their features. The paper's starting point is that convolutional networks such as U-Net have limitations in capturing global context and long-range relations.
The body encoder uses the Swin Transformer to capture semantic information with global attention. The edge encoder is convolutional: four stages, each containing four pixel difference convolution (PDC) blocks. Where an ordinary convolution takes a weighted sum of pixel values, PDC takes a weighted sum of differences between pixel values within the kernel. A Local Cross-Attention Feature (LCAF) fusion module merges the two streams by performing cross-attention only on features that are spatially close. A Double-Level Fusion (DLF) module sits in the skip connection of the encoder-decoder structure, and it leaves the middle feature level out of the fusion to save computation.
During training an edge map is generated from the output of each edge encoder stage and compared with the ground truth. The authors initialized the edge encoder from PiDiNet and the body encoder from swin-tiny. On the Synapse multi-organ CT dataset the paper reports a segmentation accuracy of 80.47% (DSC) and 16.26% (HD).
Key idea. The paper builds BEFUnet, a U-shaped network whose dual-branch encoder extracts edge features with PDC blocks and body features with a Swin Transformer, fused by local cross-attention.
- BEFUnet
- medical image segmentation
- hybrid CNN-Transformer
- body and edge fusion
- edge encoder
- U-shaped network
- LCAF
- DLF
- Synapse multi-organ segmentation
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{manzari2024befunethybridcnntransformerarchitecture,
title={BEFUnet: A Hybrid CNN-Transformer Architecture for Precise Medical Image Segmentation},
author={Omid Nejati Manzari and Javad Mirzapour Kaleybar and Hooman Saadat and Shahin Maleki},
year={2024},
eprint={2402.08793},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2402.08793},
}