mirror of
https://github.com/RapidAI/RapidOCR.git
synced 2026-11-12 05:50:49 +08:00
chore(rapidocr_onnxruntime): Optim tips
This commit is contained in:
1 parent
5891ba2142
commit
a291ca1dcb
2 files changed
+30
-54
No files matched your search
@@ -40,18 +40,8 @@ def init_args():
|
||||
global_group.add_argument("--inter_op_num_threads", type=int, default=-1)
|
||||
|
||||
det_group = parser.add_argument_group(title="Det")
|
||||
det_group.add_argument(
|
||||
"--det_use_cuda",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Whether to use cuda. The prerequisite is: first uninstall all onnxruntime packages and install only the onnxruntime-gpu library.",
|
||||
)
|
||||
det_group.add_argument(
|
||||
"--det_use_dml",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Whether to use DirectML. The prerequisite is: the operating system is Windows 10+. First uninstall all onnxruntime packages and install only the onnxruntime-directml library.",
|
||||
)
|
||||
det_group.add_argument("--det_use_cuda", action="store_true", default=False)
|
||||
det_group.add_argument("--det_use_dml", action="store_true", default=False)
|
||||
det_group.add_argument("--det_model_path", type=str, default=None)
|
||||
det_group.add_argument("--det_limit_side_len", type=float, default=736)
|
||||
det_group.add_argument(
|
||||
@@ -68,18 +58,8 @@ def init_args():
|
||||
)
|
||||
|
||||
cls_group = parser.add_argument_group(title="Cls")
|
||||
cls_group.add_argument(
|
||||
"--cls_use_cuda",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Whether to use cuda. The prerequisite is: first uninstall all onnxruntime packages and install only the onnxruntime-gpu library.",
|
||||
)
|
||||
cls_group.add_argument(
|
||||
"--cls_use_dml",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Whether to use DirectML. The prerequisite is: the operating system is Windows 10+. First uninstall all onnxruntime packages and install only the onnxruntime-directml library.",
|
||||
)
|
||||
cls_group.add_argument("--cls_use_cuda", action="store_true", default=False)
|
||||
cls_group.add_argument("--cls_use_dml", action="store_true", default=False)
|
||||
cls_group.add_argument("--cls_model_path", type=str, default=None)
|
||||
cls_group.add_argument("--cls_image_shape", type=list, default=[3, 48, 192])
|
||||
cls_group.add_argument("--cls_label_list", type=list, default=["0", "180"])
|
||||
@@ -87,18 +67,8 @@ def init_args():
|
||||
cls_group.add_argument("--cls_thresh", type=float, default=0.9)
|
||||
|
||||
rec_group = parser.add_argument_group(title="Rec")
|
||||
rec_group.add_argument(
|
||||
"--rec_use_cuda",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Whether to use cuda. The prerequisite is: first uninstall all onnxruntime packages and install only the onnxruntime-gpu library.",
|
||||
)
|
||||
rec_group.add_argument(
|
||||
"--rec_use_dml",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Whether to use DirectML. The prerequisite is: the operating system is Windows 10+. First uninstall all onnxruntime packages and install only the onnxruntime-directml library.",
|
||||
)
|
||||
rec_group.add_argument("--rec_use_cuda", action="store_true", default=False)
|
||||
rec_group.add_argument("--rec_use_dml", action="store_true", default=False)
|
||||
rec_group.add_argument("--rec_model_path", type=str, default=None)
|
||||
rec_group.add_argument("--rec_keys_path", type=str, default=None)
|
||||
rec_group.add_argument("--rec_img_shape", type=list, default=[3, 48, 320])
|
||||
|
||||
Reference in new issue
Block a user