When Fine-tuning a object detection model which parameters do we update?

When we fine-tune an object detection model, which weights exactly are we updating?

Do we explicitly configure which components of the model we want to update?

For example, in fine-tuning DETR, which components are we updating?

I would assume that the backbone is being frozen, and that encoder/decoder get updated, the prediction heads get reset and trained from scratch

(I am asking specifically about DETR because it is a popular and simple object detection dataset)

Thanks!

1 Like

In the case of Hugging Face’s Trainer, simply specify requires_grad=False for the parts you want to freeze. Therefore, trainable parameters can be obtained like this.

for name, param in model.named_parameters():
    if "backbone" in name:
        param.requires_grad = False # frozen