mirror of
https://github.com/NanjingForestryUniversity/supermachine-tobacco.git
synced 2025-11-08 06:13:53 +00:00
调整mask大小为256*1024,且修改了一个plt无法显示图片的bug
This commit is contained in:
parent
74d2d031a3
commit
b752bea8d4
@ -34,7 +34,7 @@ class Config:
|
|||||||
ai_conf_threshold = 0.5
|
ai_conf_threshold = 0.5
|
||||||
|
|
||||||
# mask parameter
|
# mask parameter
|
||||||
target_size = (256, 256) # (Width, Height) of mask
|
target_size = (256, 1024) # (Width, Height) of mask
|
||||||
valve_merge_size = 2 # 每两个喷阀当中有任意一个出现杂质则认为都是杂质
|
valve_merge_size = 2 # 每两个喷阀当中有任意一个出现杂质则认为都是杂质
|
||||||
valve_horizontal_padding = 3 # 喷阀横向膨胀的尺寸,应该是奇数,3时表示左右各膨胀1
|
valve_horizontal_padding = 3 # 喷阀横向膨胀的尺寸,应该是奇数,3时表示左右各膨胀1
|
||||||
max_open_valve_limit = 25 # 最大同时开启喷阀限制,按照电流计算,当前的喷阀可以开启的喷阀 600W的电源 / 12V电源 = 50A, 一个阀门1A
|
max_open_valve_limit = 25 # 最大同时开启喷阀限制,按照电流计算,当前的喷阀可以开启的喷阀 600W的电源 / 12V电源 = 50A, 一个阀门1A
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import typing
|
|||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
|
|
||||||
import cv2
|
import cv2
|
||||||
|
import matplotlib
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from matplotlib.gridspec import GridSpec
|
from matplotlib.gridspec import GridSpec
|
||||||
@ -24,6 +25,8 @@ from config import Config
|
|||||||
from models import Detector, AnonymousColorDetector, ManualTree, SpecDetector, RgbDetector
|
from models import Detector, AnonymousColorDetector, ManualTree, SpecDetector, RgbDetector
|
||||||
from utils import read_labeled_img, size_threshold, natural_sort
|
from utils import read_labeled_img, size_threshold, natural_sort
|
||||||
|
|
||||||
|
matplotlib.use('TkAgg')
|
||||||
|
|
||||||
|
|
||||||
class TestMain:
|
class TestMain:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user