diff --git a/config.py b/config.py index d93b3e3..fd3115e 100644 --- a/config.py +++ b/config.py @@ -34,7 +34,7 @@ class Config: ai_conf_threshold = 0.5 # mask parameter - target_size = (256, 256) # (Width, Height) of mask + target_size = (256, 1024) # (Width, Height) of mask valve_merge_size = 2 # 每两个喷阀当中有任意一个出现杂质则认为都是杂质 valve_horizontal_padding = 3 # 喷阀横向膨胀的尺寸,应该是奇数,3时表示左右各膨胀1 max_open_valve_limit = 25 # 最大同时开启喷阀限制,按照电流计算,当前的喷阀可以开启的喷阀 600W的电源 / 12V电源 = 50A, 一个阀门1A diff --git a/main_test.py b/main_test.py index 3e60d98..e5e2784 100644 --- a/main_test.py +++ b/main_test.py @@ -13,6 +13,7 @@ import typing from shutil import copyfile import cv2 +import matplotlib import matplotlib.pyplot as plt import numpy as np from matplotlib.gridspec import GridSpec @@ -24,6 +25,8 @@ from config import Config from models import Detector, AnonymousColorDetector, ManualTree, SpecDetector, RgbDetector from utils import read_labeled_img, size_threshold, natural_sort +matplotlib.use('TkAgg') + class TestMain: def __init__(self):