tracker = DeepOCSORT(model_weights=Path('clip_vehicleid.pt'),fp16=True, device='cuda:0')
Resized position embedding: %s to %s torch.Size([197, 768]) torch.Size([129, 768])
Position embedding resize to height:16 width: 8
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/shreejaltrivedi/miniforge3/envs/dl-env/lib/python3.8/site-packages/boxmot/trackers/deepocsort/deep_ocsort.py", line 349, in __init__
self.model = ReIDDetectMultiBackend(weights=model_weights, device=device, fp16=fp16)
File "/Users/shreejaltrivedi/miniforge3/envs/dl-env/lib/python3.8/site-packages/boxmot/appearance/reid_multibackend.py", line 85, in __init__
load_pretrained_weights(self.model, w)
File "/Users/shreejaltrivedi/miniforge3/envs/dl-env/lib/python3.8/site-packages/boxmot/appearance/reid_model_factory.py", line 176, in load_pretrained_weights
model.load_param(str(weight_path))
File "/Users/shreejaltrivedi/miniforge3/envs/dl-env/lib/python3.8/site-packages/boxmot/appearance/backbones/clip/make_model.py", line 129, in load_param
self.state_dict()[i.replace('module.', '')].copy_(param_dict[i])
RuntimeError: The size of tensor a (129) must match the size of tensor b (257) at non-singleton dimension 0
Search before asking
Question
Hi @mikel-brostrom ,
I wanted to run the vehicle ReID model using Boxmot and when I tried to initialize the model weights I get the following error. It will be very helpful if you can help me with this.