pipeline_arguments.py 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. # copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
  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. PIPELINE_ARGUMENTS = {
  15. "OCR": [
  16. {
  17. "name": "--use_doc_orientation_classify",
  18. "type": bool,
  19. "help": "Determines whether to use document orientation classification",
  20. },
  21. {
  22. "name": "--use_doc_unwarping",
  23. "type": bool,
  24. "help": "Determines whether to use document unwarping",
  25. },
  26. {
  27. "name": "--use_textline_orientation",
  28. "type": bool,
  29. "help": "Determines whether to consider text line orientation",
  30. },
  31. {
  32. "name": "--text_det_limit_side_len",
  33. "type": int,
  34. "help": "Sets the side length limit for text detection.",
  35. },
  36. {
  37. "name": "--text_det_limit_type",
  38. "type": str,
  39. "help": "Sets the limit type for text detection.",
  40. },
  41. {
  42. "name": "--text_det_thresh",
  43. "type": float,
  44. "help": "Sets the threshold for text detection.",
  45. },
  46. {
  47. "name": "--text_det_box_thresh",
  48. "type": float,
  49. "help": "Sets the box threshold for text detection.",
  50. },
  51. {
  52. "name": "--text_det_unclip_ratio",
  53. "type": float,
  54. "help": "Sets the unclip ratio for text detection.",
  55. },
  56. {
  57. "name": "--text_rec_score_thresh",
  58. "type": float,
  59. "help": "Sets the score threshold for text recognition.",
  60. },
  61. ],
  62. "object_detection": [
  63. {
  64. "name": "--threshold",
  65. "type": float,
  66. "help": "Sets the threshold for object detection.",
  67. },
  68. ],
  69. "image_classification": [
  70. {
  71. "name": "--topk",
  72. "type": int,
  73. "help": "Sets the Top-K value for image classification.",
  74. },
  75. ],
  76. "image_multilabel_classification": [
  77. {
  78. "name": "--threshold",
  79. "type": float,
  80. "help": "Sets the threshold for image multilabel classification.",
  81. },
  82. ],
  83. "pedestrian_attribute_recognition": [
  84. {
  85. "name": "--det_threshold",
  86. "type": float,
  87. "help": "Sets the threshold for human detection.",
  88. },
  89. {
  90. "name": "--cls_threshold",
  91. "type": float,
  92. "help": "Sets the threshold for pedestrian attribute recognition.",
  93. },
  94. ],
  95. "vehicle_attribute_recognition": [
  96. {
  97. "name": "--det_threshold",
  98. "type": float,
  99. "help": "Sets the threshold for vehicle detection.",
  100. },
  101. {
  102. "name": "--cls_threshold",
  103. "type": float,
  104. "help": "Sets the threshold for vehicle attribute recognition.",
  105. },
  106. ],
  107. "table_recognition": None,
  108. "layout_parsing": None,
  109. "seal_recognition": [
  110. {
  111. "name": "--use_doc_orientation_classify",
  112. "type": bool,
  113. "help": "Determines whether to use document preprocessing",
  114. },
  115. {
  116. "name": "--use_doc_unwarping",
  117. "type": bool,
  118. "help": "Determines whether to use document unwarping",
  119. },
  120. {
  121. "name": "--use_layout_detection",
  122. "type": bool,
  123. "help": "Determines whether to use document layout detection",
  124. },
  125. {
  126. "name": "--layout_threshold",
  127. "type": float,
  128. "help": "Determines confidence threshold for layout detection",
  129. },
  130. {
  131. "name": "--layout_nms",
  132. "type": bool,
  133. "help": "Determines whether to use non maximum suppression",
  134. },
  135. {
  136. "name": "--layout_unclip_ratio",
  137. "type": float,
  138. "help": "Determines unclip ratio for layout detection boxes",
  139. },
  140. {
  141. "name": "--layout_merge_bboxes_mode",
  142. "type": str,
  143. "help": "Determines merge mode for layout detection bboxes, 'union', 'large' or 'small'",
  144. },
  145. {
  146. "name": "--seal_det_limit_side_len",
  147. "type": int,
  148. "help": "Sets the side length limit for text detection.",
  149. },
  150. {
  151. "name": "--seal_det_limit_type",
  152. "type": str,
  153. "help": "Sets the limit type for text detection, 'min', 'max'.",
  154. },
  155. {
  156. "name": "--seal_det_thresh",
  157. "type": float,
  158. "help": "Sets the threshold for text detection.",
  159. },
  160. {
  161. "name": "--seal_det_box_thresh",
  162. "type": float,
  163. "help": "Sets the box threshold for text detection.",
  164. },
  165. {
  166. "name": "--seal_det_unclip_ratio",
  167. "type": float,
  168. "help": "Sets the unclip ratio for text detection.",
  169. },
  170. {
  171. "name": "--seal_rec_score_thresh",
  172. "type": float,
  173. "help": "Sets the score threshold for text recognition.",
  174. },
  175. ],
  176. "ts_forecast": None,
  177. "ts_anomaly_detection": None,
  178. "ts_classification": None,
  179. "formula_recognition": [
  180. {
  181. "name": "--use_layout_detection",
  182. "type": bool,
  183. "help": "Determines whether to use layout detection",
  184. },
  185. {
  186. "name": "--use_doc_orientation_classify",
  187. "type": bool,
  188. "help": "Determines whether to use document orientation classification",
  189. },
  190. {
  191. "name": "--use_doc_unwarping",
  192. "type": bool,
  193. "help": "Determines whether to use document unwarping",
  194. },
  195. {
  196. "name": "--layout_threshold",
  197. "type": float,
  198. "help": "Sets the layout threshold for layout detection.",
  199. },
  200. {
  201. "name": "--layout_nms",
  202. "type": bool,
  203. "help": "Determines whether to use layout nms",
  204. },
  205. {
  206. "name": "--layout_unclip_ratio",
  207. "type": float,
  208. "help": "Sets the layout unclip ratio for layout detection.",
  209. },
  210. {
  211. "name": "--layout_merge_bboxes_mode",
  212. "type": str,
  213. "help": "Sets the layout merge bboxes mode for layout detection.",
  214. },
  215. ],
  216. "instance_segmentation": None,
  217. "semantic_segmentation": None,
  218. "small_object_detection": None,
  219. "anomaly_detection": None,
  220. "video_classification": [
  221. {
  222. "name": "--topk",
  223. "type": int,
  224. "help": "Sets the Top-K value for video classification.",
  225. },
  226. ],
  227. "video_detection": [
  228. {
  229. "name": "--nms_thresh",
  230. "type": float,
  231. "help": "Sets the NMS threshold for video detection.",
  232. },
  233. {
  234. "name": "--score_thresh",
  235. "type": float,
  236. "help": "Sets the confidence threshold for video detection.",
  237. },
  238. ],
  239. "doc_preprocessor": [
  240. {
  241. "name": "--use_doc_orientation_classify",
  242. "type": bool,
  243. "help": "Determines whether to use document orientation classification.",
  244. },
  245. {
  246. "name": "--use_doc_unwarping",
  247. "type": bool,
  248. "help": "Determines whether to use document unwarping.",
  249. },
  250. ],
  251. }