params.py 509 B

123456789101112131415161718192021222324
  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 classifier
  10. cfg.cls_model_dir = "./inference/ch_ppocr_mobile_v2.0_cls_infer/"
  11. cfg.cls_image_shape = "3, 48, 192"
  12. cfg.label_list = ['0', '180']
  13. cfg.cls_batch_num = 30
  14. cfg.cls_thresh = 0.9
  15. cfg.use_pdserving = False
  16. cfg.use_tensorrt = False
  17. return cfg