Open damianozappia opened 1 year ago
The warning message is as expected and it's not an error message. The cls_head related weights for your custom dataset is different from the original weights for K400. you can continue training if it is not interrupted.
Thanks @cir7 for your reply. Unfortunately the training is interrupted because of this classes mismatch, indeed I get the error:
RuntimeError: The size of tensor a (6) must match the size of tensor b (80) at non-singleton dimension 1
Here is my config file if it can be helpful:
From the documentation it's a bit unclear how to setup fine tuning in case of Spatio-Temporal model, as I thought it was the same as the Action Recognition tutorial were as showed in the guide you have to change num_classes
in the cls_head
dict, but this field doesn't exist in the Spatio-Temporal models.
Can you please explain me how to set it up in order to fine tune a pretrained SlowFast model on my current dataset?
custom action detection dataset requires specifying num_classes
in AVADataset
, please check it.
change the mmaction/models/roi_heads/bbox_heads/bbox_head.py. Add these 2 lines after the row 244, which can change the gt's class number from 81 to 7 for sampling_result in sampling_results: sampling_result.pos_gt_labels = sampling_result.pos_gt_labels[:, :self.num_classes]
The doc issue
Hi, can someone show me how to fine tune a model for Spatio-Temporal Action Detection with a custom AVA dataset with (in my case) 6 classes?
I modified the config file by changing the number of classes here:
and specifing the model to load for fine tuning in the
load_from
parameter.However I get the following error when staring the train.py script:
Suggest a potential alternative/fix
No response