ESCNet: Edge-Semantic Collaborative Network for Camouflaged Object Detection

July 3, 2026 · View on GitHub

This repository is the official implementation of ESCNet: Edge-Semantic Collaborative Network for Camouflaged Object Detection.

Updates (Jul 2026)

We have refreshed the codebase with an improved implementation that maintains segmentation quality while reducing inference overhead. The re-trained checkpoints can been found at https://github.com/suy9/ESCNet/releases, detail metrics are listed:

DatasetSmwFβFβEφMAE↓
CHAMELEON0.9060.8750.8860.9590.022
CAMO0.8740.8480.8680.9410.041
COD10K0.8730.8070.8270.9410.020
CHAMELEON0.8900.8590.8760.9420.029

Visual Comparison


Visual comparison between ESCNet and other SOTA methods. Our model accurately segments objects with complex backgrounds and intricate boundaries.

Requirements

  • python == 3.11
  • cuda >= 12.4
pip install -r requirements.txt

Dataset

COD (Camouflaged Object Detection) Dataset

Test sets should follow this layout (same as CAMO / COD10K / NC4K):

Test/CHAMELEON/
├── Image/       # .jpg
├── GT_Object/   # .png
└── GT_Edge/     # .png (optional, for training)

Set test_dir in config.yaml to the dataset you want to evaluate.

Pre-trained Model

The recommended checkpoint:

checkpoints/escnet/epoch_120.pth

For quick evaluation with pre-computed predictions, you can also download our test data:

Training

torchrun -nproc_per_node=4 train.py --config config.yaml

Evaluation

Change test_dir in config.yaml for each benchmark, then run:

# inference (all checkpoints in checkpoints/escnet/, or a single ckpt)
python test.py --config config.yaml --pred_root preds
python test.py --config config.yaml --ckpt checkpoints/escnet/epoch_120.pth --pred_root preds

# metrics
python eval.py --config config.yaml --pred_root preds --save_dir results

One-shot train + test + eval:

bash run.sh
# eval only (skip training)
bash run.sh --notrain

Citation

@inproceedings{ye2025escnet,
  title={ESCNet: Edge-Semantic Collaborative Network for Camouflaged Object Detection},
  author={Ye, Sheng and Chen, Xin and Zhang, Yan and Lin, Xianming and Cao, Liujuan},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  pages={20053--20063},
  year={2025}
}