ReDet icon indicating copy to clipboard operation
ReDet copied to clipboard

换faster-rcnn做实验

Open Znc1996 opened this issue 4 years ago • 5 comments

为什么无法从results.pkl文件生成Task1_results结果,(数据集是HRSC2016) 在执行python tools/parse_results.py --config configs/faster_rcnn_r50_fpn_1x.py --type OBB总是在报错:IndexError: tuple index out of range 不好意思,打搅您了,希望您能看到后回复,谢谢!

Znc1996 avatar Aug 27 '21 01:08 Znc1996

为什么无法从results.pkl文件生成Task1_results结果,(数据集是HRSC2016) 在执行python tools/parse_results.py --config configs/faster_rcnn_r50_fpn_1x.py --type OBB总是在报错:IndexError: tuple index out of range 不好意思,打搅您了,希望您能看到后回复,谢谢!

我也出现类似的问题 只能生成Task1_result 无法生成完整的nms和Task2

colsona avatar Aug 27 '21 12:08 colsona

由于HRSC2016 a)不需要split image&merge results,b)没有HBB task。请将下面代码注释掉: https://github.com/csuhan/ReDet/blob/0b9addf3c2734659fd6ffc7824f2e659fde4419c/tools/parse_results.py#L96-L120

csuhan avatar Sep 01 '21 09:09 csuhan

由于HRSC2016 a)不需要split image&merge results,b)没有HBB task。请将下面代码注释掉: https://github.com/csuhan/ReDet/blob/0b9addf3c2734659fd6ffc7824f2e659fde4419c/tools/parse_results.py#L96-L120

不好意思,打扰了,如果是用了切割图形,用的faster-rcnn配置文件训练,最后也应该需要Task1_results_nms的文件夹对图片进行拼接,但是如果正常运行parse_results的话会出现index 8 is out of bounds for axis 1 with size 5;如果运行上面您说的去除代码之后只有一个task1_results的文件夹,是切割后图片的结果,这在最后评估得到ap的时候会因为是切割图片的结果无法与大图进行匹配。

colsona avatar Sep 03 '21 06:09 colsona

这里注释掉一部分指的是HRSC2016测试,DOTA不需要注释。

csuhan avatar Sep 03 '21 06:09 csuhan

这里注释掉一部分指的是HRSC2016测试,DOTA不需要注释。

谢谢回复,我这里是用的自己的数据集,用的您的模型。ReDet没有问题,能出结果是我换用faster系列做测验的时候,在用parse_results.py的时候无法正常生成Task_results_nms文件夹,并报错 `multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/home/colsna/anaconda3/envs/python37/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/home/colsna/anaconda3/envs/python37/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar return list(map(*args)) File "/home/colsna/code/ReDet/DOTA_devkit/ResultMerge_multi_process.py", line 196, in mergesingle nameboxnmsdict = nmsbynamedict(nameboxdict, nms, nms_thresh) File "/home/colsna/code/ReDet/DOTA_devkit/ResultMerge_multi_process.py", line 149, in nmsbynamedict keep = nms(np.array(nameboxdict[imgname]), thresh) File "/home/colsna/code/ReDet/DOTA_devkit/ResultMerge_multi_process.py", line 75, in py_cpu_nms_poly_fast scores = dets[:, 8] IndexError: index 8 is out of bounds for axis 1 with size 5 """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/colsna/code/ReDet/tools/parse_results.py", line 138, in parse_results(config_file, pkl_file, output_path, type) File "/home/colsna/code/ReDet/tools/parse_results.py", line 103, in parse_results os.path.join(dstpath, 'Task1_results_nms'), nms_type=r'py_cpu_nms_poly_fast', o_thresh=current_thresh) File "/home/colsna/code/ReDet/DOTA_devkit/ResultMerge_multi_process.py", line 235, in mergebypoly_multiprocess py_cpu_nms_poly_fast, o_thresh) File "/home/colsna/code/ReDet/DOTA_devkit/ResultMerge_multi_process.py", line 213, in mergebase_parallel pool.map(mergesingle_fn, filelist) File "/home/colsna/anaconda3/envs/python37/lib/python3.7/multiprocessing/pool.py", line 268, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/home/colsna/anaconda3/envs/python37/lib/python3.7/multiprocessing/pool.py", line 657, in get raise self._value IndexError: index 8 is out of bounds for axis 1 with size 5

colsona avatar Sep 03 '21 10:09 colsona