open-mmlab / mmocr

OpenMMLab Text Detection, Recognition and Understanding Toolbox
https://mmocr.readthedocs.io/en/dev-1.x/
Apache License 2.0
4.27k stars 743 forks source link

请问:使用FCE_IC15 检测的时候报错,但是像使用TextSnake和SEG就没有这个问题 (Only one file(not dir) is allowed in the zipfile) #393

Closed JNUChenYiHong closed 3 years ago

JNUChenYiHong commented 3 years ago

(mmocr) [cyh@localhost mmorc_project]$ python mmocr/utils/ocr.py ./input_img/1.jpg --output output_img/1.jpg --det FCE_IC15 --recog SEG --export output_img/ Use load_from_http loader Traceback (most recent call last): File "mmocr/utils/ocr.py", line 466, in main() File "mmocr/utils/ocr.py", line 281, in main ocr = MMOCR(**vars(args)) File "mmocr/utils/ocr.py", line 402, in init det_config, det_ckpt, device=self.device) File "/home/cyh/.virtualenvs/mmocr/lib/python3.6/site-packages/mmdet/apis/inference.py", line 42, in init_detector checkpoint = load_checkpoint(model, checkpoint, map_location=map_loc) File "/home/cyh/.virtualenvs/mmocr/lib/python3.6/site-packages/mmcv/runner/checkpoint.py", line 513, in load_checkpoint checkpoint = _load_checkpoint(filename, map_location, logger) File "/home/cyh/.virtualenvs/mmocr/lib/python3.6/site-packages/mmcv/runner/checkpoint.py", line 451, in _load_checkpoint return CheckpointLoader.load_checkpoint(filename, map_location, logger) File "/home/cyh/.virtualenvs/mmocr/lib/python3.6/site-packages/mmcv/runner/checkpoint.py", line 244, in load_checkpoint return checkpoint_loader(filename, map_location) File "/home/cyh/.virtualenvs/mmocr/lib/python3.6/site-packages/mmcv/runner/checkpoint.py", line 284, in load_from_http filename, model_dir=model_dir, map_location=map_location) File "/home/cyh/.virtualenvs/mmocr/lib/python3.6/site-packages/torch/hub.py", line 490, in load_state_dict_from_url raise RuntimeError('Only one file(not dir) is allowed in the zipfile') RuntimeError: Only one file(not dir) is allowed in the zipfile

gaotongxiao commented 3 years ago

Your checkpoint file may not be completely downloaded. You can clean the cache by running rm ~/.cache/torch/hub/checkpoints/fcenet* and re-run the script.

JNUChenYiHong commented 3 years ago

Thank you very much for your answer, but I have tried, and it still reports this error. At the same time, this error occurs when I use DRRG as det netwok. Maybe this is just a problem of my system. I will continue to try to solve it. Thank you very much for your answer and such a great open source project

gaotongxiao commented 3 years ago

Does the issue still persist in our latest update?

gaotongxiao commented 3 years ago

Closing this issue as no extra updates.