Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

求教,按教程来的但没法复现,train和interface都出现了同样的问题 #58

Open
PaiDaxing114514 opened this issue Nov 24, 2023 · 3 comments

Comments

@PaiDaxing114514
Copy link

train的output.log
Start training
Traceback (most recent call last):
File "main.py", line 332, in
main(args)
File "main.py", line 305, in main
model, criterion, data_loader_train, optimizer, device, epoch, args.clip_max_norm)
File "E:\ZCH\MOTRv2-main\exps\motrv2\run3\engine.py", line 39, in train_one_epoch_mot
for data_dict in metric_logger.log_every(data_loader, print_freq, header):
File "E:\ZCH\MOTRv2-main\exps\motrv2\run3\util\misc.py", line 229, in log_every
for obj in iterable:
File "D:\Anaconda\envs\motrv2\lib\site-packages\torch\utils\data\dataloader.py", line 517, in next
data = self._next_data()
File "D:\Anaconda\envs\motrv2\lib\site-packages\torch\utils\data\dataloader.py", line 557, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "D:\Anaconda\envs\motrv2\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\Anaconda\envs\motrv2\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "E:\ZCH\MOTRv2-main\exps\motrv2\run3\datasets\dance.py", line 224, in getitem
images, targets = self.pre_continuous_frames(vid, indices)
File "E:\ZCH\MOTRv2-main\exps\motrv2\run3\datasets\dance.py", line 211, in pre_continuous_frames
return zip([self._pre_single_frame(vid, i) for i in indices])
File "E:\ZCH\MOTRv2-main\exps\motrv2\run3\datasets\dance.py", line 211, in
return zip(
[self._pre_single_frame(vid, i) for i in indices])
File "E:\ZCH\MOTRv2-main\exps\motrv2\run3\datasets\dance.py", line 186, in _pre_single_frame
for line in self.det_db[txt_key]:
KeyError: 'DanceTrack/train\dancetrack0016\img1\00001220.txt'
Traceback (most recent call last):
File "D:\Anaconda\envs\motrv2\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "D:\Anaconda\envs\motrv2\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\Anaconda\envs\motrv2\lib\site-packages\torch\distributed\launch.py", line 340, in
main()
File "D:\Anaconda\envs\motrv2\lib\site-packages\torch\distributed\launch.py", line 326, in main
sigkill_handler(signal.SIGTERM, None) # not coming back
File "D:\Anaconda\envs\motrv2\lib\site-packages\torch\distributed\launch.py", line 301, in sigkill_handler
raise subprocess.CalledProcessError(returncode=last_return_code, cmd=cmd)
subprocess.CalledProcessError: Command '['D:\Anaconda\envs\motrv2\python.exe', '-u', 'main.py', '--meta_arch', 'motr', '--dataset_file', 'e2e_dance', '--epoch', '5', '--with_box_refine', '--lr_drop', '4', '--lr', '2e-4', '--lr_backbone', '2e-5', '--pretrained', 'E:/ZCH/MOTRv2-main/data/Dataset/DanceTrack/r50_deformable_detr_plus_iterative_bbox_refinement-checkpoint.pth', '--batch_size', '1', '--sample_mode', 'random_interval', '--sample_interval', '10', '--sampler_lengths', '5', '--merger_dropout', '0', '--dropout', '0', '--random_drop', '0.1', '--fp_ratio', '0.3', '--query_interaction_layer', 'QIMv2', '--query_denoise', '0.05', '--num_queries', '10', '--append_crowd', '--det_db', 'det_db_motrv2.json', '--use_checkpoint', '--output_dir', '.']' returned non-zero exit status 1.
Killing subprocess 17460

@PaiDaxing114514
Copy link
Author

Why do we get keyerror

@PaiDaxing114514
Copy link
Author

interface Keyerror:
Training with Self-Cross Attention.
loaded ./motrv2_dancetrack.pth
0%| | 0/1203 [00:00<?, ?it/s]
Traceback (most recent call last):
File "submit_dance.py", line 211, in
det.detect(args.score_threshold)
File "submit_dance.py", line 118, in detect
for i, data in enumerate(tqdm(loader)):
File "D:\Anaconda\envs\motrv2\lib\site-packages\tqdm\std.py", line 1182, in iter
for obj in iterable:
File "D:\Anaconda\envs\motrv2\lib\site-packages\torch\utils\data\dataloader.py", line 517, in next
data = self._next_data()
File "D:\Anaconda\envs\motrv2\lib\site-packages\torch\utils\data\dataloader.py", line 557, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "D:\Anaconda\envs\motrv2\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\Anaconda\envs\motrv2\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "submit_dance.py", line 76, in getitem
img, proposals = self.load_img_from_file(self.img_list[index])
File "submit_dance.py", line 50, in load_img_from_file
for line in self.det_db[f_path[:-4] + '.txt']:
KeyError: 'DanceTrack/test\dancetrack0003\img1\00000001.txt'

@dcstempt
Copy link

the right key is "'DanceTrack\test\dancetrack0003\img1\00000001.txt'",
not "'DanceTrack/test\dancetrack0003\img1\00000001.txt'".
Do not use "/"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants