Closed xiaoxiaoczw closed 2 years ago
Hi @xiaoxiaoczw,
The detector weights are in fact frozen already. We fine-tuned the object detector as a first stage and only train the interaction head next. The corresponding code is here.
for p in upt.detector.parameters():
p.requires_grad = False
param_dicts = [{
"params": [p for n, p in upt.named_parameters()
if "interaction_head" in n and p.requires_grad]
}]
Fred.
Hi Fred,
Thanks for your quick feedback! By the way, which pretrained weights do I need to load if I want to train on my own dataset?
To get the best performance, you would want to fine-tune the object detector on the custom dataset first, and then train the interaction head. But if the custom dataset has the same set of objects and you don't want to go through the trouble, you can just load the provided detector weights. You can choose amongst the pre-trained MS COCO weights, fine-tuned HICO-DET weights and the fine-tuned V-COCO weights. Which one works the best for you really depends on the dataset similarity. It would be hard to guess without running experiments.
Fred.
Thanks for the suggestion!
Hi Fred,
I would like to know that, how to freeze detector weights to train the interaction head individually? Thanks!