params.py 634 B

1234567891011121314151617181920212223242526272829
  1. # -*- coding:utf-8 -*-
  2. from __future__ import absolute_import
  3. from __future__ import division
  4. from __future__ import print_function
  5. class Config(object):
  6. pass
  7. def read_params():
  8. cfg = Config()
  9. #params for text recognizer
  10. cfg.rec_algorithm = "CRNN"
  11. cfg.rec_model_dir = "./inference/ch_ppocr_mobile_v2.0_rec_infer/"
  12. cfg.rec_image_shape = "3, 32, 320"
  13. cfg.rec_char_type = 'ch'
  14. cfg.rec_batch_num = 30
  15. cfg.max_text_length = 25
  16. cfg.rec_char_dict_path = "./ppocr/utils/ppocr_keys_v1.txt"
  17. cfg.use_space_char = True
  18. cfg.use_pdserving = False
  19. cfg.use_tensorrt = False
  20. return cfg