调度器使用示例、OCR调用改进
This commit is contained in:
parent
f19b7a4968
commit
1bcc311a93
15 changed files with 154 additions and 45 deletions
|
@ -6,13 +6,14 @@ from typing import Optional
|
|||
import cv2
|
||||
import numpy as np
|
||||
|
||||
from mower.utils import config, rapidocr
|
||||
from mower.utils import config
|
||||
from mower.utils import typealias as tp
|
||||
from mower.utils.csleep import MowerExit
|
||||
from mower.utils.graph import SceneGraphSolver
|
||||
from mower.utils.image import cropimg, loadres, thres2
|
||||
from mower.utils.log import logger
|
||||
from mower.utils.matcher import Matcher
|
||||
from mower.utils.rapidocr import engine
|
||||
from mower.utils.scene import Scene
|
||||
|
||||
src_pts = np.float32([[0, 97], [1920, 97], [-400, 1080], [2320, 1080]])
|
||||
|
@ -294,7 +295,7 @@ class ReclamationAlgorithm(SceneGraphSolver):
|
|||
def detect_score(self, scope=None, find_max=True):
|
||||
if find_max and self.find("ra/max", scope=scope, score=0.7):
|
||||
return "已达上限"
|
||||
score = rapidocr.engine(
|
||||
score = engine(
|
||||
thres2(cropimg(config.recog.gray, scope), 127),
|
||||
use_det=False,
|
||||
use_cls=False,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue