tccli 3.0.1173.1__py2.py3-none-any.whl → 3.0.1174.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/services/asr/v20190614/api.json +2 -2
- tccli/services/ccc/v20200210/api.json +9 -0
- tccli/services/cfg/v20210820/api.json +25 -0
- tccli/services/cls/v20201016/api.json +148 -16
- tccli/services/cls/v20201016/examples.json +5 -5
- tccli/services/cwp/v20180228/api.json +41 -14
- tccli/services/ess/v20201111/examples.json +2 -2
- tccli/services/facefusion/v20181201/api.json +15 -21
- tccli/services/facefusion/v20220927/api.json +17 -21
- tccli/services/iotexplorer/v20190423/api.json +20 -10
- tccli/services/lighthouse/v20200324/api.json +18 -0
- tccli/services/mps/v20190612/api.json +47 -5
- tccli/services/ms/v20180408/api.json +46 -46
- tccli/services/ocr/ocr_client.py +413 -307
- tccli/services/ocr/v20181119/api.json +166 -4
- tccli/services/ocr/v20181119/examples.json +16 -0
- tccli/services/tdmq/v20200217/api.json +25 -6
- tccli/services/tmt/v20180321/api.json +1 -1
- tccli/services/vpc/v20170312/api.json +93 -0
- {tccli-3.0.1173.1.dist-info → tccli-3.0.1174.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1173.1.dist-info → tccli-3.0.1174.1.dist-info}/RECORD +25 -25
- {tccli-3.0.1173.1.dist-info → tccli-3.0.1174.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1173.1.dist-info → tccli-3.0.1174.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1173.1.dist-info → tccli-3.0.1174.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/ocr/ocr_client.py
CHANGED
@@ -17,7 +17,7 @@ from tencentcloud.ocr.v20181119 import models as models_v20181119
|
|
17
17
|
from jmespath import search
|
18
18
|
import time
|
19
19
|
|
20
|
-
def
|
20
|
+
def doTextDetect(args, parsed_globals):
|
21
21
|
g_param = parse_global_arg(parsed_globals)
|
22
22
|
|
23
23
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -46,11 +46,11 @@ def doInsuranceBillOCR(args, parsed_globals):
|
|
46
46
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
47
47
|
client._sdkVersion += ("_CLI_" + __version__)
|
48
48
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
-
model = models.
|
49
|
+
model = models.TextDetectRequest()
|
50
50
|
model.from_json_string(json.dumps(args))
|
51
51
|
start_time = time.time()
|
52
52
|
while True:
|
53
|
-
rsp = client.
|
53
|
+
rsp = client.TextDetect(model)
|
54
54
|
result = rsp.to_json_string()
|
55
55
|
try:
|
56
56
|
json_obj = json.loads(result)
|
@@ -69,7 +69,7 @@ def doInsuranceBillOCR(args, parsed_globals):
|
|
69
69
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
70
|
|
71
71
|
|
72
|
-
def
|
72
|
+
def doQrcodeOCR(args, parsed_globals):
|
73
73
|
g_param = parse_global_arg(parsed_globals)
|
74
74
|
|
75
75
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -98,11 +98,11 @@ def doImageEnhancement(args, parsed_globals):
|
|
98
98
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
99
99
|
client._sdkVersion += ("_CLI_" + __version__)
|
100
100
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
101
|
-
model = models.
|
101
|
+
model = models.QrcodeOCRRequest()
|
102
102
|
model.from_json_string(json.dumps(args))
|
103
103
|
start_time = time.time()
|
104
104
|
while True:
|
105
|
-
rsp = client.
|
105
|
+
rsp = client.QrcodeOCR(model)
|
106
106
|
result = rsp.to_json_string()
|
107
107
|
try:
|
108
108
|
json_obj = json.loads(result)
|
@@ -121,7 +121,7 @@ def doImageEnhancement(args, parsed_globals):
|
|
121
121
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
122
122
|
|
123
123
|
|
124
|
-
def
|
124
|
+
def doGeneralAccurateOCR(args, parsed_globals):
|
125
125
|
g_param = parse_global_arg(parsed_globals)
|
126
126
|
|
127
127
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -150,11 +150,11 @@ def doGeneralBasicOCR(args, parsed_globals):
|
|
150
150
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
151
151
|
client._sdkVersion += ("_CLI_" + __version__)
|
152
152
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
153
|
-
model = models.
|
153
|
+
model = models.GeneralAccurateOCRRequest()
|
154
154
|
model.from_json_string(json.dumps(args))
|
155
155
|
start_time = time.time()
|
156
156
|
while True:
|
157
|
-
rsp = client.
|
157
|
+
rsp = client.GeneralAccurateOCR(model)
|
158
158
|
result = rsp.to_json_string()
|
159
159
|
try:
|
160
160
|
json_obj = json.loads(result)
|
@@ -173,7 +173,7 @@ def doGeneralBasicOCR(args, parsed_globals):
|
|
173
173
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
174
|
|
175
175
|
|
176
|
-
def
|
176
|
+
def doRecognizeContainerOCR(args, parsed_globals):
|
177
177
|
g_param = parse_global_arg(parsed_globals)
|
178
178
|
|
179
179
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -202,11 +202,11 @@ def doSmartStructuralOCRV2(args, parsed_globals):
|
|
202
202
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
203
203
|
client._sdkVersion += ("_CLI_" + __version__)
|
204
204
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
205
|
-
model = models.
|
205
|
+
model = models.RecognizeContainerOCRRequest()
|
206
206
|
model.from_json_string(json.dumps(args))
|
207
207
|
start_time = time.time()
|
208
208
|
while True:
|
209
|
-
rsp = client.
|
209
|
+
rsp = client.RecognizeContainerOCR(model)
|
210
210
|
result = rsp.to_json_string()
|
211
211
|
try:
|
212
212
|
json_obj = json.loads(result)
|
@@ -225,7 +225,7 @@ def doSmartStructuralOCRV2(args, parsed_globals):
|
|
225
225
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
226
226
|
|
227
227
|
|
228
|
-
def
|
228
|
+
def doRecognizeEncryptedIDCardOCR(args, parsed_globals):
|
229
229
|
g_param = parse_global_arg(parsed_globals)
|
230
230
|
|
231
231
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -254,11 +254,11 @@ def doEnterpriseLicenseOCR(args, parsed_globals):
|
|
254
254
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
255
255
|
client._sdkVersion += ("_CLI_" + __version__)
|
256
256
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
257
|
-
model = models.
|
257
|
+
model = models.RecognizeEncryptedIDCardOCRRequest()
|
258
258
|
model.from_json_string(json.dumps(args))
|
259
259
|
start_time = time.time()
|
260
260
|
while True:
|
261
|
-
rsp = client.
|
261
|
+
rsp = client.RecognizeEncryptedIDCardOCR(model)
|
262
262
|
result = rsp.to_json_string()
|
263
263
|
try:
|
264
264
|
json_obj = json.loads(result)
|
@@ -277,7 +277,7 @@ def doEnterpriseLicenseOCR(args, parsed_globals):
|
|
277
277
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
278
|
|
279
279
|
|
280
|
-
def
|
280
|
+
def doRecognizeStoreName(args, parsed_globals):
|
281
281
|
g_param = parse_global_arg(parsed_globals)
|
282
282
|
|
283
283
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -306,11 +306,11 @@ def doBusinessCardOCR(args, parsed_globals):
|
|
306
306
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
307
307
|
client._sdkVersion += ("_CLI_" + __version__)
|
308
308
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
309
|
-
model = models.
|
309
|
+
model = models.RecognizeStoreNameRequest()
|
310
310
|
model.from_json_string(json.dumps(args))
|
311
311
|
start_time = time.time()
|
312
312
|
while True:
|
313
|
-
rsp = client.
|
313
|
+
rsp = client.RecognizeStoreName(model)
|
314
314
|
result = rsp.to_json_string()
|
315
315
|
try:
|
316
316
|
json_obj = json.loads(result)
|
@@ -329,7 +329,7 @@ def doBusinessCardOCR(args, parsed_globals):
|
|
329
329
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
330
330
|
|
331
331
|
|
332
|
-
def
|
332
|
+
def doMLIDPassportOCR(args, parsed_globals):
|
333
333
|
g_param = parse_global_arg(parsed_globals)
|
334
334
|
|
335
335
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -358,11 +358,11 @@ def doIDCardOCR(args, parsed_globals):
|
|
358
358
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
359
359
|
client._sdkVersion += ("_CLI_" + __version__)
|
360
360
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
361
|
-
model = models.
|
361
|
+
model = models.MLIDPassportOCRRequest()
|
362
362
|
model.from_json_string(json.dumps(args))
|
363
363
|
start_time = time.time()
|
364
364
|
while True:
|
365
|
-
rsp = client.
|
365
|
+
rsp = client.MLIDPassportOCR(model)
|
366
366
|
result = rsp.to_json_string()
|
367
367
|
try:
|
368
368
|
json_obj = json.loads(result)
|
@@ -381,7 +381,7 @@ def doIDCardOCR(args, parsed_globals):
|
|
381
381
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
382
|
|
383
383
|
|
384
|
-
def
|
384
|
+
def doTrainTicketOCR(args, parsed_globals):
|
385
385
|
g_param = parse_global_arg(parsed_globals)
|
386
386
|
|
387
387
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -410,11 +410,11 @@ def doPassportOCR(args, parsed_globals):
|
|
410
410
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
411
411
|
client._sdkVersion += ("_CLI_" + __version__)
|
412
412
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
413
|
-
model = models.
|
413
|
+
model = models.TrainTicketOCRRequest()
|
414
414
|
model.from_json_string(json.dumps(args))
|
415
415
|
start_time = time.time()
|
416
416
|
while True:
|
417
|
-
rsp = client.
|
417
|
+
rsp = client.TrainTicketOCR(model)
|
418
418
|
result = rsp.to_json_string()
|
419
419
|
try:
|
420
420
|
json_obj = json.loads(result)
|
@@ -433,7 +433,7 @@ def doPassportOCR(args, parsed_globals):
|
|
433
433
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
434
434
|
|
435
435
|
|
436
|
-
def
|
436
|
+
def doPropOwnerCertOCR(args, parsed_globals):
|
437
437
|
g_param = parse_global_arg(parsed_globals)
|
438
438
|
|
439
439
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -462,11 +462,11 @@ def doLicensePlateOCR(args, parsed_globals):
|
|
462
462
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
463
463
|
client._sdkVersion += ("_CLI_" + __version__)
|
464
464
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
465
|
-
model = models.
|
465
|
+
model = models.PropOwnerCertOCRRequest()
|
466
466
|
model.from_json_string(json.dumps(args))
|
467
467
|
start_time = time.time()
|
468
468
|
while True:
|
469
|
-
rsp = client.
|
469
|
+
rsp = client.PropOwnerCertOCR(model)
|
470
470
|
result = rsp.to_json_string()
|
471
471
|
try:
|
472
472
|
json_obj = json.loads(result)
|
@@ -485,7 +485,7 @@ def doLicensePlateOCR(args, parsed_globals):
|
|
485
485
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
486
486
|
|
487
487
|
|
488
|
-
def
|
488
|
+
def doInvoiceGeneralOCR(args, parsed_globals):
|
489
489
|
g_param = parse_global_arg(parsed_globals)
|
490
490
|
|
491
491
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -514,11 +514,11 @@ def doMLIDCardOCR(args, parsed_globals):
|
|
514
514
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
515
515
|
client._sdkVersion += ("_CLI_" + __version__)
|
516
516
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
517
|
-
model = models.
|
517
|
+
model = models.InvoiceGeneralOCRRequest()
|
518
518
|
model.from_json_string(json.dumps(args))
|
519
519
|
start_time = time.time()
|
520
520
|
while True:
|
521
|
-
rsp = client.
|
521
|
+
rsp = client.InvoiceGeneralOCR(model)
|
522
522
|
result = rsp.to_json_string()
|
523
523
|
try:
|
524
524
|
json_obj = json.loads(result)
|
@@ -537,7 +537,7 @@ def doMLIDCardOCR(args, parsed_globals):
|
|
537
537
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
538
|
|
539
539
|
|
540
|
-
def
|
540
|
+
def doReconstructDocument(args, parsed_globals):
|
541
541
|
g_param = parse_global_arg(parsed_globals)
|
542
542
|
|
543
543
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -566,11 +566,11 @@ def doVatInvoiceVerifyNew(args, parsed_globals):
|
|
566
566
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
567
567
|
client._sdkVersion += ("_CLI_" + __version__)
|
568
568
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
569
|
-
model = models.
|
569
|
+
model = models.ReconstructDocumentRequest()
|
570
570
|
model.from_json_string(json.dumps(args))
|
571
571
|
start_time = time.time()
|
572
572
|
while True:
|
573
|
-
rsp = client.
|
573
|
+
rsp = client.ReconstructDocument(model)
|
574
574
|
result = rsp.to_json_string()
|
575
575
|
try:
|
576
576
|
json_obj = json.loads(result)
|
@@ -589,7 +589,7 @@ def doVatInvoiceVerifyNew(args, parsed_globals):
|
|
589
589
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
590
590
|
|
591
591
|
|
592
|
-
def
|
592
|
+
def doHKIDCardOCR(args, parsed_globals):
|
593
593
|
g_param = parse_global_arg(parsed_globals)
|
594
594
|
|
595
595
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -618,11 +618,11 @@ def doQrcodeOCR(args, parsed_globals):
|
|
618
618
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
619
619
|
client._sdkVersion += ("_CLI_" + __version__)
|
620
620
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
621
|
-
model = models.
|
621
|
+
model = models.HKIDCardOCRRequest()
|
622
622
|
model.from_json_string(json.dumps(args))
|
623
623
|
start_time = time.time()
|
624
624
|
while True:
|
625
|
-
rsp = client.
|
625
|
+
rsp = client.HKIDCardOCR(model)
|
626
626
|
result = rsp.to_json_string()
|
627
627
|
try:
|
628
628
|
json_obj = json.loads(result)
|
@@ -641,7 +641,7 @@ def doQrcodeOCR(args, parsed_globals):
|
|
641
641
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
642
642
|
|
643
643
|
|
644
|
-
def
|
644
|
+
def doPermitOCR(args, parsed_globals):
|
645
645
|
g_param = parse_global_arg(parsed_globals)
|
646
646
|
|
647
647
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -670,11 +670,11 @@ def doGeneralAccurateOCR(args, parsed_globals):
|
|
670
670
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
671
671
|
client._sdkVersion += ("_CLI_" + __version__)
|
672
672
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
673
|
-
model = models.
|
673
|
+
model = models.PermitOCRRequest()
|
674
674
|
model.from_json_string(json.dumps(args))
|
675
675
|
start_time = time.time()
|
676
676
|
while True:
|
677
|
-
rsp = client.
|
677
|
+
rsp = client.PermitOCR(model)
|
678
678
|
result = rsp.to_json_string()
|
679
679
|
try:
|
680
680
|
json_obj = json.loads(result)
|
@@ -693,7 +693,7 @@ def doGeneralAccurateOCR(args, parsed_globals):
|
|
693
693
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
694
|
|
695
695
|
|
696
|
-
def
|
696
|
+
def doBusInvoiceOCR(args, parsed_globals):
|
697
697
|
g_param = parse_global_arg(parsed_globals)
|
698
698
|
|
699
699
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -722,11 +722,11 @@ def doMixedInvoiceOCR(args, parsed_globals):
|
|
722
722
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
723
723
|
client._sdkVersion += ("_CLI_" + __version__)
|
724
724
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
725
|
-
model = models.
|
725
|
+
model = models.BusInvoiceOCRRequest()
|
726
726
|
model.from_json_string(json.dumps(args))
|
727
727
|
start_time = time.time()
|
728
728
|
while True:
|
729
|
-
rsp = client.
|
729
|
+
rsp = client.BusInvoiceOCR(model)
|
730
730
|
result = rsp.to_json_string()
|
731
731
|
try:
|
732
732
|
json_obj = json.loads(result)
|
@@ -745,7 +745,7 @@ def doMixedInvoiceOCR(args, parsed_globals):
|
|
745
745
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
746
746
|
|
747
747
|
|
748
|
-
def
|
748
|
+
def doEnglishOCR(args, parsed_globals):
|
749
749
|
g_param = parse_global_arg(parsed_globals)
|
750
750
|
|
751
751
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -774,11 +774,11 @@ def doRecognizeContainerOCR(args, parsed_globals):
|
|
774
774
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
775
775
|
client._sdkVersion += ("_CLI_" + __version__)
|
776
776
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
777
|
-
model = models.
|
777
|
+
model = models.EnglishOCRRequest()
|
778
778
|
model.from_json_string(json.dumps(args))
|
779
779
|
start_time = time.time()
|
780
780
|
while True:
|
781
|
-
rsp = client.
|
781
|
+
rsp = client.EnglishOCR(model)
|
782
782
|
result = rsp.to_json_string()
|
783
783
|
try:
|
784
784
|
json_obj = json.loads(result)
|
@@ -797,7 +797,7 @@ def doRecognizeContainerOCR(args, parsed_globals):
|
|
797
797
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
798
798
|
|
799
799
|
|
800
|
-
def
|
800
|
+
def doSmartStructuralOCR(args, parsed_globals):
|
801
801
|
g_param = parse_global_arg(parsed_globals)
|
802
802
|
|
803
803
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -826,11 +826,11 @@ def doRecognizeTableAccurateOCR(args, parsed_globals):
|
|
826
826
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
827
827
|
client._sdkVersion += ("_CLI_" + __version__)
|
828
828
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
829
|
-
model = models.
|
829
|
+
model = models.SmartStructuralOCRRequest()
|
830
830
|
model.from_json_string(json.dumps(args))
|
831
831
|
start_time = time.time()
|
832
832
|
while True:
|
833
|
-
rsp = client.
|
833
|
+
rsp = client.SmartStructuralOCR(model)
|
834
834
|
result = rsp.to_json_string()
|
835
835
|
try:
|
836
836
|
json_obj = json.loads(result)
|
@@ -849,7 +849,7 @@ def doRecognizeTableAccurateOCR(args, parsed_globals):
|
|
849
849
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
850
850
|
|
851
851
|
|
852
|
-
def
|
852
|
+
def doClassifyStoreName(args, parsed_globals):
|
853
853
|
g_param = parse_global_arg(parsed_globals)
|
854
854
|
|
855
855
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -878,11 +878,11 @@ def doRecognizeEncryptedIDCardOCR(args, parsed_globals):
|
|
878
878
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
879
879
|
client._sdkVersion += ("_CLI_" + __version__)
|
880
880
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
881
|
-
model = models.
|
881
|
+
model = models.ClassifyStoreNameRequest()
|
882
882
|
model.from_json_string(json.dumps(args))
|
883
883
|
start_time = time.time()
|
884
884
|
while True:
|
885
|
-
rsp = client.
|
885
|
+
rsp = client.ClassifyStoreName(model)
|
886
886
|
result = rsp.to_json_string()
|
887
887
|
try:
|
888
888
|
json_obj = json.loads(result)
|
@@ -901,7 +901,7 @@ def doRecognizeEncryptedIDCardOCR(args, parsed_globals):
|
|
901
901
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
902
902
|
|
903
903
|
|
904
|
-
def
|
904
|
+
def doTaxiInvoiceOCR(args, parsed_globals):
|
905
905
|
g_param = parse_global_arg(parsed_globals)
|
906
906
|
|
907
907
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -930,11 +930,11 @@ def doMixedInvoiceDetect(args, parsed_globals):
|
|
930
930
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
931
931
|
client._sdkVersion += ("_CLI_" + __version__)
|
932
932
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
933
|
-
model = models.
|
933
|
+
model = models.TaxiInvoiceOCRRequest()
|
934
934
|
model.from_json_string(json.dumps(args))
|
935
935
|
start_time = time.time()
|
936
936
|
while True:
|
937
|
-
rsp = client.
|
937
|
+
rsp = client.TaxiInvoiceOCR(model)
|
938
938
|
result = rsp.to_json_string()
|
939
939
|
try:
|
940
940
|
json_obj = json.loads(result)
|
@@ -953,7 +953,7 @@ def doMixedInvoiceDetect(args, parsed_globals):
|
|
953
953
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
954
954
|
|
955
955
|
|
956
|
-
def
|
956
|
+
def doRideHailingDriverLicenseOCR(args, parsed_globals):
|
957
957
|
g_param = parse_global_arg(parsed_globals)
|
958
958
|
|
959
959
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -982,11 +982,11 @@ def doVinOCR(args, parsed_globals):
|
|
982
982
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
983
983
|
client._sdkVersion += ("_CLI_" + __version__)
|
984
984
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
985
|
-
model = models.
|
985
|
+
model = models.RideHailingDriverLicenseOCRRequest()
|
986
986
|
model.from_json_string(json.dumps(args))
|
987
987
|
start_time = time.time()
|
988
988
|
while True:
|
989
|
-
rsp = client.
|
989
|
+
rsp = client.RideHailingDriverLicenseOCR(model)
|
990
990
|
result = rsp.to_json_string()
|
991
991
|
try:
|
992
992
|
json_obj = json.loads(result)
|
@@ -1005,7 +1005,7 @@ def doVinOCR(args, parsed_globals):
|
|
1005
1005
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1006
1006
|
|
1007
1007
|
|
1008
|
-
def
|
1008
|
+
def doDutyPaidProofOCR(args, parsed_globals):
|
1009
1009
|
g_param = parse_global_arg(parsed_globals)
|
1010
1010
|
|
1011
1011
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1034,11 +1034,11 @@ def doMLIDPassportOCR(args, parsed_globals):
|
|
1034
1034
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1035
1035
|
client._sdkVersion += ("_CLI_" + __version__)
|
1036
1036
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1037
|
-
model = models.
|
1037
|
+
model = models.DutyPaidProofOCRRequest()
|
1038
1038
|
model.from_json_string(json.dumps(args))
|
1039
1039
|
start_time = time.time()
|
1040
1040
|
while True:
|
1041
|
-
rsp = client.
|
1041
|
+
rsp = client.DutyPaidProofOCR(model)
|
1042
1042
|
result = rsp.to_json_string()
|
1043
1043
|
try:
|
1044
1044
|
json_obj = json.loads(result)
|
@@ -1057,7 +1057,7 @@ def doMLIDPassportOCR(args, parsed_globals):
|
|
1057
1057
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1058
1058
|
|
1059
1059
|
|
1060
|
-
def
|
1060
|
+
def doMainlandPermitOCR(args, parsed_globals):
|
1061
1061
|
g_param = parse_global_arg(parsed_globals)
|
1062
1062
|
|
1063
1063
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1086,11 +1086,11 @@ def doVatRollInvoiceOCR(args, parsed_globals):
|
|
1086
1086
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1087
1087
|
client._sdkVersion += ("_CLI_" + __version__)
|
1088
1088
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1089
|
-
model = models.
|
1089
|
+
model = models.MainlandPermitOCRRequest()
|
1090
1090
|
model.from_json_string(json.dumps(args))
|
1091
1091
|
start_time = time.time()
|
1092
1092
|
while True:
|
1093
|
-
rsp = client.
|
1093
|
+
rsp = client.MainlandPermitOCR(model)
|
1094
1094
|
result = rsp.to_json_string()
|
1095
1095
|
try:
|
1096
1096
|
json_obj = json.loads(result)
|
@@ -1109,7 +1109,7 @@ def doVatRollInvoiceOCR(args, parsed_globals):
|
|
1109
1109
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
1110
|
|
1111
1111
|
|
1112
|
-
def
|
1112
|
+
def doGeneralBasicOCR(args, parsed_globals):
|
1113
1113
|
g_param = parse_global_arg(parsed_globals)
|
1114
1114
|
|
1115
1115
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1138,11 +1138,11 @@ def doQuotaInvoiceOCR(args, parsed_globals):
|
|
1138
1138
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1139
1139
|
client._sdkVersion += ("_CLI_" + __version__)
|
1140
1140
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1141
|
-
model = models.
|
1141
|
+
model = models.GeneralBasicOCRRequest()
|
1142
1142
|
model.from_json_string(json.dumps(args))
|
1143
1143
|
start_time = time.time()
|
1144
1144
|
while True:
|
1145
|
-
rsp = client.
|
1145
|
+
rsp = client.GeneralBasicOCR(model)
|
1146
1146
|
result = rsp.to_json_string()
|
1147
1147
|
try:
|
1148
1148
|
json_obj = json.loads(result)
|
@@ -1161,7 +1161,7 @@ def doQuotaInvoiceOCR(args, parsed_globals):
|
|
1161
1161
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1162
1162
|
|
1163
1163
|
|
1164
|
-
def
|
1164
|
+
def doRecognizeGeneralInvoice(args, parsed_globals):
|
1165
1165
|
g_param = parse_global_arg(parsed_globals)
|
1166
1166
|
|
1167
1167
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1190,11 +1190,11 @@ def doBankSlipOCR(args, parsed_globals):
|
|
1190
1190
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1191
1191
|
client._sdkVersion += ("_CLI_" + __version__)
|
1192
1192
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1193
|
-
model = models.
|
1193
|
+
model = models.RecognizeGeneralInvoiceRequest()
|
1194
1194
|
model.from_json_string(json.dumps(args))
|
1195
1195
|
start_time = time.time()
|
1196
1196
|
while True:
|
1197
|
-
rsp = client.
|
1197
|
+
rsp = client.RecognizeGeneralInvoice(model)
|
1198
1198
|
result = rsp.to_json_string()
|
1199
1199
|
try:
|
1200
1200
|
json_obj = json.loads(result)
|
@@ -1213,7 +1213,7 @@ def doBankSlipOCR(args, parsed_globals):
|
|
1213
1213
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1214
1214
|
|
1215
1215
|
|
1216
|
-
def
|
1216
|
+
def doInsuranceBillOCR(args, parsed_globals):
|
1217
1217
|
g_param = parse_global_arg(parsed_globals)
|
1218
1218
|
|
1219
1219
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1242,11 +1242,11 @@ def doGeneralFastOCR(args, parsed_globals):
|
|
1242
1242
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1243
1243
|
client._sdkVersion += ("_CLI_" + __version__)
|
1244
1244
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1245
|
-
model = models.
|
1245
|
+
model = models.InsuranceBillOCRRequest()
|
1246
1246
|
model.from_json_string(json.dumps(args))
|
1247
1247
|
start_time = time.time()
|
1248
1248
|
while True:
|
1249
|
-
rsp = client.
|
1249
|
+
rsp = client.InsuranceBillOCR(model)
|
1250
1250
|
result = rsp.to_json_string()
|
1251
1251
|
try:
|
1252
1252
|
json_obj = json.loads(result)
|
@@ -1265,7 +1265,7 @@ def doGeneralFastOCR(args, parsed_globals):
|
|
1265
1265
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1266
1266
|
|
1267
1267
|
|
1268
|
-
def
|
1268
|
+
def doVatInvoiceVerifyNew(args, parsed_globals):
|
1269
1269
|
g_param = parse_global_arg(parsed_globals)
|
1270
1270
|
|
1271
1271
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1294,11 +1294,11 @@ def doPropOwnerCertOCR(args, parsed_globals):
|
|
1294
1294
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1295
1295
|
client._sdkVersion += ("_CLI_" + __version__)
|
1296
1296
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1297
|
-
model = models.
|
1297
|
+
model = models.VatInvoiceVerifyNewRequest()
|
1298
1298
|
model.from_json_string(json.dumps(args))
|
1299
1299
|
start_time = time.time()
|
1300
1300
|
while True:
|
1301
|
-
rsp = client.
|
1301
|
+
rsp = client.VatInvoiceVerifyNew(model)
|
1302
1302
|
result = rsp.to_json_string()
|
1303
1303
|
try:
|
1304
1304
|
json_obj = json.loads(result)
|
@@ -1317,7 +1317,7 @@ def doPropOwnerCertOCR(args, parsed_globals):
|
|
1317
1317
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1318
1318
|
|
1319
1319
|
|
1320
|
-
def
|
1320
|
+
def doVinOCR(args, parsed_globals):
|
1321
1321
|
g_param = parse_global_arg(parsed_globals)
|
1322
1322
|
|
1323
1323
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1346,11 +1346,11 @@ def doBizLicenseOCR(args, parsed_globals):
|
|
1346
1346
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1347
1347
|
client._sdkVersion += ("_CLI_" + __version__)
|
1348
1348
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1349
|
-
model = models.
|
1349
|
+
model = models.VinOCRRequest()
|
1350
1350
|
model.from_json_string(json.dumps(args))
|
1351
1351
|
start_time = time.time()
|
1352
1352
|
while True:
|
1353
|
-
rsp = client.
|
1353
|
+
rsp = client.VinOCR(model)
|
1354
1354
|
result = rsp.to_json_string()
|
1355
1355
|
try:
|
1356
1356
|
json_obj = json.loads(result)
|
@@ -1369,7 +1369,7 @@ def doBizLicenseOCR(args, parsed_globals):
|
|
1369
1369
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1370
1370
|
|
1371
1371
|
|
1372
|
-
def
|
1372
|
+
def doVehicleLicenseOCR(args, parsed_globals):
|
1373
1373
|
g_param = parse_global_arg(parsed_globals)
|
1374
1374
|
|
1375
1375
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1398,11 +1398,11 @@ def doGeneralHandwritingOCR(args, parsed_globals):
|
|
1398
1398
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1399
1399
|
client._sdkVersion += ("_CLI_" + __version__)
|
1400
1400
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1401
|
-
model = models.
|
1401
|
+
model = models.VehicleLicenseOCRRequest()
|
1402
1402
|
model.from_json_string(json.dumps(args))
|
1403
1403
|
start_time = time.time()
|
1404
1404
|
while True:
|
1405
|
-
rsp = client.
|
1405
|
+
rsp = client.VehicleLicenseOCR(model)
|
1406
1406
|
result = rsp.to_json_string()
|
1407
1407
|
try:
|
1408
1408
|
json_obj = json.loads(result)
|
@@ -1421,7 +1421,7 @@ def doGeneralHandwritingOCR(args, parsed_globals):
|
|
1421
1421
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1422
1422
|
|
1423
1423
|
|
1424
|
-
def
|
1424
|
+
def doBizLicenseOCR(args, parsed_globals):
|
1425
1425
|
g_param = parse_global_arg(parsed_globals)
|
1426
1426
|
|
1427
1427
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1450,11 +1450,11 @@ def doAdvertiseOCR(args, parsed_globals):
|
|
1450
1450
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1451
1451
|
client._sdkVersion += ("_CLI_" + __version__)
|
1452
1452
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1453
|
-
model = models.
|
1453
|
+
model = models.BizLicenseOCRRequest()
|
1454
1454
|
model.from_json_string(json.dumps(args))
|
1455
1455
|
start_time = time.time()
|
1456
1456
|
while True:
|
1457
|
-
rsp = client.
|
1457
|
+
rsp = client.BizLicenseOCR(model)
|
1458
1458
|
result = rsp.to_json_string()
|
1459
1459
|
try:
|
1460
1460
|
json_obj = json.loads(result)
|
@@ -1473,7 +1473,7 @@ def doAdvertiseOCR(args, parsed_globals):
|
|
1473
1473
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1474
1474
|
|
1475
1475
|
|
1476
|
-
def
|
1476
|
+
def doGetTaskState(args, parsed_globals):
|
1477
1477
|
g_param = parse_global_arg(parsed_globals)
|
1478
1478
|
|
1479
1479
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1502,11 +1502,11 @@ def doInvoiceGeneralOCR(args, parsed_globals):
|
|
1502
1502
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1503
1503
|
client._sdkVersion += ("_CLI_" + __version__)
|
1504
1504
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1505
|
-
model = models.
|
1505
|
+
model = models.GetTaskStateRequest()
|
1506
1506
|
model.from_json_string(json.dumps(args))
|
1507
1507
|
start_time = time.time()
|
1508
1508
|
while True:
|
1509
|
-
rsp = client.
|
1509
|
+
rsp = client.GetTaskState(model)
|
1510
1510
|
result = rsp.to_json_string()
|
1511
1511
|
try:
|
1512
1512
|
json_obj = json.loads(result)
|
@@ -1525,7 +1525,7 @@ def doInvoiceGeneralOCR(args, parsed_globals):
|
|
1525
1525
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1526
1526
|
|
1527
1527
|
|
1528
|
-
def
|
1528
|
+
def doFlightInvoiceOCR(args, parsed_globals):
|
1529
1529
|
g_param = parse_global_arg(parsed_globals)
|
1530
1530
|
|
1531
1531
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1554,11 +1554,11 @@ def doReconstructDocument(args, parsed_globals):
|
|
1554
1554
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1555
1555
|
client._sdkVersion += ("_CLI_" + __version__)
|
1556
1556
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1557
|
-
model = models.
|
1557
|
+
model = models.FlightInvoiceOCRRequest()
|
1558
1558
|
model.from_json_string(json.dumps(args))
|
1559
1559
|
start_time = time.time()
|
1560
1560
|
while True:
|
1561
|
-
rsp = client.
|
1561
|
+
rsp = client.FlightInvoiceOCR(model)
|
1562
1562
|
result = rsp.to_json_string()
|
1563
1563
|
try:
|
1564
1564
|
json_obj = json.loads(result)
|
@@ -1577,7 +1577,7 @@ def doReconstructDocument(args, parsed_globals):
|
|
1577
1577
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1578
1578
|
|
1579
1579
|
|
1580
|
-
def
|
1580
|
+
def doRecognizeThaiIDCardOCR(args, parsed_globals):
|
1581
1581
|
g_param = parse_global_arg(parsed_globals)
|
1582
1582
|
|
1583
1583
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1606,11 +1606,11 @@ def doGetTaskState(args, parsed_globals):
|
|
1606
1606
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1607
1607
|
client._sdkVersion += ("_CLI_" + __version__)
|
1608
1608
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1609
|
-
model = models.
|
1609
|
+
model = models.RecognizeThaiIDCardOCRRequest()
|
1610
1610
|
model.from_json_string(json.dumps(args))
|
1611
1611
|
start_time = time.time()
|
1612
1612
|
while True:
|
1613
|
-
rsp = client.
|
1613
|
+
rsp = client.RecognizeThaiIDCardOCR(model)
|
1614
1614
|
result = rsp.to_json_string()
|
1615
1615
|
try:
|
1616
1616
|
json_obj = json.loads(result)
|
@@ -1629,7 +1629,7 @@ def doGetTaskState(args, parsed_globals):
|
|
1629
1629
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1630
1630
|
|
1631
1631
|
|
1632
|
-
def
|
1632
|
+
def doTableOCR(args, parsed_globals):
|
1633
1633
|
g_param = parse_global_arg(parsed_globals)
|
1634
1634
|
|
1635
1635
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1658,11 +1658,11 @@ def doRecognizeOnlineTaxiItineraryOCR(args, parsed_globals):
|
|
1658
1658
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1659
1659
|
client._sdkVersion += ("_CLI_" + __version__)
|
1660
1660
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1661
|
-
model = models.
|
1661
|
+
model = models.TableOCRRequest()
|
1662
1662
|
model.from_json_string(json.dumps(args))
|
1663
1663
|
start_time = time.time()
|
1664
1664
|
while True:
|
1665
|
-
rsp = client.
|
1665
|
+
rsp = client.TableOCR(model)
|
1666
1666
|
result = rsp.to_json_string()
|
1667
1667
|
try:
|
1668
1668
|
json_obj = json.loads(result)
|
@@ -1681,7 +1681,7 @@ def doRecognizeOnlineTaxiItineraryOCR(args, parsed_globals):
|
|
1681
1681
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1682
1682
|
|
1683
1683
|
|
1684
|
-
def
|
1684
|
+
def doArithmeticOCR(args, parsed_globals):
|
1685
1685
|
g_param = parse_global_arg(parsed_globals)
|
1686
1686
|
|
1687
1687
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1710,11 +1710,11 @@ def doHKIDCardOCR(args, parsed_globals):
|
|
1710
1710
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1711
1711
|
client._sdkVersion += ("_CLI_" + __version__)
|
1712
1712
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1713
|
-
model = models.
|
1713
|
+
model = models.ArithmeticOCRRequest()
|
1714
1714
|
model.from_json_string(json.dumps(args))
|
1715
1715
|
start_time = time.time()
|
1716
1716
|
while True:
|
1717
|
-
rsp = client.
|
1717
|
+
rsp = client.ArithmeticOCR(model)
|
1718
1718
|
result = rsp.to_json_string()
|
1719
1719
|
try:
|
1720
1720
|
json_obj = json.loads(result)
|
@@ -1733,7 +1733,7 @@ def doHKIDCardOCR(args, parsed_globals):
|
|
1733
1733
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1734
1734
|
|
1735
1735
|
|
1736
|
-
def
|
1736
|
+
def doEstateCertOCR(args, parsed_globals):
|
1737
1737
|
g_param = parse_global_arg(parsed_globals)
|
1738
1738
|
|
1739
1739
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1762,11 +1762,11 @@ def doVatInvoiceOCR(args, parsed_globals):
|
|
1762
1762
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1763
1763
|
client._sdkVersion += ("_CLI_" + __version__)
|
1764
1764
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1765
|
-
model = models.
|
1765
|
+
model = models.EstateCertOCRRequest()
|
1766
1766
|
model.from_json_string(json.dumps(args))
|
1767
1767
|
start_time = time.time()
|
1768
1768
|
while True:
|
1769
|
-
rsp = client.
|
1769
|
+
rsp = client.EstateCertOCR(model)
|
1770
1770
|
result = rsp.to_json_string()
|
1771
1771
|
try:
|
1772
1772
|
json_obj = json.loads(result)
|
@@ -1785,7 +1785,7 @@ def doVatInvoiceOCR(args, parsed_globals):
|
|
1785
1785
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1786
1786
|
|
1787
1787
|
|
1788
|
-
def
|
1788
|
+
def doRecognizePhilippinesUMIDOCR(args, parsed_globals):
|
1789
1789
|
g_param = parse_global_arg(parsed_globals)
|
1790
1790
|
|
1791
1791
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1814,11 +1814,11 @@ def doCreateAIFormTask(args, parsed_globals):
|
|
1814
1814
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1815
1815
|
client._sdkVersion += ("_CLI_" + __version__)
|
1816
1816
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1817
|
-
model = models.
|
1817
|
+
model = models.RecognizePhilippinesUMIDOCRRequest()
|
1818
1818
|
model.from_json_string(json.dumps(args))
|
1819
1819
|
start_time = time.time()
|
1820
1820
|
while True:
|
1821
|
-
rsp = client.
|
1821
|
+
rsp = client.RecognizePhilippinesUMIDOCR(model)
|
1822
1822
|
result = rsp.to_json_string()
|
1823
1823
|
try:
|
1824
1824
|
json_obj = json.loads(result)
|
@@ -1837,7 +1837,7 @@ def doCreateAIFormTask(args, parsed_globals):
|
|
1837
1837
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1838
1838
|
|
1839
1839
|
|
1840
|
-
def
|
1840
|
+
def doBankCardOCR(args, parsed_globals):
|
1841
1841
|
g_param = parse_global_arg(parsed_globals)
|
1842
1842
|
|
1843
1843
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1866,11 +1866,11 @@ def doWaybillOCR(args, parsed_globals):
|
|
1866
1866
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1867
1867
|
client._sdkVersion += ("_CLI_" + __version__)
|
1868
1868
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1869
|
-
model = models.
|
1869
|
+
model = models.BankCardOCRRequest()
|
1870
1870
|
model.from_json_string(json.dumps(args))
|
1871
1871
|
start_time = time.time()
|
1872
1872
|
while True:
|
1873
|
-
rsp = client.
|
1873
|
+
rsp = client.BankCardOCR(model)
|
1874
1874
|
result = rsp.to_json_string()
|
1875
1875
|
try:
|
1876
1876
|
json_obj = json.loads(result)
|
@@ -1889,7 +1889,7 @@ def doWaybillOCR(args, parsed_globals):
|
|
1889
1889
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1890
1890
|
|
1891
1891
|
|
1892
|
-
def
|
1892
|
+
def doVatInvoiceVerify(args, parsed_globals):
|
1893
1893
|
g_param = parse_global_arg(parsed_globals)
|
1894
1894
|
|
1895
1895
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1918,11 +1918,11 @@ def doFlightInvoiceOCR(args, parsed_globals):
|
|
1918
1918
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1919
1919
|
client._sdkVersion += ("_CLI_" + __version__)
|
1920
1920
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1921
|
-
model = models.
|
1921
|
+
model = models.VatInvoiceVerifyRequest()
|
1922
1922
|
model.from_json_string(json.dumps(args))
|
1923
1923
|
start_time = time.time()
|
1924
1924
|
while True:
|
1925
|
-
rsp = client.
|
1925
|
+
rsp = client.VatInvoiceVerify(model)
|
1926
1926
|
result = rsp.to_json_string()
|
1927
1927
|
try:
|
1928
1928
|
json_obj = json.loads(result)
|
@@ -1941,7 +1941,7 @@ def doFlightInvoiceOCR(args, parsed_globals):
|
|
1941
1941
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1942
1942
|
|
1943
1943
|
|
1944
|
-
def
|
1944
|
+
def doRecognizePhilippinesDrivingLicenseOCR(args, parsed_globals):
|
1945
1945
|
g_param = parse_global_arg(parsed_globals)
|
1946
1946
|
|
1947
1947
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1970,11 +1970,11 @@ def doPermitOCR(args, parsed_globals):
|
|
1970
1970
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1971
1971
|
client._sdkVersion += ("_CLI_" + __version__)
|
1972
1972
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1973
|
-
model = models.
|
1973
|
+
model = models.RecognizePhilippinesDrivingLicenseOCRRequest()
|
1974
1974
|
model.from_json_string(json.dumps(args))
|
1975
1975
|
start_time = time.time()
|
1976
1976
|
while True:
|
1977
|
-
rsp = client.
|
1977
|
+
rsp = client.RecognizePhilippinesDrivingLicenseOCR(model)
|
1978
1978
|
result = rsp.to_json_string()
|
1979
1979
|
try:
|
1980
1980
|
json_obj = json.loads(result)
|
@@ -1993,7 +1993,7 @@ def doPermitOCR(args, parsed_globals):
|
|
1993
1993
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1994
1994
|
|
1995
1995
|
|
1996
|
-
def
|
1996
|
+
def doEduPaperOCR(args, parsed_globals):
|
1997
1997
|
g_param = parse_global_arg(parsed_globals)
|
1998
1998
|
|
1999
1999
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2022,11 +2022,11 @@ def doRecognizeThaiIDCardOCR(args, parsed_globals):
|
|
2022
2022
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2023
2023
|
client._sdkVersion += ("_CLI_" + __version__)
|
2024
2024
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2025
|
-
model = models.
|
2025
|
+
model = models.EduPaperOCRRequest()
|
2026
2026
|
model.from_json_string(json.dumps(args))
|
2027
2027
|
start_time = time.time()
|
2028
2028
|
while True:
|
2029
|
-
rsp = client.
|
2029
|
+
rsp = client.EduPaperOCR(model)
|
2030
2030
|
result = rsp.to_json_string()
|
2031
2031
|
try:
|
2032
2032
|
json_obj = json.loads(result)
|
@@ -2045,7 +2045,7 @@ def doRecognizeThaiIDCardOCR(args, parsed_globals):
|
|
2045
2045
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2046
2046
|
|
2047
2047
|
|
2048
|
-
def
|
2048
|
+
def doEnterpriseLicenseOCR(args, parsed_globals):
|
2049
2049
|
g_param = parse_global_arg(parsed_globals)
|
2050
2050
|
|
2051
2051
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2074,11 +2074,11 @@ def doTextDetect(args, parsed_globals):
|
|
2074
2074
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2075
2075
|
client._sdkVersion += ("_CLI_" + __version__)
|
2076
2076
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2077
|
-
model = models.
|
2077
|
+
model = models.EnterpriseLicenseOCRRequest()
|
2078
2078
|
model.from_json_string(json.dumps(args))
|
2079
2079
|
start_time = time.time()
|
2080
2080
|
while True:
|
2081
|
-
rsp = client.
|
2081
|
+
rsp = client.EnterpriseLicenseOCR(model)
|
2082
2082
|
result = rsp.to_json_string()
|
2083
2083
|
try:
|
2084
2084
|
json_obj = json.loads(result)
|
@@ -2097,7 +2097,7 @@ def doTextDetect(args, parsed_globals):
|
|
2097
2097
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2098
2098
|
|
2099
2099
|
|
2100
|
-
def
|
2100
|
+
def doBusinessCardOCR(args, parsed_globals):
|
2101
2101
|
g_param = parse_global_arg(parsed_globals)
|
2102
2102
|
|
2103
2103
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2126,11 +2126,11 @@ def doBusInvoiceOCR(args, parsed_globals):
|
|
2126
2126
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2127
2127
|
client._sdkVersion += ("_CLI_" + __version__)
|
2128
2128
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2129
|
-
model = models.
|
2129
|
+
model = models.BusinessCardOCRRequest()
|
2130
2130
|
model.from_json_string(json.dumps(args))
|
2131
2131
|
start_time = time.time()
|
2132
2132
|
while True:
|
2133
|
-
rsp = client.
|
2133
|
+
rsp = client.BusinessCardOCR(model)
|
2134
2134
|
result = rsp.to_json_string()
|
2135
2135
|
try:
|
2136
2136
|
json_obj = json.loads(result)
|
@@ -2149,7 +2149,7 @@ def doBusInvoiceOCR(args, parsed_globals):
|
|
2149
2149
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2150
2150
|
|
2151
2151
|
|
2152
|
-
def
|
2152
|
+
def doIDCardOCR(args, parsed_globals):
|
2153
2153
|
g_param = parse_global_arg(parsed_globals)
|
2154
2154
|
|
2155
2155
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2178,11 +2178,11 @@ def doRecognizePhilippinesSssIDOCR(args, parsed_globals):
|
|
2178
2178
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2179
2179
|
client._sdkVersion += ("_CLI_" + __version__)
|
2180
2180
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2181
|
-
model = models.
|
2181
|
+
model = models.IDCardOCRRequest()
|
2182
2182
|
model.from_json_string(json.dumps(args))
|
2183
2183
|
start_time = time.time()
|
2184
2184
|
while True:
|
2185
|
-
rsp = client.
|
2185
|
+
rsp = client.IDCardOCR(model)
|
2186
2186
|
result = rsp.to_json_string()
|
2187
2187
|
try:
|
2188
2188
|
json_obj = json.loads(result)
|
@@ -2201,7 +2201,7 @@ def doRecognizePhilippinesSssIDOCR(args, parsed_globals):
|
|
2201
2201
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2202
2202
|
|
2203
2203
|
|
2204
|
-
def
|
2204
|
+
def doRecognizeGeneralTextImageWarn(args, parsed_globals):
|
2205
2205
|
g_param = parse_global_arg(parsed_globals)
|
2206
2206
|
|
2207
2207
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2230,11 +2230,11 @@ def doTableOCR(args, parsed_globals):
|
|
2230
2230
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2231
2231
|
client._sdkVersion += ("_CLI_" + __version__)
|
2232
2232
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2233
|
-
model = models.
|
2233
|
+
model = models.RecognizeGeneralTextImageWarnRequest()
|
2234
2234
|
model.from_json_string(json.dumps(args))
|
2235
2235
|
start_time = time.time()
|
2236
2236
|
while True:
|
2237
|
-
rsp = client.
|
2237
|
+
rsp = client.RecognizeGeneralTextImageWarn(model)
|
2238
2238
|
result = rsp.to_json_string()
|
2239
2239
|
try:
|
2240
2240
|
json_obj = json.loads(result)
|
@@ -2253,7 +2253,7 @@ def doTableOCR(args, parsed_globals):
|
|
2253
2253
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2254
2254
|
|
2255
2255
|
|
2256
|
-
def
|
2256
|
+
def doInstitutionOCR(args, parsed_globals):
|
2257
2257
|
g_param = parse_global_arg(parsed_globals)
|
2258
2258
|
|
2259
2259
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2282,11 +2282,11 @@ def doEnglishOCR(args, parsed_globals):
|
|
2282
2282
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2283
2283
|
client._sdkVersion += ("_CLI_" + __version__)
|
2284
2284
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2285
|
-
model = models.
|
2285
|
+
model = models.InstitutionOCRRequest()
|
2286
2286
|
model.from_json_string(json.dumps(args))
|
2287
2287
|
start_time = time.time()
|
2288
2288
|
while True:
|
2289
|
-
rsp = client.
|
2289
|
+
rsp = client.InstitutionOCR(model)
|
2290
2290
|
result = rsp.to_json_string()
|
2291
2291
|
try:
|
2292
2292
|
json_obj = json.loads(result)
|
@@ -2305,7 +2305,7 @@ def doEnglishOCR(args, parsed_globals):
|
|
2305
2305
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2306
2306
|
|
2307
2307
|
|
2308
|
-
def
|
2308
|
+
def doSmartStructuralOCRV2(args, parsed_globals):
|
2309
2309
|
g_param = parse_global_arg(parsed_globals)
|
2310
2310
|
|
2311
2311
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2334,11 +2334,11 @@ def doHmtResidentPermitOCR(args, parsed_globals):
|
|
2334
2334
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2335
2335
|
client._sdkVersion += ("_CLI_" + __version__)
|
2336
2336
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2337
|
-
model = models.
|
2337
|
+
model = models.SmartStructuralOCRV2Request()
|
2338
2338
|
model.from_json_string(json.dumps(args))
|
2339
2339
|
start_time = time.time()
|
2340
2340
|
while True:
|
2341
|
-
rsp = client.
|
2341
|
+
rsp = client.SmartStructuralOCRV2(model)
|
2342
2342
|
result = rsp.to_json_string()
|
2343
2343
|
try:
|
2344
2344
|
json_obj = json.loads(result)
|
@@ -2357,7 +2357,7 @@ def doHmtResidentPermitOCR(args, parsed_globals):
|
|
2357
2357
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2358
2358
|
|
2359
2359
|
|
2360
|
-
def
|
2360
|
+
def doRecognizeTableAccurateOCR(args, parsed_globals):
|
2361
2361
|
g_param = parse_global_arg(parsed_globals)
|
2362
2362
|
|
2363
2363
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2386,11 +2386,11 @@ def doRecognizeGeneralTextImageWarn(args, parsed_globals):
|
|
2386
2386
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2387
2387
|
client._sdkVersion += ("_CLI_" + __version__)
|
2388
2388
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2389
|
-
model = models.
|
2389
|
+
model = models.RecognizeTableAccurateOCRRequest()
|
2390
2390
|
model.from_json_string(json.dumps(args))
|
2391
2391
|
start_time = time.time()
|
2392
2392
|
while True:
|
2393
|
-
rsp = client.
|
2393
|
+
rsp = client.RecognizeTableAccurateOCR(model)
|
2394
2394
|
result = rsp.to_json_string()
|
2395
2395
|
try:
|
2396
2396
|
json_obj = json.loads(result)
|
@@ -2409,7 +2409,7 @@ def doRecognizeGeneralTextImageWarn(args, parsed_globals):
|
|
2409
2409
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2410
2410
|
|
2411
2411
|
|
2412
|
-
def
|
2412
|
+
def doMixedInvoiceDetect(args, parsed_globals):
|
2413
2413
|
g_param = parse_global_arg(parsed_globals)
|
2414
2414
|
|
2415
2415
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2438,11 +2438,11 @@ def doSmartStructuralOCR(args, parsed_globals):
|
|
2438
2438
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2439
2439
|
client._sdkVersion += ("_CLI_" + __version__)
|
2440
2440
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2441
|
-
model = models.
|
2441
|
+
model = models.MixedInvoiceDetectRequest()
|
2442
2442
|
model.from_json_string(json.dumps(args))
|
2443
2443
|
start_time = time.time()
|
2444
2444
|
while True:
|
2445
|
-
rsp = client.
|
2445
|
+
rsp = client.MixedInvoiceDetect(model)
|
2446
2446
|
result = rsp.to_json_string()
|
2447
2447
|
try:
|
2448
2448
|
json_obj = json.loads(result)
|
@@ -2461,7 +2461,7 @@ def doSmartStructuralOCR(args, parsed_globals):
|
|
2461
2461
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2462
2462
|
|
2463
2463
|
|
2464
|
-
def
|
2464
|
+
def doVatRollInvoiceOCR(args, parsed_globals):
|
2465
2465
|
g_param = parse_global_arg(parsed_globals)
|
2466
2466
|
|
2467
2467
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2490,11 +2490,11 @@ def doArithmeticOCR(args, parsed_globals):
|
|
2490
2490
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2491
2491
|
client._sdkVersion += ("_CLI_" + __version__)
|
2492
2492
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2493
|
-
model = models.
|
2493
|
+
model = models.VatRollInvoiceOCRRequest()
|
2494
2494
|
model.from_json_string(json.dumps(args))
|
2495
2495
|
start_time = time.time()
|
2496
2496
|
while True:
|
2497
|
-
rsp = client.
|
2497
|
+
rsp = client.VatRollInvoiceOCR(model)
|
2498
2498
|
result = rsp.to_json_string()
|
2499
2499
|
try:
|
2500
2500
|
json_obj = json.loads(result)
|
@@ -2513,7 +2513,7 @@ def doArithmeticOCR(args, parsed_globals):
|
|
2513
2513
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2514
2514
|
|
2515
2515
|
|
2516
|
-
def
|
2516
|
+
def doQuotaInvoiceOCR(args, parsed_globals):
|
2517
2517
|
g_param = parse_global_arg(parsed_globals)
|
2518
2518
|
|
2519
2519
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2542,11 +2542,11 @@ def doTollInvoiceOCR(args, parsed_globals):
|
|
2542
2542
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2543
2543
|
client._sdkVersion += ("_CLI_" + __version__)
|
2544
2544
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2545
|
-
model = models.
|
2545
|
+
model = models.QuotaInvoiceOCRRequest()
|
2546
2546
|
model.from_json_string(json.dumps(args))
|
2547
2547
|
start_time = time.time()
|
2548
2548
|
while True:
|
2549
|
-
rsp = client.
|
2549
|
+
rsp = client.QuotaInvoiceOCR(model)
|
2550
2550
|
result = rsp.to_json_string()
|
2551
2551
|
try:
|
2552
2552
|
json_obj = json.loads(result)
|
@@ -2565,7 +2565,7 @@ def doTollInvoiceOCR(args, parsed_globals):
|
|
2565
2565
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2566
2566
|
|
2567
2567
|
|
2568
|
-
def
|
2568
|
+
def doGeneralHandwritingOCR(args, parsed_globals):
|
2569
2569
|
g_param = parse_global_arg(parsed_globals)
|
2570
2570
|
|
2571
2571
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2594,11 +2594,11 @@ def doEstateCertOCR(args, parsed_globals):
|
|
2594
2594
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2595
2595
|
client._sdkVersion += ("_CLI_" + __version__)
|
2596
2596
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2597
|
-
model = models.
|
2597
|
+
model = models.GeneralHandwritingOCRRequest()
|
2598
2598
|
model.from_json_string(json.dumps(args))
|
2599
2599
|
start_time = time.time()
|
2600
2600
|
while True:
|
2601
|
-
rsp = client.
|
2601
|
+
rsp = client.GeneralHandwritingOCR(model)
|
2602
2602
|
result = rsp.to_json_string()
|
2603
2603
|
try:
|
2604
2604
|
json_obj = json.loads(result)
|
@@ -2617,7 +2617,7 @@ def doEstateCertOCR(args, parsed_globals):
|
|
2617
2617
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2618
2618
|
|
2619
2619
|
|
2620
|
-
def
|
2620
|
+
def doRecognizeOnlineTaxiItineraryOCR(args, parsed_globals):
|
2621
2621
|
g_param = parse_global_arg(parsed_globals)
|
2622
2622
|
|
2623
2623
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2646,11 +2646,11 @@ def doClassifyDetectOCR(args, parsed_globals):
|
|
2646
2646
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2647
2647
|
client._sdkVersion += ("_CLI_" + __version__)
|
2648
2648
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2649
|
-
model = models.
|
2649
|
+
model = models.RecognizeOnlineTaxiItineraryOCRRequest()
|
2650
2650
|
model.from_json_string(json.dumps(args))
|
2651
2651
|
start_time = time.time()
|
2652
2652
|
while True:
|
2653
|
-
rsp = client.
|
2653
|
+
rsp = client.RecognizeOnlineTaxiItineraryOCR(model)
|
2654
2654
|
result = rsp.to_json_string()
|
2655
2655
|
try:
|
2656
2656
|
json_obj = json.loads(result)
|
@@ -2669,7 +2669,7 @@ def doClassifyDetectOCR(args, parsed_globals):
|
|
2669
2669
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2670
2670
|
|
2671
2671
|
|
2672
|
-
def
|
2672
|
+
def doRecognizeTableOCR(args, parsed_globals):
|
2673
2673
|
g_param = parse_global_arg(parsed_globals)
|
2674
2674
|
|
2675
2675
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2698,11 +2698,11 @@ def doOrgCodeCertOCR(args, parsed_globals):
|
|
2698
2698
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2699
2699
|
client._sdkVersion += ("_CLI_" + __version__)
|
2700
2700
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2701
|
-
model = models.
|
2701
|
+
model = models.RecognizeTableOCRRequest()
|
2702
2702
|
model.from_json_string(json.dumps(args))
|
2703
2703
|
start_time = time.time()
|
2704
2704
|
while True:
|
2705
|
-
rsp = client.
|
2705
|
+
rsp = client.RecognizeTableOCR(model)
|
2706
2706
|
result = rsp.to_json_string()
|
2707
2707
|
try:
|
2708
2708
|
json_obj = json.loads(result)
|
@@ -2721,7 +2721,7 @@ def doOrgCodeCertOCR(args, parsed_globals):
|
|
2721
2721
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2722
2722
|
|
2723
2723
|
|
2724
|
-
def
|
2724
|
+
def doCreateAIFormTask(args, parsed_globals):
|
2725
2725
|
g_param = parse_global_arg(parsed_globals)
|
2726
2726
|
|
2727
2727
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2750,11 +2750,11 @@ def doSealOCR(args, parsed_globals):
|
|
2750
2750
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2751
2751
|
client._sdkVersion += ("_CLI_" + __version__)
|
2752
2752
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2753
|
-
model = models.
|
2753
|
+
model = models.CreateAIFormTaskRequest()
|
2754
2754
|
model.from_json_string(json.dumps(args))
|
2755
2755
|
start_time = time.time()
|
2756
2756
|
while True:
|
2757
|
-
rsp = client.
|
2757
|
+
rsp = client.CreateAIFormTask(model)
|
2758
2758
|
result = rsp.to_json_string()
|
2759
2759
|
try:
|
2760
2760
|
json_obj = json.loads(result)
|
@@ -2773,7 +2773,7 @@ def doSealOCR(args, parsed_globals):
|
|
2773
2773
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2774
2774
|
|
2775
2775
|
|
2776
|
-
def
|
2776
|
+
def doWaybillOCR(args, parsed_globals):
|
2777
2777
|
g_param = parse_global_arg(parsed_globals)
|
2778
2778
|
|
2779
2779
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2802,11 +2802,11 @@ def doRecognizePhilippinesVoteIDOCR(args, parsed_globals):
|
|
2802
2802
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2803
2803
|
client._sdkVersion += ("_CLI_" + __version__)
|
2804
2804
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2805
|
-
model = models.
|
2805
|
+
model = models.WaybillOCRRequest()
|
2806
2806
|
model.from_json_string(json.dumps(args))
|
2807
2807
|
start_time = time.time()
|
2808
2808
|
while True:
|
2809
|
-
rsp = client.
|
2809
|
+
rsp = client.WaybillOCR(model)
|
2810
2810
|
result = rsp.to_json_string()
|
2811
2811
|
try:
|
2812
2812
|
json_obj = json.loads(result)
|
@@ -2825,7 +2825,7 @@ def doRecognizePhilippinesVoteIDOCR(args, parsed_globals):
|
|
2825
2825
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2826
2826
|
|
2827
2827
|
|
2828
|
-
def
|
2828
|
+
def doHmtResidentPermitOCR(args, parsed_globals):
|
2829
2829
|
g_param = parse_global_arg(parsed_globals)
|
2830
2830
|
|
2831
2831
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2854,11 +2854,11 @@ def doFinanBillOCR(args, parsed_globals):
|
|
2854
2854
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2855
2855
|
client._sdkVersion += ("_CLI_" + __version__)
|
2856
2856
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2857
|
-
model = models.
|
2857
|
+
model = models.HmtResidentPermitOCRRequest()
|
2858
2858
|
model.from_json_string(json.dumps(args))
|
2859
2859
|
start_time = time.time()
|
2860
2860
|
while True:
|
2861
|
-
rsp = client.
|
2861
|
+
rsp = client.HmtResidentPermitOCR(model)
|
2862
2862
|
result = rsp.to_json_string()
|
2863
2863
|
try:
|
2864
2864
|
json_obj = json.loads(result)
|
@@ -2877,7 +2877,7 @@ def doFinanBillOCR(args, parsed_globals):
|
|
2877
2877
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2878
2878
|
|
2879
2879
|
|
2880
|
-
def
|
2880
|
+
def doTollInvoiceOCR(args, parsed_globals):
|
2881
2881
|
g_param = parse_global_arg(parsed_globals)
|
2882
2882
|
|
2883
2883
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2906,11 +2906,11 @@ def doTrainTicketOCR(args, parsed_globals):
|
|
2906
2906
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2907
2907
|
client._sdkVersion += ("_CLI_" + __version__)
|
2908
2908
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2909
|
-
model = models.
|
2909
|
+
model = models.TollInvoiceOCRRequest()
|
2910
2910
|
model.from_json_string(json.dumps(args))
|
2911
2911
|
start_time = time.time()
|
2912
2912
|
while True:
|
2913
|
-
rsp = client.
|
2913
|
+
rsp = client.TollInvoiceOCR(model)
|
2914
2914
|
result = rsp.to_json_string()
|
2915
2915
|
try:
|
2916
2916
|
json_obj = json.loads(result)
|
@@ -2929,7 +2929,7 @@ def doTrainTicketOCR(args, parsed_globals):
|
|
2929
2929
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2930
2930
|
|
2931
2931
|
|
2932
|
-
def
|
2932
|
+
def doClassifyDetectOCR(args, parsed_globals):
|
2933
2933
|
g_param = parse_global_arg(parsed_globals)
|
2934
2934
|
|
2935
2935
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2958,11 +2958,11 @@ def doRecognizePhilippinesUMIDOCR(args, parsed_globals):
|
|
2958
2958
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2959
2959
|
client._sdkVersion += ("_CLI_" + __version__)
|
2960
2960
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2961
|
-
model = models.
|
2961
|
+
model = models.ClassifyDetectOCRRequest()
|
2962
2962
|
model.from_json_string(json.dumps(args))
|
2963
2963
|
start_time = time.time()
|
2964
2964
|
while True:
|
2965
|
-
rsp = client.
|
2965
|
+
rsp = client.ClassifyDetectOCR(model)
|
2966
2966
|
result = rsp.to_json_string()
|
2967
2967
|
try:
|
2968
2968
|
json_obj = json.loads(result)
|
@@ -2981,7 +2981,7 @@ def doRecognizePhilippinesUMIDOCR(args, parsed_globals):
|
|
2981
2981
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2982
2982
|
|
2983
2983
|
|
2984
|
-
def
|
2984
|
+
def doSealOCR(args, parsed_globals):
|
2985
2985
|
g_param = parse_global_arg(parsed_globals)
|
2986
2986
|
|
2987
2987
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3010,11 +3010,11 @@ def doGeneralEfficientOCR(args, parsed_globals):
|
|
3010
3010
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3011
3011
|
client._sdkVersion += ("_CLI_" + __version__)
|
3012
3012
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3013
|
-
model = models.
|
3013
|
+
model = models.SealOCRRequest()
|
3014
3014
|
model.from_json_string(json.dumps(args))
|
3015
3015
|
start_time = time.time()
|
3016
3016
|
while True:
|
3017
|
-
rsp = client.
|
3017
|
+
rsp = client.SealOCR(model)
|
3018
3018
|
result = rsp.to_json_string()
|
3019
3019
|
try:
|
3020
3020
|
json_obj = json.loads(result)
|
@@ -3033,7 +3033,7 @@ def doGeneralEfficientOCR(args, parsed_globals):
|
|
3033
3033
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3034
3034
|
|
3035
3035
|
|
3036
|
-
def
|
3036
|
+
def doRecognizePhilippinesVoteIDOCR(args, parsed_globals):
|
3037
3037
|
g_param = parse_global_arg(parsed_globals)
|
3038
3038
|
|
3039
3039
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3062,11 +3062,63 @@ def doTaxiInvoiceOCR(args, parsed_globals):
|
|
3062
3062
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3063
3063
|
client._sdkVersion += ("_CLI_" + __version__)
|
3064
3064
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3065
|
-
model = models.
|
3065
|
+
model = models.RecognizePhilippinesVoteIDOCRRequest()
|
3066
3066
|
model.from_json_string(json.dumps(args))
|
3067
3067
|
start_time = time.time()
|
3068
3068
|
while True:
|
3069
|
-
rsp = client.
|
3069
|
+
rsp = client.RecognizePhilippinesVoteIDOCR(model)
|
3070
|
+
result = rsp.to_json_string()
|
3071
|
+
try:
|
3072
|
+
json_obj = json.loads(result)
|
3073
|
+
except TypeError as e:
|
3074
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3075
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3076
|
+
break
|
3077
|
+
cur_time = time.time()
|
3078
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3079
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3080
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3081
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3082
|
+
else:
|
3083
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3084
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3085
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3086
|
+
|
3087
|
+
|
3088
|
+
def doBankSlipOCR(args, parsed_globals):
|
3089
|
+
g_param = parse_global_arg(parsed_globals)
|
3090
|
+
|
3091
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3092
|
+
cred = credential.CVMRoleCredential()
|
3093
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3094
|
+
cred = credential.STSAssumeRoleCredential(
|
3095
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3096
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3097
|
+
)
|
3098
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3099
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3100
|
+
else:
|
3101
|
+
cred = credential.Credential(
|
3102
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3103
|
+
)
|
3104
|
+
http_profile = HttpProfile(
|
3105
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3106
|
+
reqMethod="POST",
|
3107
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3108
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3109
|
+
)
|
3110
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3111
|
+
if g_param[OptionsDefine.Language]:
|
3112
|
+
profile.language = g_param[OptionsDefine.Language]
|
3113
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3114
|
+
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3115
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3116
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3117
|
+
model = models.BankSlipOCRRequest()
|
3118
|
+
model.from_json_string(json.dumps(args))
|
3119
|
+
start_time = time.time()
|
3120
|
+
while True:
|
3121
|
+
rsp = client.BankSlipOCR(model)
|
3070
3122
|
result = rsp.to_json_string()
|
3071
3123
|
try:
|
3072
3124
|
json_obj = json.loads(result)
|
@@ -3189,7 +3241,7 @@ def doRecognizeTravelCardOCR(args, parsed_globals):
|
|
3189
3241
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3190
3242
|
|
3191
3243
|
|
3192
|
-
def
|
3244
|
+
def doVerifyOfdVatInvoiceOCR(args, parsed_globals):
|
3193
3245
|
g_param = parse_global_arg(parsed_globals)
|
3194
3246
|
|
3195
3247
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3218,11 +3270,11 @@ def doRecognizeMedicalInvoiceOCR(args, parsed_globals):
|
|
3218
3270
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3219
3271
|
client._sdkVersion += ("_CLI_" + __version__)
|
3220
3272
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3221
|
-
model = models.
|
3273
|
+
model = models.VerifyOfdVatInvoiceOCRRequest()
|
3222
3274
|
model.from_json_string(json.dumps(args))
|
3223
3275
|
start_time = time.time()
|
3224
3276
|
while True:
|
3225
|
-
rsp = client.
|
3277
|
+
rsp = client.VerifyOfdVatInvoiceOCR(model)
|
3226
3278
|
result = rsp.to_json_string()
|
3227
3279
|
try:
|
3228
3280
|
json_obj = json.loads(result)
|
@@ -3241,7 +3293,7 @@ def doRecognizeMedicalInvoiceOCR(args, parsed_globals):
|
|
3241
3293
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3242
3294
|
|
3243
3295
|
|
3244
|
-
def
|
3296
|
+
def doDriverLicenseOCR(args, parsed_globals):
|
3245
3297
|
g_param = parse_global_arg(parsed_globals)
|
3246
3298
|
|
3247
3299
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3270,11 +3322,11 @@ def doRideHailingDriverLicenseOCR(args, parsed_globals):
|
|
3270
3322
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3271
3323
|
client._sdkVersion += ("_CLI_" + __version__)
|
3272
3324
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3273
|
-
model = models.
|
3325
|
+
model = models.DriverLicenseOCRRequest()
|
3274
3326
|
model.from_json_string(json.dumps(args))
|
3275
3327
|
start_time = time.time()
|
3276
3328
|
while True:
|
3277
|
-
rsp = client.
|
3329
|
+
rsp = client.DriverLicenseOCR(model)
|
3278
3330
|
result = rsp.to_json_string()
|
3279
3331
|
try:
|
3280
3332
|
json_obj = json.loads(result)
|
@@ -3293,7 +3345,7 @@ def doRideHailingDriverLicenseOCR(args, parsed_globals):
|
|
3293
3345
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3294
3346
|
|
3295
3347
|
|
3296
|
-
def
|
3348
|
+
def doFinanBillOCR(args, parsed_globals):
|
3297
3349
|
g_param = parse_global_arg(parsed_globals)
|
3298
3350
|
|
3299
3351
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3322,11 +3374,11 @@ def doRecognizePhilippinesTinIDOCR(args, parsed_globals):
|
|
3322
3374
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3323
3375
|
client._sdkVersion += ("_CLI_" + __version__)
|
3324
3376
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3325
|
-
model = models.
|
3377
|
+
model = models.FinanBillOCRRequest()
|
3326
3378
|
model.from_json_string(json.dumps(args))
|
3327
3379
|
start_time = time.time()
|
3328
3380
|
while True:
|
3329
|
-
rsp = client.
|
3381
|
+
rsp = client.FinanBillOCR(model)
|
3330
3382
|
result = rsp.to_json_string()
|
3331
3383
|
try:
|
3332
3384
|
json_obj = json.loads(result)
|
@@ -3345,7 +3397,7 @@ def doRecognizePhilippinesTinIDOCR(args, parsed_globals):
|
|
3345
3397
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3346
3398
|
|
3347
3399
|
|
3348
|
-
def
|
3400
|
+
def doMixedInvoiceOCR(args, parsed_globals):
|
3349
3401
|
g_param = parse_global_arg(parsed_globals)
|
3350
3402
|
|
3351
3403
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3374,11 +3426,11 @@ def doVehicleRegCertOCR(args, parsed_globals):
|
|
3374
3426
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3375
3427
|
client._sdkVersion += ("_CLI_" + __version__)
|
3376
3428
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3377
|
-
model = models.
|
3429
|
+
model = models.MixedInvoiceOCRRequest()
|
3378
3430
|
model.from_json_string(json.dumps(args))
|
3379
3431
|
start_time = time.time()
|
3380
3432
|
while True:
|
3381
|
-
rsp = client.
|
3433
|
+
rsp = client.MixedInvoiceOCR(model)
|
3382
3434
|
result = rsp.to_json_string()
|
3383
3435
|
try:
|
3384
3436
|
json_obj = json.loads(result)
|
@@ -3397,7 +3449,7 @@ def doVehicleRegCertOCR(args, parsed_globals):
|
|
3397
3449
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3398
3450
|
|
3399
3451
|
|
3400
|
-
def
|
3452
|
+
def doImageEnhancement(args, parsed_globals):
|
3401
3453
|
g_param = parse_global_arg(parsed_globals)
|
3402
3454
|
|
3403
3455
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3426,11 +3478,11 @@ def doBankCardOCR(args, parsed_globals):
|
|
3426
3478
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3427
3479
|
client._sdkVersion += ("_CLI_" + __version__)
|
3428
3480
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3429
|
-
model = models.
|
3481
|
+
model = models.ImageEnhancementRequest()
|
3430
3482
|
model.from_json_string(json.dumps(args))
|
3431
3483
|
start_time = time.time()
|
3432
3484
|
while True:
|
3433
|
-
rsp = client.
|
3485
|
+
rsp = client.ImageEnhancement(model)
|
3434
3486
|
result = rsp.to_json_string()
|
3435
3487
|
try:
|
3436
3488
|
json_obj = json.loads(result)
|
@@ -3449,7 +3501,7 @@ def doBankCardOCR(args, parsed_globals):
|
|
3449
3501
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3450
3502
|
|
3451
3503
|
|
3452
|
-
def
|
3504
|
+
def doMLIDCardOCR(args, parsed_globals):
|
3453
3505
|
g_param = parse_global_arg(parsed_globals)
|
3454
3506
|
|
3455
3507
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3478,11 +3530,11 @@ def doCarInvoiceOCR(args, parsed_globals):
|
|
3478
3530
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3479
3531
|
client._sdkVersion += ("_CLI_" + __version__)
|
3480
3532
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3481
|
-
model = models.
|
3533
|
+
model = models.MLIDCardOCRRequest()
|
3482
3534
|
model.from_json_string(json.dumps(args))
|
3483
3535
|
start_time = time.time()
|
3484
3536
|
while True:
|
3485
|
-
rsp = client.
|
3537
|
+
rsp = client.MLIDCardOCR(model)
|
3486
3538
|
result = rsp.to_json_string()
|
3487
3539
|
try:
|
3488
3540
|
json_obj = json.loads(result)
|
@@ -3501,7 +3553,7 @@ def doCarInvoiceOCR(args, parsed_globals):
|
|
3501
3553
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3502
3554
|
|
3503
3555
|
|
3504
|
-
def
|
3556
|
+
def doRecognizeMedicalInvoiceOCR(args, parsed_globals):
|
3505
3557
|
g_param = parse_global_arg(parsed_globals)
|
3506
3558
|
|
3507
3559
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3530,11 +3582,11 @@ def doRecognizeForeignPermanentResidentIdCard(args, parsed_globals):
|
|
3530
3582
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3531
3583
|
client._sdkVersion += ("_CLI_" + __version__)
|
3532
3584
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3533
|
-
model = models.
|
3585
|
+
model = models.RecognizeMedicalInvoiceOCRRequest()
|
3534
3586
|
model.from_json_string(json.dumps(args))
|
3535
3587
|
start_time = time.time()
|
3536
3588
|
while True:
|
3537
|
-
rsp = client.
|
3589
|
+
rsp = client.RecognizeMedicalInvoiceOCR(model)
|
3538
3590
|
result = rsp.to_json_string()
|
3539
3591
|
try:
|
3540
3592
|
json_obj = json.loads(result)
|
@@ -3553,7 +3605,7 @@ def doRecognizeForeignPermanentResidentIdCard(args, parsed_globals):
|
|
3553
3605
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3554
3606
|
|
3555
3607
|
|
3556
|
-
def
|
3608
|
+
def doGeneralFastOCR(args, parsed_globals):
|
3557
3609
|
g_param = parse_global_arg(parsed_globals)
|
3558
3610
|
|
3559
3611
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3582,11 +3634,11 @@ def doMainlandPermitOCR(args, parsed_globals):
|
|
3582
3634
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3583
3635
|
client._sdkVersion += ("_CLI_" + __version__)
|
3584
3636
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3585
|
-
model = models.
|
3637
|
+
model = models.GeneralFastOCRRequest()
|
3586
3638
|
model.from_json_string(json.dumps(args))
|
3587
3639
|
start_time = time.time()
|
3588
3640
|
while True:
|
3589
|
-
rsp = client.
|
3641
|
+
rsp = client.GeneralFastOCR(model)
|
3590
3642
|
result = rsp.to_json_string()
|
3591
3643
|
try:
|
3592
3644
|
json_obj = json.loads(result)
|
@@ -3605,7 +3657,7 @@ def doMainlandPermitOCR(args, parsed_globals):
|
|
3605
3657
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3606
3658
|
|
3607
3659
|
|
3608
|
-
def
|
3660
|
+
def doVatInvoiceOCR(args, parsed_globals):
|
3609
3661
|
g_param = parse_global_arg(parsed_globals)
|
3610
3662
|
|
3611
3663
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3634,11 +3686,11 @@ def doFinanBillSliceOCR(args, parsed_globals):
|
|
3634
3686
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3635
3687
|
client._sdkVersion += ("_CLI_" + __version__)
|
3636
3688
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3637
|
-
model = models.
|
3689
|
+
model = models.VatInvoiceOCRRequest()
|
3638
3690
|
model.from_json_string(json.dumps(args))
|
3639
3691
|
start_time = time.time()
|
3640
3692
|
while True:
|
3641
|
-
rsp = client.
|
3693
|
+
rsp = client.VatInvoiceOCR(model)
|
3642
3694
|
result = rsp.to_json_string()
|
3643
3695
|
try:
|
3644
3696
|
json_obj = json.loads(result)
|
@@ -3657,7 +3709,7 @@ def doFinanBillSliceOCR(args, parsed_globals):
|
|
3657
3709
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3658
3710
|
|
3659
3711
|
|
3660
|
-
def
|
3712
|
+
def doRecognizeForeignPermanentResidentIdCard(args, parsed_globals):
|
3661
3713
|
g_param = parse_global_arg(parsed_globals)
|
3662
3714
|
|
3663
3715
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3686,11 +3738,11 @@ def doFormulaOCR(args, parsed_globals):
|
|
3686
3738
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3687
3739
|
client._sdkVersion += ("_CLI_" + __version__)
|
3688
3740
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3689
|
-
model = models.
|
3741
|
+
model = models.RecognizeForeignPermanentResidentIdCardRequest()
|
3690
3742
|
model.from_json_string(json.dumps(args))
|
3691
3743
|
start_time = time.time()
|
3692
3744
|
while True:
|
3693
|
-
rsp = client.
|
3745
|
+
rsp = client.RecognizeForeignPermanentResidentIdCard(model)
|
3694
3746
|
result = rsp.to_json_string()
|
3695
3747
|
try:
|
3696
3748
|
json_obj = json.loads(result)
|
@@ -3709,7 +3761,7 @@ def doFormulaOCR(args, parsed_globals):
|
|
3709
3761
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3710
3762
|
|
3711
3763
|
|
3712
|
-
def
|
3764
|
+
def doOrgCodeCertOCR(args, parsed_globals):
|
3713
3765
|
g_param = parse_global_arg(parsed_globals)
|
3714
3766
|
|
3715
3767
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3738,11 +3790,11 @@ def doVatInvoiceVerify(args, parsed_globals):
|
|
3738
3790
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3739
3791
|
client._sdkVersion += ("_CLI_" + __version__)
|
3740
3792
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3741
|
-
model = models.
|
3793
|
+
model = models.OrgCodeCertOCRRequest()
|
3742
3794
|
model.from_json_string(json.dumps(args))
|
3743
3795
|
start_time = time.time()
|
3744
3796
|
while True:
|
3745
|
-
rsp = client.
|
3797
|
+
rsp = client.OrgCodeCertOCR(model)
|
3746
3798
|
result = rsp.to_json_string()
|
3747
3799
|
try:
|
3748
3800
|
json_obj = json.loads(result)
|
@@ -3761,7 +3813,7 @@ def doVatInvoiceVerify(args, parsed_globals):
|
|
3761
3813
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3762
3814
|
|
3763
3815
|
|
3764
|
-
def
|
3816
|
+
def doFinanBillSliceOCR(args, parsed_globals):
|
3765
3817
|
g_param = parse_global_arg(parsed_globals)
|
3766
3818
|
|
3767
3819
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3790,11 +3842,11 @@ def doInstitutionOCR(args, parsed_globals):
|
|
3790
3842
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3791
3843
|
client._sdkVersion += ("_CLI_" + __version__)
|
3792
3844
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3793
|
-
model = models.
|
3845
|
+
model = models.FinanBillSliceOCRRequest()
|
3794
3846
|
model.from_json_string(json.dumps(args))
|
3795
3847
|
start_time = time.time()
|
3796
3848
|
while True:
|
3797
|
-
rsp = client.
|
3849
|
+
rsp = client.FinanBillSliceOCR(model)
|
3798
3850
|
result = rsp.to_json_string()
|
3799
3851
|
try:
|
3800
3852
|
json_obj = json.loads(result)
|
@@ -3813,7 +3865,7 @@ def doInstitutionOCR(args, parsed_globals):
|
|
3813
3865
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3814
3866
|
|
3815
3867
|
|
3816
|
-
def
|
3868
|
+
def doLicensePlateOCR(args, parsed_globals):
|
3817
3869
|
g_param = parse_global_arg(parsed_globals)
|
3818
3870
|
|
3819
3871
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3842,11 +3894,11 @@ def doShipInvoiceOCR(args, parsed_globals):
|
|
3842
3894
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3843
3895
|
client._sdkVersion += ("_CLI_" + __version__)
|
3844
3896
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3845
|
-
model = models.
|
3897
|
+
model = models.LicensePlateOCRRequest()
|
3846
3898
|
model.from_json_string(json.dumps(args))
|
3847
3899
|
start_time = time.time()
|
3848
3900
|
while True:
|
3849
|
-
rsp = client.
|
3901
|
+
rsp = client.LicensePlateOCR(model)
|
3850
3902
|
result = rsp.to_json_string()
|
3851
3903
|
try:
|
3852
3904
|
json_obj = json.loads(result)
|
@@ -3865,7 +3917,7 @@ def doShipInvoiceOCR(args, parsed_globals):
|
|
3865
3917
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3866
3918
|
|
3867
3919
|
|
3868
|
-
def
|
3920
|
+
def doGeneralEfficientOCR(args, parsed_globals):
|
3869
3921
|
g_param = parse_global_arg(parsed_globals)
|
3870
3922
|
|
3871
3923
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3894,11 +3946,11 @@ def doRecognizePhilippinesDrivingLicenseOCR(args, parsed_globals):
|
|
3894
3946
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3895
3947
|
client._sdkVersion += ("_CLI_" + __version__)
|
3896
3948
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3897
|
-
model = models.
|
3949
|
+
model = models.GeneralEfficientOCRRequest()
|
3898
3950
|
model.from_json_string(json.dumps(args))
|
3899
3951
|
start_time = time.time()
|
3900
3952
|
while True:
|
3901
|
-
rsp = client.
|
3953
|
+
rsp = client.GeneralEfficientOCR(model)
|
3902
3954
|
result = rsp.to_json_string()
|
3903
3955
|
try:
|
3904
3956
|
json_obj = json.loads(result)
|
@@ -3917,7 +3969,7 @@ def doRecognizePhilippinesDrivingLicenseOCR(args, parsed_globals):
|
|
3917
3969
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3918
3970
|
|
3919
3971
|
|
3920
|
-
def
|
3972
|
+
def doAdvertiseOCR(args, parsed_globals):
|
3921
3973
|
g_param = parse_global_arg(parsed_globals)
|
3922
3974
|
|
3923
3975
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3946,11 +3998,11 @@ def doVerifyOfdVatInvoiceOCR(args, parsed_globals):
|
|
3946
3998
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3947
3999
|
client._sdkVersion += ("_CLI_" + __version__)
|
3948
4000
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3949
|
-
model = models.
|
4001
|
+
model = models.AdvertiseOCRRequest()
|
3950
4002
|
model.from_json_string(json.dumps(args))
|
3951
4003
|
start_time = time.time()
|
3952
4004
|
while True:
|
3953
|
-
rsp = client.
|
4005
|
+
rsp = client.AdvertiseOCR(model)
|
3954
4006
|
result = rsp.to_json_string()
|
3955
4007
|
try:
|
3956
4008
|
json_obj = json.loads(result)
|
@@ -3969,7 +4021,7 @@ def doVerifyOfdVatInvoiceOCR(args, parsed_globals):
|
|
3969
4021
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3970
4022
|
|
3971
4023
|
|
3972
|
-
def
|
4024
|
+
def doVehicleRegCertOCR(args, parsed_globals):
|
3973
4025
|
g_param = parse_global_arg(parsed_globals)
|
3974
4026
|
|
3975
4027
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3998,11 +4050,11 @@ def doRecognizeHealthCodeOCR(args, parsed_globals):
|
|
3998
4050
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3999
4051
|
client._sdkVersion += ("_CLI_" + __version__)
|
4000
4052
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4001
|
-
model = models.
|
4053
|
+
model = models.VehicleRegCertOCRRequest()
|
4002
4054
|
model.from_json_string(json.dumps(args))
|
4003
4055
|
start_time = time.time()
|
4004
4056
|
while True:
|
4005
|
-
rsp = client.
|
4057
|
+
rsp = client.VehicleRegCertOCR(model)
|
4006
4058
|
result = rsp.to_json_string()
|
4007
4059
|
try:
|
4008
4060
|
json_obj = json.loads(result)
|
@@ -4021,7 +4073,7 @@ def doRecognizeHealthCodeOCR(args, parsed_globals):
|
|
4021
4073
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4022
4074
|
|
4023
4075
|
|
4024
|
-
def
|
4076
|
+
def doCarInvoiceOCR(args, parsed_globals):
|
4025
4077
|
g_param = parse_global_arg(parsed_globals)
|
4026
4078
|
|
4027
4079
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4050,11 +4102,11 @@ def doRecognizeTableOCR(args, parsed_globals):
|
|
4050
4102
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
4051
4103
|
client._sdkVersion += ("_CLI_" + __version__)
|
4052
4104
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4053
|
-
model = models.
|
4105
|
+
model = models.CarInvoiceOCRRequest()
|
4054
4106
|
model.from_json_string(json.dumps(args))
|
4055
4107
|
start_time = time.time()
|
4056
4108
|
while True:
|
4057
|
-
rsp = client.
|
4109
|
+
rsp = client.CarInvoiceOCR(model)
|
4058
4110
|
result = rsp.to_json_string()
|
4059
4111
|
try:
|
4060
4112
|
json_obj = json.loads(result)
|
@@ -4073,7 +4125,7 @@ def doRecognizeTableOCR(args, parsed_globals):
|
|
4073
4125
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4074
4126
|
|
4075
4127
|
|
4076
|
-
def
|
4128
|
+
def doRecognizeHealthCodeOCR(args, parsed_globals):
|
4077
4129
|
g_param = parse_global_arg(parsed_globals)
|
4078
4130
|
|
4079
4131
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4102,11 +4154,11 @@ def doRecognizeIndonesiaIDCardOCR(args, parsed_globals):
|
|
4102
4154
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
4103
4155
|
client._sdkVersion += ("_CLI_" + __version__)
|
4104
4156
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4105
|
-
model = models.
|
4157
|
+
model = models.RecognizeHealthCodeOCRRequest()
|
4106
4158
|
model.from_json_string(json.dumps(args))
|
4107
4159
|
start_time = time.time()
|
4108
4160
|
while True:
|
4109
|
-
rsp = client.
|
4161
|
+
rsp = client.RecognizeHealthCodeOCR(model)
|
4110
4162
|
result = rsp.to_json_string()
|
4111
4163
|
try:
|
4112
4164
|
json_obj = json.loads(result)
|
@@ -4125,7 +4177,7 @@ def doRecognizeIndonesiaIDCardOCR(args, parsed_globals):
|
|
4125
4177
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4126
4178
|
|
4127
4179
|
|
4128
|
-
def
|
4180
|
+
def doRecognizePhilippinesSssIDOCR(args, parsed_globals):
|
4129
4181
|
g_param = parse_global_arg(parsed_globals)
|
4130
4182
|
|
4131
4183
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4154,11 +4206,11 @@ def doDriverLicenseOCR(args, parsed_globals):
|
|
4154
4206
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
4155
4207
|
client._sdkVersion += ("_CLI_" + __version__)
|
4156
4208
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4157
|
-
model = models.
|
4209
|
+
model = models.RecognizePhilippinesSssIDOCRRequest()
|
4158
4210
|
model.from_json_string(json.dumps(args))
|
4159
4211
|
start_time = time.time()
|
4160
4212
|
while True:
|
4161
|
-
rsp = client.
|
4213
|
+
rsp = client.RecognizePhilippinesSssIDOCR(model)
|
4162
4214
|
result = rsp.to_json_string()
|
4163
4215
|
try:
|
4164
4216
|
json_obj = json.loads(result)
|
@@ -4177,7 +4229,7 @@ def doDriverLicenseOCR(args, parsed_globals):
|
|
4177
4229
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4178
4230
|
|
4179
4231
|
|
4180
|
-
def
|
4232
|
+
def doFormulaOCR(args, parsed_globals):
|
4181
4233
|
g_param = parse_global_arg(parsed_globals)
|
4182
4234
|
|
4183
4235
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4206,11 +4258,11 @@ def doEduPaperOCR(args, parsed_globals):
|
|
4206
4258
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
4207
4259
|
client._sdkVersion += ("_CLI_" + __version__)
|
4208
4260
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4209
|
-
model = models.
|
4261
|
+
model = models.FormulaOCRRequest()
|
4210
4262
|
model.from_json_string(json.dumps(args))
|
4211
4263
|
start_time = time.time()
|
4212
4264
|
while True:
|
4213
|
-
rsp = client.
|
4265
|
+
rsp = client.FormulaOCR(model)
|
4214
4266
|
result = rsp.to_json_string()
|
4215
4267
|
try:
|
4216
4268
|
json_obj = json.loads(result)
|
@@ -4229,7 +4281,7 @@ def doEduPaperOCR(args, parsed_globals):
|
|
4229
4281
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4230
4282
|
|
4231
4283
|
|
4232
|
-
def
|
4284
|
+
def doPassportOCR(args, parsed_globals):
|
4233
4285
|
g_param = parse_global_arg(parsed_globals)
|
4234
4286
|
|
4235
4287
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4258,11 +4310,11 @@ def doRideHailingTransportLicenseOCR(args, parsed_globals):
|
|
4258
4310
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
4259
4311
|
client._sdkVersion += ("_CLI_" + __version__)
|
4260
4312
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4261
|
-
model = models.
|
4313
|
+
model = models.PassportOCRRequest()
|
4262
4314
|
model.from_json_string(json.dumps(args))
|
4263
4315
|
start_time = time.time()
|
4264
4316
|
while True:
|
4265
|
-
rsp = client.
|
4317
|
+
rsp = client.PassportOCR(model)
|
4266
4318
|
result = rsp.to_json_string()
|
4267
4319
|
try:
|
4268
4320
|
json_obj = json.loads(result)
|
@@ -4281,7 +4333,7 @@ def doRideHailingTransportLicenseOCR(args, parsed_globals):
|
|
4281
4333
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4282
4334
|
|
4283
4335
|
|
4284
|
-
def
|
4336
|
+
def doShipInvoiceOCR(args, parsed_globals):
|
4285
4337
|
g_param = parse_global_arg(parsed_globals)
|
4286
4338
|
|
4287
4339
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4310,11 +4362,11 @@ def doDutyPaidProofOCR(args, parsed_globals):
|
|
4310
4362
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
4311
4363
|
client._sdkVersion += ("_CLI_" + __version__)
|
4312
4364
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4313
|
-
model = models.
|
4365
|
+
model = models.ShipInvoiceOCRRequest()
|
4314
4366
|
model.from_json_string(json.dumps(args))
|
4315
4367
|
start_time = time.time()
|
4316
4368
|
while True:
|
4317
|
-
rsp = client.
|
4369
|
+
rsp = client.ShipInvoiceOCR(model)
|
4318
4370
|
result = rsp.to_json_string()
|
4319
4371
|
try:
|
4320
4372
|
json_obj = json.loads(result)
|
@@ -4333,7 +4385,7 @@ def doDutyPaidProofOCR(args, parsed_globals):
|
|
4333
4385
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4334
4386
|
|
4335
4387
|
|
4336
|
-
def
|
4388
|
+
def doRecognizeIndonesiaIDCardOCR(args, parsed_globals):
|
4337
4389
|
g_param = parse_global_arg(parsed_globals)
|
4338
4390
|
|
4339
4391
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4362,11 +4414,11 @@ def doRecognizeGeneralInvoice(args, parsed_globals):
|
|
4362
4414
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
4363
4415
|
client._sdkVersion += ("_CLI_" + __version__)
|
4364
4416
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4365
|
-
model = models.
|
4417
|
+
model = models.RecognizeIndonesiaIDCardOCRRequest()
|
4366
4418
|
model.from_json_string(json.dumps(args))
|
4367
4419
|
start_time = time.time()
|
4368
4420
|
while True:
|
4369
|
-
rsp = client.
|
4421
|
+
rsp = client.RecognizeIndonesiaIDCardOCR(model)
|
4370
4422
|
result = rsp.to_json_string()
|
4371
4423
|
try:
|
4372
4424
|
json_obj = json.loads(result)
|
@@ -4385,7 +4437,7 @@ def doRecognizeGeneralInvoice(args, parsed_globals):
|
|
4385
4437
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4386
4438
|
|
4387
4439
|
|
4388
|
-
def
|
4440
|
+
def doRideHailingTransportLicenseOCR(args, parsed_globals):
|
4389
4441
|
g_param = parse_global_arg(parsed_globals)
|
4390
4442
|
|
4391
4443
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4414,11 +4466,63 @@ def doVehicleLicenseOCR(args, parsed_globals):
|
|
4414
4466
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
4415
4467
|
client._sdkVersion += ("_CLI_" + __version__)
|
4416
4468
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4417
|
-
model = models.
|
4469
|
+
model = models.RideHailingTransportLicenseOCRRequest()
|
4418
4470
|
model.from_json_string(json.dumps(args))
|
4419
4471
|
start_time = time.time()
|
4420
4472
|
while True:
|
4421
|
-
rsp = client.
|
4473
|
+
rsp = client.RideHailingTransportLicenseOCR(model)
|
4474
|
+
result = rsp.to_json_string()
|
4475
|
+
try:
|
4476
|
+
json_obj = json.loads(result)
|
4477
|
+
except TypeError as e:
|
4478
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4479
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4480
|
+
break
|
4481
|
+
cur_time = time.time()
|
4482
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4483
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4484
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4485
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4486
|
+
else:
|
4487
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4488
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4489
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4490
|
+
|
4491
|
+
|
4492
|
+
def doRecognizePhilippinesTinIDOCR(args, parsed_globals):
|
4493
|
+
g_param = parse_global_arg(parsed_globals)
|
4494
|
+
|
4495
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4496
|
+
cred = credential.CVMRoleCredential()
|
4497
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4498
|
+
cred = credential.STSAssumeRoleCredential(
|
4499
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4500
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4501
|
+
)
|
4502
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4503
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4504
|
+
else:
|
4505
|
+
cred = credential.Credential(
|
4506
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4507
|
+
)
|
4508
|
+
http_profile = HttpProfile(
|
4509
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4510
|
+
reqMethod="POST",
|
4511
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4512
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4513
|
+
)
|
4514
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4515
|
+
if g_param[OptionsDefine.Language]:
|
4516
|
+
profile.language = g_param[OptionsDefine.Language]
|
4517
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4518
|
+
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
4519
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4520
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4521
|
+
model = models.RecognizePhilippinesTinIDOCRRequest()
|
4522
|
+
model.from_json_string(json.dumps(args))
|
4523
|
+
start_time = time.time()
|
4524
|
+
while True:
|
4525
|
+
rsp = client.RecognizePhilippinesTinIDOCR(model)
|
4422
4526
|
result = rsp.to_json_string()
|
4423
4527
|
try:
|
4424
4528
|
json_obj = json.loads(result)
|
@@ -4448,91 +4552,93 @@ MODELS_MAP = {
|
|
4448
4552
|
}
|
4449
4553
|
|
4450
4554
|
ACTION_MAP = {
|
4451
|
-
"
|
4452
|
-
"ImageEnhancement": doImageEnhancement,
|
4453
|
-
"GeneralBasicOCR": doGeneralBasicOCR,
|
4454
|
-
"SmartStructuralOCRV2": doSmartStructuralOCRV2,
|
4455
|
-
"EnterpriseLicenseOCR": doEnterpriseLicenseOCR,
|
4456
|
-
"BusinessCardOCR": doBusinessCardOCR,
|
4457
|
-
"IDCardOCR": doIDCardOCR,
|
4458
|
-
"PassportOCR": doPassportOCR,
|
4459
|
-
"LicensePlateOCR": doLicensePlateOCR,
|
4460
|
-
"MLIDCardOCR": doMLIDCardOCR,
|
4461
|
-
"VatInvoiceVerifyNew": doVatInvoiceVerifyNew,
|
4555
|
+
"TextDetect": doTextDetect,
|
4462
4556
|
"QrcodeOCR": doQrcodeOCR,
|
4463
4557
|
"GeneralAccurateOCR": doGeneralAccurateOCR,
|
4464
|
-
"MixedInvoiceOCR": doMixedInvoiceOCR,
|
4465
4558
|
"RecognizeContainerOCR": doRecognizeContainerOCR,
|
4466
|
-
"RecognizeTableAccurateOCR": doRecognizeTableAccurateOCR,
|
4467
4559
|
"RecognizeEncryptedIDCardOCR": doRecognizeEncryptedIDCardOCR,
|
4468
|
-
"
|
4469
|
-
"VinOCR": doVinOCR,
|
4560
|
+
"RecognizeStoreName": doRecognizeStoreName,
|
4470
4561
|
"MLIDPassportOCR": doMLIDPassportOCR,
|
4471
|
-
"
|
4472
|
-
"QuotaInvoiceOCR": doQuotaInvoiceOCR,
|
4473
|
-
"BankSlipOCR": doBankSlipOCR,
|
4474
|
-
"GeneralFastOCR": doGeneralFastOCR,
|
4562
|
+
"TrainTicketOCR": doTrainTicketOCR,
|
4475
4563
|
"PropOwnerCertOCR": doPropOwnerCertOCR,
|
4476
|
-
"BizLicenseOCR": doBizLicenseOCR,
|
4477
|
-
"GeneralHandwritingOCR": doGeneralHandwritingOCR,
|
4478
|
-
"AdvertiseOCR": doAdvertiseOCR,
|
4479
4564
|
"InvoiceGeneralOCR": doInvoiceGeneralOCR,
|
4480
4565
|
"ReconstructDocument": doReconstructDocument,
|
4481
|
-
"GetTaskState": doGetTaskState,
|
4482
|
-
"RecognizeOnlineTaxiItineraryOCR": doRecognizeOnlineTaxiItineraryOCR,
|
4483
4566
|
"HKIDCardOCR": doHKIDCardOCR,
|
4484
|
-
"VatInvoiceOCR": doVatInvoiceOCR,
|
4485
|
-
"CreateAIFormTask": doCreateAIFormTask,
|
4486
|
-
"WaybillOCR": doWaybillOCR,
|
4487
|
-
"FlightInvoiceOCR": doFlightInvoiceOCR,
|
4488
4567
|
"PermitOCR": doPermitOCR,
|
4489
|
-
"RecognizeThaiIDCardOCR": doRecognizeThaiIDCardOCR,
|
4490
|
-
"TextDetect": doTextDetect,
|
4491
4568
|
"BusInvoiceOCR": doBusInvoiceOCR,
|
4492
|
-
"RecognizePhilippinesSssIDOCR": doRecognizePhilippinesSssIDOCR,
|
4493
|
-
"TableOCR": doTableOCR,
|
4494
4569
|
"EnglishOCR": doEnglishOCR,
|
4495
|
-
"HmtResidentPermitOCR": doHmtResidentPermitOCR,
|
4496
|
-
"RecognizeGeneralTextImageWarn": doRecognizeGeneralTextImageWarn,
|
4497
4570
|
"SmartStructuralOCR": doSmartStructuralOCR,
|
4571
|
+
"ClassifyStoreName": doClassifyStoreName,
|
4572
|
+
"TaxiInvoiceOCR": doTaxiInvoiceOCR,
|
4573
|
+
"RideHailingDriverLicenseOCR": doRideHailingDriverLicenseOCR,
|
4574
|
+
"DutyPaidProofOCR": doDutyPaidProofOCR,
|
4575
|
+
"MainlandPermitOCR": doMainlandPermitOCR,
|
4576
|
+
"GeneralBasicOCR": doGeneralBasicOCR,
|
4577
|
+
"RecognizeGeneralInvoice": doRecognizeGeneralInvoice,
|
4578
|
+
"InsuranceBillOCR": doInsuranceBillOCR,
|
4579
|
+
"VatInvoiceVerifyNew": doVatInvoiceVerifyNew,
|
4580
|
+
"VinOCR": doVinOCR,
|
4581
|
+
"VehicleLicenseOCR": doVehicleLicenseOCR,
|
4582
|
+
"BizLicenseOCR": doBizLicenseOCR,
|
4583
|
+
"GetTaskState": doGetTaskState,
|
4584
|
+
"FlightInvoiceOCR": doFlightInvoiceOCR,
|
4585
|
+
"RecognizeThaiIDCardOCR": doRecognizeThaiIDCardOCR,
|
4586
|
+
"TableOCR": doTableOCR,
|
4498
4587
|
"ArithmeticOCR": doArithmeticOCR,
|
4499
|
-
"TollInvoiceOCR": doTollInvoiceOCR,
|
4500
4588
|
"EstateCertOCR": doEstateCertOCR,
|
4589
|
+
"RecognizePhilippinesUMIDOCR": doRecognizePhilippinesUMIDOCR,
|
4590
|
+
"BankCardOCR": doBankCardOCR,
|
4591
|
+
"VatInvoiceVerify": doVatInvoiceVerify,
|
4592
|
+
"RecognizePhilippinesDrivingLicenseOCR": doRecognizePhilippinesDrivingLicenseOCR,
|
4593
|
+
"EduPaperOCR": doEduPaperOCR,
|
4594
|
+
"EnterpriseLicenseOCR": doEnterpriseLicenseOCR,
|
4595
|
+
"BusinessCardOCR": doBusinessCardOCR,
|
4596
|
+
"IDCardOCR": doIDCardOCR,
|
4597
|
+
"RecognizeGeneralTextImageWarn": doRecognizeGeneralTextImageWarn,
|
4598
|
+
"InstitutionOCR": doInstitutionOCR,
|
4599
|
+
"SmartStructuralOCRV2": doSmartStructuralOCRV2,
|
4600
|
+
"RecognizeTableAccurateOCR": doRecognizeTableAccurateOCR,
|
4601
|
+
"MixedInvoiceDetect": doMixedInvoiceDetect,
|
4602
|
+
"VatRollInvoiceOCR": doVatRollInvoiceOCR,
|
4603
|
+
"QuotaInvoiceOCR": doQuotaInvoiceOCR,
|
4604
|
+
"GeneralHandwritingOCR": doGeneralHandwritingOCR,
|
4605
|
+
"RecognizeOnlineTaxiItineraryOCR": doRecognizeOnlineTaxiItineraryOCR,
|
4606
|
+
"RecognizeTableOCR": doRecognizeTableOCR,
|
4607
|
+
"CreateAIFormTask": doCreateAIFormTask,
|
4608
|
+
"WaybillOCR": doWaybillOCR,
|
4609
|
+
"HmtResidentPermitOCR": doHmtResidentPermitOCR,
|
4610
|
+
"TollInvoiceOCR": doTollInvoiceOCR,
|
4501
4611
|
"ClassifyDetectOCR": doClassifyDetectOCR,
|
4502
|
-
"OrgCodeCertOCR": doOrgCodeCertOCR,
|
4503
4612
|
"SealOCR": doSealOCR,
|
4504
4613
|
"RecognizePhilippinesVoteIDOCR": doRecognizePhilippinesVoteIDOCR,
|
4505
|
-
"
|
4506
|
-
"TrainTicketOCR": doTrainTicketOCR,
|
4507
|
-
"RecognizePhilippinesUMIDOCR": doRecognizePhilippinesUMIDOCR,
|
4508
|
-
"GeneralEfficientOCR": doGeneralEfficientOCR,
|
4509
|
-
"TaxiInvoiceOCR": doTaxiInvoiceOCR,
|
4614
|
+
"BankSlipOCR": doBankSlipOCR,
|
4510
4615
|
"ResidenceBookletOCR": doResidenceBookletOCR,
|
4511
4616
|
"RecognizeTravelCardOCR": doRecognizeTravelCardOCR,
|
4617
|
+
"VerifyOfdVatInvoiceOCR": doVerifyOfdVatInvoiceOCR,
|
4618
|
+
"DriverLicenseOCR": doDriverLicenseOCR,
|
4619
|
+
"FinanBillOCR": doFinanBillOCR,
|
4620
|
+
"MixedInvoiceOCR": doMixedInvoiceOCR,
|
4621
|
+
"ImageEnhancement": doImageEnhancement,
|
4622
|
+
"MLIDCardOCR": doMLIDCardOCR,
|
4512
4623
|
"RecognizeMedicalInvoiceOCR": doRecognizeMedicalInvoiceOCR,
|
4513
|
-
"
|
4514
|
-
"
|
4515
|
-
"VehicleRegCertOCR": doVehicleRegCertOCR,
|
4516
|
-
"BankCardOCR": doBankCardOCR,
|
4517
|
-
"CarInvoiceOCR": doCarInvoiceOCR,
|
4624
|
+
"GeneralFastOCR": doGeneralFastOCR,
|
4625
|
+
"VatInvoiceOCR": doVatInvoiceOCR,
|
4518
4626
|
"RecognizeForeignPermanentResidentIdCard": doRecognizeForeignPermanentResidentIdCard,
|
4519
|
-
"
|
4627
|
+
"OrgCodeCertOCR": doOrgCodeCertOCR,
|
4520
4628
|
"FinanBillSliceOCR": doFinanBillSliceOCR,
|
4629
|
+
"LicensePlateOCR": doLicensePlateOCR,
|
4630
|
+
"GeneralEfficientOCR": doGeneralEfficientOCR,
|
4631
|
+
"AdvertiseOCR": doAdvertiseOCR,
|
4632
|
+
"VehicleRegCertOCR": doVehicleRegCertOCR,
|
4633
|
+
"CarInvoiceOCR": doCarInvoiceOCR,
|
4634
|
+
"RecognizeHealthCodeOCR": doRecognizeHealthCodeOCR,
|
4635
|
+
"RecognizePhilippinesSssIDOCR": doRecognizePhilippinesSssIDOCR,
|
4521
4636
|
"FormulaOCR": doFormulaOCR,
|
4522
|
-
"
|
4523
|
-
"InstitutionOCR": doInstitutionOCR,
|
4637
|
+
"PassportOCR": doPassportOCR,
|
4524
4638
|
"ShipInvoiceOCR": doShipInvoiceOCR,
|
4525
|
-
"RecognizePhilippinesDrivingLicenseOCR": doRecognizePhilippinesDrivingLicenseOCR,
|
4526
|
-
"VerifyOfdVatInvoiceOCR": doVerifyOfdVatInvoiceOCR,
|
4527
|
-
"RecognizeHealthCodeOCR": doRecognizeHealthCodeOCR,
|
4528
|
-
"RecognizeTableOCR": doRecognizeTableOCR,
|
4529
4639
|
"RecognizeIndonesiaIDCardOCR": doRecognizeIndonesiaIDCardOCR,
|
4530
|
-
"DriverLicenseOCR": doDriverLicenseOCR,
|
4531
|
-
"EduPaperOCR": doEduPaperOCR,
|
4532
4640
|
"RideHailingTransportLicenseOCR": doRideHailingTransportLicenseOCR,
|
4533
|
-
"
|
4534
|
-
"RecognizeGeneralInvoice": doRecognizeGeneralInvoice,
|
4535
|
-
"VehicleLicenseOCR": doVehicleLicenseOCR,
|
4641
|
+
"RecognizePhilippinesTinIDOCR": doRecognizePhilippinesTinIDOCR,
|
4536
4642
|
|
4537
4643
|
}
|
4538
4644
|
|