If you use the code or models from this repository in your research, please cite the following manuscript:
Article Title: Frequency-Guided Cross-Domain Learning for Lightweight Camouflaged Object Detection
Journal: The Visual Computer
BibTeX entry:
@article{tan2026fchnet,
title={Frequency-Guided Cross-Domain Learning for Lightweight Camouflaged Object Detection},
author={Tan, Song and Jinbao, Li and Yahong, Guo},
journal={The Visual Computer},
year={2026},
note={Manuscript submitted to The Visual Computer. Code available at https://doi.org/10.5281/zenodo.20192879}
}Camouflaged object detection (COD) faces challenges in preserving subtle structural cues due to weak boundaries and high background similarity. Existing methods often rely on loosely coupled fusion between frequency priors and spatial features, leading to unstable prior-feature interaction. This work presents a Frequency-aware Cross-domain Hierarchical Network (FCHNet) for efficient COD. The model integrates Wavelet Feature Refinement and Cross-domain Frequency Alignment to stabilize prior-feature coordination, while a boundary-aware decoder further refines object contours. Experiments on CAMO, COD10K, and NC4K show that FCHNet consistently outperforms representative lightweight COD models in weighted F-measure. In particular, FCHNet-S achieves a favorable accuracy-efficiency trade-off with 4.69M parameters, while FCHNet-L remains competitive with heavyweight models. The code is publicly available at https://github.com/carbonsir/FCHNet.
This repository provides the full source code of the proposed FCHNet algorithm, including the model implementation, training script, inference script, evaluation script, dependency requirements, key algorithm modules, trained weights, and prediction maps.
- GitHub repository: https://github.com/carbonsir/FCHNet
- Permanent archived DOI: https://doi.org/10.5281/zenodo.20192879
- Trained weights: Google Drive
- Prediction maps: Google Drive
- Dataset preparation instructions:
dataset/README.md
The raw images of CAMO, COD10K, and NC4K are not redistributed due to dataset license restrictions. We provide dataset organization instructions, preprocessing instructions, edge-map preparation details, trained weights, prediction maps, and evaluation scripts to facilitate reproducible research.
This repository contains the official implementation of the manuscript:
Frequency-Guided Cross-Domain Learning for Lightweight Camouflaged Object Detection
This code is directly related to a manuscript submitted to The Visual Computer.
If you use this code, trained weights, prediction maps, or experimental results in your research, please cite the related manuscript. The official citation information will be updated after the paper is accepted or published.
To improve transparency and reproducibility, this repository provides source code, trained models, prediction maps, and dataset preparation instructions.
| Resource | Link | Extraction Code |
|---|---|---|
| FCHNet prediction maps | https://pan.baidu.com/s/1esOes8En-lfgAugIYQvs4A?pwd=wpe7 | wpe7 |
| FCHNet trained weights | https://pan.baidu.com/s/1Iz02YaItxvPlpAuICyeblg?pwd=e4x4 | e4x4 |
| Archived repository DOI | https://doi.org/10.5281/zenodo.20192879 | - |
Google Drive mirrors are also provided:
| Resource | Link |
|---|---|
| FCHNet trained weights | Google Drive |
| FCHNet prediction maps | Google Drive |
FCHNet consists of the following key components:
-
EfficientNet-based Backbone
Extracts lightweight multi-level visual features. -
Wavelet Feature Refinement (WFR) Module
Refines features through frequency-aware wavelet decomposition and attention. -
Cross-domain Frequency Alignment (CFA) Module
Aligns spatial-domain features and frequency-domain representations. -
Boundary Feature Extraction (BFE) Module
Extracts boundary-aware cues to enhance contour perception. -
Boundary-guided Decoder (BGD)
Progressively integrates semantic, frequency, and boundary information to generate accurate prediction maps.
The Wavelet Feature Refinement module decomposes feature maps into low-frequency and high-frequency components. The low-frequency component helps capture global semantic context, while the high-frequency component preserves texture, contour, and structural details.
This design is useful for camouflaged object detection because camouflaged targets usually have weak object boundaries and high similarity with their surroundings.
Related implementation files:
Model/HTLBlock.py
Model/WHAtt.py
Model/WLAtt.py
The Cross-domain Frequency Alignment module coordinates spatial-domain features and frequency-domain representations. It reduces unstable feature fusion caused by weak boundaries and complex background interference.
Related implementation file:
Model/CFA.py
The Boundary Feature Extraction module introduces edge-aware information to enhance the perception of object contours. It provides additional boundary guidance for the decoder and helps generate sharper prediction maps.
Related implementation file:
Model/EdgeFT.py
The Boundary-guided Decoder progressively fuses multi-level encoder features, refined frequency features, and boundary cues. It is designed to improve localization accuracy and recover fine object structures.
Related implementation file:
Model/DeBlock.py
FCHNet/
βββ Model/
β βββ FCHNet.py # Main model framework
β βββ CFA.py # Cross-domain Frequency Alignment module
β βββ CoordAtt.py # Coordinate Attention module
β βββ DeBlock.py # Boundary-guided Decoder module
β βββ EdgeFT.py # Boundary Feature Extraction module
β βββ EfficientNet.py # EfficientNet backbone
β βββ GlobalAtt.py # Global Attention module
β βββ HTLBlock.py # Wavelet refinement module
β βββ Module.py # Basic convolution modules
β βββ RefineFM.py # Transformer refinement module
β βββ WHAtt.py # High-frequency wavelet attention module
β βββ WLAtt.py # Low-frequency wavelet attention module
β
βββ dataset/
β βββ README.md # Dataset preparation instructions
β
βββ utils/
β βββ dataloader_freq.py
β βββ data_augmentation.py
β βββ dct.py
β βββ metrics.py
β
βββ train.py
βββ inference.py
βββ evaluate.py
βββ config.py
βββ requirements.txt
βββ README.md
The experiments were conducted under the following environment:
Ubuntu 20.04
Python 3.8
PyTorch 2.5.1
CUDA 12.1
torchvision
numpy
opencv-python
Pillow
tqdm
scipy
matplotlib
Install dependencies:
conda create -n fchnet python=3.8
conda activate fchnet
pip install -r requirements.txtExample requirements.txt:
torch>=2.0.0
torchvision
numpy
opencv-python
Pillow
tqdm
scipy
matplotlib
Please make sure that the installed PyTorch version is compatible with your CUDA version.
FCHNet is trained and evaluated on three public COD benchmark datasets:
- CAMO
- COD10K
- NC4K
Due to dataset license restrictions, the raw images are not redistributed in this repository. Please download the original datasets from their official sources or publicly available benchmark collections.
Please refer to the dataset preparation file for detailed instructions:
dataset/README.md
Expected dataset structure:
dataset/
βββ TrainDataset/
β βββ Imgs/
β βββ GT/
β βββ Edge/
βββ TestDataset/
βββ CAMO/
β βββ Imgs/
β βββ GT/
βββ COD10K/
β βββ Imgs/
β βββ GT/
βββ NC4K/
βββ Imgs/
βββ GT/
The Edge/ folder contains edge or boundary maps generated from the ground-truth masks for boundary supervision.
Before training, please check and modify the following settings:
- Training dataset path
- Batch size
- Learning rate
- Number of epochs
- Checkpoint save path
- GPU device ID
Run:
python train.pyRecommended training settings:
Input size: 384 Γ 384
Batch size: 32
Learning rate: 2.6e-4
Epochs: 200
Optimizer: Adam
The trained checkpoints will be saved in:
checkpoints/FCHNet/
Example checkpoint path:
checkpoints/FCHNet/FCHNet.pth
Run the following command to generate prediction maps:
python inference.pyBefore inference, please make sure that the trained model path and testing dataset path are correctly configured.
The prediction maps will be saved in:
prediction_maps/
Expected output structure:
prediction_maps/
βββ CAMO/
βββ COD10K/
βββ NC4K/
Run the following command to evaluate the prediction maps:
python evaluate.pyThe evaluation metrics include:
- S-measure
- E-measure
- Weighted F-measure
- MAE
Figure 2. Overall pipeline of FCHNet.
The following table reports the performance of FCHNet-S on three COD benchmark datasets.
| Dataset | S-measure β | E-measure β | Weighted F-measure β | MAE β |
|---|---|---|---|---|
| CAMO | 0.840 | 0.898 | 0.781 | 0.059 |
| COD10K | 0.835 | 0.910 | 0.727 | 0.029 |
| NC4K | 0.862 | 0.916 | 0.802 | 0.041 |
To provide a more comprehensive understanding of the proposed FCHNet, we include qualitative comparisons, ablation studies, visualization results, and failure cases.
The following figure shows qualitative comparison results between FCHNet and other representative camouflaged object detection methods.
Figure 7. Qualitative comparison of FCHNet with other COD methods.
The following figure presents the ablation study of the main components in FCHNet. The results demonstrate the effectiveness of the proposed modules.
Figure 8. Ablation analysis of the proposed components.
The following figure visualizes the feature activation and heatmap responses of FCHNet. The visualization results show that FCHNet can focus more accurately on camouflaged objects and suppress background interference.
Figure 9. Overview of heatmap visualization results.
To reproduce the reported results, please follow these steps:
- Install the required environment.
- Download and organize the training and testing datasets.
- Prepare edge maps for boundary supervision.
- Update dataset paths in the configuration file or training script.
- Train FCHNet using
train.py, or download the released trained model. - Run
inference.pyto generate prediction maps. - Run
evaluate.pyto calculate quantitative metrics.
For dataset organization and edge-map preparation, please refer to:
dataset/README.md
If you find this work useful for your research, please cite our related manuscript:
@article{tan2026fchnet,
title={Frequency-Guided Cross-Domain Learning for Lightweight Camouflaged Object Detection},
author={Tan, Song and Jinbao, Li and Yahong, Guo},
journal={The Visual Computer},
year={2026},
note={Manuscript submitted to The Visual Computer. Code available at https://doi.org/10.5281/zenodo.20192879}
}The citation information will be updated after the manuscript is officially accepted or published.
This repository is released for academic research purposes only.
Commercial use is not permitted without permission from the authors.
For other usage, please contact the authors.
We sincerely thank the authors of previous camouflaged object detection works and publicly available datasets, including:
- CAMO
- COD10K
- NC4K
- SINet
- SINet-V2
This project also benefits from previous studies on camouflaged object detection, frequency-domain learning, wavelet-based feature refinement, and boundary-aware segmentation.
For any questions, please contact:
carbonsir@126.com



