RotationDetection icon indicating copy to clipboard operation
RotationDetection copied to clipboard

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

Open daili650 opened this issue 3 years ago • 8 comments

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,接着训练其他网络,能成功训练,但是不能测试,同时前面的网络也不能测试了

daili650 avatar Jan 25 '22 14:01 daili650

能留一个联系方式吗

Cherich-GL avatar Jan 26 '22 05:01 Cherich-GL

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

yangxue0827 avatar Jan 28 '22 04:01 yangxue0827

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

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

daili650 avatar Jan 28 '22 04:01 daili650

能留一个联系方式吗

[email protected],你把联系方式发我,我加你吧

daili650 avatar Jan 28 '22 04:01 daili650

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

yangxue0827 avatar Jan 28 '22 05:01 yangxue0827

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

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

daili650 avatar Jan 28 '22 05:01 daili650

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

yangxue0827 avatar Jan 28 '22 05:01 yangxue0827

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

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

daili650 avatar Jan 28 '22 05:01 daili650