microsoft / FairMOT

This project provides an official implementation of our recent work on real-time multi-object tracking in videos. The previous works conduct object detection and tracking with two separate models so they are very slow. In contrast, we propose a one-stage solution which does detection and tracking with a single network by elegantly solving the alignment problem. The resulting approach achieves groundbreaking results in terms of both accuracy and speed: (1) it ranks first among all the trackers on the MOT challenges; (2) it is significantly faster than the previous state-of-the-arts. In addition, it scales gracefully to handle a large number of objects.
MIT License
163 stars 21 forks source link

KeyError: 'epoch' on running track.py with hrnetv2_w32_imagenet_pretrained.pth #10

Open adityamd opened 3 years ago

adityamd commented 3 years ago

Hello, I want to use the code with pretrained imagenet weights: hrnetv2_w32_imagenet_pretrained.pth ( given as the official fairmot implementation on imagenet dataset). However, running the command:

python track.py mot --load_model /content/FairMOT/models/hrnetv2_w32_imagenet_pretrained.pth --conf_thres 0.4 --data_dir /content/FairMOT --val_mot20 VAL_MOT20

gives me the following error:

Fix size testing.
training chunk_sizes: [6, 6]
The output will be saved to  /content/FairMOT/src/lib/../../exp/mot/default
heads {'hm': 1, 'wh': 2, 'id': 512, 'reg': 2}
2021-10-11 05:01:30 [INFO]: start seq: MOT20-01
Creating model...
Traceback (most recent call last):
  File "track.py", line 240, in <module>
    save_videos=False)
  File "track.py", line 112, in main
    save_dir=output_dir, show_image=show_image, frame_rate=frame_rate)
  File "track.py", line 56, in eval_seq
    tracker = JDETracker(opt, frame_rate=frame_rate)
  File "/content/FairMOT/src/lib/tracker/multitracker.py", line 181, in __init__
    self.model = load_model(self.model, opt.load_model)
  File "/content/FairMOT/src/lib/models/model.py", line 37, in load_model
    print('loaded {}, epoch {}'.format(model_path, checkpoint['epoch']))
KeyError: 'epoch'

Any help will be appreciated. Thank you