WenmuZhou / PSENet.pytorch

A pytorch re-implementation of PSENet: Shape Robust Text Detection with Progressive Scale Expansion Network
GNU General Public License v3.0
462 stars 138 forks source link

> > 看一下图片读进去没,如果你是在linux系统下,你最好进文件夹ls一下,看看是否有不是图片的文件 #96

Open zzzzjx opened 3 years ago

zzzzjx commented 3 years ago

看一下图片读进去没,如果你是在linux系统下,你最好进文件夹ls一下,看看是否有不是图片的文件

谢谢,文件夹中多了一个自动生成的文件,删除解决了,但是在eval函数中(141-150行),boxes_list返回时空,导致报下面的错误:

Traceback (most recent call last): File "/mnt/data/ocr/psenet/PSENet.pytorch-master/cal_recall/rrc_evaluation_funcs.py", line 326, in main_evaluation evalData = evaluate_method_fn(p['g'], p['s'], evalParams) File "/mnt/data/ocr/psenet/PSENet.pytorch-master/cal_recall/script.py", line 136, in evaluate_method subm = rrc_evaluation_funcs.load_folder_file(submFilePath, evaluationParams['DET_SAMPLE_NAME_2_ID'], True) File "/mnt/data/ocr/psenet/PSENet.pytorch-master/cal_recall/rrc_evaluation_funcs.py", line 102, in load_folder_file raise Exception('ZIP entry not valid: %s' % name) Exception: ZIP entry not valid: res_F011912250373_002.txt Traceback (most recent call last): File "train.py", line 265, in main() File "train.py", line 219, in main recall, precision, f1 = eval(model, os.path.join(config.output_dir, 'output'), config.testroot, device) File "train.py", line 151, in eval return result_dict['recall'], result_dict['precision'], result_dict['hmean'] TypeError: string indices must be integers

是我迭代次数太少,导致没有检测到结果吗? 大神帮忙看看这是什么问题,非常感谢

这个问题的原因是因为数据集格式没有按照Readme里面说的格式而产生的,可以修改数据集格式,或者修改script.py里default_evaluation_params里面的匹配规则。

Originally posted by @xunlonghuang in https://github.com/WenmuZhou/PSENet.pytorch/issues/77#issuecomment-732745288

zzzzjx commented 3 years ago

这个问题怎么解决呢

zzzzjx commented 3 years ago

Traceback (most recent call last): File "/mnt/data/ocr/psenet/PSENet.pytorch-master/cal_recall/rrc_evaluation_funcs.py", line 326, in main_evaluation evalData = evaluate_method_fn(p['g'], p['s'], evalParams) File "/mnt/data/ocr/psenet/PSENet.pytorch-master/cal_recall/script.py", line 136, in evaluate_method subm = rrc_evaluation_funcs.load_folder_file(submFilePath, evaluationParams['DET_SAMPLE_NAME_2_ID'], True) File "/mnt/data/ocr/psenet/PSENet.pytorch-master/cal_recall/rrc_evaluation_funcs.py", line 102, in load_folder_file raise Exception('ZIP entry not valid: %s' % name) Exception: ZIP entry not valid: res_F011912250373_002.txt Traceback (most recent call last): File "train.py", line 265, in main() File "train.py", line 219, in main recall, precision, f1 = eval(model, os.path.join(config.output_dir, 'output'), config.testroot, device) File "train.py", line 151, in eval return result_dict['recall'], result_dict['precision'], result_dict['hmean'] TypeError: string indices must be integers

aojue1109 commented 3 years ago

查看已关闭的issue,发现数据的组织形式图片命名也应该加上“img_”