automl
automl copied to clipboard
Problem of finetune on my data with detector COCO ckpt
Follow the tutorial 8 Finetune on PASCAL VOC 2012 with detector COCO ckpt, I want to train efficientdet-d0 on my data. When I set var_freeze_expr: '(efficientnet|fpn_cells|resample_p6)' in the configure file, the final result is really bad (best object AP=0.019). Then I remove the var_freeze_expr, the performance of the final model is improved a lot (best object AP>0.6). Could anyone explain this, the tutorial 8 can get a good result by setting var_freeze_expr?
When you froze (efficientnet|fpn_cells|resample_p6)
, model had very little scope to actually learn anything from your data compared to when you removed var_freeze_expr
. I think without freezing all the layers, your model is actually learning from the data and hence the high AP score. I would highly recommend to try and freeze only backbone
and or fpn_cells
, as training from scratch takes longer than training with frozen layers.
Thanks for your explanation. Another confusion point is that when finetune on PASCAL VOC 2012 with detector COCO ckpt by setting var_freeze_expr, the final result is good. Is it related to the object class difference among the two datasets?
What var_freeze_expr
did you set?
If you set (efficientnet)
, that means the efficientnet backbone
weights trained on COCO data are frozen and the model head
is trainable
. So the model head
is learning from the PASCAL VOC 2012 data and adapting the weights to minimize the loss. Even though efficientnet backbone
is trained on COCO data, it has learnt the fundamental features well, so it is making use of those features and hence the result is good after finetuning head
. Please refer to the paper if you are interested in details of the architecture
Hi @ameyparanjape.
Out of curiosity, would you know what precisely the 'resample'
does?
If using ('efficientnet'
) or ('efficientnet'
|'fpn_cells'
) I interpret that either the backbone weights or the backbone + fpn weights are frozen. However, it is not clear to me what the resample layer refers to? Is it the level of which the freezing applies in the backbone? E.g resample_p5
would not freeze backbone or fpn weights in the P6 and P7 layers?