Authors: Yujia Sun, Shuo Wang, Chenglizhao Chen, and Tian-Zhu Xiang.
The training and testing experiments are conducted using PyTorch with a single NVIDIA Tesla P40 GPU of 24 GB Memory.
Configuring your environment (Prerequisites):
Creating a virtual environment in terminal: conda create -n BGNet python=3.6
.
Installing necessary packages: pip install -r requirements.txt
.
Downloading necessary data:
downloading testing dataset and move it into ./data/TestDataset/
,
which can be found in this download link (Google Drive).
downloading training dataset and move it into ./data/TrainDataset/
,
which can be found in this download link (Google Drive).
downloading pretrained weights and move it into ./checkpoints/best/BGNet.pth
,
which can be found in this download link (Google Drive).
downloading Res2Net weights and move it into ./models/res2net50_v1b_26w_4s-3cf99910.pth
download link (Google Drive).
Training Configuration:
--train_save
and --train_path
in etrain.py
.Testing Configuration:
etest.py
to generate the final prediction map:
replace your trained model directory (--pth_path
).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 BGNet can be found in download link (Google Drive).
pre-computed maps of other comparison methods can be found in download link (Baidu Pan) with Code: yxy9.
Please cite our paper if you find the work useful:
@inproceedings{sun2022bgnet,
title={Boundary-Guided Camouflaged Object Detection},
author={Sun, Yujia and Wang, Shuo and Chen, Chenglizhao and Xiang, Tian-Zhu},
booktitle={IJCAI},
pages = "1335--1341",
year={2022}
}