OCRModelConfig.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Copyright (c) 2021 raoyutian Authors. All Rights Reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. namespace PaddleOCRSharp
  15. {
  16. /// <summary>
  17. /// 模型配置对象
  18. /// </summary>
  19. public class OCRModelConfig
  20. {
  21. /// <summary>
  22. /// det_infer模型路径
  23. /// </summary>
  24. public string det_infer { get; set; }
  25. /// <summary>
  26. /// cls_infer模型路径
  27. /// </summary>
  28. public string cls_infer { get; set; }
  29. /// <summary>
  30. /// rec_infer模型路径
  31. /// </summary>
  32. public string rec_infer { get; set; }
  33. /// <summary>
  34. /// ppocr_keys.txt文件名全路径
  35. /// </summary>
  36. public string keys { get; set; }
  37. }
  38. /// <summary>
  39. /// 表格模型配置对象
  40. /// </summary>
  41. public class StructureModelConfig : OCRModelConfig
  42. {
  43. /// <summary>
  44. /// table_model_dir模型路径
  45. /// </summary>
  46. public string table_model_dir { get; set; }
  47. /// <summary>
  48. /// 表格识别字典
  49. /// </summary>
  50. public string table_char_dict_path { get; set; }
  51. }
  52. }