Fix: import BoxedResult

This commit is contained in:
LmeSzinc 2023-09-10 19:23:27 +08:00
parent 04e9e39384
commit f85be40c98
3 changed files with 6 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import time
from datetime import timedelta
import cv2
from ppocronnx.predict_system import BoxedResult
from pponnxcr.predict_system import BoxedResult
import module.config.server as server
from module.base.button import ButtonWrapper

View File

@ -1,6 +1,6 @@
import itertools
from ppocronnx.predict_system import BoxedResult
from pponnxcr.predict_system import BoxedResult
from module.base.utils import area_in_area, area_offset
@ -45,6 +45,9 @@ def merge_buttons(buttons: list[BoxedResult], thres_x=20, thres_y=20) -> list[Bo
Returns:
"""
if thres_x <= 0 and thres_y <= 0:
return buttons
dic_button = {button.box: button for button in buttons}
set_merged = set()
for left, right in itertools.combinations(dic_button.items(), 2):

View File

@ -1,6 +1,6 @@
import cv2
import numpy as np
from ppocronnx.predict_system import BoxedResult
from pponnxcr.predict_system import BoxedResult
from module.base.base import ModuleBase
from module.base.timer import Timer