Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

How to reproduce VOC07 linear classification result? #32

Open
yxchng opened this issue Oct 3, 2021 · 0 comments
Open

How to reproduce VOC07 linear classification result? #32

yxchng opened this issue Oct 3, 2021 · 0 comments

Comments

@yxchng
Copy link

yxchng commented Oct 3, 2021

I used vissl to reproduce VOC07 linear classification result using the pre-trained model linked in this repo and the following config. The accuracy I got is 86.831% which is quite a bit higher than the 86.2% reported in your paper. However, for multi-crop SwAV, I am able to reproduce the 88.9% figure using this config. Can you kindly comment on the settings you use? What are differences from the config above? Thanks.

```yaml
# @package _global_
config:
  DATA:
    NUM_DATALOADER_WORKERS: 5
    TRAIN:
      DATA_SOURCES: [disk_filelist]
      LABEL_SOURCES: [disk_filelist]
      DATASET_NAMES: [voc2007]
      BATCHSIZE_PER_REPLICA: 32
      TRANSFORMS:
        - name: Resize
          size: 256
        - name: CenterCrop
          size: [224, 224]
        - name: ToTensor
        - name: Normalize
          mean: [0.485, 0.456, 0.406]
          std: [0.229, 0.224, 0.225]
      MMAP_MODE: False
      COPY_TO_LOCAL_DISK: True
      COPY_DESTINATION_DIR: /tmp/voc2007/
    TEST:
      DATA_SOURCES: [disk_filelist]
      LABEL_SOURCES: [disk_filelist]
      DATASET_NAMES: [voc2007]
      BATCHSIZE_PER_REPLICA: 32
      TRANSFORMS:
        - name: Resize
          size: 256
        - name: CenterCrop
          size: [224, 224]
        - name: ToTensor
        - name: Normalize
          mean: [0.485, 0.456, 0.406]
          std: [0.229, 0.224, 0.225]
      MMAP_MODE: False
      COPY_TO_LOCAL_DISK: True
      COPY_DESTINATION_DIR: /tmp/voc2007/
  MODEL:
    WEIGHTS_INIT:
      PARAMS_FILE: "specify path"
      STATE_DICT_KEY_NAME: classy_state_dict
      # STATE_DICT_KEY_NAME: model_state_dict
    FEATURE_EVAL_SETTINGS:
      EVAL_MODE_ON: True
      FREEZE_TRUNK_ONLY: True
      EXTRACT_TRUNK_FEATURES_ONLY: True
      SHOULD_FLATTEN_FEATS: True
      LINEAR_EVAL_FEAT_POOL_OPS_MAP: [
        ["res5", ["AvgPool2d", [[6, 6], 1, 0]]],
        ["res5avg", ["Identity", []]],
      ]
    TRUNK:
      NAME: resnet
      RESNETS:
        DEPTH: 50
  DISTRIBUTED:
    NUM_NODES: 1
    NUM_PROC_PER_NODE: 8
  MACHINE:
    DEVICE: gpu
  CHECKPOINT:
    DIR: .
  SVM:
    costs:
      costs_list: [0.01, 0.1, 1.0, 2, 5, 10, 15, 20, 50, 100, 1000]
    normalize: True
    loss: squared_hinge
    penalty: l2
    dual: True
    max_iter: 2000
    cross_val_folds: 3
    force_retrain: False

I am attaching the following screenshot from your paper as a reference.

Screenshot 2021-10-03 at 9 07 16 PM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant