HDPNet: Hourglass Vision Transformer with Dual-Path Feature Pyramid for Camouflaged Object Detection (WACV2025)
The training and testing experiments are conducted using PyTorch with an NVIDIA A100-SXM of 40 GB Memory.
Note that HDPNet is only tested on Ubuntu OS with the following environments.
- Creating a virtual environment in terminal:
conda create -n HDPNet python=3.8. - Installing necessary packages:
pip install -r requirements.txt
- Download the training set (COD-TrainDataset) used for training
- Download the testing sets (COD10K-test + CAMO-test + CHAMELEON + NC4K ) used for testing
- The pretrained model(PVT2) is stored in Google Drive and Baidu Drive (g3ea). After downloading, please change the file path in the corresponding code.
- Run
train.shto train.
Our well-trained model is stored in Google Drive and Baidu Drive (gv9n). After downloading, please change the file path in the corresponding code.
- Evaluate HDPNet: After configuring the test dataset path, run
hpvt_eval.shin therun_slurmfolder for evaluation. - PR-Curves: We provide the code for obtaining PR-Curves through detection results. Please refer to 'PR_Curve.py'.
- Super- and Sub-Classes: To evaluate the performance of each method on COD10K superclasses and subclasses through detection results, please refer to 'class_eval.py'.
The prediction results of our HDPNet are stored on Google Drive. Please check.
Our final results, which perform very well on the COD10K dataset (contains a lot of small objects and detailed labeling of the objects' fine boundaries).
we adopt five kinds of evaluation metrics: S-measure(
$S_m$ ), weighted F-measure($F_\beta^\omega$ ), adaptive F-measure($F_\beta^{adp}$ ), mean F-measure($F_\beta^{mean}$ ),max F-measure($F_\beta^{max}$ ), adaptive E-measure($E_\phi^{apd}$ ), mean E-measure($E_\phi^{mean}$ ), max E-measure ($E_\phi^{max}$ ), and mean absolute error($\mathcal{M}$ )
| Dataset | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| CAMO | 0.893 | 0.851 | 0.848 | 0.870 | 0.890 | 0.932 | 0.934 | 0.948 | 0.040 |
| CHAMELEON | 0.921 | 0.861 | 0.849 | 0.874 | 0.902 | 0.943 | 0.947 | 0.970 | 0.021 |
| COD10K | 0.888 | 0.794 | 0.770 | 0.820 | 0.852 | 0.915 | 0.925 | 0.951 | 0.020 |
| NC4K | 0.902 | 0.850 | 0.845 | 0.871 | 0.891 | 0.931 | 0.934 | 0.950 | 0.029 |
Quantitative results in several typical complex situations, including occlusion, small objects, multiple objects, and object boundaries.
@inproceedings{he2025hdpnet,
title={HDPNet: Hourglass Vision Transformer with Dual-Path Feature Pyramid for Camouflaged Object Detection},
author={He, Jinpeng and Liu, Biyuan and Chen, Huaixin},
booktitle={2025 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
pages={8638--8647},
year={2025},
organization={IEEE}
}
