调整mask大小为256*1024,且修改了一个plt无法显示图片的bug

This commit is contained in:
FEIJINTI 2022-08-21 11:35:18 +08:00
parent 74d2d031a3
commit b752bea8d4
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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):