apiVersion: v1
kind: Service
metadata:
  name: max-ocr
  namespace: test
spec:
  selector:
    app: max-ocr
  ports:
  - port: 5000
    nodePort: 30042
  type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: max-ocr
  namespace: test
  labels:
    app: max-ocr
spec:
  selector:
    matchLabels:
      app: max-ocr
  replicas: 1
  template:
    metadata:
      labels:
        app: max-ocr
    spec:
      containers:
      - name: max-ocr
        image: codait/max-ocr:latest
        ports:
        - containerPort: 5000

英文测试,效果较好

[root@node04 ~]# curl -F "image=@ocr1.png" -XPOST http://172.16.0.21:30042/model/predict
{"status": "ok", "text": [["Creating a Deployment"], ["The following is an example of a Deployment. It creates a ReplicaSet to bring up 
three nginx Pods:"], [" "], ["france ey"], ["apiVersion: apps/v1", "kind: Deployment", "metadata:", "name: nginx-deployment", "labels:", "app: nginx", "spec:", "replicas: 3", "selector:", "matchLabels:", "app: nginx", "template:", "metadata", "labels", "app: nginx", "spec:", "containers:", "= name: nginx", "image: nginx:1.14.2", "ports:", "= containerPort: 88"]]}

中文识别不了

[root@master01 ~]# curl -F "image=@ocr.png" -XPOST http://172.16.0.21:30042/model/predict
{"status": "ok", "text": [["TERA, AMPH ESA A AT ORR, HOTTA", "#LHTYouTubelll SHEA A Aik TA. WRIA YouTube, Az Ae", "EMTS ATE, PARI TOL, U
RS Sate, Tea", "AYP LE. ARE ELS OMA \u2014 9 ATT", "in."], [" "], ["200944] 29, BEAGLE He FRR PAS 3 BH 3)", "FEMA ERR A AL BEY ouTube E48 8 6 KA We ALBEE ES PAL", "Feo AWN Z Ja HAZE FEA OP, IEE YouTube FH BLdR", "BOE, SOKA ME RT BAL TE."], ["$1 FEF YouTube#lHulutti tt, OBES OMA A? SPE", "YouTubeffi MAK. HuluR Bik se Be wep ej HE Heri \u2014 BL Te."], ["ALR ET URAL oe, PTE BK, Wea RA RT"], ["RAUAS AKAM NAL, MEU Ee. RAEN, K", "RUA TIM RA BAP a, BRITT A EFC TFG AS", "BEE, REREAD aE, Sh a ABU", "WY. Kb, RARRMMR."], ["ARAL T SESE ERE FEO. TERIA EA ME", "BARNA. KET ZINES TNA, FSR. 1X", "IA) TSE Ae AP AB EIA AE EB AT AD ERR, NRA", "MEL BAS UME ARS aoe BS TT BR RE A BS AEA BEAK", "CEBRAIRE, REACH TREES, MAS MME TAY", "FEAT REAR RE, (BASSE, BAUER RT BY AE BE MAPS SE"], ["RAP he, BRET ERATE FR, kA RIE.", "KM ZORA T eS, RB GET RAHA ae,", "TH FE Py ERD Sh AE RT SEAT SRR, TAS EAR ACBL."]]}

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code