params.py 746 B

12345678910111213141516171819202122232425262728293031323334
  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 detector
  10. cfg.det_algorithm = "DB"
  11. cfg.det_model_dir = "./inference/ch_ppocr_mobile_v2.0_det_infer/"
  12. cfg.det_limit_side_len = 960
  13. cfg.det_limit_type = 'max'
  14. #DB parmas
  15. cfg.det_db_thresh = 0.3
  16. cfg.det_db_box_thresh = 0.5
  17. cfg.det_db_unclip_ratio = 1.6
  18. cfg.use_dilation = False
  19. # #EAST parmas
  20. # cfg.det_east_score_thresh = 0.8
  21. # cfg.det_east_cover_thresh = 0.1
  22. # cfg.det_east_nms_thresh = 0.2
  23. cfg.use_pdserving = False
  24. cfg.use_tensorrt = False
  25. return cfg