Skip to content

ArloJie/SAPNet

Repository files navigation

SAPNet

Self-Anchored Progressive Framework with Noise Mitigation for Unsupervised Camouflaged Object Detection

Overview

Usage

This code was implemented with Python 3.9, PyTorch 2.4.1 and CUDA 12.4 on an NVIDIA GeForce GTX 3090.

1. Dataset Preparation

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 2

2. Extract DINO Tokens

Before training the model, you need to extract DINO token features from the images.

Clone the Tokencut project

git clone https://github.com/YangtaoWANG95/TokenCut

Then, 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>

3. Training the Model

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.py

You can directly use the pseudo labels we provide.

In the second stage.

python train.py

4. Evaluating the Model

To generate prediction maps:

python test.py

To compute evaluation metrics:

python eval.py

Results

Results

You can view the results of our model on four benchmark datasets.

Our Bib:

Thanks for citing our work:

Contact

Please drop me an email for further problems or discussion: liu081824@gmail.com

About

Self-Anchored Progressive Framework with Noise Mitigation for Unsupervised Camouflaged Object Detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages