config.json 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. {
  2. "Global": {
  3. "model_name": "PP-OCRv5_server_det"
  4. },
  5. "Hpi": {
  6. "backend_configs": {
  7. "paddle_infer": {
  8. "trt_dynamic_shapes": {
  9. "x": [
  10. [
  11. 1,
  12. 3,
  13. 32,
  14. 32
  15. ],
  16. [
  17. 1,
  18. 3,
  19. 736,
  20. 736
  21. ],
  22. [
  23. 1,
  24. 3,
  25. 4000,
  26. 4000
  27. ]
  28. ]
  29. }
  30. },
  31. "tensorrt": {
  32. "dynamic_shapes": {
  33. "x": [
  34. [
  35. 1,
  36. 3,
  37. 32,
  38. 32
  39. ],
  40. [
  41. 1,
  42. 3,
  43. 736,
  44. 736
  45. ],
  46. [
  47. 1,
  48. 3,
  49. 4000,
  50. 4000
  51. ]
  52. ]
  53. }
  54. }
  55. }
  56. },
  57. "PreProcess": {
  58. "transform_ops": [
  59. {
  60. "DecodeImage": {
  61. "channel_first": false,
  62. "img_mode": "BGR"
  63. }
  64. },
  65. {
  66. "DetLabelEncode": null
  67. },
  68. {
  69. "DetResizeForTest": {
  70. "resize_long": 960
  71. }
  72. },
  73. {
  74. "NormalizeImage": {
  75. "mean": [
  76. 0.485,
  77. 0.456,
  78. 0.406
  79. ],
  80. "order": "hwc",
  81. "scale": "1./255.",
  82. "std": [
  83. 0.229,
  84. 0.224,
  85. 0.225
  86. ]
  87. }
  88. },
  89. {
  90. "ToCHWImage": null
  91. },
  92. {
  93. "KeepKeys": {
  94. "keep_keys": [
  95. "image",
  96. "shape",
  97. "polys",
  98. "ignore_tags"
  99. ]
  100. }
  101. }
  102. ]
  103. },
  104. "PostProcess": {
  105. "name": "DBPostProcess",
  106. "thresh": 0.3,
  107. "box_thresh": 0.6,
  108. "max_candidates": 1000,
  109. "unclip_ratio": 1.5
  110. }
  111. }