DOTA_devkit icon indicating copy to clipboard operation
DOTA_devkit copied to clipboard

Error in ResultMerge.py

Open Smoothing97 opened this issue 5 years ago • 4 comments

按照readme走流程,特意用了example的几张图片,分割处理数据然后valid,得到了15个results文件,大概如下: P1234__1__0___2976 0.011820 696.137329 983.967957 756.505493 1024.000000 P1234__1__0___2976 0.010101 1.000000 924.940125 19.290693 969.360168 P1234__1__0___2976 0.008857 795.971069 960.030212 853.479736 1024.000000 P1234__1__0___2976 0.008307 1.000000 979.919922 124.899353 1024.000000 P1234__1__0___2976 0.010262 560.123779 828.110779 578.821289 863.667175 P1234__1__0___2976 0.010617 538.470886 988.313965 599.414612 1024.000000 P1234__1__0___2976 0.010275 764.724182 968.561584 819.250671 1024.000000 P1234__1__0___2976 0.009946 1004.529358 704.344116 1024.000000 733.913330

放到resultmerge.py,src_path=15个results的存放路径,dct_path=新建存放路径,总报错: (mytensorflow) aa@aa-GPU:~/DOTA_YOLOv2/DOTA_devkit$ python ResultMerge.py Traceback (most recent call last): File "ResultMerge.py", line 161, in mergebypoly(r'path_to_configure', r'path_to_configure') File "ResultMerge.py", line 158, in mergebypoly py_cpu_nms_poly) File "ResultMerge.py", line 127, in mergebase nameboxnmsdict = nmsbynamedict(nameboxdict, nms, nms_thresh) File "ResultMerge.py", line 76, in nmsbynamedict keep = nms(np.array(nameboxdict[imgname]), thresh) File "ResultMerge.py", line 12, in py_cpu_nms_poly scores = dets[:, 8] IndexError: index 8 is out of bounds for axis 1 with size 5

Smoothing97 avatar Mar 10 '19 13:03 Smoothing97

因为你的结果是Task2的,所以你应该使用mergebyrec()而不是mergebypoly

dingjiansw101 avatar Mar 11 '19 02:03 dingjiansw101

谢谢您的指点,跑出结果了,但是用dota_evaluation_task2.py测map结果不太好: ... classname: ship check fp: [ 1. 1. 1. ..., 1. 1. 1.] check tp [ 0. 0. 0. ..., 0. 0. 0.] npos num: 555 ap: 1.37685416361e-05 ... classname: helicopter check fp: [ 1. 1. 1. ..., 1. 1. 1.] check tp [ 0. 0. 0. ..., 0. 0. 0.] npos num: 0 ap: 0.0 map: 9.21994456949e-06 classaps: [ 0.00310588 0.00575313 0. 0. 0. 0.00032483 0.00137685 0.00151971 0. 0.00174951 0. 0. 0. 0. 0. ] 困惑,我是按照教程摸索来的,但是不知道哪里出了问题

Smoothing97 avatar Mar 11 '19 06:03 Smoothing97

你是用的我们提供的模型跑的结果,还是自己训练的?

dingjiansw101 avatar Mar 11 '19 12:03 dingjiansw101

我想问一下怎么获取15个results?

Yanhong-Li avatar Aug 26 '19 11:08 Yanhong-Li