0

How to save PaddleOCR model? How to load it afterwards from the saved file?

I'd like to have something like this:

import PaddleOCR

model = PaddleOCR(use_angle_cls=True, lang='en')

save_path = '/some/custom/path'

# Save model - how?
model.save(save_path,...) # How to write this?

# Load model - how?
model = # load model from save_path

Alcibiades
  • 335
  • 5
  • 16

1 Answers1

0

If you are using a custom model (trained by you or found by you somewhere), you should refer to this page https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/doc/doc_en/algorithm_overview_en.md. In brief: After training, you need to export the model and then already use the line command interface to recognize it.

python3 tools/infer_*.py --your_model --etc # where * = rec, det, cls, sr
Patrick Klitzke
  • 1,519
  • 2
  • 14
  • 24
Viktor B.
  • 13
  • 2