Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you provide me Pascal VOC configs? #7

Closed
seoha-kim opened this issue Nov 10, 2022 · 3 comments
Closed

Can you provide me Pascal VOC configs? #7

seoha-kim opened this issue Nov 10, 2022 · 3 comments

Comments

@seoha-kim
Copy link

seoha-kim commented Nov 10, 2022

Hello.
I'd like to try to replicate your great distortion methods at Pascal VOC.
However, this repository only provides MS-coco configurations.
you used extra 6k iterations for auxiliary task warm-up on the Pascal VOC dataset,
how can I reproduce this training details?

Is it alright to train teacher standalone / and distill students?

teacher standalone train
BASE: "../Base-RCNN-FPN.yaml"
MODEL:
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
MASK_ON: False
RESNETS:
DEPTH: 101
ROI_HEADS:
NUM_CLASSES: 20
INPUT:
MIN_SIZE_TRAIN: (480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800)
MIN_SIZE_TEST: 800
DATASETS:
TRAIN: ('voc_2007_trainval', 'voc_2012_trainval')
TEST: ('voc_2007_test')
SOLVER:
STEPS: (12000, 16000)
MAX_ITER: 18000 # 17.4 epochs

student distillation
BASE: "../Base-RCNN-FPN.yaml"
MODEL:
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl"
MASK_ON: False
RESNETS:
DEPTH: 50
ROI_HEADS:
NUM_CLASSES: 20
DISTILLER:
MODEL_LOAD_OFFICIAL: False
MODEL_DISTILLER_CONFIG: 'PascalVOC-Detection/faster_rcnn_R_101_FPN.yaml'
INS_ATT_MIMIC:
WEIGHT_VALUE: 3.0
INS:
INPUT_FEATS: ['p2', 'p3', 'p4', 'p5', 'p6']
MAX_LABELS: 100
INPUT:
MIN_SIZE_TRAIN: (480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800)
MIN_SIZE_TEST: 800
DATASETS:
TRAIN: ('voc_2007_trainval', 'voc_2012_trainval')
TEST: ('voc_2007_test',)
SOLVER:
STEPS: (12000, 16000)
MAX_ITER: 18000 # 17.4 epochs
CLIP_GRADIENTS: {"ENABLED": True}

@seoha-kim
Copy link
Author

If I modify the cfg.If MODEL.DISTILLER.BYPASS_DISTILL = 1000 to 7000, can only decoder be trained during 6000iter?
I wonder if this option is implemented in this repository.

@AmoseKang
Copy link
Collaborator

Hello, thanks for your question.
The config you used is basically right (the base voc config is from d2), however, there are few things I need to highlight.

In general, to reproduce the result, there are three steps you need to do:

  1. Train a teacher network with R101 backbone, this is basically the teacher standalone train config your provided,
  2. Create a new teacher standalone config, replace the 'WEIGHTS' to the checkpoint of step 1,
  3. Train and distill the student, you should change MODEL_DISTILLER_CONFIG to the config from step2, and set MODEL.DISTILLER.PRETRAIN_TEACHER_ITERS to 6000, leave BYPASS_DISTILL to 1000. This will append an extra warmup stage before distillation.

@seoha-kim
Copy link
Author

Thank you for the detailed instructions.
Thanks to you, I was able to re-produce it well. 😀

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

No branches or pull requests

2 participants