The code for "Weakly-supervised Contrastive Learning for Unsupervised Object Discovery" The checkpoint for evaluation could be downloaded from wcl-16-final.pth
The results for object segmentation in VOC2007, VOC2012, COCO20K, DUTS-Test, DUT-OMRON and ECSSD could be downloaded from seg_results
This code was implemented with Python 3.8, PyTorch 1.9.1+cu111 and CUDA 11.6.
The dataset for segmentation could be downloaded from ECSSD, DUTS and DUT-OMRON; The dataset for detection could be downloaded from VOC2007, VOC2012 and COCO20K
To train the model, please check the dataset directory in data/dataloader.py (image_folder_prefix
) and the pre-trained model directory in wcl.py (--pretrained_path
) and run:
bash run_pipeline.sh
Please check:
- the testing dataset directory in ddt_dino_sig.py (
--test_root
andtest_dataset
) - the checkpoint directory in ddt_dino_sig.py (
--pretr_path
): - the testing dataset directory and save path in measure.py(
pred_dir0
,test_datasets
) and run
python ddt_dino_sig.py
python measure.py
We acknowledge these excellent works that inspire our project: Weakly Contrastive Learning, DDT and DINO.