From b752bea8d40e3d398652f0e5c50292f00e71e0e5 Mon Sep 17 00:00:00 2001 From: FEIJINTI <83849113+FEIJINTI@users.noreply.github.com> Date: Sun, 21 Aug 2022 11:35:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4mask=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E4=B8=BA256*1024,=E4=B8=94=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=B8=AAplt=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 2 +- main_test.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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):