CamoFormer
A PVTv2 encoder with a top-down decoder that uses masked separable attention to segment camouflaged objects.
Segmentation · 2,492 operations Structure only
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
- 71.4M
- Operations
- 2,492
- Framework
- PyTorch
- Recurrent
- No
- Published
- IEEE TPAMI (arXiv 2022)
- Cited by
- 207 (as of 29 October 2026)
- Authors
- Bowen Yin, Xuying Zhang, Qibin Hou and others
- Checked
- Structure only: shapes and data types are hypotheses, not measurements.
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
- m15235
- Graph hash
- 278891c9ea218f8b2edea35b5187f129164495140e15b4727fb2eb92a56433e4
- Skeleton hash
- 5d3f20b7692d4d4d6e950638403133c22ddf88800ebfe92e608d8478a671e030
- Architecture hash
- 47f45ca36d8c955c8eb9b66f35aadaf968d24bf2ef2e44b9b72ef8d6a76a55a3
- Diagram SHA-256
- 5268be3054eff4de849d3f7f2f67237c53343448025a58cfa1f2edabe97cde6e
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
What it is
CamoFormer identifies and segments camouflaged objects from the background, a task the paper calls challenging. It is a backbone encoder plus a top-down decoder built on masked separable attention (MSA).
MSA separates multi-head self-attention into three parts that use different mask strategies. Part of the attention heads calculate attention scores separately in the predicted foreground and background regions. The third group of heads is kept unchanged and builds relationships between the foreground and background. The attention underneath is Multi-Dconv Head Transposed Attention, a modified self-attention chosen to save computation. The outputs of all the heads are concatenated and sent into a 3 × 3 convolution.
The default encoder is PVTv2. At each feature level of the decoder, a segmentation map is predicted and sent to an MSA block to improve the prediction. Each prediction is rescaled to the input size and supervised by BCE and IoU losses. During training all input images are resized to 384×384. On the COD10K-test dataset the paper reports 0.786 weighted F-measure and 0.023 MAE for CamoFormer.
Key idea. CamoFormer splits multi-head self-attention into foreground, background and normal heads using predicted masks, and applies this masked separable attention in a top-down decoder that refines the segmentation progressively.
- CamoFormer
- camouflaged object detection
- COD
- masked separable attention
- MSA
- camouflage segmentation
- progressive refinement decoder
- binary segmentation
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{yin2022camoformermaskedseparableattention,
title={CamoFormer: Masked Separable Attention for Camouflaged Object Detection},
author={Bowen Yin and Xuying Zhang and Qibin Hou and Bo-Yuan Sun and Deng-Ping Fan and Luc Van Gool},
year={2022},
eprint={2212.06570},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2212.06570},
}