JDAI-CV / fast-reid

SOTA Re-identification Methods and Toolbox
Apache License 2.0
3.42k stars 837 forks source link

the pretrained weights #617

Closed divastar closed 2 years ago

divastar commented 2 years ago

Hi, I am trying to reproduce the inference results by using the yml and the pretrained model from the Model ZOO:

Capture

!python3 /content/drive/MyDrive/fast-reid/demo/demo1.py --config-file /content/drive/MyDrive/fast-reid/configs/VehicleID/bagtricks_R50-ibn.yml --input /content/drive/MyDrive/fast-reid/datasets/my_data/*jpg --output /content/drive/MyDrive/fast-reid/output

But I get incostinsesty errors [12/29 15:23:57 fastreid.utils.checkpoint]: Loading checkpoint from /content/drive/MyDrive/fast-reid/fastreid/pretrained/vehicleid_bot_R50-ibn.pth [12/29 15:23:58 fastreid.utils.checkpoint]: Some model parameters or buffers are not found in the checkpoint: heads.weight [12/29 15:23:58 fastreid.utils.checkpoint]: The checkpoint state_dict contains keys that are not used by the model: pixel_mean pixel_std heads.bnneck.num_batches_tracked heads.classifier.weight heads.pool_layer.p 100% 49/49 [00:05<00:00, 8.54it/s] 100% 49/49 [00:03<00:00, 13.43it/s] 100% 49/49 [00:03<00:00, 13.46it/s] 100% 49/49 [00:03<00:00, 13.46it/s] 100% 49/49 [00:03<00:00, 13.53it/s] 100% 49/49 [00:03<00:00, 13.36it/s] 100% 49/49 [00:03<00:00, 13.48it/s] 100% 49/49 [00:03<00:00, 13.49it/s] [array([[1.0728836e-06]], dtype=float32), array([[1.0728836e-06]], dtype=float32), array([[1.0728836e-06]], dtype=float32), array([[1.0728836e-06]], dtype=float32), array([[1.0728836e-06]], dtype=float32), array([[1.0728836e-06]], dtype=float32), array([[1.0728836e-06]], dtype=float32), array([[1.0728836e-06]], dtype=float32), array([[1.0728836e-06]], dtype=float32), ...

Same with ...fast-reid/configs/VehicleID/sbs_R50-ibn.yml ..: and veri_sbs_R50-ibn.pth etc - non matching keys /----------------------------------------------------- I tried to work with the 01 version as was suggected in (#321, #351) with !python3 /content/drive/MyDrive/fast-reid/demo/demo.py --config-file /content/drive/MyDrive/fast-reid/configs/VeRi/sbs_R50-ibn.yml --input /content/drive/MyDrive/fast-reid/datasets/my_data/*jpg --output /content/drive/MyDrive/fast-reid/output

but got another inconpatible model and weights:

'heads.classifier.weight' has shape (575, 2048) in the checkpoint but (0, 2048) in the model! Skipped.

as in Capture

Is there a compatible pretrained model that I can start with?

Thank you

L1aoXingyu commented 2 years ago

You can change the pre-trained model by yourself. Actually, you can load pth file using torch.load(file), then change the key that didn't match.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 30 days with no activity.