PSENet.pytorch
PSENet.pytorch copied to clipboard
> > 看一下图片读进去没,如果你是在linux系统下,你最好进文件夹ls一下,看看是否有不是图片的文件
看一下图片读进去没,如果你是在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
这个问题怎么解决呢
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
查看已关闭的issue,发现数据的组织形式图片命名也应该加上“img_”