Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom model not working #47

Closed
tvone opened this issue Jan 1, 2024 · 1 comment
Closed

Custom model not working #47

tvone opened this issue Jan 1, 2024 · 1 comment

Comments

@tvone
Copy link

tvone commented Jan 1, 2024

请提供下述完整信息以便快速定位问题
(Please provide the following information to quickly locate the problem)

  • 系统环境/System Environment: windowns
  • 使用的是哪门语言的程序/Which programing language: python 3.10
  • 所使用语言相关版本信息/Version: latest
  • OnnxRuntime版本/OnnxRuntime Version: latest
  • 使用当前库的版本/Use version: latest
  • 可复现问题的demo和文件/Demo of reproducible problems:
  • 完整报错/Complete Error Message:
    CR: 0%| | 0/303 [00:02<?, ?it/s]
    Traceback (most recent call last):
    File "C:\Users\X\Desktop\rapidOCR\RapidVideOCR\onlyOCR.py", line 10, in
    extractor(rgb_dir, save_dir, save_name=save_name)
    File "C:\Users\X\Desktop\rapidOCR\venv\lib\site-packages\rapid_videocr\rapid_videocr.py", line 85, in call
    srt_result, txt_result = self.single_rec(img_list)
    File "C:\Users\X\Desktop\rapidOCR\venv\lib\site-packages\rapid_videocr\rapid_videocr.py", line 103, in single_rec
    dt_boxes, rec_res = self.run_ocr(img)
    File "C:\Users\X\Desktop\rapidOCR\venv\lib\site-packages\rapid_videocr\rapid_videocr.py", line 224, in run_ocr
    ocr_result, _ = self.rapid_ocr(img)
    File "C:\Users\X\Desktop\rapidOCR\venv\lib\site-packages\rapidocr_onnxruntime\rapid_ocr_api.py", line 91, in call
    rec_res, rec_elapse = self.text_recognizer(img_crop_list)
    File "C:\Users\X\Desktop\rapidOCR\venv\lib\site-packages\rapidocr_onnxruntime\ch_ppocr_v3_rec\text_recognize.py", line 71, in call
    rec_result = self.postprocess_op(preds)
    File "C:\Users\X\Desktop\rapidOCR\venv\lib\site-packages\rapidocr_onnxruntime\ch_ppocr_v3_rec\utils.py", line 36, in call
    text = self.decode(preds_idx, preds_prob, is_remove_duplicate=True)
    File "C:\Users\X\Desktop\rapidOCR\venv\lib\site-packages\rapidocr_onnxruntime\ch_ppocr_v3_rec\utils.py", line 68, in decode
    char_list.append(self.character[int(text_index[batch_idx][idx])])
    IndexError: list index out of range
  • 可能的解决方案/Possible solutions:
    image
@tvone
Copy link
Author

tvone commented Jan 1, 2024

Sorry, I converted the wrong model, I fixed it

@SWHL SWHL closed this as completed Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants