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

RuntimeError: Only one file(not dir) is allowed in the zipfile #489

Closed ChenCong7375 closed 2 years ago

ChenCong7375 commented 2 years ago

When I test FCE model to detect the error raised.

ChenCong7375 commented 2 years ago

image

gaotongxiao commented 2 years ago

Is your MMOCR up-to-date? I remember that it's due to the wrong link to FCENet in ocr.py but it already got fixed.

ChenCong7375 commented 2 years ago

Is your MMOCR up-to-date? I remember that it's due to the wrong link to FCENet in ocr.py but it already got fixed.

I use v0.3.0 I'll try to re-download the model

gaotongxiao commented 2 years ago

Does it work?

gaotongxiao commented 2 years ago

Similar to #516, this checkpoint turns out to be saved by newer PyTorch which offers no backward compatibility by default (https://github.com/pytorch/pytorch/issues/43106). We will run a thorough check and fix any incompatible checkpoints soon. Thanks for reporting!

usuyama commented 2 years ago

I just started using mmocr and hit the same issue e.g. python mmocr/utils/ocr.py demo/demo_text_det.jpg --print-result --output test_results --details --det FCE_CTW_DCNv2 -> RuntimeError: Only one file(not dir) is allowed in the zipfile

@gaotongxiao any quick workaround?

usuyama commented 2 years ago

FYI got the same error with https://download.openmmlab.com/mmocr/textdet/drrg/drrg_r50_fpn_unet_1200e_ctw1500-1abf4f67.pth

gaotongxiao commented 2 years ago

@usuyama Upload your PyTorch to 1.8.0 can be a quick fix