zeke-chin vor 2 Jahren
Ursprung
Commit
7d0c7d2078
6 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen
  1. 0 0
      core/__init__.py
  2. 1 1
      core/direction.py
  3. 0 0
      core/line_parser.py
  4. 3 3
      core/ocr.py
  5. 1 1
      core/parser.py
  6. 2 2
      server.py

+ 0 - 0
ocr_core/__init__.py → core/__init__.py


+ 1 - 1
ocr_core/direction.py → core/direction.py

@@ -7,7 +7,7 @@ import cv2
 import numpy as np
 from paddleocr import PaddleOCR
 
-from ocr_core.line_parser import LineParser
+from core.line_parser import LineParser
 
 
 class Direction(Enum):

+ 0 - 0
ocr_core/line_parser.py → core/line_parser.py


+ 3 - 3
ocr_core/ocr.py → core/ocr.py

@@ -1,9 +1,9 @@
 from dataclasses import dataclass
 from typing import Any
 
-from ocr_core.line_parser import LineParser
-from ocr_core.parser import *
-from ocr_core.direction import *
+from core.line_parser import LineParser
+from core.parser import *
+from core.direction import *
 import numpy as np
 from paddleocr import PaddleOCR
 

+ 1 - 1
ocr_core/parser.py → core/parser.py

@@ -7,7 +7,7 @@ import cpca
 import numpy as np
 from zhon.hanzi import punctuation
 
-from ocr_core.line_parser import OcrResult
+from core.line_parser import OcrResult
 
 
 @dataclass

+ 2 - 2
server.py

@@ -3,11 +3,11 @@ from fastapi.middleware.cors import CORSMiddleware
 from pydantic import BaseModel
 from paddleocr import PaddleOCR
 
-from ocr_core.direction import AngleDetector
+from core.direction import AngleDetector
 from utils.image import *
 from utils.time import timeit
 from utils.web import web_try
-from ocr_core.ocr import IdCardOcr
+from core.ocr import IdCardOcr
 import os
 
 app = FastAPI()