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
How to select classes of which outputs from Detector model to be fed into reid model ? #564
Comments
Hi, Balakumaran-kandula, Thank you for your question. For the question 1, the current version does not support modifying the config file to meet your requirements. In my opinion, you need to modify some code to complete it. Take
For the question 2, you need to modify the key of the weight file. This is mainly because the keys(means key in dict) of mmtrack and mmdet weight files are different. Here is a example to fix it. In fact, you just need to add 'detector' in front of the ori key. import torch
from collections import OrderedDict
new_dict = OrderedDict()
key1 = []
weight_dict = torch.load("your.pth")
weight_dict = weight_dict['state_dict']
for (k1, v1) in weight_dict.items():
new_dict['detector.' + k1] = v1
torch.save(new_dict, 'new_track.pth') Hope this will help you. If you have any questions, please leave your comment here.🚀 |
Could you paste the config.py here? |
detector config as model = dict( tracker config base = [ model = dict( learning policylr_config = dict( runtime settingstotal_epochs = 4 |
There seems to be no problem with the configuration file. I suspect it is your mmdet version problem. Please make sure that the mmdet pre training model you use is consistent with the mmdet version installed in the mmtrack environment |
You can follow the above method to confirm whether the names of each |
I have trained the detector model in mmdetection with multiple classes , if i want to fed the "person" class outputs alone from the detector model to the reid model during inference , can i do that using config or any other method ?
And also if i have to fed the mmdetection pretrained model into tracker , what are the config changes have to be done ?
Thank you in advance
The text was updated successfully, but these errors were encountered: