在完成PaddleOCR体验小作业的时候,训练正常,但是测试报错
Created by: deep-practice
在完成PaddleOCR体验小作业的时候,训练正常,但是测试报错: 单张检测: export PYTHONPATH=. && python3 tools/infer_det.py -c configs/det/det_db_mv3.yml -o TestReader="./imgs/image_819.jpg"
2020-07-24 09:17:53,837-INFO: Finish initing model from ./output/det_db/best_accuracy Traceback (most recent call last): File "tools/infer_det.py", line 150, in main() File "tools/infer_det.py", line 107, in main test_reader = reader_main(config=config, mode='test') File "/home/aistudio/ppocr/data/reader_main.py", line 64, in reader_main params['mode'] = mode TypeError: 'str' object does not support item assignment
单张识别: export PYTHONPATH=. && python3 tools/infer_rec.py -c configs/rec/rec_icdar15_train.yml -o Global.infer_img=./imgs/text_line.jpg
Traceback (most recent call last): File "tools/infer_rec.py", line 40, in from ppocr.data.reader_main import test_reader ImportError: cannot import name 'test_reader' from 'ppocr.data.reader_main' (/home/aistudio/ppocr/data/reader_main.py)