Self-Anchored Progressive Framework with Noise Mitigation for Unsupervised Camouflaged Object Detection
This code was implemented with Python 3.9, PyTorch 2.4.1 and CUDA 12.4 on an NVIDIA GeForce GTX 3090.
To train and evaluate the model, you need to download publicly available datasets.
After downloading, please organize the dataset as follows:
COD10K/
├── images/
├── segmentations/
└── tokens/ # This folder will be created in Step 2Before training the model, you need to extract DINO token features from the images.
Clone the Tokencut project
git clone https://github.com/YangtaoWANG95/TokenCutThen, copy our provided extract_dino_tokens.py into this directory.
Run the following script to extract the features:
python extract_dino_tokens.py --input_dir <path_to_dataset> --output_dir <path_to_save_features>After dataset preparation and token extraction, start training with:
In the first stage, the model generates pseudo labels.
python train-label.py
python test-label.pyYou can directly use the pseudo labels we provide.
In the second stage.
python train.pyTo generate prediction maps:
python test.pyTo compute evaluation metrics:
python eval.pyYou can view the results of our model on four benchmark datasets.
Thanks for citing our work:
Please drop me an email for further problems or discussion: liu081824@gmail.com

