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多个网络后,test出现问题 #84

Open
daili650 opened this issue Jan 25, 2022 · 8 comments
Open

train多个网络后,test出现问题 #84

daili650 opened this issue Jan 25, 2022 · 8 comments

Comments

@daili650
Copy link

Traceback (most recent call last):
File "", line 1, in
File "D:\PyCharm 2020.1\plugins\python\helpers\pydev_pydev_bundle\pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "D:\PyCharm 2020.1\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "I:/projects/RotationDetection-new/tools/gwd/test_dota.py", line 33, in
tester.eval()
File "I:/projects/RotationDetection-new/tools/gwd/test_dota.py", line 25, in eval
self.test_dota(det_net=gwd, real_test_img_list=real_test_img_list, txt_name=txt_name)
File "I:\projects\RotationDetection-new\tools\test_dota_base.py", line 310, in test_dota
proc = self.test(int(gpu_id), split_records, det_net, result_queue)
File "I:\projects\RotationDetection-new\tools\test_dota_base.py", line 281, in test
float(threshold[self.label_name_map[sub_class]]), 0)
KeyError: 9
train一个网络后,能成功test,接着训练其他网络,能成功训练,但是不能测试,同时前面的网络也不能测试了

@Cherich-GL
Copy link

能留一个联系方式吗

@yangxue0827
Copy link
Owner

KeyError: 9
是不是你类别数量和对应的label_dict.py没改

@daili650
Copy link
Author

KeyError: 9
是不是你类别数量和对应的label_dict.py没改

用的是自己制作的同一个数据集

@daili650
Copy link
Author

能留一个联系方式吗

1466908765@qq.com,你把联系方式发我,我加你吧

@yangxue0827
Copy link
Owner

所以你需要改类别总数,已经修改对应的label_dict.py
image

@daili650
Copy link
Author

所以你需要改类别总数,已经修改对应的label_dict.py
image

我已经修改过了,成功训练过一个网络,第二次才会出现问题

@yangxue0827
Copy link
Owner

你可以debug,看它找的是label_dict.py里的哪个数据集

@daili650
Copy link
Author

daili650 commented Jan 28, 2022

你可以debug,看它找的是label_dict.py里的哪个数据集

我是模仿的dota数据集,修改了label_dict.py的DOTA数据集,
1643359525(1)
但是在test_dota_base.py中,self.cfgs.CLASS_NUM依旧为15,
1643359649(1)

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

3 participants