C2AM (Unsupervised)

November 5, 2024 · View on GitHub

Update (2022-12-12)

MethodLoc Back.Cls Back.CUB (top1/top5 loc)CUB (GT-Known)ImageNet (top1/top5 loc)ImageNet (GT-Known)
ORNetVGG16VGG1667.74 / 80.7786.2052.05 / 63.9468.27
PSOLResNet50ResNet5070.68 / 86.6490.0053.98 / 63.0865.44
C2AM (supervised initialization)ResNet50ResNet5076.36 / 89.1593.4054.41 / 64.7767.80
C2AM (unsupervised initialization)ResNet50ResNet5074.76 / 87.3791.5454.65 / 65.0568.07

We provide the extracted class-agnostic bounding boxes (on CUB-200-2011 and ILSVRC2012) and background cues (on PASCAL VOC12) from here.

Dependencies

  • Python 3
  • Paddlepaddle 2.1.0
  • OpenCV-Python
  • Numpy
  • Scipy
  • MatplotLib
  • Yaml
  • Easydict

Dataset

CUB-200-2011

You will need to download the images (JPEG format) in CUB-200-2011 dataset from here. Make sure your data/CUB_200_2011 folder is structured as follows:

├── CUB_200_2011/
|   ├── images
|   ├── images.txt
|   ├── bounding_boxes.txt
|   ...
|   └── train_test_split.txt

You will need to download the images (JPEG format) in ILSVRC2012 dataset from here. Make sure your data/ILSVRC2012 folder is structured as follows:

ILSVRC2012

├── ILSVRC2012/ 
|   ├── train
|   ├── val
|   ├── val_boxes
|   |   ├——val
|   |   |   ├—— ILSVRC2012_val_00050000.xml
|   |   |   ├—— ...
|   ├── train.txt
|   └── val.txt

PASCAL VOC2012

You will need to download the images (JPEG format) in PASCAL VOC2012 dataset from here. Make sure your data/VOC2012 folder is structured as follows:

├── VOC2012/
|   ├── Annotations
|   ├── ImageSets
|   ├── SegmentationClass
|   ├── SegmentationClassAug
|   └── SegmentationObject

For WSOL task

please refer to the directory of './WSOL'

cd WSOL

For WSSS task

please refer to the directory of './WSSS'

cd WSSS

Comparison with CAM

CUSTOM DATASET

As CCAM is an unsupervised method, it can be applied to various scenarios, like ReID, Saliency detection, or skin lesion detection. We provide an example to apply CCAM on your custom dataset like 'Market-1501'.

cd CUSTOM