visionml / pytracking

Visual tracking library based on PyTorch.
GNU General Public License v3.0
3.2k stars 603 forks source link

KeyError: 'Nf1aqv5Fg5o_0' #156

Closed meimeixu520 closed 3 years ago

meimeixu520 commented 4 years ago

Hi,thanks your excellent work. When I train ATOM using the setting 'atom_paper.py',it uses the dataset TrackingNet,then shows the KeyError,but the dataset is correct.Can you tell me why?Look foward your reply! Best regards!

meimeixu520 commented 4 years ago

image

meimeixu520 commented 4 years ago

the error is as follows:

Training: bbreg atom_paper Traceback (most recent call last): File "run_training.py", line 56, in main() File "run_training.py", line 51, in main run_training(args.train_module, args.train_name, args.cudnn_benchmark) File "run_training.py", line 40, in run_training expr_func(settings) File "../ltr/train_settings/bbreg/atom_paper.py", line 27, in run trackingnet_train = TrackingNet(settings.env.trackingnet_dir, set_ids=list(range(11))) File "../ltr/dataset/tracking_net.py", line 71, in init self.seq_to_class_map, self.seq_per_class = self._load_class_info() File "../ltr/dataset/tracking_net.py", line 86, in _load_class_info class_name = seq_to_class_map[seq[1]] KeyError: 'Nf1aqv5Fg5o_0'

goutamgmb commented 4 years ago

Hi,

Thanks for notifying the issue. I am not entirely sure why the class name is missing for that sequence. Anyways I have pushed a fix for the issue. Could you try again with the latest commit?

meimeixu520 commented 4 years ago

Great,it works!But I account for another error,for example: image I check the parameters ,it is correct,so I don't know why it is wrong.Can you tell me? Best regards!

goutamgmb commented 4 years ago

It was another bug introduced in the latest release :(. I have fixed it now. Can you check again?

meimeixu520 commented 4 years ago

OK,it starts trainning!Thanks for your reply! I have another question,in the tracking prase,pytracking/pytracking/tracker/base/basetracker.py,it changes a lot,there is no previous initialization process.So how does it initialize?

meimeixu520 commented 4 years ago

when it run through the seventh epoch,it produces the following error: image

goutamgmb commented 4 years ago

Regarding the first question, I am not sure what do you mean. Could you please clarify?

Regarding the "too small bounding box" issue, yes we have seen this issue before. We will try to fix it.

danier97 commented 4 years ago

Hi,

The commit to fix this issue seems to have missed out other parts of the code that can raise the key error. E.g. in the same file (tracking_net.py) line 126 in function _get_class:

def _get_class(self, seq_id):
    seq_name = self.sequence_list[seq_id][1]
    return self.seq_to_class_map[seq_name]

Thanks

lerohiso commented 4 years ago

you can fix the "KeyError" by adding "Nf1aqv5Fg5o_0 airplane" line in trackingnet_classmap.txt file

meimeixu520 commented 4 years ago

Thank your reply,can you add my wechat,19966519787,then can you send me the picture or the way of solving the problem!Thanks very much! Best wishes!

------------------ 原始邮件 ------------------ 发件人: "visionml/pytracking" <notifications@github.com>; 发送时间: 2020年9月10日(星期四) 下午3:38 收件人: "visionml/pytracking"<pytracking@noreply.github.com>; 抄送: "别做白日梦了??"<1398629150@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [visionml/pytracking] KeyError: 'Nf1aqv5Fg5o_0' (#156)

you can fix the "KeyError" by adding "Nf1aqv5Fg5o_0 airplane" line in trackingnet_classmap.txt file

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

martin-danelljan commented 4 years ago

@lerohiso Thank you very much for giving the solution! It should be fixed now.

zj717754140 commented 4 years ago

I clone the repo recently,I also meet the same problem KeyError: 'Nf1aqv5Fg5o_0' in Training.How to solve this

KeyError: Caught KeyError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/jzhang/anaconda3/envs/pytracking/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 185, in _worker_loop data = fetcher.fetch(index) File "/home/jzhang/anaconda3/envs/pytracking/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/jzhang/anaconda3/envs/pytracking/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/jzhang/VisualTracking/pytracking/ltr/data/sampler.py", line 159, in __getitem__ train_frames, train_anno, meta_obj_train = dataset.get_frames(seq_id, train_frame_ids, seq_info_dict) File "/home/jzhang/VisualTracking/pytracking/ltr/dataset/tracking_net.py", line 143, in get_frames obj_class = self._get_class(seq_id) File "/home/jzhang/VisualTracking/pytracking/ltr/dataset/tracking_net.py", line 126, in _get_class return self.seq_to_class_map[seq_name] KeyError: 'Nf1aqv5Fg5o_0'

martin-danelljan commented 4 years ago

@zj717754140 When was "recently" exactly? Can you try pulling first?