@ptrblck  : Any help would be much appreciated.
I have setup the same environment, and I am trying to load pretrained model “model_mot.pth” to get the state_dict().
But I am getting an error:
Unexpected key(s) in state_dict: “ltrb_amodal.0.weight”, “ltrb_amodal.0.bias”, “ltrb_amodal.2.weight”, “ltrb_amodal.2.bias”, “base.pre_hm_layer.0.weight”, “base.pre_hm_layer.1.weight”, “base.pre_hm_layer.1.bias”, “base.pre_hm_layer.1.running_mean”, “base.pre_hm_layer.1.running_var”, “base.pre_hm_layer.1.num_batches_tracked”.
The above keys are already available in state_dict_util. using pytorch 1.5.0

code
model_path  = 'models/model_mot.pth'
model = create_model(opt.arch, opt.heads, opt.head_conv, opt=opt)
dummy_input = Variable(torch.randn(1, 1, 544, 960))
state_dict_util = torch.load(model_path, map_location="cpu")['state_dict']
model.eval()
new_state_dict = OrderedDict()
for k, v in state_dict_util.items():
    new_state_dict[k] = v
torch_model = model.load_state_dict(new_state_dict)
# torch_model = model.load_state_dict(torch.load(model_path)['state_dict'], strict=False)
torch.onnx.export(torch_model, dummy_input, "models/model_mot.onnx")