ifzhang / FairMOT

[IJCV-2021] FairMOT: On the Fairness of Detection and Re-Identification in Multi-Object Tracking
MIT License
4.01k stars 934 forks source link

ValueError: unsupported pickle protocol: 59 #52

Open WhiteDOU opened 4 years ago

WhiteDOU commented 4 years ago

When I tried to run 'sh experiments/all_dla34.sh', it comes to the error: Traceback (most recent call last): File "train.py", line 97, in main(opt) File "train.py", line 43, in main model = create_model(opt.arch, opt.heads, opt.head_conv) File "/home/huanzhang/code/fairmot/src/lib/models/model.py", line 25, in create_model model = get_model(num_layers=num_layers, heads=heads, head_conv=head_conv) File "/home/huanzhang/code/fairmot/src/lib/models/networks/pose_dla_dcn.py", line 490, in get_pose_net head_conv=head_conv) File "/home/huanzhang/code/fairmot/src/lib/models/networks/pose_dla_dcn.py", line 433, in init self.base = globals()base_name File "/home/huanzhang/code/fairmot/src/lib/models/networks/pose_dla_dcn.py", line 313, in dla34 model.load_pretrained_model(data='imagenet', name='dla34', hash='ba72cf86') File "/home/huanzhang/code/fairmot/src/lib/models/networks/pose_dla_dcn.py", line 299, in load_pretrained_model model_weights = model_zoo.load_url(model_url) File "/home/huanzhang/anaconda3/envs/fairmot/lib/python3.7/site-packages/torch/hub.py", line 463, in load_state_dict_from_url return torch.load(cached_file, map_location=map_location) File "/home/huanzhang/anaconda3/envs/fairmot/lib/python3.7/site-packages/torch/serialization.py", line 386, in load return _load(f, map_location, pickle_module, pickle_load_args) File "/home/huanzhang/anaconda3/envs/fairmot/lib/python3.7/site-packages/torch/serialization.py", line 563, in _load magic_number = pickle_module.load(f, pickle_load_args) ValueError: unsupported pickle protocol: 59

Could you help me to solve this? THX~

ifzhang commented 4 years ago

You can change pretrained=False here: https://github.com/ifzhang/FairMOT/blob/f41cefe20b89098c18c2b8dacd59ab2488bfd87e/src/lib/models/networks/pose_dla_dcn.py#L486 We do not need to load the imagenet pretrained model here. We load the coco pretrained model instead.

WhiteDOU commented 4 years ago

You can change pretrained=False here: https://github.com/ifzhang/FairMOT/blob/f41cefe20b89098c18c2b8dacd59ab2488bfd87e/src/lib/models/networks/pose_dla_dcn.py#L486

We do not need to load the imagenet pretrained model here. We load the coco pretrained model instead.

THX for your timely reply~. BTW, when I use 'demo' or 'train', it prints 'core dumped', then I cannot get access to my gpu(gpustat or nvidia-smi). Only restarting my Linux machine can re-visit my GPU. Moreover, when I test other code, this situation doesn't appear, could u help me?