yangxue0827 / RotationDetection

This is a tensorflow-based rotation detection benchmark, also called AlphaRotate.
https://rotationdetection.readthedocs.io/
Apache License 2.0
1.07k stars 180 forks source link

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

Open daili650 opened 2 years ago

daili650 commented 2 years ago

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 commented 2 years ago

能留一个联系方式吗

yangxue0827 commented 2 years ago

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

daili650 commented 2 years ago

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

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

daili650 commented 2 years ago

能留一个联系方式吗

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

yangxue0827 commented 2 years ago

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

daili650 commented 2 years ago

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

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

yangxue0827 commented 2 years ago

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

daili650 commented 2 years ago

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

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