Closed JNUChenYiHong closed 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.
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
Does the issue still persist in our latest update?
Closing this issue as no extra updates.
(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