Learning Compact Representations with an Information Bottleneck for Camouflaged Object Detection (TMM 2025)
April 5, 2025 ยท View on GitHub
Authors: Guanyi Li, Junjie Zhang, Rui Gao, Wubang Yuan, Gloria Jin, and Dan Zeng.
1. Preface
- This repository provides code for "Learning Compact Representations with an Information Bottleneck for Camouflaged Object Detection" TMM-2025.
2. Proposed Baseline
2.1. Training/Testing
The training and testing experiments are conducted using PyTorch with a single NVIDIA GeForce RTX 3090Ti GPU.
-
Configuring your environment (Prerequisites):
- Creating a virtual environment in terminal:
conda create -n CODIB python=3.8.
- Creating a virtual environment in terminal:
-
Downloading necessary data:
-
downloading testing dataset and move it into
./data/TestDataset/, which can be found in this download link (Baidu Drive). -
downloading training dataset and move it into
./data/TrainDataset/, which can be found in this download link (Baidu Drive). -
downloading pretrained weights and move it into
./checkpoints/CODIB/CODIB.pth, which can be found in this download link (Baidu Drive). -
downloading PVTv2 weights and move it into
./models/pvt_v2_b2.pthdownload link (Baidu Drive).
-
-
Training Configuration:
- Assigning your costumed path, like
--train_pathintrain.py.
- Assigning your costumed path, like
-
Testing Configuration:
- After you download all the pre-trained model and testing dataset, just run
test.pyto generate the final prediction map: replace your trained model directory (--pth_path).
- After you download all the pre-trained model and testing dataset, just run
2.2 Evaluating your trained model:
One-key evaluation is written in MATLAB code (revised from link),
please follow this the instructions in ./eval/main.m and just run it to generate the evaluation results in.
If you want to speed up the evaluation on GPU, you just need to use the efficient tool by pip install pysodmetrics.
Assigning your costumed path, like method, mask_root and pred_root in eval.py.
Just run eval.py to evaluate the trained model.
pre-computed maps of CODIB can be found in download link (Baidu Drive).
3. Citation
Please cite our paper if you find the work useful: