问题1,加载模型时类别不一致导致的权重部分加载,设置好自己的类别就行,只训练人就只设置 1,
opt.heads = {'hm': 1,
'wh': 2 if not opt.cat_spec_wh else 2 * opt.num_classes,
'id': opt.reid_dim}
Skip loading parameter hm.2.weight, required shapetorch.Size([80, 256, 1, 1]), loaded shapetorch.Size([1, 256, 1, 1]). If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Skip loading parameter hm.2.bias, required shapetorch.Size([80]), loaded shapetorch.Size([1]). If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
问题2:加载模型时类别不一致导致的权重部分加载,加载
‘./models/ctdet_coco_dla_2x.pth'
模型本身就没有id这部分权重,所以作为预训练模型加载进去的,FairMOT模型是有这部分的
No param id.0.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
No param id.0.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
No param id.2.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
No param id.2.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
问题3,更改训练数据集时,需要在/home/cody/PycharmProjects/FairMOT/src/data/ 修改对应的训练文件列表,
训练的格式:0 1 0.177778 0.195573 0.0981481 0.131771
类别,ID,x_center,y_center,w,h(坐标均是归一化之后的)