diff --git a/DrGraph/Bussiness/Bussiness.py b/DrGraph/Bussiness/Bussiness.py new file mode 100644 index 0000000..ea8c168 --- /dev/null +++ b/DrGraph/Bussiness/Bussiness.py @@ -0,0 +1,285 @@ +from loguru import logger +import cv2,os,time, json, glob +import numpy as np +from collections import namedtuple +from concurrent.futures import ThreadPoolExecutor +import tensorrt as trt +from models.experimental import attempt_load +from DrGraph.util.masterUtils import get_needed_objectsIndex +from DrGraph.util.stdc import stdcModel + +from DrGraph.appIOs.conf.ModelTypeEnum import * +from DrGraph.appIOs.conf.ModelUtils import * +from DrGraph.util import aiHelper +from DrGraph.util.drHelper import * + +AnalysisFrameType = namedtuple('AnalysisFrameData', ['images', 'model', 'seg_model', 'names', 'label_arrays', + 'rainbows', 'object_params', 'font', 'image_name', 'seg_params', 'mode', 'post_params' ]) + +class BussinessBase: + @staticmethod + def createModel(opt): + business = opt['business'] + if business == 'illParking': + from .Bussiness_IllParking import Bussiness_IllParking + return Bussiness_IllParking(opt) + + def __init__(self, opt): + self.bussiness = opt['business'] + from DrGraph.appIOs.conf.ModelUtils import MODEL_CONFIG + self.code = '019' + model_method = MODEL_CONFIG[self.code] + self.modelClass = model_method[0] + self.modelProcessFun = model_method[3] + + self.param = { + 'device':'0', ###显卡号,如果用TRT模型,只支持0(单显卡) + # 'labelnames':"../AIlib2/DrGraph/weights/conf/%s/labelnames.json" % (self.bussiness), ###检测类别对照表 + 'labelnames':"../weights/conf/%s/labelnames.json" % (self.bussiness), ###检测类别对照表 + 'max_workers':1, ###并行线程数 + 'Detweights':"../weights/%s/yolov5_%s_fp16.engine"%(self.bussiness ,opt['gpu'] ),###检测模型路径 + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [0,1,2,3,5,6,7,8,9] ],###控制哪些检测类别显示、输出 + 'seg_nclass':4,###分割模型类别数目,默认2类 + 'segRegionCnt':2,###分割模型结果需要保留的等值线数目 + 'Segweights' : "../weights/%s/stdc_360X640_3090_fp16.engine" % (self.bussiness), ###分割模型权重位置 + 'postFile': '../weights/conf/%s/para.json'%(self.bussiness),###后处理参数文件 + 'txtFontSize':20,###文本字符的大小 + 'digitFont': { 'line_thickness':2,'boxLine_thickness':1, 'fontSize':1.0,'waterLineColor':(0,255,255),'segLineShow':True,'waterLineWidth':2},###显示框、线设置 + 'testImgPath':'./DrGraph/appIOs/samples/%s/' % (self.bussiness),###测试图像的位置 + 'testOutPath':'./DrGraph/appIOs/results/%s/' % (self.bussiness),###输出测试图像位置 + 'segPar': {'mixFunction':{'function':self.modelProcessFun, 'pars':{}}} + } + self.extraConfig(opt) + + logger.warning(f"""[{self.bussiness}] 业务配置 - {[key for key in self.param if self.param[key] is not None]} - 重点配置: + 检测类别(labelnames):{self.param['labelnames']} >>>>>> {ioHelper.get_labelnames(self.param['labelnames'])} + 检测模型路径(Detweights): {self.param['Detweights']} + 分割模型权重文件(Segweights): {self.param['Segweights']} + 后处理参数文件(postFile): {self.param['postFile']} + 测试图像路径(testImgPath): {self.param['testImgPath']} + 输出图像位置(testOutPath): {self.param['testOutPath']} + 输出图像路径: {self.param['testOutPath']}""") + ioHelper.checkFile(self.param['labelnames'], '检测类别') + ioHelper.checkFile(self.param['Detweights'], '检测模型路径') + ioHelper.checkFile(self.param['postFile'], '后处理参数文件') + ioHelper.checkFile(self.param['Segweights'], '分割模型权重文件') + ioHelper.checkFile(self.param['testImgPath'], '测试图像路径') + if ioHelper.checkFile(self.param['testOutPath'], '输出图像路径') is False: + os.makedirs(self.param['testOutPath'], exist_ok=True) + ioHelper.checkFile(self.param['testOutPath'], '创建后再检查输出图像路径') + + def extraConfig(self, opt): + pass + + def setParam(self, key, value): + self.param[key] = value + + def addParams(self, params): + for key, value in params.items(): + self.param[key] = value + + def getTestParam_Model(self): + device = torchHelper.select_device(self.param['device']) # 1 device + half = device.type != 'cpu' + trtFlag_det=self.param['trtFlag_det'] + if trtFlag_det: + Detweights = self.param['Detweights'] ##升级后的检测模型 + trt_logger = trt.Logger(trt.Logger.ERROR) + with open(Detweights, "rb") as f, trt.Runtime(trt_logger) as runtime: + model = runtime.deserialize_cuda_engine(f.read())# 输入trt本地文件,返回ICudaEngine对象 + logger.info(f"step {step}: 情况 1 - 成功载入 det model trt [{Detweights}]"); step += 1 + else: + Detweights = self.param['Detweights'] + model = attempt_load(Detweights, map_location=device) # load FP32 model + logger.info(f'step {step}: 情况 2 - 成功载入 det model pth [{Detweights}]'); step += 1 + if half: + model.half() # 启用半精度推理 + return model + + def getTestParam_SegModel(self): + segmodel= None + if self.param['Segweights']: + if self.bussiness == 'cityMangement2': + from DMPR import DMPRModel + segmodel = DMPRModel(weights=self.param['Segweights'], par = self.param['segPar']) + else: + segmodel = stdcModel(weights=self.param['Segweights'], par = self.param['segPar']) + else: + logger.warning('############None seg model is loaded###########:' ) + return segmodel + + def getTestParm_ObjectPar(self): + from DrGraph.util import torchHelper + device = torchHelper.select_device(self.param['device']) # 1 device + half = device.type != 'cpu' # 2 half + postFile= self.param['postFile'] + # 3 allowedList + allowedList,allowedList_string=get_needed_objectsIndex(self.param['detModelpara']) + # 4 segRegionCnt + segRegionCnt=self.param['segRegionCnt'] + + if self.param['Segweights']: + self.param['trtFlag_seg']=True if self.param['Segweights'].endswith('.engine') else False + else: + self.param['trtFlag_seg']=False + self.param['trtFlag_det']=True if self.param['Detweights'].endswith('.engine') else False + + trtFlag_det=self.param['trtFlag_det'] # 5 trtFlag_det + trtFlag_seg=self.param['trtFlag_seg'] # 6 trtFlag_seg + + detPostPar = ioHelper.get_postProcess_para_dic(postFile) + # 7 conf_thres 8 iou_thres + conf_thres,iou_thres,classes,rainbows = detPostPar["conf_thres"],detPostPar["iou_thres"],detPostPar["classes"],detPostPar["rainbows"] + # 9 ovlap_thres_crossCategory + if 'ovlap_thres_crossCategory' in detPostPar.keys(): + ovlap_thres_crossCategory=detPostPar['ovlap_thres_crossCategory'] + else: + ovlap_thres_crossCategory = None + # 10 score_byClass + if 'score_byClass' in detPostPar.keys(): score_byClass=detPostPar['score_byClass'] + else: score_byClass = None + + objectPar={ + 'half':half, + 'device':device, + 'conf_thres':conf_thres, + 'ovlap_thres_crossCategory':ovlap_thres_crossCategory, + 'iou_thres':iou_thres, + 'allowedList':allowedList, + 'segRegionCnt':segRegionCnt, + 'trtFlag_det':trtFlag_det, + 'trtFlag_seg':trtFlag_seg , + 'score_byClass':score_byClass} + return objectPar + def run(self): + postFile= self.param['postFile'] + digitFont= self.param['digitFont'] + detPostPar = ioHelper.get_postProcess_para_dic(postFile) + rainbows = detPostPar["rainbows"] + + mode_paras=self.param['detModelpara'] + allowedList,allowedList_string=get_needed_objectsIndex(mode_paras) + requestId = '1234' + gpu_name = '3090' + base_dir = None + env = None + from GPUtil import getAvailable, getGPUs + gpu_ids = getAvailable(maxLoad=0.80, maxMemory=0.80) + modelObject = self.modelClass(gpu_ids[0], allowedList, requestId, gpu_name, base_dir, env) + model_conf = modelObject.model_conf + model_param = model_conf[1] + if 'model' not in model_param: + model_param['model'] = self.getTestParam_Model() + logger.error(f"[{self.bussiness}] 业务配置 - 缺少模型参数 model - 置为测试配置量") + if 'segmodel' not in model_param: + model_param['segmodel'] = self.getTestParam_SegModel() + logger.error(f"[{self.bussiness}] 业务配置 - 缺少模型参数 segmodel - {model_param}") + if 'objectPar' not in model_param: + model_param['objectPar'] = self.getTestParm_ObjectPar() + logger.error(f"[{self.bussiness}] 业务配置 - 缺少模型参数 objectPar - {model_param}") + if 'segPar' not in model_param: + self.param['segPar']['seg_nclass'] = self.param['seg_nclass'] + model_param['segPar']=self.param['segPar'] + logger.error(f"[{self.bussiness}] 业务配置 - 缺少模型参数 segPar - {model_param}") + if 'mode' not in model_param: + model_param['mode'] = self.param['mode'] if 'mode' in self.param.keys() else 'others' + logger.error(f"[{self.bussiness}] 业务配置 - 缺少模型参数 mode - 置为测试配置量{model_param['mode']}") + if 'postPar' not in model_param: + model_param['postPar'] = self.param['postPar'] if 'postPar' in self.param.keys() else None + logger.error(f"[{self.bussiness}] 业务配置 - 缺少模型参数 postPar - 置为测试配置量{model_param['postPar']}") + + labelnames = self.param['labelnames'] + names = ioHelper.get_labelnames(labelnames) + label_arraylist = imgHelper.get_label_arrays(names,rainbows,outfontsize=self.param['txtFontSize'],fontpath="./DrGraph/appIOs/conf/platech.ttf") + + max_workers=self.param['max_workers'] + + # 获取测试图像和视频路径 + impth = self.param['testImgPath'] + outpth = self.param['testOutPath'] + imgpaths=[]###获取文件里所有的图像 + for postfix in ['.jpg','.JPG','.PNG','.png']: + imgpaths.extend(glob.glob('%s/*%s'%(impth,postfix )) ) + videopaths=[]###获取文件里所有的视频 + for postfix in ['.MP4','.mp4','.avi']: + videopaths.extend(glob.glob('%s/*%s'%(impth,postfix )) ) + + # 构造图像帧处理对象列表 + frames=[] + for imgpath in imgpaths: + im0s=[cv2.imread(imgpath)] + analysisFrameData = AnalysisFrameType( + im0s, + model_param['model'], # model + model_param['segmodel'], # segmodel, + names, + label_arraylist, + rainbows, + model_param['objectPar'], # objectPar, + digitFont, + os.path.basename(imgpath), + model_param['segPar'], # segPar, + model_param['mode'], # mode, + model_param['postPar'] # postPar + ) + # im0s,model,segmodel,names,label_arraylist,rainbows,objectPar,digitFont,os.path.basename(imgpath),segPar,mode,postPar) + frames.append(analysisFrameData) + logger.info(f'共读入 %d 张图片待处理' % len(imgpaths)); + t1=time.time() + # 多线程或单线程处理图像 + if max_workers==1: + for index, img in enumerate(frames): + logger.warning(f'-'*20 + ' 处理图片 ' + imgpaths[index] + '-'*20); + t5=time.time() + self.doAnalysis(img) + t6=time.time() + else: + with ThreadPoolExecutor(max_workers=max_workers) as t: + for result in t.map(self.doAnalysis, frames): + t=result + + t2=time.time() + if len(imgpaths)>0: + logger.info('%d 张图片共耗时:%.1f ms ,依次为:%.1f ms, 占用 %d 线程'%(len(imgpaths),(t2-t1)*1000, (t2-t1)*1000.0/len(imgpaths) , max_workers) ); + + def doAnalysis(self, frameData: AnalysisFrameType): + time00 = time.time() + H,W,C = frameData[0][0].shape + #frmess---- (im0s,model,segmodel,names,label_arraylist,rainbows,objectPar,digitFont,os.path.basename(imgpath),segPar,mode,postPar) + #p_result[1] = draw_painting_joint(xyxy,p_result[1],label_arraylist[int(cls)],score=conf,color=rainbows[int(cls)%20],font=font,socre_location="leftBottom") + + with TimeDebugger('业务分析') as td: + p_result, timeOut = aiHelper.AI_process(frameData.images, frameData.model, frameData.seg_model, + frameData.names, frameData.label_arrays, frameData.rainbows, + objectPar=frameData.object_params, font=frameData.font, + segPar=frameData.seg_params, mode=frameData.mode, postPar=frameData.post_params) + td.addStep('AI_Process') + p_result[1] = drawHelper.drawAllBox(p_result[2],p_result[1],frameData[4],frameData[5],frameData[7]) + td.addStep('drawAllBox') + # time11 = time.time() + image_array = p_result[1] + + cv2.imwrite(os.path.join(self.param['testOutPath'], frameData[8] ) ,image_array) + bname = frameData[8].split('.')[0] + if frameData[2]: + if len(p_result)==5: + image_mask = p_result[4] + if isinstance(image_mask,np.ndarray) and image_mask.shape[0]>0: + cv2.imwrite(os.path.join(self.param['testOutPath'],bname+'_mask.png' ) , (image_mask).astype(np.uint8)) + td.addStep('testOutPath') + boxes=p_result[2] + with open(os.path.join(self.param['testOutPath'], bname+'.txt' ),'w' ) as fp: + for box in boxes: + box_str=[str(x) for x in box] + out_str=','.join(box_str)+'\n' + fp.write(out_str) + td.addStep('fp') + # time22 = time.time() + logger.info(td.getReportInfo()) + # logger.info('''耗时记录分析: + # 原始图像:%s,%d*%d + # AI-process: %.1f,其中: + # image save:%.1f %s'''%(frameData[8],H,W, \ + # (time11 - time00) * 1000.0, (time22-time11)*1000.0,timeOut)) + return 'success' + diff --git a/DrGraph/Bussiness/Bussiness_IllParking.py b/DrGraph/Bussiness/Bussiness_IllParking.py new file mode 100644 index 0000000..562d57d --- /dev/null +++ b/DrGraph/Bussiness/Bussiness_IllParking.py @@ -0,0 +1,119 @@ +from loguru import logger +import cv2, time +import numpy as np + +from DrGraph.util.drHelper import * +from .Bussiness import BussinessBase + +class Bussiness_IllParking(BussinessBase): + def __init__(self, opt): + logger.info("create AlAlg_IllParking") + super().__init__(opt) + + @staticmethod + def postProcess(pred, cvMask, pars): + #pred:直接预测结果,不要原图。预测结果[0,1,2,...],不是[车、T角点,L角点] + #mask_cv:分割结果图,numpy格式(H,W),结果是int,[0,1,2,...] + #pars: 其它参数,dict格式 + '''三个标签:车、T角点,L角点''' + '''输入:落水人员的结果(类别+坐标)、原图 + + 过程:将车辆识别框外扩,并按contours形成区域。 + T角点与L角点的坐标合并为列表。 + 判断每个车辆contours区域内有几个角点,少于2个则判断违停。 + 返回:最终违停车辆标记结果图、违停车辆信息(坐标、类别、置信度)。 + ''' + #输入的是[cls,x0,y0,x1,y1,score]---> [x0,y0,x1,y1,cls,score] + #输出的也是[cls,x0,y0,x1,y1,score] + #pred = [ [ int(x[4]) ,*x[1:5], x[5] ] for x in pred] + + #pred = [[ *x[1:5],x[0], x[5] ] for x in pred] + pred = [[ *x[0:4],x[5], x[4] ] for x in pred] + + ##统一格式 + imgSize=pars['imgSize'] + '''1、pred中车辆识别框形成列表,T角点与L角点形成列表''' + tW1=time.time() + init_vehicle=[] + init_corner = [] + + for i in range(len(pred)): + #if pred[i][4]=='TCorner' or pred[i][4]=='LCorner': #vehicle、TCorner、LCorner + if pred[i][4]==1 or pred[i][4]==2: #vehicle、TCorner、LCorner + init_corner.append(pred[i]) + else: + init_vehicle.append(pred[i]) + + '''2、init_corner中心点坐标计算,并形成列表。''' + tW2 = time.time() + center_corner=[] + for i in range(len(init_corner)): + center_corner.append(mathHelper.center_coordinate(init_corner[i])) + + + '''3、遍历每个车辆识别框,扩充矩形区域,将矩形区域形成contours,判断扩充区域内的。''' + tW3 = time.time() + final_weiting=[] #违停车辆列表 + '''遍历车辆列表,扩大矩形框形成contours''' + for i in range(len(init_vehicle)): + boundbxs1=[init_vehicle[i][0],init_vehicle[i][1],init_vehicle[i][2],init_vehicle[i][3]] + width_boundingbox=init_vehicle[i][2]-init_vehicle[i][0] #框宽度 + height_boundingbox=init_vehicle[i][2] - init_vehicle[i][0] #框长度 + #当框长大于宽,则是水平方向车辆;否则认为是竖向车辆 + if width_boundingbox>=height_boundingbox: + ex_width=0.4*(init_vehicle[i][2]-init_vehicle[i][0]) #矩形扩充宽度,取车宽0.4倍 #膨胀系数小一些。角点设成1个。 + ex_height=0.2*(init_vehicle[i][2]-init_vehicle[i][0]) #矩形扩充宽度,取车长0.2倍 + boundbxs1 = imgHelper.expand_rectangle(boundbxs1, imgSize, ex_width, ex_height) # 扩充后矩形对角坐标 + else: + ex_width=0.2*(init_vehicle[i][2]-init_vehicle[i][0]) #竖向,不需要改变变量名称,将系数对换下就行。(坐标点顺序还是1234不变) + ex_height=0.4*(init_vehicle[i][2]-init_vehicle[i][0]) # + boundbxs1 = imgHelper.expand_rectangle(boundbxs1, imgSize, ex_width, ex_height) # 扩充后矩形对角坐标 + contour_temp = mathHelper.fourcorner_coordinate(boundbxs1) #得到扩充后矩形框的contour + contour_temp_=np.array(contour_temp)#contour转为array + contour_temp_=np.float32(contour_temp_) + + '''遍历角点识别框中心坐标是否在contours内,在则计1''' + zzz=0 + for j in range(len(center_corner)): + flag = cv2.pointPolygonTest(contour_temp_, (center_corner[j][0], center_corner[j][1]), False) #若为False,会找点是否在内,外,或轮廓上(相应返回+1, -1, 0)。 + if flag==+1: + zzz+=1 + '''contours框内小于等于1个角点,认为不在停车位内''' + # if zzz<=1: + if zzz<1: + final_weiting.append(init_vehicle[i]) + #print('t7-t6',t7-t6) + #print('final_weiting',final_weiting) + + '''4、绘制保存检违停车辆图像''' + + tW4=time.time() + ''' + colors = Colors() + if final_weiting is not None: + for i in range(len(final_weiting)): + lbl='illegal park' + xyxy=[final_weiting[i][0],final_weiting[i][1],final_weiting[i][2],final_weiting[i][3]] + c = int(5) + plot_one_box(xyxy, _img_cv, label=lbl, color=colors(c, True), line_thickness=3) + final_img=_img_cv + ''' + tW5=time.time() + # cv2.imwrite('final_result.png', _img_cv) + + + timeStr = ' step1:%s step2:%s step3:%s save:%s'%(\ + timeHelper.deltaTimeString_MS(tW2,tW1), \ + timeHelper.deltaTimeString_MS(tW3,tW2), \ + timeHelper.deltaTimeString_MS(tW4,tW3), \ + timeHelper.deltaTimeString_MS(tW5,tW4) ) + + #final_weiting-----[x0,y0,x1,y1,cls,score] + #输出的也是outRe----[cls,x0,y0,x1,y1,score] + + #outRes = [ [ 3 ,*x[0:4], x[5] ] for x in final_weiting]###违停用3表示 + + outRes = [ [ *x[0:4], x[5],3 ] for x in final_weiting]###违停用3表示 + + return outRes,timeStr #返回最终绘制的结果图、违停车辆(坐标、类别、置信度) + \ No newline at end of file diff --git a/DrGraph/Bussiness/Models.py b/DrGraph/Bussiness/Models.py new file mode 100644 index 0000000..e743f54 --- /dev/null +++ b/DrGraph/Bussiness/Models.py @@ -0,0 +1,74 @@ +from loguru import logger +import time +import tensorrt as trt +from DMPR import DMPRModel +from traceback import format_exc +from models.experimental import attempt_load + +from DrGraph.util.drHelper import * +from DrGraph.util.Constant import * +from DrGraph.enums.ExceptionEnum import ExceptionType +from DrGraph.util.stdc import stdcModel + +# 河道模型、河道检测模型、交通模型、人员落水模型、城市违章公共模型 +class Model1: + __slots__ = "model_conf" + # 3090 + def __init__(self, device, allowedList=None, requestId=None, modeType=None, gpu_name=None, base_dir=None, env=None): + try: + start = time.time() + logger.info("########################加载{}########################, requestId:{}", modeType.value[2], + requestId) + logger.info('__init__(device={}, allowedList={}, requestId={}, modeType={}, gpu_name={}, base_dir={}, env={})', \ + device, allowedList, requestId, modeType, gpu_name, base_dir, env) + par = modeType.value[4](str(device), gpu_name) + mode, postPar, segPar = par.get('mode', 'others'), par.get('postPar'), par.get('segPar') + names = par['labelnames'] + postFile = par['postFile'] + rainbows = postFile["rainbows"] + new_device = torchHelper.select_device(par.get('device')) + half = new_device.type != 'cpu' + Detweights = par['Detweights'] + if par['trtFlag_det']: + with open(Detweights, "rb") as f, trt.Runtime(trt.Logger(trt.Logger.ERROR)) as runtime: + model = runtime.deserialize_cuda_engine(f.read()) + else: + model = attempt_load(Detweights, map_location=new_device) # load FP32 model + if half: model.half() + par['segPar']['seg_nclass'] = par['seg_nclass'] + Segweights = par['Segweights'] + if Segweights: + if modeType.value[3] == 'cityMangement3': + segmodel = DMPRModel(weights=Segweights, par=par['segPar']) + else: + segmodel = stdcModel(weights=Segweights, par=par['segPar']) + else: + segmodel = None + objectPar = { + 'half': half, + 'device': new_device, + 'conf_thres': postFile["conf_thres"], + 'ovlap_thres_crossCategory': postFile.get("ovlap_thres_crossCategory"), + 'iou_thres': postFile["iou_thres"], + # 对高速模型进行过滤 + 'segRegionCnt': par['segRegionCnt'], + 'trtFlag_det': par['trtFlag_det'], + 'trtFlag_seg': par['trtFlag_seg'], + 'score_byClass':par['score_byClass'] if 'score_byClass' in par.keys() else None, + 'fiterList': par['fiterList'] if 'fiterList' in par.keys() else [] + } + model_param = { + "model": model, + "segmodel": segmodel, + "objectPar": objectPar, + "segPar": segPar, + "mode": mode, + "postPar": postPar + } + self.model_conf = (modeType, model_param, allowedList, names, rainbows) + except Exception: + logger.error("模型加载异常:{}, requestId:{}", format_exc(), requestId) + raise ServiceException(ExceptionType.MODEL_LOADING_EXCEPTION.value[0], + ExceptionType.MODEL_LOADING_EXCEPTION.value[1]) + logger.info("模型初始化时间:{}, requestId:{}", time.time() - start, requestId) + \ No newline at end of file diff --git a/DrGraph/Bussiness/__pycache__/Bussiness.cpython-310.pyc b/DrGraph/Bussiness/__pycache__/Bussiness.cpython-310.pyc new file mode 100644 index 0000000..9ed96f6 Binary files /dev/null and b/DrGraph/Bussiness/__pycache__/Bussiness.cpython-310.pyc differ diff --git a/DrGraph/Bussiness/__pycache__/Bussiness_IllParking.cpython-310.pyc b/DrGraph/Bussiness/__pycache__/Bussiness_IllParking.cpython-310.pyc new file mode 100644 index 0000000..608e057 Binary files /dev/null and b/DrGraph/Bussiness/__pycache__/Bussiness_IllParking.cpython-310.pyc differ diff --git a/DrGraph/Bussiness/__pycache__/Bussiness_Seg.cpython-310.pyc b/DrGraph/Bussiness/__pycache__/Bussiness_Seg.cpython-310.pyc new file mode 100644 index 0000000..b216999 Binary files /dev/null and b/DrGraph/Bussiness/__pycache__/Bussiness_Seg.cpython-310.pyc differ diff --git a/DrGraph/Bussiness/__pycache__/Models.cpython-310.pyc b/DrGraph/Bussiness/__pycache__/Models.cpython-310.pyc new file mode 100644 index 0000000..d790852 Binary files /dev/null and b/DrGraph/Bussiness/__pycache__/Models.cpython-310.pyc differ diff --git a/DrGraph/appIOs/conf/ModelTypeEnum.py b/DrGraph/appIOs/conf/ModelTypeEnum.py new file mode 100644 index 0000000..1003162 --- /dev/null +++ b/DrGraph/appIOs/conf/ModelTypeEnum.py @@ -0,0 +1,1141 @@ +import sys +from enum import Enum, unique + +from DrGraph.util.Constant import COLOR + +sys.path.extend(['..', '../AIlib2']) +from utilsK.illParkingUtils import illParking_postprocess +from DrGraph.Bussiness.Bussiness_IllParking import Bussiness_IllParking +# from DMPR import DMPRModel +# from DMPRUtils.jointUtil import dmpr_yolo +# from segutils.segmodel import SegModel +# from utilsK.queRiver import riverDetSegMixProcess +# from utilsK.crowdGather import gather_post_process +# from util.segutils.trafficUtils import tracfficAccidentMixFunction,mixTraffic_postprocess +# from utilsK.drownUtils import mixDrowing_water_postprocess +# from utilsK.noParkingUtils import mixNoParking_road_postprocess +# from utilsK.pannelpostUtils import pannel_post_process +# from utilsK.securitypostUtils import security_post_process +# from stdc import stdcModel +# from yolov5 import yolov5Model +# from p2pNet import p2NnetModel +# from DMPRUtils.jointUtil import dmpr_yolo_stdc +# from AI import default_mix +# from ocr import ocrModel +# from utilsK.channel2postUtils import channel2_post_process + +''' +参数说明 +1. 编号 +2. 模型编号 +3. 模型名称 +4. 选用的模型名称 +5. 模型配置 +6. 模型引用配置[Detweights文件, Segweights文件, 引用计数] +''' + + +@unique +class ModelType(Enum): + ILLPARKING_MODEL = ("19", "019", "车辆违停模型", 'illParking', lambda device, gpuName: { + 'device': device, + 'labelnames': ["车", "T角点", "L角点", "违停"], + 'trtFlag_seg': False, + 'trtFlag_det': True, + 'seg_nclass': 4, + 'segRegionCnt': 2, + 'segPar': { + 'mixFunction': { + 'function': Bussiness_IllParking.postProcess, + 'pars': {} + } + }, + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.25, + "classes": 9, + "rainbows": COLOR + }, + 'Detweights': "../weights/illParking/yolov5_%s_fp16.engine" % gpuName, + 'Segweights': None + }) + + # WATER_SURFACE_MODEL = ("1", "001", "河道模型", 'river', lambda device, gpuName: { + # 'device': device, + # 'labelnames': ["排口", "水生植被", "其它", "漂浮物", "污染排口", "菜地", "违建", "岸坡垃圾"], + # 'seg_nclass': 2, + # 'trtFlag_seg': True, + # 'trtFlag_det': True, + # 'segRegionCnt': 1, + # 'segPar': { + # 'modelSize': (640, 360), + # 'mean': (0.485, 0.456, 0.406), + # 'std': (0.229, 0.224, 0.225), + # 'numpy': False, + # 'RGB_convert_first': True, + # 'mixFunction': { + # 'function': riverDetSegMixProcess, + # 'pars': { + # 'slopeIndex': [5, 6, 7], + # 'riverIou': 0.1 + # } + # } + # }, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.45, + # "classes": 5, + # "rainbows": COLOR + # }, + # 'fiterList':[2], + # 'Detweights': "../weights/trt/AIlib2/river/yolov5_%s_fp16.engine" % gpuName, + # 'Segweights': '../weights/trt/AIlib2/river/stdc_360X640_%s_fp16.engine' % gpuName + # }) + + # # FOREST_FARM_MODEL = ("2", "002", "森林模型", 'forest2', lambda device, gpuName: { + # # 'device': device, + # # 'gpu_name': gpuName, + # # 'labelnames': ["林斑", "病死树", "行人", "火焰", "烟雾","云朵"], + # # 'trtFlag_det': True, + # # 'trtFlag_seg': False, + # # 'Detweights': "../weights/trt/AIlib2/forest2/yolov5_%s_fp16.engine" % gpuName, + # # 'seg_nclass': 2, + # # 'segRegionCnt': 0, + # # 'slopeIndex': [], + # # 'segPar': None, + # # 'postFile': { + # # "name": "post_process", + # # "conf_thres": 0.25, + # # "iou_thres": 0.45, + # # "classes": 6, + # # "rainbows": COLOR + # # }, + # # 'Segweights': None + # # }) + + + # FOREST_FARM_MODEL = ("2", "002", "森林模型", 'forest2', lambda device, gpuName: { + # 'labelnames': ["林斑", "病死树", "行人", "火焰", "烟雾","云朵"], + # 'postProcess':{'function':default_mix,'pars':{}}, + # 'models': + # [ + # { + # 'weight':"../weights/trt/AIlib2/forest2/yolov5_%s_fp16.engine"%(gpuName),###检测模型路径 + # 'name':'yolov5', + # 'model':yolov5Model, + # 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False}, + # } + # ], + + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.45, + # "classes": 5, + # "rainbows": COLOR + # }, + # "score_byClass": {0: 0.25, 1: 0.3, 2: 0.3, 3: 0.3}, + # 'fiterList': [5], + # 'segRegionCnt':2,###分割模型结果需要保留的等值线数目 + # "pixScale": 1.2, + # }) + + + # TRAFFIC_FARM_MODEL = ("3", "003", "交通模型", 'highWay2', lambda device, gpuName: { + # 'device': str(device), + # 'labelnames': ["行人", "车辆", "纵向裂缝", "横向裂缝", "修补", "网状裂纹", "坑槽", "块状裂纹", "积水", "影子", + # "事故","抛撒物", "危化品车辆", "虚标线","其他标线","其他","桥梁外观","设施破损缺失","龙门架","防抛网","标识牌损坏","护栏损坏","钢筋裸露"], + # 'trtFlag_seg': True, + # 'trtFlag_det': True, + # 'seg_nclass': 3, + # 'segRegionCnt': 2, + # 'segPar': { + # 'modelSize': (640, 360), + # 'mean': (0.485, 0.456, 0.406), + # 'std': (0.229, 0.224, 0.225), + # 'predResize': True, + # 'numpy': False, + # 'RGB_convert_first': True, + # 'mixFunction': { + # 'function': tracfficAccidentMixFunction, + # 'pars': { + # 'modelSize': (640, 360), + # 'RoadArea': 16000, + # 'roadVehicleAngle': 15, + # 'speedRoadVehicleAngleMax': 75, + # 'roundness': 1.0, + # 'cls': 10, + # 'CarId':1, + # 'CthcId':12, + # 'vehicleFactor': 0.1, + # 'confThres': 0.25, + # 'roadIou': 0.6, + # 'radius': 50, + # 'vehicleFlag': False, + # 'distanceFlag': False + # } + # } + # }, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.25, + # "classes": 10, + # "rainbows": COLOR + # }, + # 'score_byClass':{11:0.75,12:0.75}, + # 'fiterList': [13,14,15,16,17,18,19,20,21,22], + # 'Detweights': "../weights/trt/AIlib2/highWay2/yolov5_%s_fp16.engine" % gpuName, + # 'Segweights': '../weights/trt/AIlib2/highWay2/stdc_360X640_%s_fp16.engine' % gpuName + # }) + + # EPIDEMIC_PREVENTION_MODEL = ("4", "004", "防疫模型", None, None) + + # PLATE_MODEL = ("5", "005", "车牌模型", None, None) + + # VEHICLE_MODEL = ("6", "006", "车辆模型", 'vehicle', lambda device, gpuName: { + # 'device': device, + # 'gpu_name': gpuName, + # 'labelnames': ["车辆"], + # 'seg_nclass': 2, + # 'segRegionCnt': 0, + # 'slopeIndex': [], + # 'trtFlag_det': True, + # 'trtFlag_seg': False, + # 'Detweights': "../weights/trt/AIlib2/vehicle/yolov5_%s_fp16.engine" % gpuName, + # 'segPar': None, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.45, + # "classes": 5, + # "rainbows": COLOR + # }, + # 'Segweights': None + # }) + + # PEDESTRIAN_MODEL = ("7", "007", "行人模型", 'pedestrian', lambda device, gpuName: { + # 'device': device, + # 'gpu_name': gpuName, + # 'labelnames': ["行人"], + # 'seg_nclass': 2, + # 'segRegionCnt': 0, + # 'trtFlag_det': True, + # 'trtFlag_seg': False, + # 'Detweights': "../weights/trt/AIlib2/pedestrian/yolov5_%s_fp16.engine" % gpuName, + # 'slopeIndex': [], + # 'segPar': None, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.45, + # "classes": 5, + # "rainbows": COLOR + # }, + # 'Segweights': None + # }) + + # SMOGFIRE_MODEL = ("8", "008", "烟火模型", 'smogfire', lambda device, gpuName: { + # 'device': device, + # 'gpu_name': gpuName, + # 'labelnames': ["火焰", "烟雾"], + # 'seg_nclass': 2, # 分割模型类别数目,默认2类 + # 'segRegionCnt': 0, + # 'trtFlag_det': True, + # 'trtFlag_seg': False, + # 'Detweights': "../weights/trt/AIlib2/smogfire/yolov5_%s_fp16.engine" % gpuName, + # 'slopeIndex': [], + # 'segPar': None, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.45, + # "classes": 5, + # "rainbows": COLOR + # }, + # 'Segweights': None, + # }) + + # ANGLERSWIMMER_MODEL = ("9", "009", "钓鱼游泳模型", 'AnglerSwimmer', lambda device, gpuName: { + # 'device': device, + # 'gpu_name': gpuName, + # 'labelnames': ["钓鱼", "游泳"], + # 'seg_nclass': 2, # 分割模型类别数目,默认2类 + # 'segRegionCnt': 0, + # 'slopeIndex': [], + # 'trtFlag_det': True, + # 'trtFlag_seg': False, + # 'Detweights': "../weights/trt/AIlib2/AnglerSwimmer/yolov5_%s_fp16.engine" % gpuName, + # 'segPar': None, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.45, + # "classes": 5, + # "rainbows": COLOR + # }, + # 'Segweights': None + # }) + + # COUNTRYROAD_MODEL = ("10", "010", "乡村模型", 'countryRoad', lambda device, gpuName: { + # 'device': device, + # 'gpu_name': gpuName, + # 'labelnames': ["违法种植"], + # 'seg_nclass': 2, # 分割模型类别数目,默认2类 + # 'segRegionCnt': 0, + # 'slopeIndex': [], + # 'trtFlag_det': True, + # 'trtFlag_seg': False, + # 'Detweights': "../weights/trt/AIlib2/countryRoad/yolov5_%s_fp16.engine" % gpuName, + # 'segPar': None, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.45, + # "classes": 5, + # "rainbows": COLOR + # }, + # 'Segweights': None + # }) + + # SHIP_MODEL = ("11", "011", "船只模型", 'ship2', lambda device, gpuName: { + # 'model_size': (608, 608), + # 'K': 100, + # 'conf_thresh': 0.18, + # 'device': 'cuda:%s' % device, + # 'down_ratio': 4, + # 'num_classes': 15, + # 'weights': '../weights/trt/AIlib2/ship2/obb_608X608_%s_fp16.engine' % gpuName, + # 'dataset': 'dota', + # 'half': False, + # 'mean': (0.5, 0.5, 0.5), + # 'std': (1, 1, 1), + # 'heads': {'hm': None, 'wh': 10, 'reg': 2, 'cls_theta': 1}, + # 'decoder': None, + # 'test_flag': True, + # "rainbows": COLOR, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.45, + # "classes": 5, + # "rainbows": COLOR + # }, + # 'drawBox': False, + # 'label_array': None, + # 'labelnames': ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "船只"), + # }) + + # BAIDU_MODEL = ("12", "012", "百度AI图片识别模型", None, None) + + # CHANNEL_EMERGENCY_MODEL = ("13", "013", "航道模型", 'channelEmergency', lambda device, gpuName: { + # 'device': device, + # 'gpu_name': gpuName, + # 'labelnames': ["人"], + # 'seg_nclass': 2, # 分割模型类别数目,默认2类 + # 'segRegionCnt': 0, + # 'slopeIndex': [], + # 'trtFlag_det': True, + # 'trtFlag_seg': False, + # 'Detweights': "../weights/trt/AIlib2/channelEmergency/yolov5_%s_fp16.engine" % gpuName, + # 'segPar': None, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.45, + # "classes": 5, + # "rainbows": COLOR + # }, + # 'Segweights': None + # }) + + # RIVER2_MODEL = ("15", "015", "河道检测模型", 'river2', lambda device, gpuName: { + # 'device': device, + # 'labelnames': ["漂浮物", "岸坡垃圾", "排口", "违建", "菜地", "水生植物", "河湖人员", "钓鱼人员", "船只", + # "蓝藻"], + # 'trtFlag_seg': True, + # 'trtFlag_det': True, + # 'seg_nclass': 2, + # 'segRegionCnt': 1, + # 'segPar': { + # 'modelSize': (640, 360), + # 'mean': (0.485, 0.456, 0.406), + # 'std': (0.229, 0.224, 0.225), + # 'numpy': False, + # 'RGB_convert_first': True, + # 'mixFunction': { + # 'function': riverDetSegMixProcess, + # 'pars': { + # 'slopeIndex': [1, 3, 4, 7], + # 'riverIou': 0.1, + # 'scale': 0.25 + # } + # } + # }, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.3, + # "ovlap_thres_crossCategory": 0.65, + # "classes": 5, + # "rainbows": COLOR + # }, + # 'Detweights': "../weights/trt/AIlib2/river2/yolov5_%s_fp16.engine" % gpuName, + # 'Segweights': '../weights/trt/AIlib2/river2/stdc_360X640_%s_fp16.engine' % gpuName + # }) + + # CITY_MANGEMENT_MODEL = ("16", "016", "城管模型", 'cityMangement2', lambda device, gpuName: { + # 'labelnames': [ "车辆", "垃圾", "商贩", "违停","占道经营","裸土","未覆盖裸土","违建" ], + # 'postProcess':{ + # 'function':dmpr_yolo_stdc, + # 'pars':{ + # 'carCls':0 ,'illCls':7,'scaleRatio':0.5,'border':80, + # #"车辆","垃圾","商贩","裸土","占道经营","未覆盖裸土","违建" + # # key:实际训练index value:展示index + # 'classReindex':{ 0:0,1:1,2:2,7:3,4:4,3:5,5:6,6:7} + # } + # }, + # 'models':[ + # { + # 'weight':'../weights/trt/AIlib2/cityMangement3/yolov5_%s_fp16.engine'%(gpuName), + # 'name':'yolov5', + # 'model':yolov5Model, + # 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'segRegionCnt':1, 'trtFlag_det':True,'trtFlag_seg':True} + # }, + # { + # 'weight':'../weights/trt/AIlib2/cityMangement3/dmpr_3090.engine', + # #'weight':'../weights/pth/AIlib2/cityMangement3/dmpr.pth', + # 'par':{ + # 'depth_factor':32,'NUM_FEATURE_MAP_CHANNEL':6,'dmpr_thresh':0.1, 'dmprimg_size':640, + # 'name':'dmpr' + # }, + # 'model':DMPRModel, + # 'name':'dmpr' + # }, + # { + # 'weight':'../weights/trt/AIlib2/cityMangement3/stdc_360X640_%s_fp16.engine'%(gpuName), + # 'par':{ + # 'modelSize':(640,360),'mean':(0.485, 0.456, 0.406),'std' :(0.229, 0.224, 0.225),'predResize':True,'numpy':False, 'RGB_convert_first':True,'seg_nclass':3},###分割模型预处理参数 + # 'model':stdcModel, + # 'name':'stdc' + # } + # ], + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.45, + # "classes": 8, + # "rainbows": COLOR + # }, + # "score_byClass":{0:0.8, 1:0.4, 2:0.5, 3:0.5}, + # 'segRegionCnt':2,###分割模型结果需要保留的等值线数目 + # "pixScale": 1.2, + # }) + + # DROWING_MODEL = ("17", "017", "人员落水模型", 'drowning', lambda device, gpuName: { + # 'device': device, + # 'labelnames': ["人头", "人", "船只"], + # 'trtFlag_seg': True, + # 'trtFlag_det': True, + # 'seg_nclass': 2, + # 'segRegionCnt': 2, + # 'segPar': { + # 'modelSize': (640, 360), + # 'mean': (0.485, 0.456, 0.406), + # 'std': (0.229, 0.224, 0.225), + # 'predResize': True, + # 'numpy': False, + # 'RGB_convert_first': True, + # 'mixFunction': { + # 'function': mixDrowing_water_postprocess, + # 'pars': { + # 'modelSize': (640, 360) + # } + # } + # }, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.25, + # "classes": 9, + # "rainbows": COLOR + # }, + # 'Detweights': "../weights/trt/AIlib2/drowning/yolov5_%s_fp16.engine" % gpuName, + # 'Segweights': '../weights/trt/AIlib2/drowning/stdc_360X640_%s_fp16.engine' % gpuName + # }) + + # NOPARKING_MODEL = ( + # "18", "018", "城市违章模型", 'noParking', lambda device, gpuName: { + # 'device': device, + # 'labelnames': ["车辆", "违停"], + # 'trtFlag_seg': True, + # 'trtFlag_det': True, + # 'seg_nclass': 4, + # 'segRegionCnt': 2, + # 'segPar': { + # 'modelSize': (640, 360), + # 'mean': (0.485, 0.456, 0.406), + # 'std': (0.229, 0.224, 0.225), + # 'predResize': True, + # 'numpy': False, + # 'RGB_convert_first': True, ###分割模型预处理参数 + # 'mixFunction': { + # 'function': mixNoParking_road_postprocess, + # 'pars': { + # 'modelSize': (640, 360), + # 'roundness': 0.3, + # 'cls': 9, + # 'laneArea': 10, + # 'laneAngleCha': 5, + # 'RoadArea': 16000, + # 'fitOrder':2 + # } + # } + # }, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.25, + # "classes": 9, + # "rainbows": COLOR + # }, + # 'Detweights': "../weights/trt/AIlib2/noParking/yolov5_%s_fp16.engine" % gpuName, + # 'Segweights': '../weights/trt/AIlib2/noParking/stdc_360X640_%s_fp16.engine' % gpuName + # }) + + + # CITYROAD_MODEL = ("20", "020", "城市公路模型", 'cityRoad', lambda device, gpuName: { + # 'device': device, + # 'labelnames': ["护栏", "交通标志", "非交通标志", "施工锥桶", "施工水马"], + # 'trtFlag_seg': False, + # 'trtFlag_det': True, + # 'slopeIndex': [], + # 'seg_nclass': 2, + # 'segRegionCnt': 0, + # 'segPar': None, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.8, + # "iou_thres": 0.45, + # "classes": 5, + # "rainbows": COLOR + # }, + # 'Detweights': "../weights/trt/AIlib2/cityRoad/yolov5_%s_fp16.engine" % gpuName, + # 'Segweights': None + # }) + + # POTHOLE_MODEL = ("23", "023", "坑槽检测模型", 'pothole', lambda device, gpuName: { + # 'device': device, + # 'gpu_name': gpuName, + # 'labelnames': ["坑槽"], + # 'seg_nclass': 2, # 分割模型类别数目,默认2类 + # 'segRegionCnt': 0, + # 'slopeIndex': [], + # 'trtFlag_det': True, + # 'trtFlag_seg': False, + # 'Detweights': "../weights/trt/AIlib2/pothole/yolov5_%s_fp16.engine" % gpuName, + # 'segPar': None, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.45, + # "classes": 5, + # "rainbows": COLOR + # }, + # 'Segweights': None, + # }) + + # CHANNEL2_MODEL = ("24", "024", "船只综合检测模型", 'channel2', lambda device, gpuName: { + # 'device': device, + # 'gpu_name': gpuName, + # # 'labelnames': ["国旗", "浮标", "船名", "船只","未挂国旗船只"], + # 'labelnames': ["国旗", "浮标", "船名", "船只", "未挂国旗船只","未封仓船只","未挂国旗且未封仓船只"], + # 'segRegionCnt': 0, + # 'postProcess':{'function':channel2_post_process,'name':'channel2','pars':{ + # 'objs':[2], + # 'wRation':1/6.0, + # 'hRation':1/6.0, + # 'flagId':0, + # 'boatId':3, + # 'unflagId': 4, # 未挂国旗船只 + # 'uncoverId': 5, # 未封仓 + # 'unflagAndcoverId': 6, # 未挂国旗且未封仓 + # 'recScale':1.2, + # 'target_cls': 3, # 船只目标种类 + # 'filter_cls': 4 # 被过滤的种类,模型文件中未封仓实际index + # }}, + # 'models':[ + # { + # 'weight':'../weights/trt/AIlib2/channel2/yolov5_%s_fp16.engine'%(gpuName), + # 'name':'yolov5', + # 'model':yolov5Model, + # 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.1,'iou_thres':0.45,'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False} + # }, + # { + # 'weight' : '../weights/trt/AIlib2/ocr2/crnn_ch_%s_fp16_192X32.engine'%(gpuName), + # 'name':'ocr', + # 'model':ocrModel, + # 'par':{ + # 'char_file':'../AIlib2/conf/ocr2/benchmark.txt', + # 'mode':'ch', + # 'nc':3, + # 'imgH':32, + # 'imgW':192, + # 'hidden':256, + # 'mean':[0.5,0.5,0.5], + # 'std':[0.5,0.5,0.5], + # 'dynamic':False, + # }, + # } + # ], + # 'segPar': None, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.45, + # "classes": 5, + # "rainbows": COLOR + # }, + # 'Segweights': None, + # "score_byClass": {0: 0.7, 1: 0.7, 2: 0.8, 3: 0.6} + + # }) + + # RIVERT_MODEL = ("25", "025", "河道检测模型(T)", 'riverT', lambda device, gpuName: { + # 'device': device, + # 'labelnames': ["漂浮物", "岸坡垃圾", "排口", "违建", "菜地", "水生植物", "河湖人员", "钓鱼人员", "船只", + # "蓝藻"], + # 'trtFlag_seg': True, + # 'trtFlag_det': True, + # 'seg_nclass': 2, + # 'segRegionCnt': 1, + # 'segPar': { + # 'modelSize': (640, 360), + # 'mean': (0.485, 0.456, 0.406), + # 'std': (0.229, 0.224, 0.225), + # 'numpy': False, + # 'RGB_convert_first': True, + # 'mixFunction': { + # 'function': riverDetSegMixProcess, + # 'pars': { + # 'slopeIndex': [1, 3, 4, 7], + # 'riverIou': 0.1 + # } + # } + # }, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.3, + # "ovlap_thres_crossCategory": 0.65, + # "classes": 5, + # "rainbows": COLOR + # }, + # 'Detweights': "../weights/trt/AIlib2/riverT/yolov5_%s_fp16.engine" % gpuName, + # 'Segweights': '../weights/trt/AIlib2/riverT/stdc_360X640_%s_fp16.engine' % gpuName + # }) + + # FORESTCROWD_FARM_MODEL = ("26", "026", "森林人群模型", 'forestCrowd', lambda device, gpuName: { + # 'labelnames': ["林斑", "病死树", "行人", "火焰", "烟雾","人群"], + # 'postProcess':{'function':gather_post_process,'pars':{'pedestrianId':2,'crowdThreshold':4,'gatherId':5,'distancePersonScale':2.0}}, + # 'models': + # [ + # { + # 'weight':"../weights/trt/AIlib2/forestCrowd/yolov5_%s_fp16.engine"%(gpuName),###检测模型路径 + # 'name':'yolov5', + # 'model':yolov5Model, + # 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False}, + # } + + + # ], + + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.45, + # "classes": 5, + # "rainbows": COLOR + # }, + # "score_byClass":{0:0.25,1:0.25,2:0.6,3:0.6,4:0.6 ,5:0.6}, + # 'segRegionCnt':2,###分割模型结果需要保留的等值线数目 + # "pixScale": 1.2, + + + # }) + # TRAFFICFORDSJ_FARM_MODEL = ("27", "027", "交通模型-大数据局", 'highWay2T', lambda device, gpuName: { + # 'device': str(device), + # 'labelnames': ["行人", "车辆", "纵向裂缝", "横向裂缝", "修补", "网状裂纹", "坑槽", "块状裂纹", "积水", "影子", + # "事故", "桥梁外观","设施破损缺失","龙门架","防抛网","标识牌损坏","护栏损坏","钢筋裸露" ], + # 'trtFlag_seg': True, + # 'trtFlag_det': True, + # 'seg_nclass': 3, + # 'segRegionCnt': 2, + # 'segPar': { + # 'modelSize': (640, 360), + # 'mean': (0.485, 0.456, 0.406), + # 'std': (0.229, 0.224, 0.225), + # 'predResize': True, + # 'numpy': False, + # 'RGB_convert_first': True, + # 'mixFunction': { + # 'function': tracfficAccidentMixFunction, + # 'pars': { + # 'modelSize': (640, 360), + # 'RoadArea': 16000, + # 'roadVehicleAngle': 15, + # 'speedRoadVehicleAngleMax': 75, + # 'roundness': 1.0, + # 'cls': 10, + # 'CarId':1, + # 'CthcId':1, + # 'vehicleFactor': 0.1, + # 'confThres': 0.25, + # 'roadIou': 0.6, + # 'radius': 50, + # 'vehicleFlag': False, + # 'distanceFlag': False + # } + # } + # }, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.25, + # "classes": 10, + # "rainbows": COLOR + # }, + # 'fiterltList': [11,12,13,14,15,16,17], + # 'Detweights': "../weights/trt/AIlib2/highWay2T/yolov5_%s_fp16.engine" % gpuName, + # 'Segweights': '../weights/trt/AIlib2/highWay2T/stdc_360X640_%s_fp16.engine' % gpuName + # }) + + # SMARTSITE_MODEL = ("28", "028", "智慧工地模型", 'smartSite', lambda device, gpuName: { + # 'labelnames': [ "工人","塔式起重机","悬臂","起重机","压路机","推土机","挖掘机","卡车","装载机","泵车","混凝土搅拌车","打桩","其他车辆" ], + # 'postProcess':{'function':default_mix,'pars':{}}, + # 'models': + # [ + # { + # 'weight':"../weights/trt/AIlib2/smartSite/yolov5_%s_fp16.engine"%(gpuName),###检测模型路径 + # 'name':'yolov5', + # 'model':yolov5Model, + # 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'segRegionCnt':1, 'trtFlag_det':True,'trtFlag_seg':False}, + # } + + + # ], + # 'postFile': { + # "rainbows": COLOR + # }, + # "score_byClass": {0: 0.25, 1: 0.3, 2: 0.3, 3: 0.3} + + # }) + + # RUBBISH_MODEL = ("29", "029", "垃圾模型", 'rubbish', lambda device, gpuName: { + # 'labelnames': [ "建筑垃圾","白色垃圾","其他垃圾"], + # 'postProcess':{'function':default_mix,'pars':{}}, + # 'models': + # [ + # { + # 'weight':"../weights/trt/AIlib2/rubbish/yolov5_%s_fp16.engine"%(gpuName),###检测模型路径 + # 'name':'yolov5', + # 'model':yolov5Model, + # 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'segRegionCnt':1, 'trtFlag_det':True,'trtFlag_seg':False}, + # } + + + # ], + # 'postFile': { + # "rainbows": COLOR + # }, + # "score_byClass": {0: 0.25, 1: 0.3, 2: 0.3, 3: 0.3} + + # }) + + # FIREWORK_MODEL = ("30", "030", "烟花模型", 'firework', lambda device, gpuName: { + # 'labelnames': [ "烟花"], + # 'postProcess':{'function':default_mix,'pars':{}}, + # 'models': + # [ + # { + # 'weight':"../weights/trt/AIlib2/firework/yolov5_%s_fp16.engine"%(gpuName),###检测模型路径 + # 'name':'yolov5', + # 'model':yolov5Model, + # 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'segRegionCnt':1, 'trtFlag_det':True,'trtFlag_seg':False }, + # } + + + # ], + # 'postFile': { + # "rainbows": COLOR + # }, + # }) + + # TRAFFIC_SPILL_MODEL = ("50", "501", "高速公路抛洒物模型", 'highWaySpill', lambda device, gpuName: { + # 'device': str(device), + # 'labelnames': ["抛洒物","车辆"], + # 'trtFlag_seg': True, + # 'trtFlag_det': True, + # 'seg_nclass': 3, + # 'segRegionCnt': 2, + # 'segPar': { + # 'modelSize': (640, 360), + # 'mean': (0.485, 0.456, 0.406), + # 'std': (0.229, 0.224, 0.225), + # 'predResize': True, + # 'numpy': False, + # 'RGB_convert_first': True, + # 'mixFunction': { + # 'function': mixTraffic_postprocess, + # 'pars': { + # 'modelSize': (640, 360), + # 'RoadArea': 16000, + # 'roadVehicleAngle': 15, + # 'speedRoadVehicleAngleMax': 75, + # 'roundness': 1.0, + # 'cls': 0, + # 'vehicleFactor': 0.1, + # 'confThres': 0.25, + # 'roadIou': 0.6, + # 'radius': 50, + # 'vehicleFlag': False, + # 'distanceFlag': False + # } + # } + # }, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.25, + # "classes": 2, + # "rainbows": COLOR + # }, + # 'fiterList': [1], + # ###控制哪些检测类别显示、输出 + # 'Detweights': "../weights/trt/AIlib2/highWaySpill/yolov5_%s_fp16.engine" % gpuName, + # 'Segweights': '../weights/trt/AIlib2/highWaySpill/stdc_360X640_%s_fp16.engine' % gpuName + # }) + + # TRAFFIC_CTHC_MODEL = ("50", "502", "高速公路危化品模型", 'highWayCthc', lambda device, gpuName: { + # 'device': str(device), + # 'labelnames': ["危化品","罐体","危险标识","普通车"], + # 'trtFlag_seg': True, + # 'trtFlag_det': True, + # 'seg_nclass': 3, + # 'segRegionCnt': 2, + # 'segPar': { + # 'modelSize': (640, 360), + # 'mean': (0.485, 0.456, 0.406), + # 'std': (0.229, 0.224, 0.225), + # 'predResize': True, + # 'numpy': False, + # 'RGB_convert_first': True, + # 'mixFunction': { + # 'function': mixTraffic_postprocess, + # 'pars': { + # 'modelSize': (640, 360), + # 'RoadArea': 16000, + # 'roadVehicleAngle': 15, + # 'speedRoadVehicleAngleMax': 75, + # 'roundness': 1.0, + # 'cls': 0, + # 'vehicleFactor': 0.1, + # 'confThres': 0.25, + # 'roadIou': 0.6, + # 'radius': 50, + # 'vehicleFlag': False, + # 'distanceFlag': False + # } + # } + # }, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.25, + # "classes": 4, + # "rainbows": COLOR + # }, + # 'fiterList':[1,2,3], + # ###控制哪些检测类别显示、输出 + # 'Detweights': "../weights/trt/AIlib2/highWayCthc/yolov5_%s_fp16.engine" % gpuName, + # 'Segweights': '../weights/trt/AIlib2/highWayCthc/stdc_360X640_%s_fp16.engine' % gpuName + # }) + + # TRAFFIC_PANNEL_MODEL = ("50", "503", "光伏板模型", 'pannel', lambda device, gpuName: { + # 'labelnames': ["光伏板","覆盖物","裂缝"], + # 'postProcess': {'function': pannel_post_process, 'pars': {'objs': [0]}}, + # 'models': + # [ + # { + # 'weight': "../weights/trt/AIlib2/pannel/yolov5_%s_fp16.engine" % (gpuName), ###检测模型路径 + # 'name': 'yolov5', + # 'model': yolov5Model, + # 'par': {'half': True, 'device': 'cuda:0', 'conf_thres': 0.25, 'iou_thres': 0.45, + # 'segRegionCnt': 1, 'trtFlag_det': True, + # 'trtFlag_seg': False}, + # } + + # ], + # 'postFile': { + # "rainbows": COLOR + # }, + # 'fiterList':[0] + + # }) + + # CITY_CARPLATE_MODEL = ("30", "301", "自研车牌检测", 'carplate', lambda device, gpuName: { + # 'labelnames': ["车牌"], + # 'device': str(device), + # 'rainbows': COLOR, + # 'models': [ + # { + # #'weight': '../weights/pth/AIlib2/carplate/plate_yolov5s_v3.jit', + # 'weight': '../weights/trt/AIlib2/carplate/yolov5_%s_fp16.engine' % (gpuName), + # 'name': 'yolov5', + # 'model': yolov5Model, + # 'par': { + # 'trtFlag_det': True, + # 'device': 'cuda:0', + # 'half': True, + # 'conf_thres': 0.4, + # 'iou_thres': 0.45, + # 'nc': 1, + # 'plate':8, + # 'plate_dilate': (0.5, 0.1) + # }, + # }, + # { + # 'weight' : '../weights/trt/AIlib2/ocr2/crnn_ch_%s_fp16_192X32.engine'%(gpuName), + # 'name': 'ocr', + # 'model': ocrModel, + # 'par': { + # 'trtFlag_ocr': True, + # 'char_file': '../AIlib2/conf/ocr2/benchmark.txt', + # 'mode': 'ch', + # 'nc': 3, + # 'imgH': 32, + # 'imgW': 192, + # 'hidden': 256, + # 'mean': [0.5, 0.5, 0.5], + # 'std': [0.5, 0.5, 0.5], + # 'dynamic': False, + # } + # }], + # }) + + # CITY_INFRAREDPERSON_MODEL = ("30", "302", "红外行人模型", 'infraredPerson', lambda device, gpuName: { + # 'labelnames': ["行人"], + # 'postProcess': {'function': default_mix, 'pars': {}}, + # 'models': + # [ + # { + # 'weight': "../weights/trt/AIlib2/infraredPerson/yolov5_%s_fp16.engine" % (gpuName), ###检测模型路径 + # 'name': 'yolov5', + # 'model': yolov5Model, + # 'par': {'half': True, 'device': 'cuda:0', 'conf_thres': 0.50, 'iou_thres': 0.45, + # 'segRegionCnt': 1, 'trtFlag_det': True,'trtFlag_seg': False}, + # } + # ], + # 'postFile': { + # "rainbows": COLOR + # }, + + # }) + + # CITY_NIGHTFIRESMOKE_MODEL = ("30", "303", "夜间烟火模型", 'nightFireSmoke', lambda device, gpuName: { + # 'labelnames': ["火","烟雾"], + # 'postProcess': {'function': default_mix, 'pars': {}}, + # 'models': + # [ + # { + # 'weight': "../weights/trt/AIlib2/nightFireSmoke/yolov5_%s_fp16.engine" % (gpuName), ###检测模型路径 + # 'name': 'yolov5', + # 'model': yolov5Model, + # 'par': {'half': True, 'device': 'cuda:0', 'conf_thres': 0.50, 'iou_thres': 0.45, + # 'segRegionCnt': 1, 'trtFlag_det': True, 'trtFlag_seg': False}, + # } + + # ], + # 'postFile': { + # "rainbows": COLOR + # }, + + # }) + + # CITY_DENSECROWDCOUNT_MODEL = ("30", "304", "密集人群计数", 'DenseCrowdCount', lambda device, gpuName: { + # 'labelnames': ["人群计数"], + # 'device': str(device), + # 'rainbows': COLOR, + # 'models': [ + # { + # 'trtFlag_det': True, + # 'weight': "../weights/pth/AIlib2/DenseCrowd/SHTechA.pth", ###检测模型路径 + # 'vggweight': "../weights/pth/AIlib2/DenseCrowd/vgg16_bn-6c64b313.pth", ###检测模型路径 + # #'weight': "../weights/trt/AIlib2/DenseCrowd/SHTechA_%s.engine" %(gpuName), ###检测模型路径 + # #'vggweight': "../weights/trt/AIlib2/DenseCrowd/vgg16_bn-6c64b313_%s.engine" %(gpuName), ###检测模型路径 + # 'name': 'p2pnet', + # 'model': p2NnetModel, + # 'par': { + # 'device': 'cuda:0', + # 'row': 2, + # 'line': 2, + # 'point_loss_coef': 0.45, + # 'conf': 0.65, + # 'gpu_id': 0, + # 'eos_coef': '0.5', + # 'set_cost_class': 1, + # 'set_cost_point': 0.05, + # 'backbone': 'vgg16_bn', + # 'expend': 10, + # 'psize': 2, + # }, + # }], + # }) + + # CITY_DENSECROWDESTIMATION_MODEL = ("30", "305", "密集人群密度估计", 'DenseCrowdEstimation', lambda device, gpuName: { + # 'labelnames': ["密度"], + # 'models': + # [ + # { + # 'weight': "../weights/pth/AIlib2/DenseCrowd/SHTechA.pth", ###检测模型路径 + # 'name': 'yolov5', + # 'model': yolov5Model, + # 'par': {'half': True, 'device': 'cuda:0', 'conf_thres': 0.50, 'iou_thres': 0.45, + # 'segRegionCnt': 1, 'trtFlag_det': True, 'trtFlag_seg': False}, + # } + + # ], + # 'postFile': { + # "rainbows": COLOR + # }, + + # }) + + # CITY_UNDERBUILDCOUNT_MODEL = ("30", "306", "建筑物下人群计数", 'perUnderBuild', lambda device, gpuName: { + # 'labelnames': ["建筑物下人群"], + # 'device': str(device), + # 'rainbows': COLOR, + # 'models': [ + # { + # 'weight': "../weights/trt/AIlib2/perUnderBuild/yolov5_%s_fp16.engine" % (gpuName), ###检测模型路径 + # 'name': 'yolov5', + # 'model': yolov5Model, + # 'par': {'half': True, 'device': 'cuda:0', 'conf_thres': 0.25, 'iou_thres': 0.45, + # 'segRegionCnt': 1, 'trtFlag_det': True, 'trtFlag_seg': False}, + # }, + # { + # 'trtFlag_det': False, + # 'weight': "../weights/pth/AIlib2/DenseCrowd/SHTechA.pth", ###检测模型路径 + # 'vggweight': "../weights/pth/AIlib2/DenseCrowd/vgg16_bn-6c64b313.pth", ###检测模型路径 + # 'name': 'p2pnet', + # 'model': p2NnetModel, + # 'par': { + # 'device': 'cuda:0', + # 'row': 2, + # 'line': 2, + # 'point_loss_coef': 0.45, + # 'conf': 0.50, + # 'gpu_id': 0, + # 'eos_coef': '0.5', + # 'set_cost_class': 1, + # 'set_cost_point': 0.05, + # 'backbone': 'vgg16_bn', + # 'expend': 10, + # 'psize': 5 + # }, + # }], + # }) + + # CITY_FIREAREA_MODEL = ("30", "307", "火焰面积模型", 'FireArea', lambda device, gpuName: { + # 'device': device, + # 'gpu_name': gpuName, + # 'labelnames': ["火焰"], + # 'seg_nclass': 2, # 分割模型类别数目,默认2类 + # 'segRegionCnt': 0, + # 'trtFlag_det': True, + # 'trtFlag_seg': False, + # 'Detweights': "../weights/trt/AIlib2/smogfire/yolov5_%s_fp16.engine" % gpuName, # 0:fire 1:smoke + # 'Samweights': "../weights/pth/AIlib2/firearea/sam_vit_b_01ec64.pth", #分割模型 + # 'ksize':(7,7), + # 'sam_type':'vit_b', + # 'slopeIndex': [], + # 'segPar': None, + # 'postFile': { + # "name": "post_process", + # "conf_thres": 0.25, + # "iou_thres": 0.45, + # "classes": 5, + # "rainbows": COLOR + # }, + # 'Segweights': None, + # 'fiterList':[1], + # "score_byClass": {0: 0.1} + + # }) + + # CITY_SECURITY_MODEL = ("30", "308", "安防模型", 'SECURITY', lambda device, gpuName: { + # 'labelnames': ["带安全帽","安全帽","攀爬","斗殴","未戴安全帽"], + # 'postProcess': {'function': security_post_process, 'pars': {'objs': [0,1],'iou':0.25,'unhelmet':4}}, + # 'models': + # [ + # { + # 'weight': "../weights/trt/AIlib2/security/yolov5_%s_fp16.engine" % (gpuName), ###检测模型路径 + # 'name': 'yolov5', + # 'model': yolov5Model, + # 'par': {'half': True, 'device': 'cuda:0', 'conf_thres': 0.25, 'iou_thres': 0.45, + # 'segRegionCnt': 1, 'trtFlag_det': True, 'trtFlag_seg': False}, + # } + + # ], + # 'postFile': { + # "rainbows": COLOR + # }, + # 'fiterList': [0,1], + # "score_byClass": {"0": 0.50} + # }) + + @staticmethod + def checkCode(code): + for model in ModelType: + if model.value[1] == code: + return True + return False + + +''' + 参数1: 检测目标名称 + 参数2: 检测目标 + 参数3: 初始化百度检测客户端 +''' + + +@unique +class BaiduModelTarget(Enum): + VEHICLE_DETECTION = ( + "车辆检测", 0, lambda client0, client1, url, request_id: client0.vehicleDetectUrl(url, request_id)) + + HUMAN_DETECTION = ( + "人体检测与属性识别", 1, lambda client0, client1, url, request_id: client1.bodyAttr(url, request_id)) + + PEOPLE_COUNTING = ("人流量统计", 2, lambda client0, client1, url, request_id: client1.bodyNum(url, request_id)) + + +BAIDU_MODEL_TARGET_CONFIG = { + BaiduModelTarget.VEHICLE_DETECTION.value[1]: BaiduModelTarget.VEHICLE_DETECTION, + BaiduModelTarget.HUMAN_DETECTION.value[1]: BaiduModelTarget.HUMAN_DETECTION, + BaiduModelTarget.PEOPLE_COUNTING.value[1]: BaiduModelTarget.PEOPLE_COUNTING +} + +EPIDEMIC_PREVENTION_CONFIG = {1: "行程码", 2: "健康码"} + + +# 模型分析方式 +@unique +class ModelMethodTypeEnum(Enum): + # 方式一: 正常识别方式 + NORMAL = 1 + + # 方式二: 追踪识别方式 + TRACE = 2 diff --git a/DrGraph/appIOs/conf/ModelUtils.py b/DrGraph/appIOs/conf/ModelUtils.py new file mode 100644 index 0000000..15169dc --- /dev/null +++ b/DrGraph/appIOs/conf/ModelUtils.py @@ -0,0 +1,785 @@ +# -*- coding: utf-8 -*- +import sys +from pickle import dumps, loads +from traceback import format_exc +import time + +import cv2 +import torch +import tensorrt as trt +from loguru import logger + +from DrGraph.util.drHelper import * +from DrGraph.util import aiHelper +from DrGraph.util.Constant import * +from DrGraph.enums.ExceptionEnum import ExceptionType + +from .ModelTypeEnum import ModelType +from DrGraph.util.PlotsUtils import get_label_arrays + +sys.path.extend(['..', '../AIlib2']) +FONT_PATH = "./DrGraph/appIOs/conf/platech.ttf" + +from DrGraph.Bussiness.Models import * + +MODEL_CONFIG = { + # 车辆违停模型 + ModelType.ILLPARKING_MODEL.value[1]: ( + lambda x, y, r, t, z, h: Model1(x, y, r, ModelType.ILLPARKING_MODEL, t, z, h), + ModelType.ILLPARKING_MODEL, + lambda x, y, z: one_label(x, y, z), # MODEL_CONFIG[code][2] + lambda x: model_process(x) + ), +} + +# 河道模型、河道检测模型、交通模型、人员落水模型、城市违章公共模型 +class OneModel: + __slots__ = "model_conf" + + # 3090 + def __init__(self, device, allowedList=None, requestId=None, modeType=None, gpu_name=None, base_dir=None, env=None): + try: + start = time.time() + logger.info("########################加载{}########################, requestId:{}", modeType.value[2], + requestId) + logger.info('__init__(device={}, allowedList={}, requestId={}, modeType={}, gpu_name={}, base_dir={}, env={})', \ + device, allowedList, requestId, modeType, gpu_name, base_dir, env) + par = modeType.value[4](str(device), gpu_name) + mode, postPar, segPar = par.get('mode', 'others'), par.get('postPar'), par.get('segPar') + names = par['labelnames'] + postFile = par['postFile'] + rainbows = postFile["rainbows"] + new_device = torchHelper.select_device(par.get('device')) + half = new_device.type != 'cpu' + Detweights = par['Detweights'] + if par['trtFlag_det']: + with open(Detweights, "rb") as f, trt.Runtime(trt.Logger(trt.Logger.ERROR)) as runtime: + model = runtime.deserialize_cuda_engine(f.read()) + else: + model = attempt_load(Detweights, map_location=new_device) # load FP32 model + if half: model.half() + par['segPar']['seg_nclass'] = par['seg_nclass'] + Segweights = par['Segweights'] + if Segweights: + if modeType.value[3] == 'cityMangement3': + segmodel = DMPRModel(weights=Segweights, par=par['segPar']) + else: + segmodel = stdcModel(weights=Segweights, par=par['segPar']) + else: + segmodel = None + objectPar = { + 'half': half, + 'device': new_device, + 'conf_thres': postFile["conf_thres"], + 'ovlap_thres_crossCategory': postFile.get("ovlap_thres_crossCategory"), + 'iou_thres': postFile["iou_thres"], + # 对高速模型进行过滤 + 'segRegionCnt': par['segRegionCnt'], + 'trtFlag_det': par['trtFlag_det'], + 'trtFlag_seg': par['trtFlag_seg'], + 'score_byClass':par['score_byClass'] if 'score_byClass' in par.keys() else None, + 'fiterList': par['fiterList'] if 'fiterList' in par.keys() else [] + } + model_param = { + "model": model, + "segmodel": segmodel, + "objectPar": objectPar, + "segPar": segPar, + "mode": mode, + "postPar": postPar + } + self.model_conf = (modeType, model_param, allowedList, names, rainbows) + except Exception: + logger.error("模型加载异常:{}, requestId:{}", format_exc(), requestId) + raise ServiceException(ExceptionType.MODEL_LOADING_EXCEPTION.value[0], + ExceptionType.MODEL_LOADING_EXCEPTION.value[1]) + logger.info("模型初始化时间:{}, requestId:{}", time.time() - start, requestId) + +# 纯分类模型 +class cityManagementModel: + __slots__ = "model_conf" + + def __init__(self, device, allowedList=None, requestId=None, modeType=None, gpu_name=None, base_dir=None, env=None): + try: + logger.info("########################加载{}########################, requestId:{}", modeType.value[2], + requestId) + par = modeType.value[4](str(device), gpu_name) + postProcess = par['postProcess'] + names = par['labelnames'] + postFile = par['postFile'] + rainbows = postFile["rainbows"] + modelList=[ modelPar['model'](weights=modelPar['weight'],par=modelPar['par']) for modelPar in par['models'] ] + model_param = { + "modelList": modelList, + "postProcess": postProcess, + "score_byClass":par['score_byClass'] if 'score_byClass' in par.keys() else None, + "fiterList":par['fiterList'] if 'fiterList' in par.keys() else [], + } + self.model_conf = (modeType, model_param, allowedList, names, rainbows) + except Exception: + logger.error("模型加载异常:{}, requestId:{}", format_exc(), requestId) + raise ServiceException(ExceptionType.MODEL_LOADING_EXCEPTION.value[0], + ExceptionType.MODEL_LOADING_EXCEPTION.value[1]) +def detSeg_demo2(args): + model_conf, frame, request_id = args + modelList, postProcess,score_byClass,fiterList = ( + model_conf[1]['modelList'], model_conf[1]['postProcess'],model_conf[1]['score_byClass'], model_conf[1]['fiterList']) + try: + result = [[ None, None, AI_process_N([frame], modelList, postProcess,score_byClass,fiterList)[0] ] ] # 为了让返回值适配统一的接口而写的shi + return result + except ServiceException as s: + raise s + except Exception: + logger.error("算法模型分析异常:{}, requestId:{}", format_exc(), request_id) + raise ServiceException(ExceptionType.MODEL_ANALYSE_EXCEPTION.value[0], + ExceptionType.MODEL_ANALYSE_EXCEPTION.value[1]) + +def model_process(args): + model_conf, frame, request_id = args + model_param, names, rainbows = model_conf[1], model_conf[3], model_conf[4] + try: + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + rainbows, objectPar=model_param['objectPar'], font=model_param['digitFont'], + segPar=loads(dumps(model_param['segPar'])), mode=model_param['mode'], + postPar=model_param['postPar']) + except ServiceException as s: + raise s + except Exception: + # self.num += 1 + # cv2.imwrite('/home/th/tuo_heng/dev/img%s.jpg' % str(self.num), frame) + logger.error("算法模型分析异常:{}, requestId:{}", format_exc(), request_id) + raise ServiceException(ExceptionType.MODEL_ANALYSE_EXCEPTION.value[0], + ExceptionType.MODEL_ANALYSE_EXCEPTION.value[1]) + + +# 森林模型、车辆模型、行人模型、烟火模型、 钓鱼模型、航道模型、乡村模型、城管模型公共模型 +class TwoModel: + __slots__ = "model_conf" + + def __init__(self, device1, allowedList=None, requestId=None, modeType=None, gpu_name=None, base_dir=None, + env=None): + s = time.time() + try: + logger.info("########################加载{}########################, requestId:{}", modeType.value[2], + requestId) + par = modeType.value[4](str(device1), gpu_name) + device = select_device(par.get('device')) + names = par['labelnames'] + half = device.type != 'cpu' + Detweights = par['Detweights'] + with open(Detweights, "rb") as f, trt.Runtime(trt.Logger(trt.Logger.ERROR)) as runtime: + model = runtime.deserialize_cuda_engine(f.read()) + if modeType == ModelType.CITY_FIREAREA_MODEL: + sam = sam_model_registry[par['sam_type']](checkpoint=par['Samweights']) + sam.to(device=device) + segmodel = SamPredictor(sam) + else: + segmodel = None + + postFile = par['postFile'] + conf_thres = postFile["conf_thres"] + iou_thres = postFile["iou_thres"] + rainbows = postFile["rainbows"] + otc = postFile.get("ovlap_thres_crossCategory") + model_param = { + "model": model, + "segmodel": segmodel, + "half": half, + "device": device, + "conf_thres": conf_thres, + "iou_thres": iou_thres, + "trtFlag_det": par['trtFlag_det'], + "otc": otc, + "ksize":par['ksize'] if 'ksize' in par.keys() else None, + "score_byClass": par['score_byClass'] if 'score_byClass' in par.keys() else None, + "fiterList": par['fiterList'] if 'fiterList' in par.keys() else [] + } + self.model_conf = (modeType, model_param, allowedList, names, rainbows) + except Exception: + logger.error("模型加载异常:{}, requestId:{}", format_exc(), requestId) + raise ServiceException(ExceptionType.MODEL_LOADING_EXCEPTION.value[0], + ExceptionType.MODEL_LOADING_EXCEPTION.value[1]) + logger.info("模型初始化时间:{}, requestId:{}", time.time() - s, requestId) +def forest_process(args): + model_conf, frame, request_id = args + model_param, names, rainbows = model_conf[1], model_conf[3], model_conf[4] + try: + return AI_process_forest([frame], model_param['model'], model_param['segmodel'], names, + model_param['label_arraylist'], rainbows, model_param['half'], model_param['device'], + model_param['conf_thres'], model_param['iou_thres'],font=model_param['digitFont'], + trtFlag_det=model_param['trtFlag_det'], SecNms=model_param['otc'],ksize = model_param['ksize'], + score_byClass=model_param['score_byClass'],fiterList=model_param['fiterList']) + except ServiceException as s: + raise s + except Exception: + # self.num += 1 + # cv2.imwrite('/home/th/tuo_heng/dev/img%s.jpg' % str(self.num), frame) + logger.error("算法模型分析异常:{}, requestId:{}", format_exc(), request_id) + raise ServiceException(ExceptionType.MODEL_ANALYSE_EXCEPTION.value[0], + ExceptionType.MODEL_ANALYSE_EXCEPTION.value[1]) +class MultiModel: + __slots__ = "model_conf" + + def __init__(self, device1, allowedList=None, requestId=None, modeType=None, gpu_name=None, base_dir=None, + env=None): + s = time.time() + try: + logger.info("########################加载{}########################, requestId:{}", modeType.value[2], + requestId) + par = modeType.value[4](str(device1), gpu_name) + postProcess = par['postProcess'] + names = par['labelnames'] + postFile = par['postFile'] + rainbows = postFile["rainbows"] + modelList=[ modelPar['model'](weights=modelPar['weight'],par=modelPar['par']) for modelPar in par['models'] ] + model_param = { + "modelList": modelList, + "postProcess": postProcess, + "score_byClass": par['score_byClass'] if 'score_byClass' in par.keys() else None, + "fiterList": par['fiterList'] if 'fiterList' in par.keys() else [] + } + self.model_conf = (modeType, model_param, allowedList, names, rainbows) + except Exception: + logger.error("模型加载异常:{}, requestId:{}", format_exc(), requestId) + raise ServiceException(ExceptionType.MODEL_LOADING_EXCEPTION.value[0], + ExceptionType.MODEL_LOADING_EXCEPTION.value[1]) + logger.info("模型初始化时间:{}, requestId:{}", time.time() - s, requestId) +def channel2_process(args): + model_conf, frame, request_id = args + modelList, postProcess,score_byClass,fiterList = ( + model_conf[1]['modelList'], model_conf[1]['postProcess'],model_conf[1]['score_byClass'], model_conf[1]['fiterList']) + try: + start = time.time() + result = [[None, None, AI_process_C([frame], modelList, postProcess,score_byClass,fiterList)[0]]] # 为了让返回值适配统一的接口而写的shi + # print("AI_process_C use time = {}".format(time.time()-start)) + return result + except ServiceException as s: + raise s + except Exception: + logger.error("算法模型分析异常:{}, requestId:{}", format_exc(), request_id) + raise ServiceException(ExceptionType.MODEL_ANALYSE_EXCEPTION.value[0], + ExceptionType.MODEL_ANALYSE_EXCEPTION.value[1]) +def get_label_arraylist(*args): + width, height, names, rainbows = args + # line = int(round(0.002 * (height + width) / 2) + 1) + line = max(1, int(round(width / 1920 * 3))) + label = ' 0.95' + tf = max(line - 1, 1) + fontScale = line * 0.33 + text_width, text_height = cv2.getTextSize(label, 0, fontScale=fontScale, thickness=tf)[0] + # fontsize = int(width / 1920 * 40) + numFontSize = float(format(width / 1920 * 1.1, '.1f')) + digitFont = {'line_thickness': line, + 'boxLine_thickness': line, + 'fontSize': numFontSize, + 'waterLineColor': (0, 255, 255), + 'segLineShow': False, + 'waterLineWidth': line, + 'wordSize': text_height, + 'label_location': 'leftTop'} + label_arraylist = get_label_arrays(names, rainbows, fontSize=text_height, fontPath=FONT_PATH) + return digitFont, label_arraylist, (line, text_width, text_height, fontScale, tf) +# 船只模型 +class ShipModel: + __slots__ = "model_conf" + + def __init__(self, device1, allowedList=None, requestId=None, modeType=None, gpu_name=None, base_dir=None, + env=None): + s = time.time() + try: + logger.info("########################加载{}########################, requestId:{}", modeType.value[2], + requestId) + par = modeType.value[4](str(device1), gpu_name) + model, decoder2 = load_model_decoder_OBB(par) + par['decoder'] = decoder2 + names = par['labelnames'] + rainbows = par['postFile']["rainbows"] + model_param = { + "model": model, + "par": par + } + self.model_conf = (modeType, model_param, allowedList, names, rainbows) + except Exception: + logger.exception("模型加载异常:{}, requestId:{}", format_exc(), requestId) + raise ServiceException(ExceptionType.MODEL_LOADING_EXCEPTION.value[0], + ExceptionType.MODEL_LOADING_EXCEPTION.value[1]) + logger.info("模型初始化时间:{}, requestId:{}", time.time() - s, requestId) +def obb_process(args): + model_conf, frame, request_id = args + model_param = model_conf[1] + # font_config, frame, names, label_arrays, rainbows, model, par, requestId = args + try: + return OBB_infer(model_param["model"], frame, model_param["par"]) + except ServiceException as s: + raise s + except Exception: + # self.num += 1 + # cv2.imwrite('/home/th/tuo_heng/dev/img%s.jpg' % str(self.num), frame) + logger.error("算法模型分析异常:{}, requestId:{}", format_exc(), request_id) + raise ServiceException(ExceptionType.MODEL_ANALYSE_EXCEPTION.value[0], + ExceptionType.MODEL_ANALYSE_EXCEPTION.value[1]) +# 车牌分割模型、健康码、行程码分割模型 +class IMModel: + __slots__ = "model_conf" + + def __init__(self, device, allowedList=None, requestId=None, modeType=None, gpu_name=None, base_dir=None, + env=None): + try: + logger.info("########################加载{}########################, requestId:{}", modeType.value[2], + requestId) + img_type = 'code' + if ModelType.PLATE_MODEL == modeType: + img_type = 'plate' + par = { + 'code': {'weights': '../weights/pth/AIlib2/jkm/health_yolov5s_v3.jit', 'img_type': 'code', 'nc': 10}, + 'plate': {'weights': '../weights/pth/AIlib2/jkm/plate_yolov5s_v3.jit', 'img_type': 'plate', 'nc': 1}, + 'conf_thres': 0.4, + 'iou_thres': 0.45, + 'device': 'cuda:%s' % device, + 'plate_dilate': (0.5, 0.3) + } + + new_device = torch.device(par['device']) + model = torch.jit.load(par[img_type]['weights']) + logger.info("########################加载 jit 模型成功 成功 ########################, requestId:{}", + requestId) + self.model_conf = (modeType, allowedList, new_device, model, par, img_type) + except Exception: + logger.error("模型加载异常:{}, requestId:{}", format_exc(), requestId) + raise ServiceException(ExceptionType.MODEL_LOADING_EXCEPTION.value[0], + ExceptionType.MODEL_LOADING_EXCEPTION.value[1]) + +def im_process(args): + frame, device, model, par, img_type, requestId = args + try: + img, padInfos = pre_process(frame, device) + pred = model(img) + boxes = post_process(pred, padInfos, device, conf_thres=par['conf_thres'], + iou_thres=par['iou_thres'], nc=par[img_type]['nc']) # 后处理 + dataBack = get_return_data(frame, boxes, modelType=img_type, plate_dilate=par['plate_dilate']) + print('-------line351----:',dataBack) + return dataBack + except ServiceException as s: + raise s + except Exception: + logger.error("算法模型分析异常:{}, requestId:{}", format_exc(), requestId) + raise ServiceException(ExceptionType.MODEL_ANALYSE_EXCEPTION.value[0], + ExceptionType.MODEL_ANALYSE_EXCEPTION.value[1]) + +def immulti_process(args): + model_conf, frame, requestId = args + device, modelList, detpar = model_conf[1], model_conf[2], model_conf[3] + try: + # new_device = torch.device(device) + # img, padInfos = pre_process(frame, new_device) + # pred = model(img) + # boxes = post_process(pred, padInfos, device, conf_thres=pardet['conf_thres'], + # iou_thres=pardet['iou_thres'], nc=pardet['nc']) # 后处理 + return AI_process_Ocr([frame], modelList, device, detpar) + except ServiceException as s: + raise s + except Exception: + logger.error("算法模型分析异常:{}, requestId:{}", format_exc(), requestId) + raise ServiceException(ExceptionType.MODEL_ANALYSE_EXCEPTION.value[0], + ExceptionType.MODEL_ANALYSE_EXCEPTION.value[1]) + +class CARPLATEModel: + __slots__ = "model_conf" + def __init__(self, device, allowedList=None, requestId=None, modeType=None, gpu_name=None, base_dir=None, + env=None): + try: + logger.info("########################加载{}########################, requestId:{}", modeType.value[2], + requestId) + par = modeType.value[4](str(device), gpu_name) + modelList=[ modelPar['model'](weights=modelPar['weight'],par=modelPar['par']) for modelPar in par['models'] ] + detpar = par['models'][0]['par'] + # new_device = torch.device(par['device']) + # modelList=[ modelPar['model'](weights=modelPar['weight'],par=modelPar['par']) for modelPar in par['models'] ] + self.model_conf = (modeType, device, modelList, detpar, par['rainbows']) + except Exception: + logger.error("模型加载异常:{}, requestId:{}", format_exc(), requestId) + raise ServiceException(ExceptionType.MODEL_LOADING_EXCEPTION.value[0], + ExceptionType.MODEL_LOADING_EXCEPTION.value[1]) + +class DENSECROWDCOUNTModel: + __slots__ = "model_conf" + + def __init__(self, device, allowedList=None, requestId=None, modeType=None, gpu_name=None, base_dir=None, env=None): + try: + logger.info("########################加载{}########################, requestId:{}", modeType.value[2], + requestId) + par = modeType.value[4](str(device), gpu_name) + rainbows = par["rainbows"] + models=[ modelPar['model'](weights=modelPar['weight'],par=modelPar['par']) for modelPar in par['models'] ] + postPar = [pp['par'] for pp in par['models']] + self.model_conf = (modeType, device, models, postPar, rainbows) + except Exception: + logger.error("模型加载异常:{}, requestId:{}", format_exc(), requestId) + raise ServiceException(ExceptionType.MODEL_LOADING_EXCEPTION.value[0], + ExceptionType.MODEL_LOADING_EXCEPTION.value[1]) + +def cc_process(args): + model_conf, frame, requestId = args + device, model, postPar = model_conf[1], model_conf[2], model_conf[3] + try: + return AI_process_Crowd([frame], model, device, postPar) + except ServiceException as s: + raise s + except Exception: + logger.error("算法模型分析异常:{}, requestId:{}", format_exc(), requestId) + raise ServiceException(ExceptionType.MODEL_ANALYSE_EXCEPTION.value[0], + ExceptionType.MODEL_ANALYSE_EXCEPTION.value[1]) + + +# # 百度AI图片识别模型 +# class BaiduAiImageModel: +# __slots__ = "model_conf" + +# def __init__(self, device=None, allowedList=None, requestId=None, modeType=None, gpu_name=None, base_dir=None, +# env=None): +# try: +# logger.info("########################加载{}########################, requestId:{}", modeType.value[2], +# requestId) +# # 人体检测与属性识别、 人流量统计客户端 +# aipBodyAnalysisClient = AipBodyAnalysisClient(base_dir, env) +# # 车辆检测检测客户端 +# aipImageClassifyClient = AipImageClassifyClient(base_dir, env) +# rainbows = COLOR +# vehicle_names = [VehicleEnum.CAR.value[1], VehicleEnum.TRICYCLE.value[1], VehicleEnum.MOTORBIKE.value[1], +# VehicleEnum.CARPLATE.value[1], VehicleEnum.TRUCK.value[1], VehicleEnum.BUS.value[1]] +# person_names = ['人'] +# self.model_conf = (modeType, aipImageClassifyClient, aipBodyAnalysisClient, allowedList, rainbows, +# vehicle_names, person_names, requestId) +# except Exception: +# logger.exception("模型加载异常:{}, requestId:{}", format_exc(), requestId) +# raise ServiceException(ExceptionType.MODEL_LOADING_EXCEPTION.value[0], +# ExceptionType.MODEL_LOADING_EXCEPTION.value[1]) + + +# def get_baidu_label_arraylist(*args): +# width, height, vehicle_names, person_names, rainbows = args +# # line = int(round(0.002 * (height + width) / 2) + 1) +# line = max(1, int(round(width / 1920 * 3) + 1)) +# label = ' 0.97' +# tf = max(line, 1) +# fontScale = line * 0.33 +# text_width, text_height = cv2.getTextSize(label, 0, fontScale=fontScale, thickness=tf)[0] +# vehicle_label_arrays = get_label_arrays(vehicle_names, rainbows, fontSize=text_height, fontPath=FONT_PATH) +# person_label_arrays = get_label_arrays(person_names, rainbows, fontSize=text_height, fontPath=FONT_PATH) +# font_config = (line, text_width, text_height, fontScale, tf) +# return vehicle_label_arrays, person_label_arrays, font_config + + +# def baidu_process(args): +# target, url, aipImageClassifyClient, aipBodyAnalysisClient, request_id = args +# try: +# # [target, url, aipImageClassifyClient, aipBodyAnalysisClient, requestId] +# baiduEnum = BAIDU_MODEL_TARGET_CONFIG.get(target) +# if baiduEnum is None: +# raise ServiceException(ExceptionType.DETECTION_TARGET_TYPES_ARE_NOT_SUPPORTED.value[0], +# ExceptionType.DETECTION_TARGET_TYPES_ARE_NOT_SUPPORTED.value[1] +# + " target: " + target) +# return baiduEnum.value[2](aipImageClassifyClient, aipBodyAnalysisClient, url, request_id) +# except ServiceException as s: +# raise s +# except Exception: +# logger.error("算法模型分析异常:{}, requestId:{}", format_exc(), request_id) +# raise ServiceException(ExceptionType.MODEL_ANALYSE_EXCEPTION.value[0], +# ExceptionType.MODEL_ANALYSE_EXCEPTION.value[1]) + + +def one_label(width, height, model_conf): + # modeType, model_param, allowedList, names, rainbows = model_conf + names = model_conf[3] + rainbows = model_conf[4] + model_param = model_conf[1] + digitFont, label_arraylist, font_config = get_label_arraylist(width, height, names, rainbows) + model_param['digitFont'] = digitFont + model_param['label_arraylist'] = label_arraylist + model_param['font_config'] = font_config + +# def dynamics_label(width, height, model_conf): +# # modeType, model_param, allowedList, names, rainbows = model_conf +# names = model_conf[3] +# rainbows = model_conf[4] +# model_param = model_conf[1] +# digitFont, label_arraylist, font_config = get_label_arraylist(width, height, names, rainbows) +# line = max(1, int(round(width / 1920 * 3))) +# label = ' 0.95' +# tf = max(line - 1, 1) +# fontScale = line * 0.33 +# _, text_height = cv2.getTextSize(label, 0, fontScale=fontScale, thickness=tf)[0] +# label_dict = get_label_array_dict(rainbows, fontSize=text_height, fontPath=FONT_PATH) +# model_param['digitFont'] = digitFont +# model_param['label_arraylist'] = label_arraylist +# model_param['font_config'] = font_config +# model_param['label_dict'] = label_dict +# def baidu_label(width, height, model_conf): +# # modeType, aipImageClassifyClient, aipBodyAnalysisClient, allowedList, rainbows, +# # vehicle_names, person_names, requestId +# vehicle_names = model_conf[5] +# person_names = model_conf[6] +# rainbows = model_conf[4] +# vehicle_label_arrays, person_label_arrays, font_config = get_baidu_label_arraylist(width, height, vehicle_names, +# person_names, rainbows) +# return vehicle_label_arrays, person_label_arrays, font_config + + +# MODEL_CONFIG = { +# # 车辆违停模型 +# ModelType.ILLPARKING_MODEL.value[1]: ( +# lambda x, y, r, t, z, h: Model1(x, y, r, ModelType.ILLPARKING_MODEL, t, z, h), +# ModelType.ILLPARKING_MODEL, +# lambda x, y, z: one_label(x, y, z), # MODEL_CONFIG[code][2] +# lambda x: model_process(x) +# ), +# # # 加载河道模型 +# # ModelType.WATER_SURFACE_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: OneModel(x, y, r, ModelType.WATER_SURFACE_MODEL, t, z, h), +# # ModelType.WATER_SURFACE_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: model_process(x) +# # ), +# # # 加载森林模型 +# # # ModelType.FOREST_FARM_MODEL.value[1]: ( +# # # lambda x, y, r, t, z, h: TwoModel(x, y, r, ModelType.FOREST_FARM_MODEL, t, z, h), +# # # ModelType.FOREST_FARM_MODEL, +# # # lambda x, y, z: one_label(x, y, z), +# # # lambda x: forest_process(x) +# # # ), +# # ModelType.FOREST_FARM_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: cityManagementModel(x, y, r, ModelType.FOREST_FARM_MODEL, t, z, h), +# # ModelType.FOREST_FARM_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: detSeg_demo2(x) +# # ), + +# # # 加载交通模型 +# # ModelType.TRAFFIC_FARM_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: OneModel(x, y, r, ModelType.TRAFFIC_FARM_MODEL, t, z, h), +# # ModelType.TRAFFIC_FARM_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: model_process(x) +# # ), +# # # 加载防疫模型 +# # ModelType.EPIDEMIC_PREVENTION_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: IMModel(x, y, r, ModelType.EPIDEMIC_PREVENTION_MODEL, t, z, h), +# # ModelType.EPIDEMIC_PREVENTION_MODEL, +# # None, +# # lambda x: im_process(x)), +# # # 加载车牌模型 +# # ModelType.PLATE_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: IMModel(x, y, r, ModelType.PLATE_MODEL, t, z, h), +# # ModelType.PLATE_MODEL, +# # None, +# # lambda x: im_process(x)), +# # # 加载车辆模型 +# # ModelType.VEHICLE_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: TwoModel(x, y, r, ModelType.VEHICLE_MODEL, t, z, h), +# # ModelType.VEHICLE_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: forest_process(x) +# # ), +# # # 加载行人模型 +# # ModelType.PEDESTRIAN_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: TwoModel(x, y, r, ModelType.PEDESTRIAN_MODEL, t, z, h), +# # ModelType.PEDESTRIAN_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: forest_process(x)), +# # # 加载烟火模型 +# # ModelType.SMOGFIRE_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: TwoModel(x, y, r, ModelType.SMOGFIRE_MODEL, t, z, h), +# # ModelType.SMOGFIRE_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: forest_process(x)), +# # # 加载钓鱼游泳模型 +# # ModelType.ANGLERSWIMMER_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: TwoModel(x, y, r, ModelType.ANGLERSWIMMER_MODEL, t, z, h), +# # ModelType.ANGLERSWIMMER_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: forest_process(x)), +# # # 加载乡村模型 +# # ModelType.COUNTRYROAD_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: TwoModel(x, y, r, ModelType.COUNTRYROAD_MODEL, t, z, h), +# # ModelType.COUNTRYROAD_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: forest_process(x)), +# # # 加载船只模型 +# # ModelType.SHIP_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: ShipModel(x, y, r, ModelType.SHIP_MODEL, t, z, h), +# # ModelType.SHIP_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: obb_process(x)), +# # # 百度AI图片识别模型 +# # ModelType.BAIDU_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: BaiduAiImageModel(x, y, r, ModelType.BAIDU_MODEL, t, z, h), +# # ModelType.BAIDU_MODEL, +# # lambda x, y, z: baidu_label(x, y, z), +# # lambda x: baidu_process(x)), +# # # 航道模型 +# # ModelType.CHANNEL_EMERGENCY_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: TwoModel(x, y, r, ModelType.CHANNEL_EMERGENCY_MODEL, t, z, h), +# # ModelType.CHANNEL_EMERGENCY_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: forest_process(x)), +# # # 河道检测模型 +# # ModelType.RIVER2_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: OneModel(x, y, r, ModelType.RIVER2_MODEL, t, z, h), +# # ModelType.RIVER2_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: model_process(x)), +# # # 城管模型 +# # ModelType.CITY_MANGEMENT_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: cityManagementModel(x, y, r, ModelType.CITY_MANGEMENT_MODEL, t, z, h), +# # ModelType.CITY_MANGEMENT_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: detSeg_demo2(x) +# # ), +# # # 人员落水模型 +# # ModelType.DROWING_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: OneModel(x, y, r, ModelType.DROWING_MODEL, t, z, h), +# # ModelType.DROWING_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: model_process(x) +# # ), +# # # 城市违章模型 +# # ModelType.NOPARKING_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: OneModel(x, y, r, ModelType.NOPARKING_MODEL, t, z, h), +# # ModelType.NOPARKING_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: model_process(x) +# # ), +# # # 城市公路模型 +# # ModelType.CITYROAD_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: TwoModel(x, y, r, ModelType.CITYROAD_MODEL, t, z, h), +# # ModelType.CITYROAD_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: forest_process(x)), +# # # 加载坑槽模型 +# # ModelType.POTHOLE_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: TwoModel(x, y, r, ModelType.POTHOLE_MODEL, t, z, h), +# # ModelType.POTHOLE_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: forest_process(x) +# # ), +# # # 加载船只综合检测模型 +# # ModelType.CHANNEL2_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: MultiModel(x, y, r, ModelType.CHANNEL2_MODEL, t, z, h), +# # ModelType.CHANNEL2_MODEL, +# # lambda x, y, z: dynamics_label(x, y, z), +# # lambda x: channel2_process(x) +# # ), +# # # 河道检测模型 +# # ModelType.RIVERT_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: OneModel(x, y, r, ModelType.RIVERT_MODEL, t, z, h), +# # ModelType.RIVERT_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: model_process(x)), +# # # 加载森林人群模型 +# # ModelType.FORESTCROWD_FARM_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: cityManagementModel(x, y, r, ModelType.FORESTCROWD_FARM_MODEL, t, z, h), +# # ModelType.FORESTCROWD_FARM_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: detSeg_demo2(x) +# # ), +# # # 加载交通模型 +# # ModelType.TRAFFICFORDSJ_FARM_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: OneModel(x, y, r, ModelType.TRAFFICFORDSJ_FARM_MODEL, t, z, h), +# # ModelType.TRAFFICFORDSJ_FARM_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: model_process(x) +# # ), +# # # 加载智慧工地模型 +# # ModelType.SMARTSITE_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: cityManagementModel(x, y, r, ModelType.SMARTSITE_MODEL, t, z, h), +# # ModelType.SMARTSITE_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: detSeg_demo2(x) +# # ), + +# # # 加载垃圾模型 +# # ModelType.RUBBISH_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: cityManagementModel(x, y, r, ModelType.RUBBISH_MODEL, t, z, h), +# # ModelType.RUBBISH_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: detSeg_demo2(x) +# # ), + +# # # 加载烟花模型 +# # ModelType.FIREWORK_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: cityManagementModel(x, y, r, ModelType.FIREWORK_MODEL, t, z, h), +# # ModelType.FIREWORK_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: detSeg_demo2(x) +# # ), +# # # 加载高速公路抛撒物模型 +# # ModelType.TRAFFIC_SPILL_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: OneModel(x, y, r, ModelType.TRAFFIC_SPILL_MODEL, t, z, h), +# # ModelType.TRAFFIC_SPILL_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: model_process(x) +# # ), +# # # 加载高速公路危化品模型 +# # ModelType.TRAFFIC_CTHC_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: OneModel(x, y, r, ModelType.TRAFFIC_CTHC_MODEL, t, z, h), +# # ModelType.TRAFFIC_CTHC_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: model_process(x) +# # ), +# # # 加载光伏板异常检测模型 +# # ModelType.TRAFFIC_PANNEL_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: cityManagementModel(x, y, r, ModelType.TRAFFIC_PANNEL_MODEL, t, z, h), +# # ModelType.TRAFFIC_PANNEL_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: detSeg_demo2(x) +# # ), +# # # 加载自研车牌检测模型 +# # ModelType.CITY_CARPLATE_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: CARPLATEModel(x, y, r, ModelType.CITY_CARPLATE_MODEL, t, z, h), +# # ModelType.CITY_CARPLATE_MODEL, +# # None, +# # lambda x: immulti_process(x) +# # ), +# # # 加载红外行人检测模型 +# # ModelType.CITY_INFRAREDPERSON_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: cityManagementModel(x, y, r, ModelType.CITY_INFRAREDPERSON_MODEL, t, z, h), +# # ModelType.CITY_INFRAREDPERSON_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: detSeg_demo2(x) +# # ), +# # # 加载夜间烟火检测模型 +# # ModelType.CITY_NIGHTFIRESMOKE_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: cityManagementModel(x, y, r, ModelType.CITY_NIGHTFIRESMOKE_MODEL, t, z, h), +# # ModelType.CITY_NIGHTFIRESMOKE_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: detSeg_demo2(x) +# # ), +# # # 加载密集人群计数检测模型 +# # ModelType.CITY_DENSECROWDCOUNT_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: DENSECROWDCOUNTModel(x, y, r, ModelType.CITY_DENSECROWDCOUNT_MODEL, t, z, h), +# # ModelType.CITY_DENSECROWDCOUNT_MODEL, +# # None, +# # lambda x: cc_process(x) +# # ), +# # # 加载建筑物下行人检测模型 +# # ModelType.CITY_UNDERBUILDCOUNT_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: DENSECROWDCOUNTModel(x, y, r, ModelType.CITY_UNDERBUILDCOUNT_MODEL, t, z, h), +# # ModelType.CITY_UNDERBUILDCOUNT_MODEL, +# # None, +# # lambda x: cc_process(x) +# # ), +# # # 加载火焰面积模型 +# # ModelType.CITY_FIREAREA_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: TwoModel(x, y, r, ModelType.CITY_FIREAREA_MODEL, t, z, h), +# # ModelType.CITY_FIREAREA_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: forest_process(x) +# # ), +# # # 加载安防模型 +# # ModelType.CITY_SECURITY_MODEL.value[1]: ( +# # lambda x, y, r, t, z, h: cityManagementModel(x, y, r, ModelType.CITY_SECURITY_MODEL, t, z, h), +# # ModelType.CITY_SECURITY_MODEL, +# # lambda x, y, z: one_label(x, y, z), +# # lambda x: detSeg_demo2(x) +# # ), +# } diff --git a/DrGraph/appIOs/conf/__pycache__/ModelTypeEnum.cpython-310.pyc b/DrGraph/appIOs/conf/__pycache__/ModelTypeEnum.cpython-310.pyc new file mode 100644 index 0000000..6f55d41 Binary files /dev/null and b/DrGraph/appIOs/conf/__pycache__/ModelTypeEnum.cpython-310.pyc differ diff --git a/DrGraph/appIOs/conf/__pycache__/ModelUtils.cpython-310.pyc b/DrGraph/appIOs/conf/__pycache__/ModelUtils.cpython-310.pyc new file mode 100644 index 0000000..e630b10 Binary files /dev/null and b/DrGraph/appIOs/conf/__pycache__/ModelUtils.cpython-310.pyc differ diff --git a/DrGraph/appIOs/conf/logger/algDev_logger.yml b/DrGraph/appIOs/conf/logger/algDev_logger.yml new file mode 100644 index 0000000..11584bf --- /dev/null +++ b/DrGraph/appIOs/conf/logger/algDev_logger.yml @@ -0,0 +1,9 @@ +enable_file_log: true +enable_stderr: true +base_path: "./appIOs/logs" +log_name: "drgraph_aialg.log" +log_fmt: "{time: HH:mm:ss.SSS} [{level}] - {message} @ {file}:{line} in {function}" +level: "INFO" +rotation: "00:00" +retention: "1 days" +encoding: "utf8" \ No newline at end of file diff --git a/DrGraph/appIOs/conf/para.json b/DrGraph/appIOs/conf/para.json new file mode 100644 index 0000000..7808956 --- /dev/null +++ b/DrGraph/appIOs/conf/para.json @@ -0,0 +1,7 @@ +{ + + + "post_process":{ "name":"post_process","conf_thres":0.25,"iou_thres":0.45,"classes":5,"rainbows":[ [0,0,255],[0,255,0],[255,0,0],[255,0,255],[255,255,0],[255,129,0],[255,0,127],[127,255,0],[0,255,127],[0,127,255],[127,0,255],[255,127,255],[255,255,127],[127,255,255],[0,255,255],[255,127,255],[127,255,255], [0,127,0],[0,0,127],[0,255,255]] } + + +} diff --git a/DrGraph/appIOs/conf/platech.ttf b/DrGraph/appIOs/conf/platech.ttf new file mode 100644 index 0000000..d66a970 Binary files /dev/null and b/DrGraph/appIOs/conf/platech.ttf differ diff --git a/DrGraph/appIOs/logs/drgraph_aialg.2025-09-19_08-54-50_467830.log b/DrGraph/appIOs/logs/drgraph_aialg.2025-09-19_08-54-50_467830.log new file mode 100644 index 0000000..e428150 --- /dev/null +++ b/DrGraph/appIOs/logs/drgraph_aialg.2025-09-19_08-54-50_467830.log @@ -0,0 +1,1822 @@ + 08:54:50.464 [INFO] - 待测试业务名称: @ main.py:15 in + 08:54:50.464 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 08:54:50.464 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 08:54:50.659 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 08:54:50.659 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 08:54:50.660 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:195 in checkFile + 08:54:50.660 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 08:54:50.660 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:195 in checkFile + 08:54:50.660 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 08:54:50.661 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:195 in checkFile + 08:54:50.661 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:195 in checkFile + 08:54:50.661 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 08:54:50.688 [INFO] - select_device YOLOv5 🚀 2025-9-17 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:106 in select_device + 08:54:50.689 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 08:54:50.848 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 08:54:50.874 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 08:54:50.883 [INFO] - step 4: 共读入 1 张图片待处理 @ Bussiness_Seg.py:170 in run + 08:54:50.883 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/a2fe274345f77fb8985d2bc90aaaae7.jpg-------------------- @ Bussiness_Seg.py:175 in run + 08:54:51.339 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 08:54:51.341 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 08:54:51.341 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 08:54:51.429 [INFO] - [业务分析]业务 总共耗时 545.5 毫秒,其中: + AI_Process: 537.7 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 537.7 毫秒,其中: + img_pad: 3.1 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 450.9 毫秒 aiHelper.py:165 in AI_process + infer: 12.3 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 65.3 毫秒 aiHelper.py:184 in AI_process + 后处理: 5.7 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 5.7 毫秒,其中: + NMS: 2.4 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.3 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 08:54:51.430 [INFO] - step 6: 1 张图片共耗时:546.4 ms ,依次为:546.4 ms, 占用 1 线程 @ Bussiness_Seg.py:187 in run + 08:55:45.440 [INFO] - 待测试业务名称: @ main.py:15 in + 08:55:45.440 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 08:55:45.440 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 08:55:45.636 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 08:55:45.637 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 08:55:45.638 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:195 in checkFile + 08:55:45.638 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 08:55:45.638 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:195 in checkFile + 08:55:45.638 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 08:55:45.639 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:195 in checkFile + 08:55:45.639 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:195 in checkFile + 08:55:45.639 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 08:55:45.666 [INFO] - select_device YOLOv5 🚀 2025-9-17 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:106 in select_device + 08:55:45.667 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 08:55:45.840 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 08:55:45.864 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 08:55:45.873 [INFO] - step 4: 共读入 1 张图片待处理 @ Bussiness_Seg.py:170 in run + 08:55:45.874 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/a2fe274345f77fb8985d2bc90aaaae7.jpg-------------------- @ Bussiness_Seg.py:175 in run + 08:55:45.904 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 08:55:45.907 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 08:55:45.907 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 08:56:03.016 [INFO] - 待测试业务名称: @ main.py:15 in + 08:56:03.016 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 08:56:03.017 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 08:56:03.207 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 08:56:03.207 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 08:56:03.208 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:195 in checkFile + 08:56:03.208 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 08:56:03.208 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:195 in checkFile + 08:56:03.209 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 08:56:03.209 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:195 in checkFile + 08:56:03.210 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:195 in checkFile + 08:56:03.210 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 08:56:03.237 [INFO] - select_device YOLOv5 🚀 2025-9-17 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:106 in select_device + 08:56:03.237 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 08:56:03.407 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 08:56:03.433 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 08:56:03.443 [INFO] - step 4: 共读入 1 张图片待处理 @ Bussiness_Seg.py:170 in run + 08:56:03.443 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/a2fe274345f77fb8985d2bc90aaaae7.jpg-------------------- @ Bussiness_Seg.py:175 in run + 08:56:03.897 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 08:56:03.899 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 08:56:03.900 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 08:56:03.989 [INFO] - [业务分析]业务 总共耗时 545.6 毫秒,其中: + AI_Process: 537.9 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 537.9 毫秒,其中: + img_pad: 1.6 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 450.4 毫秒 aiHelper.py:165 in AI_process + infer: 13.5 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 65.5 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.5 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.5 毫秒,其中: + NMS: 3.2 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 08:56:03.990 [INFO] - step 6: 1 张图片共耗时:546.4 ms ,依次为:546.4 ms, 占用 1 线程 @ Bussiness_Seg.py:187 in run + 08:56:54.624 [INFO] - 待测试业务名称: @ main.py:15 in + 08:56:54.624 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 08:56:54.624 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 08:56:54.815 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 08:56:54.816 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 08:56:54.816 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:195 in checkFile + 08:56:54.816 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 08:56:54.817 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:195 in checkFile + 08:56:54.817 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 08:56:54.818 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:195 in checkFile + 08:56:54.818 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:195 in checkFile + 08:56:54.819 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 08:56:54.845 [INFO] - select_device YOLOv5 🚀 2025-9-17 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:106 in select_device + 08:56:54.845 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 08:56:55.009 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 08:56:55.033 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 08:56:55.042 [INFO] - step 4: 共读入 1 张图片待处理 @ Bussiness_Seg.py:170 in run + 08:56:55.043 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/a2fe274345f77fb8985d2bc90aaaae7.jpg-------------------- @ Bussiness_Seg.py:175 in run + 08:56:55.047 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 08:56:55.049 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 08:56:55.050 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 08:57:56.058 [INFO] - 待测试业务名称: @ main.py:15 in + 08:57:56.058 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 08:57:56.058 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 08:57:56.254 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 08:57:56.254 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 08:57:56.255 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:195 in checkFile + 08:57:56.255 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 08:57:56.255 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:195 in checkFile + 08:57:56.256 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 08:57:56.256 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:195 in checkFile + 08:57:56.256 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:195 in checkFile + 08:57:56.256 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 08:57:56.283 [INFO] - select_device YOLOv5 🚀 2025-9-17 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:106 in select_device + 08:57:56.283 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 08:57:56.453 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 08:57:56.477 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 08:57:56.486 [INFO] - step 4: 共读入 1 张图片待处理 @ Bussiness_Seg.py:170 in run + 08:57:56.487 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/a2fe274345f77fb8985d2bc90aaaae7.jpg-------------------- @ Bussiness_Seg.py:175 in run + 08:57:56.935 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 08:57:56.937 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 08:57:56.937 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 08:57:57.123 [INFO] - [业务分析]业务 总共耗时 635.6 毫秒,其中: + AI_Process: 531.9 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 531.9 毫秒,其中: + img_pad: 1.8 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 443.2 毫秒 aiHelper.py:166 in AI_process + infer: 15.9 毫秒 aiHelper.py:178 in AI_process + yolov5Trtforward: 64.6 毫秒 aiHelper.py:185 in AI_process + 后处理: 6.0 毫秒 aiHelper.py:192 in AI_process -> [预测结果后处理]业务 总共耗时 6.0 毫秒,其中: + NMS: 2.6 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.4 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 102.8 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.2 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 08:57:57.124 [INFO] - step 6: 1 张图片共耗时:636.8 ms ,依次为:636.8 ms, 占用 1 线程 @ Bussiness_Seg.py:187 in run + 11:46:19.955 [INFO] - 待测试业务名称: @ main.py:15 in + 11:46:19.955 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 11:46:19.955 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 11:46:20.149 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 11:46:20.150 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 11:46:20.150 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:195 in checkFile + 11:46:20.151 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 11:46:20.151 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:195 in checkFile + 11:46:20.151 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 11:46:20.152 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:195 in checkFile + 11:46:20.152 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:195 in checkFile + 11:46:20.152 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 11:46:20.179 [INFO] - select_device YOLOv5 🚀 2025-9-17 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:106 in select_device + 11:46:20.180 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 11:46:20.344 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 11:46:20.368 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 11:46:20.391 [INFO] - step 4: 共读入 5 张图片待处理 @ Bussiness_Seg.py:170 in run + 11:46:20.391 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/4.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:46:20.842 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:46:20.844 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 11:46:20.844 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 11:46:20.935 [INFO] - [业务分析]业务 总共耗时 543.1 毫秒,其中: + AI_Process: 535.4 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 535.4 毫秒,其中: + img_pad: 1.7 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 446.9 毫秒 aiHelper.py:165 in AI_process + infer: 14.3 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 66.4 毫秒 aiHelper.py:184 in AI_process + 后处理: 5.7 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 5.7 毫秒,其中: + NMS: 2.4 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.3 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.8 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:46:20.935 [WARNING] - step 6-------------------- 处理图片 ./appIOs/samples/illParking/3.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:46:20.938 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:46:20.958 [INFO] - [业务分析]业务 总共耗时 22.7 毫秒,其中: + AI_Process: 14.7 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.7 毫秒,其中: + img_pad: 1.9 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.1 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.1 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.0 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.1 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.2 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:46:20.959 [WARNING] - step 7-------------------- 处理图片 ./appIOs/samples/illParking/2.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:46:20.961 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:46:20.981 [INFO] - [业务分析]业务 总共耗时 21.8 毫秒,其中: + AI_Process: 14.0 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.0 毫秒,其中: + img_pad: 1.1 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 5.7 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.5 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.5 毫秒,其中: + NMS: 1.3 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:46:20.981 [WARNING] - step 8-------------------- 处理图片 ./appIOs/samples/illParking/1.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:46:20.983 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:46:21.003 [INFO] - [业务分析]业务 总共耗时 21.8 毫秒,其中: + AI_Process: 14.3 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.3 毫秒,其中: + img_pad: 0.9 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.3 毫秒 aiHelper.py:165 in AI_process + infer: 6.1 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.3 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.2 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.2 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.1 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.7 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:46:21.003 [WARNING] - step 9-------------------- 处理图片 ./appIOs/samples/illParking/5.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:46:21.005 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:46:21.026 [INFO] - [业务分析]业务 总共耗时 22.5 毫秒,其中: + AI_Process: 14.8 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.8 毫秒,其中: + img_pad: 1.0 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.3 毫秒 aiHelper.py:165 in AI_process + infer: 6.7 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.1 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.3 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.2 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:46:21.027 [INFO] - step 10: 5 张图片共耗时:635.3 ms ,依次为:127.1 ms, 占用 1 线程 @ Bussiness_Seg.py:187 in run + 11:48:30.299 [INFO] - 待测试业务名称: @ main.py:15 in + 11:48:30.299 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 11:48:30.300 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 11:48:30.498 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 11:48:30.499 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 11:48:30.500 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:195 in checkFile + 11:48:30.500 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 11:48:30.500 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:195 in checkFile + 11:48:30.500 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 11:48:30.501 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:195 in checkFile + 11:48:30.501 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:195 in checkFile + 11:48:30.501 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 11:48:30.527 [INFO] - select_device YOLOv5 🚀 2025-9-17 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:106 in select_device + 11:48:30.528 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 11:48:30.691 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 11:48:30.716 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 11:48:30.740 [INFO] - step 4: 共读入 5 张图片待处理 @ Bussiness_Seg.py:170 in run + 11:48:30.741 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/4.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:48:31.206 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:48:31.208 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 11:48:31.209 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 11:48:31.299 [INFO] - [业务分析]业务 总共耗时 557.9 毫秒,其中: + AI_Process: 549.9 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 549.9 毫秒,其中: + img_pad: 1.7 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 461.5 毫秒 aiHelper.py:165 in AI_process + infer: 14.2 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 66.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.1 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.1 毫秒,其中: + NMS: 2.7 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.4 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.1 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:48:31.299 [WARNING] - step 6-------------------- 处理图片 ./appIOs/samples/illParking/3.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:48:31.302 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:48:31.322 [INFO] - [业务分析]业务 总共耗时 22.1 毫秒,其中: + AI_Process: 14.2 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.2 毫秒,其中: + img_pad: 1.7 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 5.7 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.1 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.1 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.0 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.1 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:48:31.322 [WARNING] - step 7-------------------- 处理图片 ./appIOs/samples/illParking/2.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:48:31.324 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:48:31.345 [INFO] - [业务分析]业务 总共耗时 22.8 毫秒,其中: + AI_Process: 15.1 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.0 毫秒,其中: + img_pad: 1.0 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.8 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.1 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.4 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.3 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.3 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:48:31.346 [WARNING] - step 8-------------------- 处理图片 ./appIOs/samples/illParking/1.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:48:31.348 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:48:31.374 [INFO] - [业务分析]业务 总共耗时 28.3 毫秒,其中: + AI_Process: 18.7 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 18.7 毫秒,其中: + img_pad: 1.4 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 7.2 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.1 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.8 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.8 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 5.6 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.1 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 9.3 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:48:31.375 [WARNING] - step 9-------------------- 处理图片 ./appIOs/samples/illParking/5.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:48:31.377 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:48:31.398 [INFO] - [业务分析]业务 总共耗时 23.0 毫秒,其中: + AI_Process: 15.2 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.1 毫秒,其中: + img_pad: 1.1 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.9 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.3 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.3 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.3 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:48:31.398 [INFO] - step 10: 5 张图片共耗时:657.7 ms ,依次为:131.5 ms, 占用 1 线程 @ Bussiness_Seg.py:187 in run + 11:49:48.090 [INFO] - 待测试业务名称: @ main.py:15 in + 11:49:48.090 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 11:49:48.091 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 11:49:48.285 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 11:49:48.286 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 11:49:48.286 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:195 in checkFile + 11:49:48.286 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 11:49:48.286 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:195 in checkFile + 11:49:48.287 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 11:49:48.287 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:195 in checkFile + 11:49:48.287 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:195 in checkFile + 11:49:48.288 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 11:49:48.315 [INFO] - select_device YOLOv5 🚀 2025-9-17 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:106 in select_device + 11:49:48.316 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 11:49:48.481 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 11:49:48.506 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 11:49:48.530 [INFO] - step 4: 共读入 5 张图片待处理 @ Bussiness_Seg.py:170 in run + 11:49:48.531 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/4.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:49:48.979 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:49:48.981 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 11:49:48.981 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 11:49:49.069 [INFO] - [业务分析]业务 总共耗时 538.4 毫秒,其中: + AI_Process: 530.7 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 530.7 毫秒,其中: + img_pad: 1.8 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 444.7 毫秒 aiHelper.py:165 in AI_process + infer: 13.3 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 64.3 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.3 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.2 毫秒,其中: + NMS: 2.9 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.3 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:49:49.070 [WARNING] - step 6-------------------- 处理图片 ./appIOs/samples/illParking/3.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:49:49.073 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:49:49.093 [INFO] - [业务分析]业务 总共耗时 22.9 毫秒,其中: + AI_Process: 15.3 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.3 毫秒,其中: + img_pad: 1.8 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.6 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 1.9 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.1 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.1 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.8 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:49:49.094 [WARNING] - step 7-------------------- 处理图片 ./appIOs/samples/illParking/2.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:49:49.096 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:49:49.117 [INFO] - [业务分析]业务 总共耗时 22.5 毫秒,其中: + AI_Process: 14.9 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.9 毫秒,其中: + img_pad: 1.2 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.5 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.1 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.3 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.3 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.8 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:49:49.117 [WARNING] - step 8-------------------- 处理图片 ./appIOs/samples/illParking/1.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:49:49.120 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:49:49.145 [INFO] - [业务分析]业务 总共耗时 27.4 毫秒,其中: + AI_Process: 18.2 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 18.2 毫秒,其中: + img_pad: 1.4 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.8 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.9 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.9 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 5.8 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.1 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 9.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:49:49.145 [WARNING] - step 9-------------------- 处理图片 ./appIOs/samples/illParking/5.jpg-------------------- @ Bussiness_Seg.py:175 in run + 11:49:49.147 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 11:49:49.168 [INFO] - [业务分析]业务 总共耗时 23.0 毫秒,其中: + AI_Process: 15.4 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.4 毫秒,其中: + img_pad: 1.1 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.3 毫秒 aiHelper.py:165 in AI_process + infer: 7.0 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.4 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.3 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.3 毫秒,其中: + NMS: 1.2 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.1 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.7 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 11:49:49.169 [INFO] - step 10: 5 张图片共耗时:638.2 ms ,依次为:127.6 ms, 占用 1 线程 @ Bussiness_Seg.py:187 in run + 13:32:54.857 [INFO] - 待测试业务名称: @ main.py:15 in + 13:32:54.858 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 13:32:54.858 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 13:32:55.048 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 13:32:55.048 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 13:32:55.049 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:195 in checkFile + 13:32:55.049 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 13:32:55.050 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:195 in checkFile + 13:32:55.050 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 13:32:55.050 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:195 in checkFile + 13:32:55.051 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:195 in checkFile + 13:32:55.051 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 13:32:55.077 [INFO] - select_device YOLOv5 🚀 2025-9-17 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:106 in select_device + 13:32:55.078 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 13:32:55.243 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 13:32:55.267 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 13:32:55.290 [INFO] - step 4: 共读入 5 张图片待处理 @ Bussiness_Seg.py:170 in run + 13:32:55.290 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/4.jpg-------------------- @ Bussiness_Seg.py:175 in run + 13:32:55.737 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 13:32:55.739 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 13:32:55.739 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 13:32:55.827 [INFO] - [业务分析]业务 总共耗时 536.1 毫秒,其中: + AI_Process: 528.4 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 528.4 毫秒,其中: + img_pad: 1.6 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 442.9 毫秒 aiHelper.py:165 in AI_process + infer: 13.0 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 64.6 毫秒 aiHelper.py:184 in AI_process + 后处理: 5.9 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 5.8 毫秒,其中: + NMS: 2.5 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.3 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 13:32:55.827 [WARNING] - step 6-------------------- 处理图片 ./appIOs/samples/illParking/3.jpg-------------------- @ Bussiness_Seg.py:175 in run + 13:32:55.830 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 13:32:55.851 [INFO] - [业务分析]业务 总共耗时 22.8 毫秒,其中: + AI_Process: 15.1 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.1 毫秒,其中: + img_pad: 1.8 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.4 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.2 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.1 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.1 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 13:32:55.851 [WARNING] - step 7-------------------- 处理图片 ./appIOs/samples/illParking/2.jpg-------------------- @ Bussiness_Seg.py:175 in run + 13:32:55.854 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 13:32:55.874 [INFO] - [业务分析]业务 总共耗时 22.2 毫秒,其中: + AI_Process: 14.5 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.4 毫秒,其中: + img_pad: 0.8 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.6 毫秒 aiHelper.py:165 in AI_process + infer: 6.5 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.1 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.0 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.0 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.0 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 13:32:55.874 [WARNING] - step 8-------------------- 处理图片 ./appIOs/samples/illParking/1.jpg-------------------- @ Bussiness_Seg.py:175 in run + 13:32:55.878 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 13:32:55.903 [INFO] - [业务分析]业务 总共耗时 28.1 毫秒,其中: + AI_Process: 18.8 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 18.8 毫秒,其中: + img_pad: 1.8 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.6 毫秒 aiHelper.py:165 in AI_process + infer: 7.2 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 1.9 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.6 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.6 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 5.5 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.1 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 9.1 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 13:32:55.903 [WARNING] - step 9-------------------- 处理图片 ./appIOs/samples/illParking/5.jpg-------------------- @ Bussiness_Seg.py:175 in run + 13:32:55.905 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 13:32:55.927 [INFO] - [业务分析]业务 总共耗时 23.4 毫秒,其中: + AI_Process: 15.6 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.5 毫秒,其中: + img_pad: 1.3 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 7.2 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.2 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.2 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.1 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.1 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 13:32:55.927 [INFO] - step 10: 5 张图片共耗时:636.5 ms ,依次为:127.3 ms, 占用 1 线程 @ Bussiness_Seg.py:187 in run + 14:02:22.400 [INFO] - 待测试业务名称: @ main.py:15 in + 14:02:22.400 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:02:22.401 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:02:22.595 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:02:22.595 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:02:22.596 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:195 in checkFile + 14:02:22.596 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 14:02:22.597 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:195 in checkFile + 14:02:22.597 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:195 in checkFile + 14:02:22.597 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:195 in checkFile + 14:02:22.598 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:195 in checkFile + 14:02:22.598 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:03:33.347 [INFO] - 待测试业务名称: @ main.py:15 in + 14:03:33.348 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:03:33.348 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:03:33.541 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:03:33.542 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:03:33.543 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:196 in checkFile + 14:03:33.543 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:196 in checkFile + 14:03:33.543 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:196 in checkFile + 14:03:33.544 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:196 in checkFile + 14:03:33.544 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:196 in checkFile + 14:03:33.545 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:196 in checkFile + 14:03:33.545 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:04:10.003 [INFO] - 待测试业务名称: @ main.py:15 in + 14:04:10.003 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:04:10.003 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:04:10.198 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:04:10.198 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:04:10.199 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:196 in checkFile + 14:04:10.199 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:196 in checkFile + 14:04:10.199 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:196 in checkFile + 14:04:10.200 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:196 in checkFile + 14:04:10.200 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:196 in checkFile + 14:04:10.200 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:196 in checkFile + 14:04:10.201 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:04:38.411 [INFO] - 待测试业务名称: @ main.py:15 in + 14:04:38.412 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:04:38.412 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:04:38.603 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:04:38.603 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:04:38.604 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:196 in checkFile + 14:04:38.604 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:196 in checkFile + 14:04:38.605 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:196 in checkFile + 14:04:38.605 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:196 in checkFile + 14:04:38.605 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:196 in checkFile + 14:04:38.605 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:196 in checkFile + 14:04:38.606 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:05:50.927 [INFO] - 待测试业务名称: @ main.py:15 in + 14:05:50.928 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:05:50.928 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:05:51.127 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:05:51.128 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:05:51.128 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:05:51.128 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:05:51.129 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:05:51.129 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:05:51.129 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:05:51.130 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:05:51.130 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:06:25.266 [INFO] - 待测试业务名称: @ main.py:15 in + 14:06:25.266 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:06:25.266 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:06:25.461 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:06:25.462 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:06:25.462 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:06:25.462 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:06:25.463 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:06:25.463 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:06:25.463 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:06:25.464 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:06:25.464 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:06:59.331 [INFO] - 待测试业务名称: @ main.py:15 in + 14:06:59.331 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:06:59.332 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:06:59.522 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:06:59.523 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:06:59.523 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:06:59.524 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:06:59.524 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:06:59.524 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:06:59.525 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:06:59.525 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:06:59.525 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:07:23.751 [INFO] - 待测试业务名称: @ main.py:15 in + 14:07:23.752 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:07:23.752 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:07:23.945 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:07:23.946 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:07:23.946 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:07:23.947 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:07:23.947 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:07:23.947 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:07:23.947 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:07:23.948 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:07:23.948 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:07:23.978 [INFO] - select_device YOLOv5 🚀 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:74 in select_device + 14:07:23.979 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 14:07:24.137 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 14:07:24.161 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 14:07:24.184 [INFO] - step 4: 共读入 5 张图片待处理 @ Bussiness_Seg.py:170 in run + 14:07:24.185 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/4.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:07:24.618 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:07:24.620 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 14:07:24.620 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 14:07:24.705 [INFO] - [业务分析]业务 总共耗时 519.9 毫秒,其中: + AI_Process: 512.1 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 512.1 毫秒,其中: + img_pad: 1.8 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 429.5 毫秒 aiHelper.py:165 in AI_process + infer: 13.2 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 61.1 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.0 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.0 毫秒,其中: + NMS: 2.5 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.4 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:07:24.705 [WARNING] - step 6-------------------- 处理图片 ./appIOs/samples/illParking/3.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:07:24.708 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:07:24.729 [INFO] - [业务分析]业务 总共耗时 23.9 毫秒,其中: + AI_Process: 16.1 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 16.1 毫秒,其中: + img_pad: 2.0 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.5 毫秒 aiHelper.py:165 in AI_process + infer: 6.7 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.1 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.4 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.3 毫秒,其中: + NMS: 1.2 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:07:24.730 [WARNING] - step 7-------------------- 处理图片 ./appIOs/samples/illParking/2.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:07:24.732 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:07:24.753 [INFO] - [业务分析]业务 总共耗时 22.3 毫秒,其中: + AI_Process: 14.5 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.5 毫秒,其中: + img_pad: 0.9 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.6 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.3 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.3 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:07:24.753 [WARNING] - step 8-------------------- 处理图片 ./appIOs/samples/illParking/1.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:07:24.756 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:07:24.782 [INFO] - [业务分析]业务 总共耗时 28.8 毫秒,其中: + AI_Process: 18.9 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 18.9 毫秒,其中: + img_pad: 1.6 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 7.4 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.8 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.8 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 5.8 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.2 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 9.6 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:07:24.783 [WARNING] - step 9-------------------- 处理图片 ./appIOs/samples/illParking/5.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:07:24.785 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:07:24.807 [INFO] - [业务分析]业务 总共耗时 24.0 毫秒,其中: + AI_Process: 16.2 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 16.2 毫秒,其中: + img_pad: 1.3 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 7.6 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.2 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.3 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.2 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:07:24.807 [INFO] - step 10: 5 张图片共耗时:623.0 ms ,依次为:124.6 ms, 占用 1 线程 @ Bussiness_Seg.py:187 in run + 14:07:31.613 [INFO] - 待测试业务名称: @ main.py:15 in + 14:07:31.614 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:07:31.614 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:07:31.809 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:07:31.810 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:07:31.810 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:07:31.810 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:07:31.811 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:07:31.811 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:07:31.812 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:07:31.812 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:07:31.812 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:39:36.115 [INFO] - 待测试业务名称: @ main.py:15 in + 14:39:36.116 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:39:36.116 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:39:36.308 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:39:36.309 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:39:36.309 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:39:36.310 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:39:36.310 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:39:36.310 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:39:36.311 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:39:36.311 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:39:36.312 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:40:00.446 [INFO] - 待测试业务名称: @ main.py:15 in + 14:40:00.446 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:40:00.446 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:40:00.642 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:40:00.643 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:40:00.643 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:40:00.643 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:40:00.644 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:40:00.644 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:40:00.644 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:40:00.645 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:40:00.645 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:41:19.176 [INFO] - 待测试业务名称: @ main.py:15 in + 14:41:19.177 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:41:19.177 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:41:19.369 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:41:19.370 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:41:19.370 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:41:19.370 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:41:19.371 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:41:19.371 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:41:19.372 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:41:19.372 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:41:19.372 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:41:44.892 [INFO] - 待测试业务名称: @ main.py:15 in + 14:41:44.893 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:41:44.893 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:41:45.087 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:41:45.087 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:41:45.088 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:41:45.088 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:41:45.089 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:41:45.089 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:41:45.090 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:41:45.090 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:41:45.090 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:42:23.564 [INFO] - 待测试业务名称: @ main.py:15 in + 14:42:23.564 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:42:23.565 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:42:23.757 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:42:23.758 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:42:23.758 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:42:23.759 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:42:23.759 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:42:23.759 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:42:23.760 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:42:23.760 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:42:23.760 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:42:40.698 [INFO] - 待测试业务名称: @ main.py:15 in + 14:42:40.698 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:42:40.699 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:42:40.893 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:42:40.894 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:42:40.894 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:42:40.895 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:42:40.895 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:42:40.895 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:42:40.896 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:42:40.896 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:42:40.896 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:43:54.433 [INFO] - 待测试业务名称: @ main.py:15 in + 14:43:54.434 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:43:54.434 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:43:54.629 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:43:54.630 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:43:54.630 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:43:54.630 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:43:54.631 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:43:54.631 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:43:54.631 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:43:54.632 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:43:54.632 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:44:38.939 [INFO] - 待测试业务名称: @ main.py:15 in + 14:44:38.940 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:44:38.940 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:44:39.133 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:44:39.134 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:44:39.134 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:44:39.135 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:44:39.135 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:44:39.136 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:44:39.136 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:44:39.137 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:44:39.137 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:45:07.678 [INFO] - 待测试业务名称: @ main.py:15 in + 14:45:07.679 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:45:07.679 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:45:07.873 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:45:07.874 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:45:07.874 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:45:07.875 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:45:07.875 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:45:07.875 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:45:07.875 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:45:07.876 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:45:07.876 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:45:21.917 [INFO] - 待测试业务名称: @ main.py:15 in + 14:45:21.918 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:45:21.918 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:45:22.109 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:45:22.110 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:45:22.111 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:45:22.111 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:45:22.111 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:45:22.112 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:45:22.112 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:45:22.112 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:45:22.113 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:45:36.433 [INFO] - 待测试业务名称: @ main.py:15 in + 14:45:36.433 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:45:36.433 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:45:36.626 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:45:36.627 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:45:36.627 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:45:36.627 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:45:36.628 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:45:36.628 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:45:36.629 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:45:36.629 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:45:36.629 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:45:36.657 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:78 in select_device + 14:45:36.658 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 14:45:36.813 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 14:45:36.837 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 14:45:36.860 [INFO] - step 4: 共读入 5 张图片待处理 @ Bussiness_Seg.py:170 in run + 14:45:36.860 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/4.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:45:37.285 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:45:37.287 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 14:45:37.288 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 14:45:37.386 [INFO] - [业务分析]业务 总共耗时 525.0 毫秒,其中: + AI_Process: 505.4 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 505.4 毫秒,其中: + img_pad: 1.8 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 420.6 毫秒 aiHelper.py:165 in AI_process + infer: 14.9 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 62.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 5.7 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 5.7 毫秒,其中: + NMS: 2.4 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.3 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 18.8 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:45:37.386 [WARNING] - step 6-------------------- 处理图片 ./appIOs/samples/illParking/3.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:45:37.389 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:45:37.410 [INFO] - [业务分析]业务 总共耗时 23.6 毫秒,其中: + AI_Process: 16.0 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 16.0 毫秒,其中: + img_pad: 1.9 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.6 毫秒 aiHelper.py:165 in AI_process + infer: 6.7 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.1 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.3 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.3 毫秒,其中: + NMS: 1.2 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.1 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.8 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:45:37.411 [WARNING] - step 7-------------------- 处理图片 ./appIOs/samples/illParking/2.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:45:37.413 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:45:37.435 [INFO] - [业务分析]业务 总共耗时 23.8 毫秒,其中: + AI_Process: 14.4 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.3 毫秒,其中: + img_pad: 1.0 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.7 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.0 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.0 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.0 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 8.6 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:45:37.435 [WARNING] - step 8-------------------- 处理图片 ./appIOs/samples/illParking/1.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:45:37.438 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:45:37.463 [INFO] - [业务分析]业务 总共耗时 27.0 毫秒,其中: + AI_Process: 17.5 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 17.5 毫秒,其中: + img_pad: 1.4 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.3 毫秒 aiHelper.py:165 in AI_process + infer: 6.5 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.6 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.6 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 5.6 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.1 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 9.2 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:45:37.463 [WARNING] - step 9-------------------- 处理图片 ./appIOs/samples/illParking/5.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:45:37.465 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:45:37.486 [INFO] - [业务分析]业务 总共耗时 22.4 毫秒,其中: + AI_Process: 14.8 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.8 毫秒,其中: + img_pad: 1.0 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.6 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.3 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.2 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.2 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.8 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:45:37.486 [INFO] - step 10: 5 张图片共耗时:626.0 ms ,依次为:125.2 ms, 占用 1 线程 @ Bussiness_Seg.py:187 in run + 14:45:54.396 [INFO] - 待测试业务名称: @ main.py:15 in + 14:45:54.396 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:45:54.397 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:45:54.590 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:45:54.590 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:45:54.591 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:45:54.591 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:45:54.591 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:45:54.592 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:45:54.592 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:45:54.592 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:45:54.593 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:45:54.618 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:77 in select_device + 14:45:54.619 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 14:45:54.773 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 14:45:54.796 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 14:45:54.820 [INFO] - step 4: 共读入 5 张图片待处理 @ Bussiness_Seg.py:170 in run + 14:45:54.820 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/4.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:45:55.251 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:45:55.253 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 14:45:55.254 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 14:45:55.338 [INFO] - [业务分析]业务 总共耗时 517.7 毫秒,其中: + AI_Process: 509.9 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 509.8 毫秒,其中: + img_pad: 1.7 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 427.5 毫秒 aiHelper.py:165 in AI_process + infer: 13.3 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 60.8 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.1 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.1 毫秒,其中: + NMS: 2.7 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.4 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:45:55.339 [WARNING] - step 6-------------------- 处理图片 ./appIOs/samples/illParking/3.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:45:55.342 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:45:55.362 [INFO] - [业务分析]业务 总共耗时 23.1 毫秒,其中: + AI_Process: 15.4 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.4 毫秒,其中: + img_pad: 1.7 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.3 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.2 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.4 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.4 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.3 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:45:55.362 [WARNING] - step 7-------------------- 处理图片 ./appIOs/samples/illParking/2.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:45:55.364 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:45:55.385 [INFO] - [业务分析]业务 总共耗时 22.1 毫秒,其中: + AI_Process: 14.5 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.5 毫秒,其中: + img_pad: 0.9 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.3 毫秒 aiHelper.py:165 in AI_process + infer: 6.2 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.2 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.4 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.4 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.3 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.8 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:45:55.385 [WARNING] - step 8-------------------- 处理图片 ./appIOs/samples/illParking/1.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:45:55.389 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:45:55.415 [INFO] - [业务分析]业务 总共耗时 28.9 毫秒,其中: + AI_Process: 19.5 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 19.5 毫秒,其中: + img_pad: 1.7 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.5 毫秒 aiHelper.py:165 in AI_process + infer: 7.6 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.1 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.8 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.8 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 5.7 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.1 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 9.1 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:45:55.415 [WARNING] - step 9-------------------- 处理图片 ./appIOs/samples/illParking/5.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:45:55.417 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:45:55.438 [INFO] - [业务分析]业务 总共耗时 23.0 毫秒,其中: + AI_Process: 14.9 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.9 毫秒,其中: + img_pad: 0.9 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.5 毫秒 aiHelper.py:165 in AI_process + infer: 6.8 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.1 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.2 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.2 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.3 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:45:55.439 [INFO] - step 10: 5 张图片共耗时:618.7 ms ,依次为:123.7 ms, 占用 1 线程 @ Bussiness_Seg.py:187 in run + 14:46:02.358 [INFO] - 待测试业务名称: @ main.py:15 in + 14:46:02.358 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:46:02.358 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:46:02.549 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:46:02.550 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:46:02.550 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:46:02.551 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:46:02.551 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:46:02.551 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:46:02.552 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:46:02.552 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:46:02.552 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:57 in run + 14:46:32.124 [INFO] - 待测试业务名称: @ main.py:15 in + 14:46:32.125 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:46:32.125 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:46:32.321 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:306 in __init__ + 14:46:32.322 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:46:32.322 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:46:32.323 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:46:32.323 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:46:32.323 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:46:32.324 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:46:32.324 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:46:32.324 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:56 in run + 14:47:11.982 [INFO] - 待测试业务名称: @ main.py:15 in + 14:47:11.982 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:47:11.982 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:47:12.180 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:306 in __init__ + 14:47:12.181 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:47:12.181 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:47:12.181 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:47:12.182 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:47:12.182 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:47:12.182 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:47:12.183 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:47:12.183 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:56 in run + 14:47:12.209 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:77 in select_device + 14:47:12.211 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:72 in run + 14:47:12.369 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:82 in run + 14:47:12.395 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 14:47:12.418 [INFO] - step 4: 共读入 5 张图片待处理 @ Bussiness_Seg.py:169 in run + 14:47:12.419 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/4.jpg-------------------- @ Bussiness_Seg.py:174 in run + 14:47:12.848 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:47:12.850 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 14:47:12.850 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 14:47:12.935 [INFO] - [业务分析]业务 总共耗时 515.7 毫秒,其中: + AI_Process: 507.8 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 507.8 毫秒,其中: + img_pad: 1.6 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 425.1 毫秒 aiHelper.py:165 in AI_process + infer: 14.2 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 60.9 毫秒 aiHelper.py:184 in AI_process + 后处理: 5.7 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 5.7 毫秒,其中: + NMS: 2.3 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.3 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:47:12.935 [WARNING] - step 6-------------------- 处理图片 ./appIOs/samples/illParking/3.jpg-------------------- @ Bussiness_Seg.py:174 in run + 14:47:12.938 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:47:12.958 [INFO] - [业务分析]业务 总共耗时 22.4 毫秒,其中: + AI_Process: 14.7 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.7 毫秒,其中: + img_pad: 1.6 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.3 毫秒 aiHelper.py:165 in AI_process + infer: 5.8 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.2 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.3 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.3 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:47:12.959 [WARNING] - step 7-------------------- 处理图片 ./appIOs/samples/illParking/2.jpg-------------------- @ Bussiness_Seg.py:174 in run + 14:47:12.961 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:47:12.982 [INFO] - [业务分析]业务 总共耗时 22.8 毫秒,其中: + AI_Process: 15.0 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.0 毫秒,其中: + img_pad: 1.3 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.2 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.2 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.5 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.5 毫秒,其中: + NMS: 1.2 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.3 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:47:12.982 [WARNING] - step 8-------------------- 处理图片 ./appIOs/samples/illParking/1.jpg-------------------- @ Bussiness_Seg.py:174 in run + 14:47:12.984 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:47:13.009 [INFO] - [业务分析]业务 总共耗时 27.0 毫秒,其中: + AI_Process: 17.6 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 17.6 毫秒,其中: + img_pad: 1.4 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.3 毫秒 aiHelper.py:165 in AI_process + infer: 6.4 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.2 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.7 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.7 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 5.5 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.2 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 9.1 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:47:13.010 [WARNING] - step 9-------------------- 处理图片 ./appIOs/samples/illParking/5.jpg-------------------- @ Bussiness_Seg.py:174 in run + 14:47:13.012 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:47:13.034 [INFO] - [业务分析]业务 总共耗时 23.3 毫秒,其中: + AI_Process: 15.5 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.5 毫秒,其中: + img_pad: 1.0 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 7.6 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 1.9 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.2 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.2 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:47:13.034 [INFO] - step 10: 5 张图片共耗时:615.0 ms ,依次为:123.0 ms, 占用 1 线程 @ Bussiness_Seg.py:186 in run + 14:49:09.918 [INFO] - 待测试业务名称: @ main.py:15 in + 14:49:09.918 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:49:09.918 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:49:10.110 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:306 in __init__ + 14:49:10.111 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:49:10.111 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:49:10.112 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:49:10.112 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:49:10.112 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:49:10.113 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:49:10.113 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:49:10.113 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:56 in run + 14:49:10.141 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:75 in select_device + 14:49:10.142 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:72 in run + 14:49:10.299 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:82 in run + 14:49:10.323 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 14:49:10.347 [INFO] - step 4: 共读入 5 张图片待处理 @ Bussiness_Seg.py:169 in run + 14:49:10.347 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/4.jpg-------------------- @ Bussiness_Seg.py:174 in run + 14:49:10.773 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:49:10.775 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 14:49:10.776 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 14:49:10.902 [INFO] - [业务分析]业务 总共耗时 554.5 毫秒,其中: + AI_Process: 505.7 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 505.7 毫秒,其中: + img_pad: 1.6 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 422.1 毫秒 aiHelper.py:165 in AI_process + infer: 14.1 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 61.2 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.3 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.2 毫秒,其中: + NMS: 2.9 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.3 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.8 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 47.6 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.4 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:49:10.903 [WARNING] - step 6-------------------- 处理图片 ./appIOs/samples/illParking/3.jpg-------------------- @ Bussiness_Seg.py:174 in run + 14:49:10.917 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:49:10.969 [INFO] - [业务分析]业务 总共耗时 58.2 毫秒,其中: + AI_Process: 40.6 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 40.5 毫秒,其中: + img_pad: 5.0 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.6 毫秒 aiHelper.py:165 in AI_process + infer: 15.9 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 4.9 毫秒 aiHelper.py:184 in AI_process + 后处理: 13.1 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 13.0 毫秒,其中: + NMS: 4.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 8.9 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 2.0 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 15.2 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.3 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:49:10.970 [WARNING] - step 7-------------------- 处理图片 ./appIOs/samples/illParking/2.jpg-------------------- @ Bussiness_Seg.py:174 in run + 14:49:10.973 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:49:11.003 [INFO] - [业务分析]业务 总共耗时 32.4 毫秒,其中: + AI_Process: 20.9 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 20.9 毫秒,其中: + img_pad: 1.5 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 9.8 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.5 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.2 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.2 毫秒,其中: + NMS: 1.5 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 4.6 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 1.0 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 10.3 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.2 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:49:11.003 [WARNING] - step 8-------------------- 处理图片 ./appIOs/samples/illParking/1.jpg-------------------- @ Bussiness_Seg.py:174 in run + 14:49:11.007 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:49:11.043 [INFO] - [业务分析]业务 总共耗时 39.0 毫秒,其中: + AI_Process: 24.8 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 24.7 毫秒,其中: + img_pad: 2.1 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 9.3 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.5 毫秒 aiHelper.py:184 in AI_process + 后处理: 9.5 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 9.5 毫秒,其中: + NMS: 1.5 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 8.0 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.3 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 13.8 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:49:11.044 [WARNING] - step 9-------------------- 处理图片 ./appIOs/samples/illParking/5.jpg-------------------- @ Bussiness_Seg.py:174 in run + 14:49:11.046 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:49:11.069 [INFO] - [业务分析]业务 总共耗时 24.8 毫秒,其中: + AI_Process: 16.7 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 16.6 毫秒,其中: + img_pad: 1.5 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 7.3 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.4 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.7 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.7 毫秒,其中: + NMS: 1.2 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.5 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.8 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.2 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:49:11.069 [INFO] - step 10: 5 张图片共耗时:722.1 ms ,依次为:144.4 ms, 占用 1 线程 @ Bussiness_Seg.py:186 in run + 14:50:12.079 [INFO] - 待测试业务名称: @ main.py:15 in + 14:50:12.079 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:50:12.080 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:50:12.273 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:50:12.274 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:50:12.274 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:50:12.274 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:50:12.275 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:50:12.275 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:50:12.275 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:50:12.276 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:50:12.276 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:56 in run + 14:50:58.328 [INFO] - 待测试业务名称: @ main.py:15 in + 14:50:58.328 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:50:58.329 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:50:58.523 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:50:58.524 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:50:58.524 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:50:58.525 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:50:58.525 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:50:58.525 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:50:58.526 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:50:58.526 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:50:58.526 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:56 in run + 14:50:58.552 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:74 in select_device + 14:50:58.553 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 14:50:58.714 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 14:50:58.738 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 14:50:58.761 [INFO] - step 4: 共读入 5 张图片待处理 @ Bussiness_Seg.py:170 in run + 14:50:58.761 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/4.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:50:59.194 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:50:59.196 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 14:50:59.196 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 14:50:59.281 [INFO] - [业务分析]业务 总共耗时 519.3 毫秒,其中: + AI_Process: 511.5 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 511.5 毫秒,其中: + img_pad: 1.5 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 428.7 毫秒 aiHelper.py:165 in AI_process + infer: 13.7 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 60.9 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.2 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.2 毫秒,其中: + NMS: 2.8 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.3 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:50:59.282 [WARNING] - step 6-------------------- 处理图片 ./appIOs/samples/illParking/3.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:50:59.284 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:50:59.305 [INFO] - [业务分析]业务 总共耗时 23.2 毫秒,其中: + AI_Process: 15.5 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.5 毫秒,其中: + img_pad: 1.7 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.6 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.1 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.3 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.3 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:50:59.306 [WARNING] - step 7-------------------- 处理图片 ./appIOs/samples/illParking/2.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:50:59.308 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:50:59.329 [INFO] - [业务分析]业务 总共耗时 22.7 毫秒,其中: + AI_Process: 15.0 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.9 毫秒,其中: + img_pad: 0.9 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.8 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.2 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.3 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.3 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:50:59.329 [WARNING] - step 8-------------------- 处理图片 ./appIOs/samples/illParking/1.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:50:59.332 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:50:59.359 [INFO] - [业务分析]业务 总共耗时 29.0 毫秒,其中: + AI_Process: 19.5 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 19.5 毫秒,其中: + img_pad: 1.7 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 7.8 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.8 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.7 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 5.7 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.2 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 9.2 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:50:59.359 [WARNING] - step 9-------------------- 处理图片 ./appIOs/samples/illParking/5.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:50:59.361 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:50:59.382 [INFO] - [业务分析]业务 总共耗时 22.8 毫秒,其中: + AI_Process: 15.1 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.1 毫秒,其中: + img_pad: 1.0 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.8 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.3 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.2 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.2 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.1 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:50:59.383 [INFO] - step 10: 5 张图片共耗时:621.1 ms ,依次为:124.2 ms, 占用 1 线程 @ Bussiness_Seg.py:187 in run + 14:51:38.374 [INFO] - 待测试业务名称: @ main.py:15 in + 14:51:38.375 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 14:51:38.375 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 14:51:38.570 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 14:51:38.571 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 14:51:38.571 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 14:51:38.571 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:51:38.572 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 14:51:38.572 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 14:51:38.573 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:51:38.573 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 14:51:38.573 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:56 in run + 14:51:38.618 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 14:51:38.619 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 14:51:38.784 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 14:51:38.808 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 14:51:38.832 [INFO] - step 4: 共读入 5 张图片待处理 @ Bussiness_Seg.py:170 in run + 14:51:38.833 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/4.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:51:39.263 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:51:39.264 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 14:51:39.265 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 14:51:39.351 [INFO] - [业务分析]业务 总共耗时 517.7 毫秒,其中: + AI_Process: 509.9 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 509.8 毫秒,其中: + img_pad: 1.6 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 426.6 毫秒 aiHelper.py:165 in AI_process + infer: 13.1 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 62.3 毫秒 aiHelper.py:184 in AI_process + 后处理: 5.9 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 5.8 毫秒,其中: + NMS: 2.4 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.4 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:51:39.351 [WARNING] - step 6-------------------- 处理图片 ./appIOs/samples/illParking/3.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:51:39.354 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:51:39.374 [INFO] - [业务分析]业务 总共耗时 22.7 毫秒,其中: + AI_Process: 14.8 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.8 毫秒,其中: + img_pad: 1.7 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 5.9 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.2 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.2 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.2 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.1 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:51:39.375 [WARNING] - step 7-------------------- 处理图片 ./appIOs/samples/illParking/2.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:51:39.377 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:51:39.398 [INFO] - [业务分析]业务 总共耗时 22.8 毫秒,其中: + AI_Process: 14.8 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.8 毫秒,其中: + img_pad: 1.1 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.5 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.4 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.4 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.4 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.2 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:51:39.398 [WARNING] - step 8-------------------- 处理图片 ./appIOs/samples/illParking/1.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:51:39.401 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:51:39.425 [INFO] - [业务分析]业务 总共耗时 27.0 毫秒,其中: + AI_Process: 17.6 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 17.6 毫秒,其中: + img_pad: 1.4 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.3 毫秒 aiHelper.py:165 in AI_process + infer: 6.1 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.1 毫秒 aiHelper.py:184 in AI_process + 后处理: 7.0 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 7.0 毫秒,其中: + NMS: 1.3 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 5.7 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.2 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 9.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:51:39.426 [WARNING] - step 9-------------------- 处理图片 ./appIOs/samples/illParking/5.jpg-------------------- @ Bussiness_Seg.py:175 in run + 14:51:39.428 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 14:51:39.449 [INFO] - [业务分析]业务 总共耗时 22.8 毫秒,其中: + AI_Process: 15.1 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.0 毫秒,其中: + img_pad: 1.1 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.7 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.2 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.3 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.2 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 14:51:39.450 [INFO] - step 10: 5 张图片共耗时:617.0 ms ,依次为:123.4 ms, 占用 1 线程 @ Bussiness_Seg.py:187 in run + 16:26:04.590 [INFO] - 待测试业务名称: @ main.py:15 in + 16:26:04.590 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 16:26:04.590 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 16:26:04.980 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 16:26:04.982 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 16:26:04.982 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 16:26:04.982 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 16:26:04.983 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 16:26:04.983 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 16:26:04.983 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 16:26:04.984 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 16:26:04.984 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:56 in run + 16:26:05.020 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 16:26:05.021 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 16:26:05.235 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 16:26:05.261 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 16:26:05.308 [INFO] - step 4: 共读入 5 张图片待处理 @ Bussiness_Seg.py:170 in run + 16:26:05.309 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/4.jpg-------------------- @ Bussiness_Seg.py:175 in run + 16:26:05.754 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 16:26:05.757 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 16:26:05.757 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 16:26:05.849 [INFO] - [业务分析]业务 总共耗时 539.3 毫秒,其中: + AI_Process: 531.6 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 531.5 毫秒,其中: + img_pad: 1.6 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 441.4 毫秒 aiHelper.py:165 in AI_process + infer: 14.7 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 67.6 毫秒 aiHelper.py:184 in AI_process + 后处理: 5.8 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 5.8 毫秒,其中: + NMS: 2.6 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 16:26:05.849 [WARNING] - step 6-------------------- 处理图片 ./appIOs/samples/illParking/3.jpg-------------------- @ Bussiness_Seg.py:175 in run + 16:26:05.853 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 16:26:05.873 [INFO] - [业务分析]业务 总共耗时 23.4 毫秒,其中: + AI_Process: 15.5 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.5 毫秒,其中: + img_pad: 2.2 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.5 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.0 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.0 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.0 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.2 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 16:26:05.874 [WARNING] - step 7-------------------- 处理图片 ./appIOs/samples/illParking/2.jpg-------------------- @ Bussiness_Seg.py:175 in run + 16:26:05.877 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 16:26:05.897 [INFO] - [业务分析]业务 总共耗时 22.2 毫秒,其中: + AI_Process: 14.4 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.4 毫秒,其中: + img_pad: 1.2 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.1 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.3 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.2 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.0 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 16:26:05.897 [WARNING] - step 8-------------------- 处理图片 ./appIOs/samples/illParking/1.jpg-------------------- @ Bussiness_Seg.py:175 in run + 16:26:05.900 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 16:26:05.925 [INFO] - [业务分析]业务 总共耗时 27.4 毫秒,其中: + AI_Process: 18.1 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 18.0 毫秒,其中: + img_pad: 1.4 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.3 毫秒 aiHelper.py:165 in AI_process + infer: 6.7 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.2 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.7 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.6 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 5.5 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.1 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 9.1 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 16:26:05.925 [WARNING] - step 9-------------------- 处理图片 ./appIOs/samples/illParking/5.jpg-------------------- @ Bussiness_Seg.py:175 in run + 16:26:05.927 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 16:26:05.948 [INFO] - [业务分析]业务 总共耗时 22.4 毫秒,其中: + AI_Process: 14.9 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.8 毫秒,其中: + img_pad: 1.0 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.3 毫秒 aiHelper.py:165 in AI_process + infer: 6.6 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.0 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.5 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.5 毫秒,其中: + NMS: 1.2 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.8 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 16:26:05.948 [INFO] - step 10: 5 张图片共耗时:639.5 ms ,依次为:127.9 ms, 占用 1 线程 @ Bussiness_Seg.py:187 in run diff --git a/DrGraph/appIOs/logs/drgraph_aialg.log b/DrGraph/appIOs/logs/drgraph_aialg.log new file mode 100644 index 0000000..4d559af --- /dev/null +++ b/DrGraph/appIOs/logs/drgraph_aialg.log @@ -0,0 +1,6204 @@ + 09:31:45.393 [INFO] - 待测试业务名称: @ main.py:15 in + 09:31:45.394 [INFO] - -------------------- 开始业务 [illParking] -------------------- @ main.py:19 in + 09:31:45.394 [INFO] - bussiness: illParking @ Bussiness.py:16 in createModel + 09:31:45.587 [INFO] - create AlAlg_IllParking @ Bussiness_Seg.py:307 in __init__ + 09:31:45.588 [WARNING] - [illParking] 业务配置 - ['device', 'labelnames', 'max_workers', 'Detweights', 'detModelpara', 'seg_nclass', 'segRegionCnt', 'Segweights', 'postFile', 'txtFontSize', 'digitFont', 'testImgPath', 'testOutPath', 'segPar'] - 重点配置: + 检测类别(labelnames):./weights/conf/illParking/labelnames.json >>>>>> ['车', 'T角点', 'L角点', '违停'] + 检测模型路径(Detweights): ./weights/illParking/yolov5_3090_fp16.engine + 分割模型权重文件(Segweights): ./weights/illParking/stdc_360X640_3090_fp16.engine + 后处理参数文件(postFile): ./weights/conf/illParking/para.json + 测试图像路径(testImgPath): ./appIOs/samples/illParking/ + 输出图像位置(testOutPath): ./appIOs/results/illParking/ + 输出图像路径: ./appIOs/results/illParking/ @ Bussiness.py:39 in __init__ + 09:31:45.588 [INFO] - 检测类别 - ./weights/conf/illParking/labelnames.json 存在 @ drHelper.py:197 in checkFile + 09:31:45.589 [INFO] - 检测模型路径 - ./weights/illParking/yolov5_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 09:31:45.589 [INFO] - 后处理参数文件 - ./weights/conf/illParking/para.json 存在 @ drHelper.py:197 in checkFile + 09:31:45.590 [INFO] - 分割模型权重文件 - ./weights/illParking/stdc_360X640_3090_fp16.engine 存在 @ drHelper.py:197 in checkFile + 09:31:45.590 [INFO] - 测试图像路径 - ./appIOs/samples/illParking/ 存在 @ drHelper.py:197 in checkFile + 09:31:45.590 [INFO] - 输出图像路径 - ./appIOs/results/illParking/ 存在 @ drHelper.py:197 in checkFile + 09:31:45.591 [INFO] - step 1: 业务分析配置 - trtFlag_seg: True, trtFlag_det: True @ Bussiness_Seg.py:56 in run + 09:31:45.639 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 09:31:45.639 [INFO] - step 2: 取得参数配置 @ Bussiness_Seg.py:73 in run + 09:31:45.802 [INFO] - step 3: 情况 1 - 成功载入 det model trt [./weights/illParking/yolov5_3090_fp16.engine] @ Bussiness_Seg.py:83 in run + 09:31:45.827 [INFO] - 加载 stdcModel 模型: ./weights/illParking/stdc_360X640_3090_fp16.engine 类型: trt @ stdc.py:53 in __init__ + 09:31:45.850 [INFO] - step 4: 共读入 5 张图片待处理 @ Bussiness_Seg.py:170 in run + 09:31:45.851 [WARNING] - step 5-------------------- 处理图片 ./appIOs/samples/illParking/4.jpg-------------------- @ Bussiness_Seg.py:175 in run + 09:31:46.295 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 09:31:46.297 [WARNING] - mean not in par, use default mean(0.485, 0.456, 0.406) @ stdc.py:75 in preprocess_image + 09:31:46.298 [WARNING] - std not in par, use default std(0.229, 0.224, 0.225) @ stdc.py:78 in preprocess_image + 09:31:46.388 [INFO] - [业务分析]业务 总共耗时 536.3 毫秒,其中: + AI_Process: 528.6 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 528.5 毫秒,其中: + img_pad: 1.9 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.1 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 440.2 毫秒 aiHelper.py:165 in AI_process + infer: 13.5 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 66.7 毫秒 aiHelper.py:184 in AI_process + 后处理: 5.7 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 5.7 毫秒,其中: + NMS: 2.5 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.2 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 09:31:46.388 [WARNING] - step 6-------------------- 处理图片 ./appIOs/samples/illParking/3.jpg-------------------- @ Bussiness_Seg.py:175 in run + 09:31:46.392 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 09:31:46.412 [INFO] - [业务分析]业务 总共耗时 22.9 毫秒,其中: + AI_Process: 15.2 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.2 毫秒,其中: + img_pad: 2.2 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 6.2 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 1.9 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.0 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.0 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.0 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 09:31:46.412 [WARNING] - step 7-------------------- 处理图片 ./appIOs/samples/illParking/2.jpg-------------------- @ Bussiness_Seg.py:175 in run + 09:31:46.414 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 09:31:46.435 [INFO] - [业务分析]业务 总共耗时 22.7 毫秒,其中: + AI_Process: 14.3 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 14.3 毫秒,其中: + img_pad: 1.0 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.3 毫秒 aiHelper.py:165 in AI_process + infer: 6.2 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.2 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.1 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.1 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.1 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 7.6 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.2 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 09:31:46.436 [WARNING] - step 8-------------------- 处理图片 ./appIOs/samples/illParking/1.jpg-------------------- @ Bussiness_Seg.py:175 in run + 09:31:46.439 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 09:31:46.464 [INFO] - [业务分析]业务 总共耗时 27.8 毫秒,其中: + AI_Process: 18.4 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 18.3 毫秒,其中: + img_pad: 1.6 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 7.0 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.1 毫秒 aiHelper.py:184 in AI_process + 后处理: 6.6 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 6.6 毫秒,其中: + NMS: 1.1 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 5.5 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.1 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 9.2 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 09:31:46.465 [WARNING] - step 9-------------------- 处理图片 ./appIOs/samples/illParking/5.jpg-------------------- @ Bussiness_Seg.py:175 in run + 09:31:46.467 [WARNING] - modelSize not in par, use default size(640, 360) @ stdc.py:66 in preprocess_image + 09:31:46.488 [INFO] - [业务分析]业务 总共耗时 23.1 毫秒,其中: + AI_Process: 15.4 毫秒 Bussiness.py:80 in doAnalysis -> [AI_process]业务 总共耗时 15.3 毫秒,其中: + img_pad: 1.0 毫秒 aiHelper.py:159 in AI_process + from_numpy(640 x 640): 0.0 毫秒 aiHelper.py:163 in AI_process + to GPU(640 x 640): 0.4 毫秒 aiHelper.py:165 in AI_process + infer: 7.1 毫秒 aiHelper.py:177 in AI_process + yolov5Trtforward: 2.3 毫秒 aiHelper.py:184 in AI_process + 后处理: 4.2 毫秒 aiHelper.py:191 in AI_process -> [预测结果后处理]业务 总共耗时 4.2 毫秒,其中: + NMS: 1.0 毫秒 aiHelper.py:40 in getDetectionsFromPreds + ScaleBack: 3.2 毫秒 aiHelper.py:65 in getDetectionsFromPreds + drawAllBox: 0.7 毫秒 Bussiness.py:82 in doAnalysis + testOutPath: 6.9 毫秒 Bussiness.py:93 in doAnalysis + fp: 0.1 毫秒 Bussiness.py:100 in doAnalysis @ Bussiness.py:102 in doAnalysis + 09:31:46.488 [INFO] - step 10: 5 张图片共耗时:637.5 ms ,依次为:127.5 ms, 占用 1 线程 @ Bussiness_Seg.py:187 in run + 10:21:56.234 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:21:56.255 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:21:56.282 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:21:56.283 [ERROR] - 模型加载异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 65, in __init__ + with open(Detweights, "rb") as f, trt.Runtime(trt.Logger(trt.Logger.ERROR)) as runtime: +FileNotFoundError: [Errno 2] No such file or directory: '../weights/trt/AIlib2/illParking/yolov5_3090_fp16.engine' +, requestId:1234 @ ModelUtils.py:102 in __init__ + 10:21:56.284 [ERROR] - 异常编码:SP017, 异常描述:模型加载异常! @ ModelUtils.py:43 in __str__ + 10:22:58.022 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:22:58.044 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:22:58.074 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:22:58.074 [INFO] - 加载模型:../weights/trt/AIlib2/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:22:58.076 [ERROR] - 模型加载异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 66, in __init__ + with open(Detweights, "rb") as f, trt.Runtime(trt.Logger(trt.Logger.ERROR)) as runtime: +FileNotFoundError: [Errno 2] No such file or directory: '../weights/trt/AIlib2/illParking/yolov5_3090_fp16.engine' +, requestId:1234 @ ModelUtils.py:103 in __init__ + 10:22:58.077 [ERROR] - 异常编码:SP017, 异常描述:模型加载异常! @ ModelUtils.py:43 in __str__ + 10:24:14.077 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:24:14.097 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:24:14.123 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:24:14.123 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:24:14.289 [INFO] - 模型初始化时间:0.19141888618469238, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:24:14.289 [INFO] - [(( at 0x7f773658e8c0>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])), '019')] @ main.py:45 in + 10:26:33.698 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:26:33.718 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:26:33.744 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:26:33.744 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:26:33.903 [INFO] - 模型初始化时间:0.18465828895568848, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:26:33.903 [INFO] - [(( at 0x7fea16c5e680>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])), '019')] @ main.py:45 in + 10:27:19.013 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:27:19.033 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:27:19.058 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:27:19.058 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:27:19.217 [INFO] - 模型初始化时间:0.1833491325378418, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:27:19.217 [INFO] - [(( at 0x7f7dc4ffe710>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])), '019')] @ main.py:45 in + 10:27:19.217 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f7dc4ffe710>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:49 in + 10:27:32.595 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:27:32.615 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:27:32.640 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:27:32.640 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:27:32.794 [INFO] - 模型初始化时间:0.17897987365722656, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:27:32.795 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f1beb6de710>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:49 in + 10:33:25.238 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:33:25.262 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:33:25.295 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:33:25.296 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:33:25.469 [INFO] - 模型初始化时间:0.20696687698364258, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:33:28.409 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f4021667d00>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:49 in + 10:35:21.011 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:35:21.035 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:35:21.061 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:35:21.062 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:35:21.228 [INFO] - 模型初始化时间:0.19243597984313965, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:35:21.228 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f6cf5126710>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:49 in + 10:37:38.672 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:37:38.697 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:37:38.722 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:37:38.722 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:37:38.884 [INFO] - 模型初始化时间:0.1872081756591797, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:37:38.884 [INFO] - 模型编号: 019, 模型参数: ( at 0x7fd290b0a680>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:49 in + 10:41:09.625 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:41:09.645 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:41:09.671 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:41:09.672 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:41:09.834 [INFO] - 模型初始化时间:0.18894720077514648, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:41:09.835 [INFO] - 模型编号: 019, 模型参数: ( at 0x7fa55e8ba680>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:49 in + 10:41:37.225 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:41:37.246 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:41:37.271 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:41:37.271 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:41:37.447 [INFO] - 模型初始化时间:0.2016286849975586, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:41:37.448 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f727d2be680>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:49 in + 10:42:04.389 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:42:04.409 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:42:04.438 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:42:04.438 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:42:04.600 [INFO] - 模型初始化时间:0.1905205249786377, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:42:04.600 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f443b34a680>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:49 in + 10:42:50.264 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:42:50.284 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:42:50.311 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:42:50.312 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:42:50.465 [INFO] - 模型初始化时间:0.18108057975769043, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:42:50.466 [INFO] - 模型编号: 019, 模型参数: ( at 0x7fed332f6680>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:49 in + 10:43:18.095 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:43:18.120 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:43:18.145 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:43:18.146 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:43:18.303 [INFO] - 模型初始化时间:0.18239474296569824, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:43:18.303 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f20812ba680>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:49 in + 10:44:18.655 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:44:18.685 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:44:18.739 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:44:18.740 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:44:18.948 [INFO] - 模型初始化时间:0.26304006576538086, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:44:18.949 [INFO] - 模型编号: 019, 模型参数: ( at 0x7fc9aeb3a9e0>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:49 in + 10:44:18.949 [INFO] - fontPath:../AIlib2/conf/platech.ttf @ ModelUtils.py:289 in get_label_arraylist + 10:45:10.803 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:45:10.826 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:45:10.852 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:45:10.853 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:45:11.020 [INFO] - 模型初始化时间:0.19400358200073242, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:45:11.020 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f2d70ffe9e0>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:49 in + 10:45:11.020 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:289 in get_label_arraylist + 10:45:57.975 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 10:45:58.001 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 10:45:58.033 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 10:45:58.033 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 10:45:58.202 [INFO] - 模型初始化时间:0.20077276229858398, requestId:1234 @ ModelUtils.py:106 in __init__ + 10:46:03.081 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f3dd5947c70>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:49 in + 10:47:47.258 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:289 in get_label_arraylist + 11:00:31.842 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 11:00:31.863 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 11:00:31.889 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 11:00:31.890 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 11:00:32.047 [INFO] - 模型初始化时间:0.18349575996398926, requestId:1234 @ ModelUtils.py:106 in __init__ + 11:00:32.048 [INFO] - 模型编号: 019, 模型参数: ( at 0x7fc930b0a9e0>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 11:00:32.049 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:289 in get_label_arraylist + 11:02:36.952 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 11:02:36.977 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 11:02:37.004 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 11:02:37.005 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 11:02:37.183 [INFO] - 模型初始化时间:0.20563292503356934, requestId:1234 @ ModelUtils.py:106 in __init__ + 11:02:37.183 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f78f85ce7a0>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 11:02:37.184 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:289 in get_label_arraylist + 11:02:37.187 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 150, in model_process + return AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], +NameError: name 'AI_process' is not defined +, requestId:1234 @ ModelUtils.py:159 in model_process + 11:02:37.188 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:43 in __str__ + 11:20:25.465 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 11:20:25.487 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:54 in __init__ + 11:20:25.523 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 11:20:25.523 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:64 in __init__ + 11:20:25.686 [INFO] - 模型初始化时间:0.19849014282226562, requestId:1234 @ ModelUtils.py:106 in __init__ + 11:20:25.686 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f605fbc67a0>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 11:20:25.687 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:289 in get_label_arraylist + 11:20:25.691 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 150, in model_process + return AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], +NameError: name 'AI_process' is not defined +, requestId:1234 @ ModelUtils.py:159 in model_process + 11:20:25.691 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:43 in __str__ + 11:31:05.760 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 11:31:05.782 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 11:31:05.808 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 11:31:05.809 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 11:31:05.977 [INFO] - 模型初始化时间:0.19477510452270508, requestId:1234 @ ModelUtils.py:107 in __init__ + 11:31:05.977 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f7e6b58ac20>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 11:31:05.977 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 11:31:05.981 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 135, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:160 in model_process + 11:31:05.982 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 11:32:14.535 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 11:32:14.557 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 11:32:14.583 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 11:32:14.584 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 11:32:14.751 [INFO] - 模型初始化时间:0.19419503211975098, requestId:1234 @ ModelUtils.py:107 in __init__ + 11:32:14.751 [INFO] - 模型编号: 019, 模型参数: ( at 0x7fab9f70ac20>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 11:32:14.754 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:291 in get_label_arraylist + 11:32:14.757 [INFO] - model_process([( at 0x7fab9f70ac20>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None, 'digitFont': {'line_thickness': 1, 'boxLine_thickness': 1, 'fontSize': 0.4, 'waterLineColor': (0, 255, 255), 'segLineShow': False, 'waterLineWidth': 1, 'wordSize': 8, 'label_location': 'leftTop'}, 'label_arraylist': [array([[[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 15, 15], + [255, 48, 48], + [255, 61, 61], + [255, 33, 33], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 34, 34], + [255, 50, 50], + [255, 83, 83], + [255, 129, 129], + [255, 143, 143], + [255, 104, 104], + [255, 61, 61], + [255, 61, 61], + [255, 61, 61], + [255, 48, 48], + [255, 29, 29]], + + [[255, 104, 104], + [255, 154, 154], + [255, 203, 203], + [255, 232, 232], + [255, 222, 222], + [255, 205, 205], + [255, 189, 189], + [255, 186, 186], + [255, 186, 186], + [255, 145, 145], + [255, 87, 87]], + + [[255, 48, 48], + [255, 104, 104], + [255, 168, 168], + [255, 217, 217], + [255, 141, 141], + [255, 134, 134], + [255, 137, 137], + [255, 90, 90], + [255, 87, 87], + [255, 68, 68], + [255, 40, 40]], + + [[255, 16, 16], + [255, 106, 106], + [255, 170, 170], + [255, 168, 168], + [255, 112, 112], + [255, 136, 136], + [255, 149, 149], + [255, 56, 56], + [255, 50, 50], + [255, 35, 35], + [255, 14, 14]], + + [[255, 3, 3], + [255, 124, 124], + [255, 188, 188], + [255, 143, 143], + [255, 132, 132], + [255, 176, 176], + [255, 190, 190], + [255, 87, 87], + [255, 80, 80], + [255, 49, 49], + [255, 4, 4]], + + [[255, 9, 9], + [255, 124, 124], + [255, 203, 203], + [255, 201, 201], + [255, 210, 210], + [255, 228, 228], + [255, 234, 234], + [255, 199, 199], + [255, 196, 196], + [255, 120, 120], + [255, 9, 9]], + + [[255, 54, 54], + [255, 99, 99], + [255, 130, 130], + [255, 132, 132], + [255, 157, 157], + [255, 199, 199], + [255, 209, 209], + [255, 135, 135], + [255, 130, 130], + [255, 99, 99], + [255, 54, 54]], + + [[255, 93, 93], + [255, 108, 108], + [255, 119, 119], + [255, 120, 120], + [255, 149, 149], + [255, 194, 194], + [255, 205, 205], + [255, 124, 124], + [255, 119, 119], + [255, 108, 108], + [255, 93, 93]], + + [[255, 102, 102], + [255, 119, 119], + [255, 131, 131], + [255, 133, 133], + [255, 158, 158], + [255, 199, 199], + [255, 209, 209], + [255, 136, 136], + [255, 131, 131], + [255, 119, 119], + [255, 102, 102]], + + [[255, 16, 16], + [255, 19, 19], + [255, 21, 21], + [255, 24, 24], + [255, 72, 72], + [255, 149, 149], + [255, 168, 168], + [255, 29, 29], + [255, 21, 21], + [255, 19, 19], + [255, 16, 16]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 1, 1], + [255, 25, 25], + [255, 63, 63], + [255, 73, 73], + [255, 4, 4], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 3, 3], + [255, 7, 7], + [255, 8, 8], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]]], dtype=uint8), array([[[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[212, 6, 150], + [212, 7, 151], + [212, 7, 151], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[224, 77, 180], + [225, 84, 183], + [226, 89, 185], + ..., + [225, 80, 182], + [223, 70, 177], + [221, 59, 173]], + + ..., + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [218, 40, 165], + [219, 49, 168], + [221, 61, 173]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]]], dtype=uint8), array([[[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 2, 128, 2], + [ 5, 129, 5], + [ 4, 129, 4], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 26, 140, 26], + [ 63, 159, 63], + [ 60, 157, 60], + ..., + [ 79, 167, 79], + [ 64, 159, 64], + [ 59, 157, 59]], + + ..., + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 38, 146, 38], + [ 55, 155, 55], + [ 61, 157, 61]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]]], dtype=uint8), array([[[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 25, 87, 255], + [ 30, 90, 255], + [ 22, 85, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 36, 95, 255], + [ 63, 115, 255], + [ 33, 93, 255], + [ 10, 76, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 34, 94, 255], + [ 47, 103, 255], + [ 24, 86, 255], + [ 6, 73, 255], + [ 25, 87, 255], + [ 50, 105, 255], + [ 50, 105, 255], + [ 16, 80, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 53, 107, 255], + [ 87, 132, 255], + [ 90, 135, 255], + [ 49, 104, 255], + [ 67, 118, 255], + [118, 155, 255], + [151, 179, 255], + [113, 151, 255], + [ 85, 131, 255], + [ 62, 114, 255], + [ 41, 99, 255], + [ 7, 74, 255], + [ 83, 129, 255], + [121, 157, 255], + [ 80, 127, 255], + [ 67, 118, 255], + [ 93, 137, 255], + [122, 158, 255], + [122, 157, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 53, 107, 255]], + + [[ 73, 121, 255], + [160, 185, 255], + [196, 212, 255], + [147, 177, 255], + [205, 218, 255], + [235, 240, 255], + [243, 246, 255], + [233, 239, 255], + [226, 233, 255], + [190, 208, 255], + [124, 160, 255], + [ 24, 86, 255], + [138, 169, 255], + [206, 220, 255], + [158, 184, 255], + [190, 208, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [184, 203, 255], + [160, 185, 255]], + + [[ 17, 81, 255], + [ 66, 117, 255], + [ 88, 133, 255], + [ 66, 117, 255], + [123, 159, 255], + [183, 203, 255], + [214, 225, 255], + [178, 199, 255], + [152, 180, 255], + [104, 146, 255], + [ 52, 107, 255], + [ 53, 108, 255], + [156, 183, 255], + [176, 197, 255], + [ 73, 122, 255], + [179, 200, 255], + [197, 213, 255], + [182, 201, 255], + [182, 201, 255], + [202, 216, 255], + [155, 182, 255], + [ 75, 124, 255]], + + [[ 93, 137, 255], + [121, 157, 255], + [108, 147, 255], + [ 40, 98, 255], + [ 98, 141, 255], + [167, 191, 255], + [205, 218, 255], + [162, 187, 255], + [130, 164, 255], + [ 77, 126, 255], + [ 36, 95, 255], + [113, 152, 255], + [185, 204, 255], + [166, 190, 255], + [ 47, 103, 255], + [178, 199, 255], + [198, 213, 255], + [176, 197, 255], + [176, 197, 255], + [204, 217, 255], + [148, 177, 255], + [ 50, 105, 255]], + + [[150, 178, 255], + [196, 212, 255], + [176, 197, 255], + [ 68, 118, 255], + [125, 160, 255], + [184, 203, 255], + [214, 225, 255], + [179, 200, 255], + [154, 182, 255], + [108, 148, 255], + [ 73, 122, 255], + [165, 189, 255], + [207, 220, 255], + [175, 196, 255], + [ 77, 125, 255], + [184, 203, 255], + [199, 215, 255], + [181, 201, 255], + [181, 201, 255], + [204, 218, 255], + [159, 185, 255], + [ 78, 126, 255]], + + [[ 37, 96, 255], + [165, 189, 255], + [223, 231, 255], + [160, 186, 255], + [211, 223, 255], + [237, 242, 255], + [245, 248, 255], + [236, 241, 255], + [234, 239, 255], + [207, 219, 255], + [169, 192, 255], + [170, 193, 255], + [202, 216, 255], + [207, 220, 255], + [173, 195, 255], + [194, 211, 255], + [200, 215, 255], + [199, 214, 255], + [199, 214, 255], + [200, 215, 255], + [188, 206, 255], + [169, 193, 255]], + + [[ 12, 78, 255], + [156, 183, 255], + [190, 208, 255], + [ 53, 108, 255], + [ 69, 119, 255], + [141, 171, 255], + [196, 212, 255], + [157, 184, 255], + [189, 207, 255], + [187, 206, 255], + [150, 179, 255], + [ 87, 133, 255], + [163, 188, 255], + [201, 215, 255], + [152, 180, 255], + [150, 179, 255], + [145, 175, 255], + [140, 171, 255], + [140, 171, 255], + [147, 176, 255], + [151, 179, 255], + [153, 180, 255]], + + [[ 44, 101, 255], + [169, 192, 255], + [188, 206, 255], + [ 45, 102, 255], + [ 23, 85, 255], + [ 97, 140, 255], + [162, 187, 255], + [111, 150, 255], + [143, 174, 255], + [140, 171, 255], + [100, 142, 255], + [ 39, 98, 255], + [144, 174, 255], + [183, 202, 255], + [ 97, 140, 255], + [108, 148, 255], + [118, 155, 255], + [130, 164, 255], + [152, 180, 255], + [126, 161, 255], + [107, 147, 255], + [ 99, 141, 255]], + + [[109, 148, 255], + [182, 202, 255], + [197, 212, 255], + [118, 155, 255], + [ 76, 124, 255], + [117, 155, 255], + [159, 185, 255], + [117, 154, 255], + [127, 162, 255], + [104, 145, 255], + [ 57, 111, 255], + [ 29, 91, 255], + [142, 173, 255], + [162, 187, 255], + [ 31, 92, 255], + [ 80, 128, 255], + [125, 160, 255], + [165, 189, 255], + [200, 215, 255], + [119, 155, 255], + [ 60, 113, 255], + [ 32, 92, 255]], + + [[144, 173, 255], + [125, 160, 255], + [127, 162, 255], + [163, 187, 255], + [185, 204, 255], + [205, 218, 255], + [216, 226, 255], + [210, 222, 255], + [212, 223, 255], + [186, 204, 255], + [129, 163, 255], + [ 40, 99, 255], + [142, 173, 255], + [154, 181, 255], + [ 9, 76, 255], + [ 91, 135, 255], + [173, 195, 255], + [209, 221, 255], + [145, 175, 255], + [ 53, 108, 255], + [ 9, 76, 255], + [ 5, 73, 255]], + + [[ 62, 114, 255], + [ 47, 103, 255], + [ 47, 103, 255], + [ 70, 120, 255], + [ 84, 130, 255], + [ 91, 135, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 18, 82, 255], + [ 60, 113, 255], + [ 65, 116, 255], + [ 2, 71, 255], + [ 38, 97, 255], + [ 74, 123, 255], + [ 89, 134, 255], + [ 55, 109, 255], + [ 17, 81, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 1, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 3, 71, 255], + [ 3, 71, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]]], dtype=uint8)], 'font_config': (1, 29, 8, 0.33, 1)}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])), None, '1234']) @ ModelUtils.py:148 in model_process + 11:32:14.762 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 152, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 135, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:161 in model_process + 11:32:14.763 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 11:39:25.958 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 11:39:25.978 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 11:39:26.003 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 11:39:26.004 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 11:39:26.168 [INFO] - 模型初始化时间:0.18923592567443848, requestId:1234 @ ModelUtils.py:107 in __init__ + 11:39:26.168 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f3e9b436c20>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 11:39:26.169 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:291 in get_label_arraylist + 11:39:26.172 [INFO] - model_process(( at 0x7f3e9b436c20>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None, 'digitFont': {'line_thickness': 1, 'boxLine_thickness': 1, 'fontSize': 0.4, 'waterLineColor': (0, 255, 255), 'segLineShow': False, 'waterLineWidth': 1, 'wordSize': 8, 'label_location': 'leftTop'}, 'label_arraylist': [array([[[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 15, 15], + [255, 48, 48], + [255, 61, 61], + [255, 33, 33], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 34, 34], + [255, 50, 50], + [255, 83, 83], + [255, 129, 129], + [255, 143, 143], + [255, 104, 104], + [255, 61, 61], + [255, 61, 61], + [255, 61, 61], + [255, 48, 48], + [255, 29, 29]], + + [[255, 104, 104], + [255, 154, 154], + [255, 203, 203], + [255, 232, 232], + [255, 222, 222], + [255, 205, 205], + [255, 189, 189], + [255, 186, 186], + [255, 186, 186], + [255, 145, 145], + [255, 87, 87]], + + [[255, 48, 48], + [255, 104, 104], + [255, 168, 168], + [255, 217, 217], + [255, 141, 141], + [255, 134, 134], + [255, 137, 137], + [255, 90, 90], + [255, 87, 87], + [255, 68, 68], + [255, 40, 40]], + + [[255, 16, 16], + [255, 106, 106], + [255, 170, 170], + [255, 168, 168], + [255, 112, 112], + [255, 136, 136], + [255, 149, 149], + [255, 56, 56], + [255, 50, 50], + [255, 35, 35], + [255, 14, 14]], + + [[255, 3, 3], + [255, 124, 124], + [255, 188, 188], + [255, 143, 143], + [255, 132, 132], + [255, 176, 176], + [255, 190, 190], + [255, 87, 87], + [255, 80, 80], + [255, 49, 49], + [255, 4, 4]], + + [[255, 9, 9], + [255, 124, 124], + [255, 203, 203], + [255, 201, 201], + [255, 210, 210], + [255, 228, 228], + [255, 234, 234], + [255, 199, 199], + [255, 196, 196], + [255, 120, 120], + [255, 9, 9]], + + [[255, 54, 54], + [255, 99, 99], + [255, 130, 130], + [255, 132, 132], + [255, 157, 157], + [255, 199, 199], + [255, 209, 209], + [255, 135, 135], + [255, 130, 130], + [255, 99, 99], + [255, 54, 54]], + + [[255, 93, 93], + [255, 108, 108], + [255, 119, 119], + [255, 120, 120], + [255, 149, 149], + [255, 194, 194], + [255, 205, 205], + [255, 124, 124], + [255, 119, 119], + [255, 108, 108], + [255, 93, 93]], + + [[255, 102, 102], + [255, 119, 119], + [255, 131, 131], + [255, 133, 133], + [255, 158, 158], + [255, 199, 199], + [255, 209, 209], + [255, 136, 136], + [255, 131, 131], + [255, 119, 119], + [255, 102, 102]], + + [[255, 16, 16], + [255, 19, 19], + [255, 21, 21], + [255, 24, 24], + [255, 72, 72], + [255, 149, 149], + [255, 168, 168], + [255, 29, 29], + [255, 21, 21], + [255, 19, 19], + [255, 16, 16]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 1, 1], + [255, 25, 25], + [255, 63, 63], + [255, 73, 73], + [255, 4, 4], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 3, 3], + [255, 7, 7], + [255, 8, 8], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]]], dtype=uint8), array([[[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[212, 6, 150], + [212, 7, 151], + [212, 7, 151], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[224, 77, 180], + [225, 84, 183], + [226, 89, 185], + ..., + [225, 80, 182], + [223, 70, 177], + [221, 59, 173]], + + ..., + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [218, 40, 165], + [219, 49, 168], + [221, 61, 173]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]]], dtype=uint8), array([[[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 2, 128, 2], + [ 5, 129, 5], + [ 4, 129, 4], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 26, 140, 26], + [ 63, 159, 63], + [ 60, 157, 60], + ..., + [ 79, 167, 79], + [ 64, 159, 64], + [ 59, 157, 59]], + + ..., + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 38, 146, 38], + [ 55, 155, 55], + [ 61, 157, 61]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]]], dtype=uint8), array([[[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 25, 87, 255], + [ 30, 90, 255], + [ 22, 85, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 36, 95, 255], + [ 63, 115, 255], + [ 33, 93, 255], + [ 10, 76, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 34, 94, 255], + [ 47, 103, 255], + [ 24, 86, 255], + [ 6, 73, 255], + [ 25, 87, 255], + [ 50, 105, 255], + [ 50, 105, 255], + [ 16, 80, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 53, 107, 255], + [ 87, 132, 255], + [ 90, 135, 255], + [ 49, 104, 255], + [ 67, 118, 255], + [118, 155, 255], + [151, 179, 255], + [113, 151, 255], + [ 85, 131, 255], + [ 62, 114, 255], + [ 41, 99, 255], + [ 7, 74, 255], + [ 83, 129, 255], + [121, 157, 255], + [ 80, 127, 255], + [ 67, 118, 255], + [ 93, 137, 255], + [122, 158, 255], + [122, 157, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 53, 107, 255]], + + [[ 73, 121, 255], + [160, 185, 255], + [196, 212, 255], + [147, 177, 255], + [205, 218, 255], + [235, 240, 255], + [243, 246, 255], + [233, 239, 255], + [226, 233, 255], + [190, 208, 255], + [124, 160, 255], + [ 24, 86, 255], + [138, 169, 255], + [206, 220, 255], + [158, 184, 255], + [190, 208, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [184, 203, 255], + [160, 185, 255]], + + [[ 17, 81, 255], + [ 66, 117, 255], + [ 88, 133, 255], + [ 66, 117, 255], + [123, 159, 255], + [183, 203, 255], + [214, 225, 255], + [178, 199, 255], + [152, 180, 255], + [104, 146, 255], + [ 52, 107, 255], + [ 53, 108, 255], + [156, 183, 255], + [176, 197, 255], + [ 73, 122, 255], + [179, 200, 255], + [197, 213, 255], + [182, 201, 255], + [182, 201, 255], + [202, 216, 255], + [155, 182, 255], + [ 75, 124, 255]], + + [[ 93, 137, 255], + [121, 157, 255], + [108, 147, 255], + [ 40, 98, 255], + [ 98, 141, 255], + [167, 191, 255], + [205, 218, 255], + [162, 187, 255], + [130, 164, 255], + [ 77, 126, 255], + [ 36, 95, 255], + [113, 152, 255], + [185, 204, 255], + [166, 190, 255], + [ 47, 103, 255], + [178, 199, 255], + [198, 213, 255], + [176, 197, 255], + [176, 197, 255], + [204, 217, 255], + [148, 177, 255], + [ 50, 105, 255]], + + [[150, 178, 255], + [196, 212, 255], + [176, 197, 255], + [ 68, 118, 255], + [125, 160, 255], + [184, 203, 255], + [214, 225, 255], + [179, 200, 255], + [154, 182, 255], + [108, 148, 255], + [ 73, 122, 255], + [165, 189, 255], + [207, 220, 255], + [175, 196, 255], + [ 77, 125, 255], + [184, 203, 255], + [199, 215, 255], + [181, 201, 255], + [181, 201, 255], + [204, 218, 255], + [159, 185, 255], + [ 78, 126, 255]], + + [[ 37, 96, 255], + [165, 189, 255], + [223, 231, 255], + [160, 186, 255], + [211, 223, 255], + [237, 242, 255], + [245, 248, 255], + [236, 241, 255], + [234, 239, 255], + [207, 219, 255], + [169, 192, 255], + [170, 193, 255], + [202, 216, 255], + [207, 220, 255], + [173, 195, 255], + [194, 211, 255], + [200, 215, 255], + [199, 214, 255], + [199, 214, 255], + [200, 215, 255], + [188, 206, 255], + [169, 193, 255]], + + [[ 12, 78, 255], + [156, 183, 255], + [190, 208, 255], + [ 53, 108, 255], + [ 69, 119, 255], + [141, 171, 255], + [196, 212, 255], + [157, 184, 255], + [189, 207, 255], + [187, 206, 255], + [150, 179, 255], + [ 87, 133, 255], + [163, 188, 255], + [201, 215, 255], + [152, 180, 255], + [150, 179, 255], + [145, 175, 255], + [140, 171, 255], + [140, 171, 255], + [147, 176, 255], + [151, 179, 255], + [153, 180, 255]], + + [[ 44, 101, 255], + [169, 192, 255], + [188, 206, 255], + [ 45, 102, 255], + [ 23, 85, 255], + [ 97, 140, 255], + [162, 187, 255], + [111, 150, 255], + [143, 174, 255], + [140, 171, 255], + [100, 142, 255], + [ 39, 98, 255], + [144, 174, 255], + [183, 202, 255], + [ 97, 140, 255], + [108, 148, 255], + [118, 155, 255], + [130, 164, 255], + [152, 180, 255], + [126, 161, 255], + [107, 147, 255], + [ 99, 141, 255]], + + [[109, 148, 255], + [182, 202, 255], + [197, 212, 255], + [118, 155, 255], + [ 76, 124, 255], + [117, 155, 255], + [159, 185, 255], + [117, 154, 255], + [127, 162, 255], + [104, 145, 255], + [ 57, 111, 255], + [ 29, 91, 255], + [142, 173, 255], + [162, 187, 255], + [ 31, 92, 255], + [ 80, 128, 255], + [125, 160, 255], + [165, 189, 255], + [200, 215, 255], + [119, 155, 255], + [ 60, 113, 255], + [ 32, 92, 255]], + + [[144, 173, 255], + [125, 160, 255], + [127, 162, 255], + [163, 187, 255], + [185, 204, 255], + [205, 218, 255], + [216, 226, 255], + [210, 222, 255], + [212, 223, 255], + [186, 204, 255], + [129, 163, 255], + [ 40, 99, 255], + [142, 173, 255], + [154, 181, 255], + [ 9, 76, 255], + [ 91, 135, 255], + [173, 195, 255], + [209, 221, 255], + [145, 175, 255], + [ 53, 108, 255], + [ 9, 76, 255], + [ 5, 73, 255]], + + [[ 62, 114, 255], + [ 47, 103, 255], + [ 47, 103, 255], + [ 70, 120, 255], + [ 84, 130, 255], + [ 91, 135, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 18, 82, 255], + [ 60, 113, 255], + [ 65, 116, 255], + [ 2, 71, 255], + [ 38, 97, 255], + [ 74, 123, 255], + [ 89, 134, 255], + [ 55, 109, 255], + [ 17, 81, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 1, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 3, 71, 255], + [ 3, 71, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]]], dtype=uint8)], 'font_config': (1, 29, 8, 0.33, 1)}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255]))) @ ModelUtils.py:148 in model_process + 11:39:26.176 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 152, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 135, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:161 in model_process + 11:39:26.177 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 11:41:40.257 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 11:41:40.279 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 11:41:40.304 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 11:41:40.305 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 11:41:40.465 [INFO] - 模型初始化时间:0.18572115898132324, requestId:1234 @ ModelUtils.py:107 in __init__ + 11:41:40.465 [INFO] - 模型编号: 019, 模型参数: ( at 0x7fe5b4cf2b00>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 11:41:40.466 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 11:41:40.470 [INFO] - model_process([None]) @ aiHelper.py:101 in AI_process + 11:41:40.470 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 138, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:160 in model_process + 11:41:40.472 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 11:41:58.329 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 11:41:58.350 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 11:41:58.375 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 11:41:58.375 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 11:41:58.543 [INFO] - 模型初始化时间:0.19279718399047852, requestId:1234 @ ModelUtils.py:107 in __init__ + 11:41:58.543 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f0b69966710>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 11:41:58.544 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 11:41:58.547 [INFO] - model_process() @ aiHelper.py:101 in AI_process + 11:41:58.548 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 138, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:160 in model_process + 11:41:58.549 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 11:42:30.066 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 11:42:30.087 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 11:42:30.113 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 11:42:30.113 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 11:42:30.271 [INFO] - 模型初始化时间:0.18350505828857422, requestId:1234 @ ModelUtils.py:107 in __init__ + 11:42:30.271 [INFO] - 模型编号: 019, 模型参数: ( at 0x7f8c24abe680>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 11:42:30.272 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 11:42:30.279 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 101, in AI_process + logger.info("model_process({}, {},{},{},{},{},{},{},{},{},{},{})", im0s, model, segmodel, names, label_arraylist, rainbows, + File "/home/thsw/anaconda3/envs/alg_py310/lib/python3.10/site-packages/loguru/_logger.py", line 2014, in info + __self._log("INFO", False, __self._options, __message, args, kwargs) + File "/home/thsw/anaconda3/envs/alg_py310/lib/python3.10/site-packages/loguru/_logger.py", line 1991, in _log + log_record["message"] = message.format(*args, **kwargs) +IndexError: Replacement index 11 out of range for positional args tuple +, requestId:1234 @ ModelUtils.py:160 in model_process + 11:42:30.281 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 11:42:58.565 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 11:42:58.586 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 11:42:58.612 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 11:42:58.612 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 11:42:58.771 [INFO] - 模型初始化时间:0.18506455421447754, requestId:1234 @ ModelUtils.py:107 in __init__ + 11:42:58.772 [INFO] - 模型编号: 019, 模型参数: ( at 0x7fda98846680>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 11:42:58.772 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 11:42:58.775 [INFO] - model_process([None], ,None,['车', 'T角点', 'L角点', '违停'],[array([[[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 15, 15], + [255, 48, 48], + [255, 61, 61], + [255, 33, 33], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 34, 34], + [255, 50, 50], + [255, 83, 83], + [255, 129, 129], + [255, 143, 143], + [255, 104, 104], + [255, 61, 61], + [255, 61, 61], + [255, 61, 61], + [255, 48, 48], + [255, 29, 29]], + + [[255, 104, 104], + [255, 154, 154], + [255, 203, 203], + [255, 232, 232], + [255, 222, 222], + [255, 205, 205], + [255, 189, 189], + [255, 186, 186], + [255, 186, 186], + [255, 145, 145], + [255, 87, 87]], + + [[255, 48, 48], + [255, 104, 104], + [255, 168, 168], + [255, 217, 217], + [255, 141, 141], + [255, 134, 134], + [255, 137, 137], + [255, 90, 90], + [255, 87, 87], + [255, 68, 68], + [255, 40, 40]], + + [[255, 16, 16], + [255, 106, 106], + [255, 170, 170], + [255, 168, 168], + [255, 112, 112], + [255, 136, 136], + [255, 149, 149], + [255, 56, 56], + [255, 50, 50], + [255, 35, 35], + [255, 14, 14]], + + [[255, 3, 3], + [255, 124, 124], + [255, 188, 188], + [255, 143, 143], + [255, 132, 132], + [255, 176, 176], + [255, 190, 190], + [255, 87, 87], + [255, 80, 80], + [255, 49, 49], + [255, 4, 4]], + + [[255, 9, 9], + [255, 124, 124], + [255, 203, 203], + [255, 201, 201], + [255, 210, 210], + [255, 228, 228], + [255, 234, 234], + [255, 199, 199], + [255, 196, 196], + [255, 120, 120], + [255, 9, 9]], + + [[255, 54, 54], + [255, 99, 99], + [255, 130, 130], + [255, 132, 132], + [255, 157, 157], + [255, 199, 199], + [255, 209, 209], + [255, 135, 135], + [255, 130, 130], + [255, 99, 99], + [255, 54, 54]], + + [[255, 93, 93], + [255, 108, 108], + [255, 119, 119], + [255, 120, 120], + [255, 149, 149], + [255, 194, 194], + [255, 205, 205], + [255, 124, 124], + [255, 119, 119], + [255, 108, 108], + [255, 93, 93]], + + [[255, 102, 102], + [255, 119, 119], + [255, 131, 131], + [255, 133, 133], + [255, 158, 158], + [255, 199, 199], + [255, 209, 209], + [255, 136, 136], + [255, 131, 131], + [255, 119, 119], + [255, 102, 102]], + + [[255, 16, 16], + [255, 19, 19], + [255, 21, 21], + [255, 24, 24], + [255, 72, 72], + [255, 149, 149], + [255, 168, 168], + [255, 29, 29], + [255, 21, 21], + [255, 19, 19], + [255, 16, 16]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 1, 1], + [255, 25, 25], + [255, 63, 63], + [255, 73, 73], + [255, 4, 4], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 3, 3], + [255, 7, 7], + [255, 8, 8], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]]], dtype=uint8), array([[[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[212, 6, 150], + [212, 7, 151], + [212, 7, 151], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[224, 77, 180], + [225, 84, 183], + [226, 89, 185], + ..., + [225, 80, 182], + [223, 70, 177], + [221, 59, 173]], + + ..., + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [218, 40, 165], + [219, 49, 168], + [221, 61, 173]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]]], dtype=uint8), array([[[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 2, 128, 2], + [ 5, 129, 5], + [ 4, 129, 4], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 26, 140, 26], + [ 63, 159, 63], + [ 60, 157, 60], + ..., + [ 79, 167, 79], + [ 64, 159, 64], + [ 59, 157, 59]], + + ..., + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 38, 146, 38], + [ 55, 155, 55], + [ 61, 157, 61]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]]], dtype=uint8), array([[[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 25, 87, 255], + [ 30, 90, 255], + [ 22, 85, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 36, 95, 255], + [ 63, 115, 255], + [ 33, 93, 255], + [ 10, 76, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 34, 94, 255], + [ 47, 103, 255], + [ 24, 86, 255], + [ 6, 73, 255], + [ 25, 87, 255], + [ 50, 105, 255], + [ 50, 105, 255], + [ 16, 80, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 53, 107, 255], + [ 87, 132, 255], + [ 90, 135, 255], + [ 49, 104, 255], + [ 67, 118, 255], + [118, 155, 255], + [151, 179, 255], + [113, 151, 255], + [ 85, 131, 255], + [ 62, 114, 255], + [ 41, 99, 255], + [ 7, 74, 255], + [ 83, 129, 255], + [121, 157, 255], + [ 80, 127, 255], + [ 67, 118, 255], + [ 93, 137, 255], + [122, 158, 255], + [122, 157, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 53, 107, 255]], + + [[ 73, 121, 255], + [160, 185, 255], + [196, 212, 255], + [147, 177, 255], + [205, 218, 255], + [235, 240, 255], + [243, 246, 255], + [233, 239, 255], + [226, 233, 255], + [190, 208, 255], + [124, 160, 255], + [ 24, 86, 255], + [138, 169, 255], + [206, 220, 255], + [158, 184, 255], + [190, 208, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [184, 203, 255], + [160, 185, 255]], + + [[ 17, 81, 255], + [ 66, 117, 255], + [ 88, 133, 255], + [ 66, 117, 255], + [123, 159, 255], + [183, 203, 255], + [214, 225, 255], + [178, 199, 255], + [152, 180, 255], + [104, 146, 255], + [ 52, 107, 255], + [ 53, 108, 255], + [156, 183, 255], + [176, 197, 255], + [ 73, 122, 255], + [179, 200, 255], + [197, 213, 255], + [182, 201, 255], + [182, 201, 255], + [202, 216, 255], + [155, 182, 255], + [ 75, 124, 255]], + + [[ 93, 137, 255], + [121, 157, 255], + [108, 147, 255], + [ 40, 98, 255], + [ 98, 141, 255], + [167, 191, 255], + [205, 218, 255], + [162, 187, 255], + [130, 164, 255], + [ 77, 126, 255], + [ 36, 95, 255], + [113, 152, 255], + [185, 204, 255], + [166, 190, 255], + [ 47, 103, 255], + [178, 199, 255], + [198, 213, 255], + [176, 197, 255], + [176, 197, 255], + [204, 217, 255], + [148, 177, 255], + [ 50, 105, 255]], + + [[150, 178, 255], + [196, 212, 255], + [176, 197, 255], + [ 68, 118, 255], + [125, 160, 255], + [184, 203, 255], + [214, 225, 255], + [179, 200, 255], + [154, 182, 255], + [108, 148, 255], + [ 73, 122, 255], + [165, 189, 255], + [207, 220, 255], + [175, 196, 255], + [ 77, 125, 255], + [184, 203, 255], + [199, 215, 255], + [181, 201, 255], + [181, 201, 255], + [204, 218, 255], + [159, 185, 255], + [ 78, 126, 255]], + + [[ 37, 96, 255], + [165, 189, 255], + [223, 231, 255], + [160, 186, 255], + [211, 223, 255], + [237, 242, 255], + [245, 248, 255], + [236, 241, 255], + [234, 239, 255], + [207, 219, 255], + [169, 192, 255], + [170, 193, 255], + [202, 216, 255], + [207, 220, 255], + [173, 195, 255], + [194, 211, 255], + [200, 215, 255], + [199, 214, 255], + [199, 214, 255], + [200, 215, 255], + [188, 206, 255], + [169, 193, 255]], + + [[ 12, 78, 255], + [156, 183, 255], + [190, 208, 255], + [ 53, 108, 255], + [ 69, 119, 255], + [141, 171, 255], + [196, 212, 255], + [157, 184, 255], + [189, 207, 255], + [187, 206, 255], + [150, 179, 255], + [ 87, 133, 255], + [163, 188, 255], + [201, 215, 255], + [152, 180, 255], + [150, 179, 255], + [145, 175, 255], + [140, 171, 255], + [140, 171, 255], + [147, 176, 255], + [151, 179, 255], + [153, 180, 255]], + + [[ 44, 101, 255], + [169, 192, 255], + [188, 206, 255], + [ 45, 102, 255], + [ 23, 85, 255], + [ 97, 140, 255], + [162, 187, 255], + [111, 150, 255], + [143, 174, 255], + [140, 171, 255], + [100, 142, 255], + [ 39, 98, 255], + [144, 174, 255], + [183, 202, 255], + [ 97, 140, 255], + [108, 148, 255], + [118, 155, 255], + [130, 164, 255], + [152, 180, 255], + [126, 161, 255], + [107, 147, 255], + [ 99, 141, 255]], + + [[109, 148, 255], + [182, 202, 255], + [197, 212, 255], + [118, 155, 255], + [ 76, 124, 255], + [117, 155, 255], + [159, 185, 255], + [117, 154, 255], + [127, 162, 255], + [104, 145, 255], + [ 57, 111, 255], + [ 29, 91, 255], + [142, 173, 255], + [162, 187, 255], + [ 31, 92, 255], + [ 80, 128, 255], + [125, 160, 255], + [165, 189, 255], + [200, 215, 255], + [119, 155, 255], + [ 60, 113, 255], + [ 32, 92, 255]], + + [[144, 173, 255], + [125, 160, 255], + [127, 162, 255], + [163, 187, 255], + [185, 204, 255], + [205, 218, 255], + [216, 226, 255], + [210, 222, 255], + [212, 223, 255], + [186, 204, 255], + [129, 163, 255], + [ 40, 99, 255], + [142, 173, 255], + [154, 181, 255], + [ 9, 76, 255], + [ 91, 135, 255], + [173, 195, 255], + [209, 221, 255], + [145, 175, 255], + [ 53, 108, 255], + [ 9, 76, 255], + [ 5, 73, 255]], + + [[ 62, 114, 255], + [ 47, 103, 255], + [ 47, 103, 255], + [ 70, 120, 255], + [ 84, 130, 255], + [ 91, 135, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 18, 82, 255], + [ 60, 113, 255], + [ 65, 116, 255], + [ 2, 71, 255], + [ 38, 97, 255], + [ 74, 123, 255], + [ 89, 134, 255], + [ 55, 109, 255], + [ 17, 81, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 1, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 3, 71, 255], + [ 3, 71, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]]], dtype=uint8)],([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255]),{'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []},{'line_thickness': 1, 'boxLine_thickness': 1, 'fontSize': 0.4, 'waterLineColor': (0, 255, 255), 'segLineShow': False, 'waterLineWidth': 1, 'wordSize': 8, 'label_location': 'leftTop'},{'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4},others,None) @ aiHelper.py:101 in AI_process + 11:42:58.780 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 138, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:160 in model_process + 11:42:58.781 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 13:31:46.854 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 13:31:46.874 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 13:31:46.899 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 13:31:46.900 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 13:31:47.072 [INFO] - 模型初始化时间:0.1983504295349121, requestId:1234 @ ModelUtils.py:107 in __init__ + 13:31:47.073 [INFO] - 模型编号: 019 +模型参数: ( at 0x7f749cc4e7a0>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 13:31:47.073 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 13:31:47.076 [INFO] - model_process([None], ,None,['车', 'T角点', 'L角点', '违停'],[array([[[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 15, 15], + [255, 48, 48], + [255, 61, 61], + [255, 33, 33], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 34, 34], + [255, 50, 50], + [255, 83, 83], + [255, 129, 129], + [255, 143, 143], + [255, 104, 104], + [255, 61, 61], + [255, 61, 61], + [255, 61, 61], + [255, 48, 48], + [255, 29, 29]], + + [[255, 104, 104], + [255, 154, 154], + [255, 203, 203], + [255, 232, 232], + [255, 222, 222], + [255, 205, 205], + [255, 189, 189], + [255, 186, 186], + [255, 186, 186], + [255, 145, 145], + [255, 87, 87]], + + [[255, 48, 48], + [255, 104, 104], + [255, 168, 168], + [255, 217, 217], + [255, 141, 141], + [255, 134, 134], + [255, 137, 137], + [255, 90, 90], + [255, 87, 87], + [255, 68, 68], + [255, 40, 40]], + + [[255, 16, 16], + [255, 106, 106], + [255, 170, 170], + [255, 168, 168], + [255, 112, 112], + [255, 136, 136], + [255, 149, 149], + [255, 56, 56], + [255, 50, 50], + [255, 35, 35], + [255, 14, 14]], + + [[255, 3, 3], + [255, 124, 124], + [255, 188, 188], + [255, 143, 143], + [255, 132, 132], + [255, 176, 176], + [255, 190, 190], + [255, 87, 87], + [255, 80, 80], + [255, 49, 49], + [255, 4, 4]], + + [[255, 9, 9], + [255, 124, 124], + [255, 203, 203], + [255, 201, 201], + [255, 210, 210], + [255, 228, 228], + [255, 234, 234], + [255, 199, 199], + [255, 196, 196], + [255, 120, 120], + [255, 9, 9]], + + [[255, 54, 54], + [255, 99, 99], + [255, 130, 130], + [255, 132, 132], + [255, 157, 157], + [255, 199, 199], + [255, 209, 209], + [255, 135, 135], + [255, 130, 130], + [255, 99, 99], + [255, 54, 54]], + + [[255, 93, 93], + [255, 108, 108], + [255, 119, 119], + [255, 120, 120], + [255, 149, 149], + [255, 194, 194], + [255, 205, 205], + [255, 124, 124], + [255, 119, 119], + [255, 108, 108], + [255, 93, 93]], + + [[255, 102, 102], + [255, 119, 119], + [255, 131, 131], + [255, 133, 133], + [255, 158, 158], + [255, 199, 199], + [255, 209, 209], + [255, 136, 136], + [255, 131, 131], + [255, 119, 119], + [255, 102, 102]], + + [[255, 16, 16], + [255, 19, 19], + [255, 21, 21], + [255, 24, 24], + [255, 72, 72], + [255, 149, 149], + [255, 168, 168], + [255, 29, 29], + [255, 21, 21], + [255, 19, 19], + [255, 16, 16]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 1, 1], + [255, 25, 25], + [255, 63, 63], + [255, 73, 73], + [255, 4, 4], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 3, 3], + [255, 7, 7], + [255, 8, 8], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]]], dtype=uint8), array([[[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[212, 6, 150], + [212, 7, 151], + [212, 7, 151], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[224, 77, 180], + [225, 84, 183], + [226, 89, 185], + ..., + [225, 80, 182], + [223, 70, 177], + [221, 59, 173]], + + ..., + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [218, 40, 165], + [219, 49, 168], + [221, 61, 173]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]]], dtype=uint8), array([[[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 2, 128, 2], + [ 5, 129, 5], + [ 4, 129, 4], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 26, 140, 26], + [ 63, 159, 63], + [ 60, 157, 60], + ..., + [ 79, 167, 79], + [ 64, 159, 64], + [ 59, 157, 59]], + + ..., + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 38, 146, 38], + [ 55, 155, 55], + [ 61, 157, 61]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]]], dtype=uint8), array([[[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 25, 87, 255], + [ 30, 90, 255], + [ 22, 85, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 36, 95, 255], + [ 63, 115, 255], + [ 33, 93, 255], + [ 10, 76, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 34, 94, 255], + [ 47, 103, 255], + [ 24, 86, 255], + [ 6, 73, 255], + [ 25, 87, 255], + [ 50, 105, 255], + [ 50, 105, 255], + [ 16, 80, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 53, 107, 255], + [ 87, 132, 255], + [ 90, 135, 255], + [ 49, 104, 255], + [ 67, 118, 255], + [118, 155, 255], + [151, 179, 255], + [113, 151, 255], + [ 85, 131, 255], + [ 62, 114, 255], + [ 41, 99, 255], + [ 7, 74, 255], + [ 83, 129, 255], + [121, 157, 255], + [ 80, 127, 255], + [ 67, 118, 255], + [ 93, 137, 255], + [122, 158, 255], + [122, 157, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 53, 107, 255]], + + [[ 73, 121, 255], + [160, 185, 255], + [196, 212, 255], + [147, 177, 255], + [205, 218, 255], + [235, 240, 255], + [243, 246, 255], + [233, 239, 255], + [226, 233, 255], + [190, 208, 255], + [124, 160, 255], + [ 24, 86, 255], + [138, 169, 255], + [206, 220, 255], + [158, 184, 255], + [190, 208, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [184, 203, 255], + [160, 185, 255]], + + [[ 17, 81, 255], + [ 66, 117, 255], + [ 88, 133, 255], + [ 66, 117, 255], + [123, 159, 255], + [183, 203, 255], + [214, 225, 255], + [178, 199, 255], + [152, 180, 255], + [104, 146, 255], + [ 52, 107, 255], + [ 53, 108, 255], + [156, 183, 255], + [176, 197, 255], + [ 73, 122, 255], + [179, 200, 255], + [197, 213, 255], + [182, 201, 255], + [182, 201, 255], + [202, 216, 255], + [155, 182, 255], + [ 75, 124, 255]], + + [[ 93, 137, 255], + [121, 157, 255], + [108, 147, 255], + [ 40, 98, 255], + [ 98, 141, 255], + [167, 191, 255], + [205, 218, 255], + [162, 187, 255], + [130, 164, 255], + [ 77, 126, 255], + [ 36, 95, 255], + [113, 152, 255], + [185, 204, 255], + [166, 190, 255], + [ 47, 103, 255], + [178, 199, 255], + [198, 213, 255], + [176, 197, 255], + [176, 197, 255], + [204, 217, 255], + [148, 177, 255], + [ 50, 105, 255]], + + [[150, 178, 255], + [196, 212, 255], + [176, 197, 255], + [ 68, 118, 255], + [125, 160, 255], + [184, 203, 255], + [214, 225, 255], + [179, 200, 255], + [154, 182, 255], + [108, 148, 255], + [ 73, 122, 255], + [165, 189, 255], + [207, 220, 255], + [175, 196, 255], + [ 77, 125, 255], + [184, 203, 255], + [199, 215, 255], + [181, 201, 255], + [181, 201, 255], + [204, 218, 255], + [159, 185, 255], + [ 78, 126, 255]], + + [[ 37, 96, 255], + [165, 189, 255], + [223, 231, 255], + [160, 186, 255], + [211, 223, 255], + [237, 242, 255], + [245, 248, 255], + [236, 241, 255], + [234, 239, 255], + [207, 219, 255], + [169, 192, 255], + [170, 193, 255], + [202, 216, 255], + [207, 220, 255], + [173, 195, 255], + [194, 211, 255], + [200, 215, 255], + [199, 214, 255], + [199, 214, 255], + [200, 215, 255], + [188, 206, 255], + [169, 193, 255]], + + [[ 12, 78, 255], + [156, 183, 255], + [190, 208, 255], + [ 53, 108, 255], + [ 69, 119, 255], + [141, 171, 255], + [196, 212, 255], + [157, 184, 255], + [189, 207, 255], + [187, 206, 255], + [150, 179, 255], + [ 87, 133, 255], + [163, 188, 255], + [201, 215, 255], + [152, 180, 255], + [150, 179, 255], + [145, 175, 255], + [140, 171, 255], + [140, 171, 255], + [147, 176, 255], + [151, 179, 255], + [153, 180, 255]], + + [[ 44, 101, 255], + [169, 192, 255], + [188, 206, 255], + [ 45, 102, 255], + [ 23, 85, 255], + [ 97, 140, 255], + [162, 187, 255], + [111, 150, 255], + [143, 174, 255], + [140, 171, 255], + [100, 142, 255], + [ 39, 98, 255], + [144, 174, 255], + [183, 202, 255], + [ 97, 140, 255], + [108, 148, 255], + [118, 155, 255], + [130, 164, 255], + [152, 180, 255], + [126, 161, 255], + [107, 147, 255], + [ 99, 141, 255]], + + [[109, 148, 255], + [182, 202, 255], + [197, 212, 255], + [118, 155, 255], + [ 76, 124, 255], + [117, 155, 255], + [159, 185, 255], + [117, 154, 255], + [127, 162, 255], + [104, 145, 255], + [ 57, 111, 255], + [ 29, 91, 255], + [142, 173, 255], + [162, 187, 255], + [ 31, 92, 255], + [ 80, 128, 255], + [125, 160, 255], + [165, 189, 255], + [200, 215, 255], + [119, 155, 255], + [ 60, 113, 255], + [ 32, 92, 255]], + + [[144, 173, 255], + [125, 160, 255], + [127, 162, 255], + [163, 187, 255], + [185, 204, 255], + [205, 218, 255], + [216, 226, 255], + [210, 222, 255], + [212, 223, 255], + [186, 204, 255], + [129, 163, 255], + [ 40, 99, 255], + [142, 173, 255], + [154, 181, 255], + [ 9, 76, 255], + [ 91, 135, 255], + [173, 195, 255], + [209, 221, 255], + [145, 175, 255], + [ 53, 108, 255], + [ 9, 76, 255], + [ 5, 73, 255]], + + [[ 62, 114, 255], + [ 47, 103, 255], + [ 47, 103, 255], + [ 70, 120, 255], + [ 84, 130, 255], + [ 91, 135, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 18, 82, 255], + [ 60, 113, 255], + [ 65, 116, 255], + [ 2, 71, 255], + [ 38, 97, 255], + [ 74, 123, 255], + [ 89, 134, 255], + [ 55, 109, 255], + [ 17, 81, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 1, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 3, 71, 255], + [ 3, 71, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]]], dtype=uint8)],([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255]),{'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []},{'line_thickness': 1, 'boxLine_thickness': 1, 'fontSize': 0.4, 'waterLineColor': (0, 255, 255), 'segLineShow': False, 'waterLineWidth': 1, 'wordSize': 8, 'label_location': 'leftTop'},{'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4},others,None) @ aiHelper.py:101 in AI_process + 13:31:47.081 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 138, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:160 in model_process + 13:31:47.082 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 13:36:09.591 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 13:36:09.613 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 13:36:09.638 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 13:36:09.638 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 13:36:09.792 [INFO] - 模型初始化时间:0.17864322662353516, requestId:1234 @ ModelUtils.py:107 in __init__ + 13:36:09.793 [INFO] - 模型编号: 019 +模型参数: ( at 0x7fadae6665f0>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 13:36:09.794 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 13:36:09.797 [INFO] - model_process([None], model=,None,['车', 'T角点', 'L角点', '违停'],[array([[[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 15, 15], + [255, 48, 48], + [255, 61, 61], + [255, 33, 33], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 34, 34], + [255, 50, 50], + [255, 83, 83], + [255, 129, 129], + [255, 143, 143], + [255, 104, 104], + [255, 61, 61], + [255, 61, 61], + [255, 61, 61], + [255, 48, 48], + [255, 29, 29]], + + [[255, 104, 104], + [255, 154, 154], + [255, 203, 203], + [255, 232, 232], + [255, 222, 222], + [255, 205, 205], + [255, 189, 189], + [255, 186, 186], + [255, 186, 186], + [255, 145, 145], + [255, 87, 87]], + + [[255, 48, 48], + [255, 104, 104], + [255, 168, 168], + [255, 217, 217], + [255, 141, 141], + [255, 134, 134], + [255, 137, 137], + [255, 90, 90], + [255, 87, 87], + [255, 68, 68], + [255, 40, 40]], + + [[255, 16, 16], + [255, 106, 106], + [255, 170, 170], + [255, 168, 168], + [255, 112, 112], + [255, 136, 136], + [255, 149, 149], + [255, 56, 56], + [255, 50, 50], + [255, 35, 35], + [255, 14, 14]], + + [[255, 3, 3], + [255, 124, 124], + [255, 188, 188], + [255, 143, 143], + [255, 132, 132], + [255, 176, 176], + [255, 190, 190], + [255, 87, 87], + [255, 80, 80], + [255, 49, 49], + [255, 4, 4]], + + [[255, 9, 9], + [255, 124, 124], + [255, 203, 203], + [255, 201, 201], + [255, 210, 210], + [255, 228, 228], + [255, 234, 234], + [255, 199, 199], + [255, 196, 196], + [255, 120, 120], + [255, 9, 9]], + + [[255, 54, 54], + [255, 99, 99], + [255, 130, 130], + [255, 132, 132], + [255, 157, 157], + [255, 199, 199], + [255, 209, 209], + [255, 135, 135], + [255, 130, 130], + [255, 99, 99], + [255, 54, 54]], + + [[255, 93, 93], + [255, 108, 108], + [255, 119, 119], + [255, 120, 120], + [255, 149, 149], + [255, 194, 194], + [255, 205, 205], + [255, 124, 124], + [255, 119, 119], + [255, 108, 108], + [255, 93, 93]], + + [[255, 102, 102], + [255, 119, 119], + [255, 131, 131], + [255, 133, 133], + [255, 158, 158], + [255, 199, 199], + [255, 209, 209], + [255, 136, 136], + [255, 131, 131], + [255, 119, 119], + [255, 102, 102]], + + [[255, 16, 16], + [255, 19, 19], + [255, 21, 21], + [255, 24, 24], + [255, 72, 72], + [255, 149, 149], + [255, 168, 168], + [255, 29, 29], + [255, 21, 21], + [255, 19, 19], + [255, 16, 16]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 1, 1], + [255, 25, 25], + [255, 63, 63], + [255, 73, 73], + [255, 4, 4], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 3, 3], + [255, 7, 7], + [255, 8, 8], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]]], dtype=uint8), array([[[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[212, 6, 150], + [212, 7, 151], + [212, 7, 151], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[224, 77, 180], + [225, 84, 183], + [226, 89, 185], + ..., + [225, 80, 182], + [223, 70, 177], + [221, 59, 173]], + + ..., + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [218, 40, 165], + [219, 49, 168], + [221, 61, 173]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]]], dtype=uint8), array([[[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 2, 128, 2], + [ 5, 129, 5], + [ 4, 129, 4], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 26, 140, 26], + [ 63, 159, 63], + [ 60, 157, 60], + ..., + [ 79, 167, 79], + [ 64, 159, 64], + [ 59, 157, 59]], + + ..., + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 38, 146, 38], + [ 55, 155, 55], + [ 61, 157, 61]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]]], dtype=uint8), array([[[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 25, 87, 255], + [ 30, 90, 255], + [ 22, 85, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 36, 95, 255], + [ 63, 115, 255], + [ 33, 93, 255], + [ 10, 76, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 34, 94, 255], + [ 47, 103, 255], + [ 24, 86, 255], + [ 6, 73, 255], + [ 25, 87, 255], + [ 50, 105, 255], + [ 50, 105, 255], + [ 16, 80, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 53, 107, 255], + [ 87, 132, 255], + [ 90, 135, 255], + [ 49, 104, 255], + [ 67, 118, 255], + [118, 155, 255], + [151, 179, 255], + [113, 151, 255], + [ 85, 131, 255], + [ 62, 114, 255], + [ 41, 99, 255], + [ 7, 74, 255], + [ 83, 129, 255], + [121, 157, 255], + [ 80, 127, 255], + [ 67, 118, 255], + [ 93, 137, 255], + [122, 158, 255], + [122, 157, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 53, 107, 255]], + + [[ 73, 121, 255], + [160, 185, 255], + [196, 212, 255], + [147, 177, 255], + [205, 218, 255], + [235, 240, 255], + [243, 246, 255], + [233, 239, 255], + [226, 233, 255], + [190, 208, 255], + [124, 160, 255], + [ 24, 86, 255], + [138, 169, 255], + [206, 220, 255], + [158, 184, 255], + [190, 208, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [184, 203, 255], + [160, 185, 255]], + + [[ 17, 81, 255], + [ 66, 117, 255], + [ 88, 133, 255], + [ 66, 117, 255], + [123, 159, 255], + [183, 203, 255], + [214, 225, 255], + [178, 199, 255], + [152, 180, 255], + [104, 146, 255], + [ 52, 107, 255], + [ 53, 108, 255], + [156, 183, 255], + [176, 197, 255], + [ 73, 122, 255], + [179, 200, 255], + [197, 213, 255], + [182, 201, 255], + [182, 201, 255], + [202, 216, 255], + [155, 182, 255], + [ 75, 124, 255]], + + [[ 93, 137, 255], + [121, 157, 255], + [108, 147, 255], + [ 40, 98, 255], + [ 98, 141, 255], + [167, 191, 255], + [205, 218, 255], + [162, 187, 255], + [130, 164, 255], + [ 77, 126, 255], + [ 36, 95, 255], + [113, 152, 255], + [185, 204, 255], + [166, 190, 255], + [ 47, 103, 255], + [178, 199, 255], + [198, 213, 255], + [176, 197, 255], + [176, 197, 255], + [204, 217, 255], + [148, 177, 255], + [ 50, 105, 255]], + + [[150, 178, 255], + [196, 212, 255], + [176, 197, 255], + [ 68, 118, 255], + [125, 160, 255], + [184, 203, 255], + [214, 225, 255], + [179, 200, 255], + [154, 182, 255], + [108, 148, 255], + [ 73, 122, 255], + [165, 189, 255], + [207, 220, 255], + [175, 196, 255], + [ 77, 125, 255], + [184, 203, 255], + [199, 215, 255], + [181, 201, 255], + [181, 201, 255], + [204, 218, 255], + [159, 185, 255], + [ 78, 126, 255]], + + [[ 37, 96, 255], + [165, 189, 255], + [223, 231, 255], + [160, 186, 255], + [211, 223, 255], + [237, 242, 255], + [245, 248, 255], + [236, 241, 255], + [234, 239, 255], + [207, 219, 255], + [169, 192, 255], + [170, 193, 255], + [202, 216, 255], + [207, 220, 255], + [173, 195, 255], + [194, 211, 255], + [200, 215, 255], + [199, 214, 255], + [199, 214, 255], + [200, 215, 255], + [188, 206, 255], + [169, 193, 255]], + + [[ 12, 78, 255], + [156, 183, 255], + [190, 208, 255], + [ 53, 108, 255], + [ 69, 119, 255], + [141, 171, 255], + [196, 212, 255], + [157, 184, 255], + [189, 207, 255], + [187, 206, 255], + [150, 179, 255], + [ 87, 133, 255], + [163, 188, 255], + [201, 215, 255], + [152, 180, 255], + [150, 179, 255], + [145, 175, 255], + [140, 171, 255], + [140, 171, 255], + [147, 176, 255], + [151, 179, 255], + [153, 180, 255]], + + [[ 44, 101, 255], + [169, 192, 255], + [188, 206, 255], + [ 45, 102, 255], + [ 23, 85, 255], + [ 97, 140, 255], + [162, 187, 255], + [111, 150, 255], + [143, 174, 255], + [140, 171, 255], + [100, 142, 255], + [ 39, 98, 255], + [144, 174, 255], + [183, 202, 255], + [ 97, 140, 255], + [108, 148, 255], + [118, 155, 255], + [130, 164, 255], + [152, 180, 255], + [126, 161, 255], + [107, 147, 255], + [ 99, 141, 255]], + + [[109, 148, 255], + [182, 202, 255], + [197, 212, 255], + [118, 155, 255], + [ 76, 124, 255], + [117, 155, 255], + [159, 185, 255], + [117, 154, 255], + [127, 162, 255], + [104, 145, 255], + [ 57, 111, 255], + [ 29, 91, 255], + [142, 173, 255], + [162, 187, 255], + [ 31, 92, 255], + [ 80, 128, 255], + [125, 160, 255], + [165, 189, 255], + [200, 215, 255], + [119, 155, 255], + [ 60, 113, 255], + [ 32, 92, 255]], + + [[144, 173, 255], + [125, 160, 255], + [127, 162, 255], + [163, 187, 255], + [185, 204, 255], + [205, 218, 255], + [216, 226, 255], + [210, 222, 255], + [212, 223, 255], + [186, 204, 255], + [129, 163, 255], + [ 40, 99, 255], + [142, 173, 255], + [154, 181, 255], + [ 9, 76, 255], + [ 91, 135, 255], + [173, 195, 255], + [209, 221, 255], + [145, 175, 255], + [ 53, 108, 255], + [ 9, 76, 255], + [ 5, 73, 255]], + + [[ 62, 114, 255], + [ 47, 103, 255], + [ 47, 103, 255], + [ 70, 120, 255], + [ 84, 130, 255], + [ 91, 135, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 18, 82, 255], + [ 60, 113, 255], + [ 65, 116, 255], + [ 2, 71, 255], + [ 38, 97, 255], + [ 74, 123, 255], + [ 89, 134, 255], + [ 55, 109, 255], + [ 17, 81, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 1, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 3, 71, 255], + [ 3, 71, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]]], dtype=uint8)],([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255]),{'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []},{'line_thickness': 1, 'boxLine_thickness': 1, 'fontSize': 0.4, 'waterLineColor': (0, 255, 255), 'segLineShow': False, 'waterLineWidth': 1, 'wordSize': 8, 'label_location': 'leftTop'},{'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4},others,None) @ aiHelper.py:101 in AI_process + 13:36:09.801 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 138, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:160 in model_process + 13:36:09.802 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 13:36:46.828 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 13:36:46.848 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 13:36:46.877 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 13:36:46.878 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 13:36:47.039 [INFO] - 模型初始化时间:0.1906752586364746, requestId:1234 @ ModelUtils.py:107 in __init__ + 13:36:47.040 [INFO] - 模型编号: 019 +模型参数: ( at 0x7fa043e9e5f0>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 13:36:47.040 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 13:36:47.044 [INFO] - model_process([None], model=,segmodel=None,names=['车', 'T角点', 'L角点', '违停'],[array([[[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 15, 15], + [255, 48, 48], + [255, 61, 61], + [255, 33, 33], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 34, 34], + [255, 50, 50], + [255, 83, 83], + [255, 129, 129], + [255, 143, 143], + [255, 104, 104], + [255, 61, 61], + [255, 61, 61], + [255, 61, 61], + [255, 48, 48], + [255, 29, 29]], + + [[255, 104, 104], + [255, 154, 154], + [255, 203, 203], + [255, 232, 232], + [255, 222, 222], + [255, 205, 205], + [255, 189, 189], + [255, 186, 186], + [255, 186, 186], + [255, 145, 145], + [255, 87, 87]], + + [[255, 48, 48], + [255, 104, 104], + [255, 168, 168], + [255, 217, 217], + [255, 141, 141], + [255, 134, 134], + [255, 137, 137], + [255, 90, 90], + [255, 87, 87], + [255, 68, 68], + [255, 40, 40]], + + [[255, 16, 16], + [255, 106, 106], + [255, 170, 170], + [255, 168, 168], + [255, 112, 112], + [255, 136, 136], + [255, 149, 149], + [255, 56, 56], + [255, 50, 50], + [255, 35, 35], + [255, 14, 14]], + + [[255, 3, 3], + [255, 124, 124], + [255, 188, 188], + [255, 143, 143], + [255, 132, 132], + [255, 176, 176], + [255, 190, 190], + [255, 87, 87], + [255, 80, 80], + [255, 49, 49], + [255, 4, 4]], + + [[255, 9, 9], + [255, 124, 124], + [255, 203, 203], + [255, 201, 201], + [255, 210, 210], + [255, 228, 228], + [255, 234, 234], + [255, 199, 199], + [255, 196, 196], + [255, 120, 120], + [255, 9, 9]], + + [[255, 54, 54], + [255, 99, 99], + [255, 130, 130], + [255, 132, 132], + [255, 157, 157], + [255, 199, 199], + [255, 209, 209], + [255, 135, 135], + [255, 130, 130], + [255, 99, 99], + [255, 54, 54]], + + [[255, 93, 93], + [255, 108, 108], + [255, 119, 119], + [255, 120, 120], + [255, 149, 149], + [255, 194, 194], + [255, 205, 205], + [255, 124, 124], + [255, 119, 119], + [255, 108, 108], + [255, 93, 93]], + + [[255, 102, 102], + [255, 119, 119], + [255, 131, 131], + [255, 133, 133], + [255, 158, 158], + [255, 199, 199], + [255, 209, 209], + [255, 136, 136], + [255, 131, 131], + [255, 119, 119], + [255, 102, 102]], + + [[255, 16, 16], + [255, 19, 19], + [255, 21, 21], + [255, 24, 24], + [255, 72, 72], + [255, 149, 149], + [255, 168, 168], + [255, 29, 29], + [255, 21, 21], + [255, 19, 19], + [255, 16, 16]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 1, 1], + [255, 25, 25], + [255, 63, 63], + [255, 73, 73], + [255, 4, 4], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 3, 3], + [255, 7, 7], + [255, 8, 8], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]]], dtype=uint8), array([[[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[212, 6, 150], + [212, 7, 151], + [212, 7, 151], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[224, 77, 180], + [225, 84, 183], + [226, 89, 185], + ..., + [225, 80, 182], + [223, 70, 177], + [221, 59, 173]], + + ..., + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [218, 40, 165], + [219, 49, 168], + [221, 61, 173]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]]], dtype=uint8), array([[[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 2, 128, 2], + [ 5, 129, 5], + [ 4, 129, 4], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 26, 140, 26], + [ 63, 159, 63], + [ 60, 157, 60], + ..., + [ 79, 167, 79], + [ 64, 159, 64], + [ 59, 157, 59]], + + ..., + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 38, 146, 38], + [ 55, 155, 55], + [ 61, 157, 61]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]]], dtype=uint8), array([[[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 25, 87, 255], + [ 30, 90, 255], + [ 22, 85, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 36, 95, 255], + [ 63, 115, 255], + [ 33, 93, 255], + [ 10, 76, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 34, 94, 255], + [ 47, 103, 255], + [ 24, 86, 255], + [ 6, 73, 255], + [ 25, 87, 255], + [ 50, 105, 255], + [ 50, 105, 255], + [ 16, 80, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 53, 107, 255], + [ 87, 132, 255], + [ 90, 135, 255], + [ 49, 104, 255], + [ 67, 118, 255], + [118, 155, 255], + [151, 179, 255], + [113, 151, 255], + [ 85, 131, 255], + [ 62, 114, 255], + [ 41, 99, 255], + [ 7, 74, 255], + [ 83, 129, 255], + [121, 157, 255], + [ 80, 127, 255], + [ 67, 118, 255], + [ 93, 137, 255], + [122, 158, 255], + [122, 157, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 53, 107, 255]], + + [[ 73, 121, 255], + [160, 185, 255], + [196, 212, 255], + [147, 177, 255], + [205, 218, 255], + [235, 240, 255], + [243, 246, 255], + [233, 239, 255], + [226, 233, 255], + [190, 208, 255], + [124, 160, 255], + [ 24, 86, 255], + [138, 169, 255], + [206, 220, 255], + [158, 184, 255], + [190, 208, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [184, 203, 255], + [160, 185, 255]], + + [[ 17, 81, 255], + [ 66, 117, 255], + [ 88, 133, 255], + [ 66, 117, 255], + [123, 159, 255], + [183, 203, 255], + [214, 225, 255], + [178, 199, 255], + [152, 180, 255], + [104, 146, 255], + [ 52, 107, 255], + [ 53, 108, 255], + [156, 183, 255], + [176, 197, 255], + [ 73, 122, 255], + [179, 200, 255], + [197, 213, 255], + [182, 201, 255], + [182, 201, 255], + [202, 216, 255], + [155, 182, 255], + [ 75, 124, 255]], + + [[ 93, 137, 255], + [121, 157, 255], + [108, 147, 255], + [ 40, 98, 255], + [ 98, 141, 255], + [167, 191, 255], + [205, 218, 255], + [162, 187, 255], + [130, 164, 255], + [ 77, 126, 255], + [ 36, 95, 255], + [113, 152, 255], + [185, 204, 255], + [166, 190, 255], + [ 47, 103, 255], + [178, 199, 255], + [198, 213, 255], + [176, 197, 255], + [176, 197, 255], + [204, 217, 255], + [148, 177, 255], + [ 50, 105, 255]], + + [[150, 178, 255], + [196, 212, 255], + [176, 197, 255], + [ 68, 118, 255], + [125, 160, 255], + [184, 203, 255], + [214, 225, 255], + [179, 200, 255], + [154, 182, 255], + [108, 148, 255], + [ 73, 122, 255], + [165, 189, 255], + [207, 220, 255], + [175, 196, 255], + [ 77, 125, 255], + [184, 203, 255], + [199, 215, 255], + [181, 201, 255], + [181, 201, 255], + [204, 218, 255], + [159, 185, 255], + [ 78, 126, 255]], + + [[ 37, 96, 255], + [165, 189, 255], + [223, 231, 255], + [160, 186, 255], + [211, 223, 255], + [237, 242, 255], + [245, 248, 255], + [236, 241, 255], + [234, 239, 255], + [207, 219, 255], + [169, 192, 255], + [170, 193, 255], + [202, 216, 255], + [207, 220, 255], + [173, 195, 255], + [194, 211, 255], + [200, 215, 255], + [199, 214, 255], + [199, 214, 255], + [200, 215, 255], + [188, 206, 255], + [169, 193, 255]], + + [[ 12, 78, 255], + [156, 183, 255], + [190, 208, 255], + [ 53, 108, 255], + [ 69, 119, 255], + [141, 171, 255], + [196, 212, 255], + [157, 184, 255], + [189, 207, 255], + [187, 206, 255], + [150, 179, 255], + [ 87, 133, 255], + [163, 188, 255], + [201, 215, 255], + [152, 180, 255], + [150, 179, 255], + [145, 175, 255], + [140, 171, 255], + [140, 171, 255], + [147, 176, 255], + [151, 179, 255], + [153, 180, 255]], + + [[ 44, 101, 255], + [169, 192, 255], + [188, 206, 255], + [ 45, 102, 255], + [ 23, 85, 255], + [ 97, 140, 255], + [162, 187, 255], + [111, 150, 255], + [143, 174, 255], + [140, 171, 255], + [100, 142, 255], + [ 39, 98, 255], + [144, 174, 255], + [183, 202, 255], + [ 97, 140, 255], + [108, 148, 255], + [118, 155, 255], + [130, 164, 255], + [152, 180, 255], + [126, 161, 255], + [107, 147, 255], + [ 99, 141, 255]], + + [[109, 148, 255], + [182, 202, 255], + [197, 212, 255], + [118, 155, 255], + [ 76, 124, 255], + [117, 155, 255], + [159, 185, 255], + [117, 154, 255], + [127, 162, 255], + [104, 145, 255], + [ 57, 111, 255], + [ 29, 91, 255], + [142, 173, 255], + [162, 187, 255], + [ 31, 92, 255], + [ 80, 128, 255], + [125, 160, 255], + [165, 189, 255], + [200, 215, 255], + [119, 155, 255], + [ 60, 113, 255], + [ 32, 92, 255]], + + [[144, 173, 255], + [125, 160, 255], + [127, 162, 255], + [163, 187, 255], + [185, 204, 255], + [205, 218, 255], + [216, 226, 255], + [210, 222, 255], + [212, 223, 255], + [186, 204, 255], + [129, 163, 255], + [ 40, 99, 255], + [142, 173, 255], + [154, 181, 255], + [ 9, 76, 255], + [ 91, 135, 255], + [173, 195, 255], + [209, 221, 255], + [145, 175, 255], + [ 53, 108, 255], + [ 9, 76, 255], + [ 5, 73, 255]], + + [[ 62, 114, 255], + [ 47, 103, 255], + [ 47, 103, 255], + [ 70, 120, 255], + [ 84, 130, 255], + [ 91, 135, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 18, 82, 255], + [ 60, 113, 255], + [ 65, 116, 255], + [ 2, 71, 255], + [ 38, 97, 255], + [ 74, 123, 255], + [ 89, 134, 255], + [ 55, 109, 255], + [ 17, 81, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 1, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 3, 71, 255], + [ 3, 71, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]]], dtype=uint8)],([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255]),{'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []},{'line_thickness': 1, 'boxLine_thickness': 1, 'fontSize': 0.4, 'waterLineColor': (0, 255, 255), 'segLineShow': False, 'waterLineWidth': 1, 'wordSize': 8, 'label_location': 'leftTop'},{'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4},others,None) @ aiHelper.py:101 in AI_process + 13:36:47.050 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 138, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:160 in model_process + 13:36:47.051 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 13:37:14.981 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 13:37:15.026 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 13:37:15.050 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 13:37:15.051 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 13:37:15.202 [INFO] - 模型初始化时间:0.17597317695617676, requestId:1234 @ ModelUtils.py:107 in __init__ + 13:37:15.202 [INFO] - 模型编号: 019 +模型参数: ( at 0x7f604b9f2680>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 13:37:15.203 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 13:37:15.206 [INFO] - model_process( + im0s=[None], + model=, + segmodel=None, + names=['车', 'T角点', 'L角点', '违停'],[array([[[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 15, 15], + [255, 48, 48], + [255, 61, 61], + [255, 33, 33], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 34, 34], + [255, 50, 50], + [255, 83, 83], + [255, 129, 129], + [255, 143, 143], + [255, 104, 104], + [255, 61, 61], + [255, 61, 61], + [255, 61, 61], + [255, 48, 48], + [255, 29, 29]], + + [[255, 104, 104], + [255, 154, 154], + [255, 203, 203], + [255, 232, 232], + [255, 222, 222], + [255, 205, 205], + [255, 189, 189], + [255, 186, 186], + [255, 186, 186], + [255, 145, 145], + [255, 87, 87]], + + [[255, 48, 48], + [255, 104, 104], + [255, 168, 168], + [255, 217, 217], + [255, 141, 141], + [255, 134, 134], + [255, 137, 137], + [255, 90, 90], + [255, 87, 87], + [255, 68, 68], + [255, 40, 40]], + + [[255, 16, 16], + [255, 106, 106], + [255, 170, 170], + [255, 168, 168], + [255, 112, 112], + [255, 136, 136], + [255, 149, 149], + [255, 56, 56], + [255, 50, 50], + [255, 35, 35], + [255, 14, 14]], + + [[255, 3, 3], + [255, 124, 124], + [255, 188, 188], + [255, 143, 143], + [255, 132, 132], + [255, 176, 176], + [255, 190, 190], + [255, 87, 87], + [255, 80, 80], + [255, 49, 49], + [255, 4, 4]], + + [[255, 9, 9], + [255, 124, 124], + [255, 203, 203], + [255, 201, 201], + [255, 210, 210], + [255, 228, 228], + [255, 234, 234], + [255, 199, 199], + [255, 196, 196], + [255, 120, 120], + [255, 9, 9]], + + [[255, 54, 54], + [255, 99, 99], + [255, 130, 130], + [255, 132, 132], + [255, 157, 157], + [255, 199, 199], + [255, 209, 209], + [255, 135, 135], + [255, 130, 130], + [255, 99, 99], + [255, 54, 54]], + + [[255, 93, 93], + [255, 108, 108], + [255, 119, 119], + [255, 120, 120], + [255, 149, 149], + [255, 194, 194], + [255, 205, 205], + [255, 124, 124], + [255, 119, 119], + [255, 108, 108], + [255, 93, 93]], + + [[255, 102, 102], + [255, 119, 119], + [255, 131, 131], + [255, 133, 133], + [255, 158, 158], + [255, 199, 199], + [255, 209, 209], + [255, 136, 136], + [255, 131, 131], + [255, 119, 119], + [255, 102, 102]], + + [[255, 16, 16], + [255, 19, 19], + [255, 21, 21], + [255, 24, 24], + [255, 72, 72], + [255, 149, 149], + [255, 168, 168], + [255, 29, 29], + [255, 21, 21], + [255, 19, 19], + [255, 16, 16]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 1, 1], + [255, 25, 25], + [255, 63, 63], + [255, 73, 73], + [255, 4, 4], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 3, 3], + [255, 7, 7], + [255, 8, 8], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]]], dtype=uint8), array([[[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[212, 6, 150], + [212, 7, 151], + [212, 7, 151], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[224, 77, 180], + [225, 84, 183], + [226, 89, 185], + ..., + [225, 80, 182], + [223, 70, 177], + [221, 59, 173]], + + ..., + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [218, 40, 165], + [219, 49, 168], + [221, 61, 173]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]]], dtype=uint8), array([[[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 2, 128, 2], + [ 5, 129, 5], + [ 4, 129, 4], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 26, 140, 26], + [ 63, 159, 63], + [ 60, 157, 60], + ..., + [ 79, 167, 79], + [ 64, 159, 64], + [ 59, 157, 59]], + + ..., + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 38, 146, 38], + [ 55, 155, 55], + [ 61, 157, 61]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]]], dtype=uint8), array([[[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 25, 87, 255], + [ 30, 90, 255], + [ 22, 85, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 36, 95, 255], + [ 63, 115, 255], + [ 33, 93, 255], + [ 10, 76, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 34, 94, 255], + [ 47, 103, 255], + [ 24, 86, 255], + [ 6, 73, 255], + [ 25, 87, 255], + [ 50, 105, 255], + [ 50, 105, 255], + [ 16, 80, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 53, 107, 255], + [ 87, 132, 255], + [ 90, 135, 255], + [ 49, 104, 255], + [ 67, 118, 255], + [118, 155, 255], + [151, 179, 255], + [113, 151, 255], + [ 85, 131, 255], + [ 62, 114, 255], + [ 41, 99, 255], + [ 7, 74, 255], + [ 83, 129, 255], + [121, 157, 255], + [ 80, 127, 255], + [ 67, 118, 255], + [ 93, 137, 255], + [122, 158, 255], + [122, 157, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 53, 107, 255]], + + [[ 73, 121, 255], + [160, 185, 255], + [196, 212, 255], + [147, 177, 255], + [205, 218, 255], + [235, 240, 255], + [243, 246, 255], + [233, 239, 255], + [226, 233, 255], + [190, 208, 255], + [124, 160, 255], + [ 24, 86, 255], + [138, 169, 255], + [206, 220, 255], + [158, 184, 255], + [190, 208, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [184, 203, 255], + [160, 185, 255]], + + [[ 17, 81, 255], + [ 66, 117, 255], + [ 88, 133, 255], + [ 66, 117, 255], + [123, 159, 255], + [183, 203, 255], + [214, 225, 255], + [178, 199, 255], + [152, 180, 255], + [104, 146, 255], + [ 52, 107, 255], + [ 53, 108, 255], + [156, 183, 255], + [176, 197, 255], + [ 73, 122, 255], + [179, 200, 255], + [197, 213, 255], + [182, 201, 255], + [182, 201, 255], + [202, 216, 255], + [155, 182, 255], + [ 75, 124, 255]], + + [[ 93, 137, 255], + [121, 157, 255], + [108, 147, 255], + [ 40, 98, 255], + [ 98, 141, 255], + [167, 191, 255], + [205, 218, 255], + [162, 187, 255], + [130, 164, 255], + [ 77, 126, 255], + [ 36, 95, 255], + [113, 152, 255], + [185, 204, 255], + [166, 190, 255], + [ 47, 103, 255], + [178, 199, 255], + [198, 213, 255], + [176, 197, 255], + [176, 197, 255], + [204, 217, 255], + [148, 177, 255], + [ 50, 105, 255]], + + [[150, 178, 255], + [196, 212, 255], + [176, 197, 255], + [ 68, 118, 255], + [125, 160, 255], + [184, 203, 255], + [214, 225, 255], + [179, 200, 255], + [154, 182, 255], + [108, 148, 255], + [ 73, 122, 255], + [165, 189, 255], + [207, 220, 255], + [175, 196, 255], + [ 77, 125, 255], + [184, 203, 255], + [199, 215, 255], + [181, 201, 255], + [181, 201, 255], + [204, 218, 255], + [159, 185, 255], + [ 78, 126, 255]], + + [[ 37, 96, 255], + [165, 189, 255], + [223, 231, 255], + [160, 186, 255], + [211, 223, 255], + [237, 242, 255], + [245, 248, 255], + [236, 241, 255], + [234, 239, 255], + [207, 219, 255], + [169, 192, 255], + [170, 193, 255], + [202, 216, 255], + [207, 220, 255], + [173, 195, 255], + [194, 211, 255], + [200, 215, 255], + [199, 214, 255], + [199, 214, 255], + [200, 215, 255], + [188, 206, 255], + [169, 193, 255]], + + [[ 12, 78, 255], + [156, 183, 255], + [190, 208, 255], + [ 53, 108, 255], + [ 69, 119, 255], + [141, 171, 255], + [196, 212, 255], + [157, 184, 255], + [189, 207, 255], + [187, 206, 255], + [150, 179, 255], + [ 87, 133, 255], + [163, 188, 255], + [201, 215, 255], + [152, 180, 255], + [150, 179, 255], + [145, 175, 255], + [140, 171, 255], + [140, 171, 255], + [147, 176, 255], + [151, 179, 255], + [153, 180, 255]], + + [[ 44, 101, 255], + [169, 192, 255], + [188, 206, 255], + [ 45, 102, 255], + [ 23, 85, 255], + [ 97, 140, 255], + [162, 187, 255], + [111, 150, 255], + [143, 174, 255], + [140, 171, 255], + [100, 142, 255], + [ 39, 98, 255], + [144, 174, 255], + [183, 202, 255], + [ 97, 140, 255], + [108, 148, 255], + [118, 155, 255], + [130, 164, 255], + [152, 180, 255], + [126, 161, 255], + [107, 147, 255], + [ 99, 141, 255]], + + [[109, 148, 255], + [182, 202, 255], + [197, 212, 255], + [118, 155, 255], + [ 76, 124, 255], + [117, 155, 255], + [159, 185, 255], + [117, 154, 255], + [127, 162, 255], + [104, 145, 255], + [ 57, 111, 255], + [ 29, 91, 255], + [142, 173, 255], + [162, 187, 255], + [ 31, 92, 255], + [ 80, 128, 255], + [125, 160, 255], + [165, 189, 255], + [200, 215, 255], + [119, 155, 255], + [ 60, 113, 255], + [ 32, 92, 255]], + + [[144, 173, 255], + [125, 160, 255], + [127, 162, 255], + [163, 187, 255], + [185, 204, 255], + [205, 218, 255], + [216, 226, 255], + [210, 222, 255], + [212, 223, 255], + [186, 204, 255], + [129, 163, 255], + [ 40, 99, 255], + [142, 173, 255], + [154, 181, 255], + [ 9, 76, 255], + [ 91, 135, 255], + [173, 195, 255], + [209, 221, 255], + [145, 175, 255], + [ 53, 108, 255], + [ 9, 76, 255], + [ 5, 73, 255]], + + [[ 62, 114, 255], + [ 47, 103, 255], + [ 47, 103, 255], + [ 70, 120, 255], + [ 84, 130, 255], + [ 91, 135, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 18, 82, 255], + [ 60, 113, 255], + [ 65, 116, 255], + [ 2, 71, 255], + [ 38, 97, 255], + [ 74, 123, 255], + [ 89, 134, 255], + [ 55, 109, 255], + [ 17, 81, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 1, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 3, 71, 255], + [ 3, 71, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]]], dtype=uint8)],([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255]),{'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []},{'line_thickness': 1, 'boxLine_thickness': 1, 'fontSize': 0.4, 'waterLineColor': (0, 255, 255), 'segLineShow': False, 'waterLineWidth': 1, 'wordSize': 8, 'label_location': 'leftTop'},{'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4},others,None) @ aiHelper.py:101 in AI_process + 13:37:15.210 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 138, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:160 in model_process + 13:37:15.211 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 13:38:03.395 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 13:38:03.416 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 13:38:03.443 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 13:38:03.444 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 13:38:03.596 [INFO] - 模型初始化时间:0.1793203353881836, requestId:1234 @ ModelUtils.py:107 in __init__ + 13:38:03.596 [INFO] - 模型编号: 019 +模型参数: ( at 0x7f9367c56680>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 13:38:03.597 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 13:38:03.600 [INFO] - model_process( + im0s=[None], + model=, + segmodel=None, + names=['车', 'T角点', 'L角点', '违停'],[array([[[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 15, 15], + [255, 48, 48], + [255, 61, 61], + [255, 33, 33], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 34, 34], + [255, 50, 50], + [255, 83, 83], + [255, 129, 129], + [255, 143, 143], + [255, 104, 104], + [255, 61, 61], + [255, 61, 61], + [255, 61, 61], + [255, 48, 48], + [255, 29, 29]], + + [[255, 104, 104], + [255, 154, 154], + [255, 203, 203], + [255, 232, 232], + [255, 222, 222], + [255, 205, 205], + [255, 189, 189], + [255, 186, 186], + [255, 186, 186], + [255, 145, 145], + [255, 87, 87]], + + [[255, 48, 48], + [255, 104, 104], + [255, 168, 168], + [255, 217, 217], + [255, 141, 141], + [255, 134, 134], + [255, 137, 137], + [255, 90, 90], + [255, 87, 87], + [255, 68, 68], + [255, 40, 40]], + + [[255, 16, 16], + [255, 106, 106], + [255, 170, 170], + [255, 168, 168], + [255, 112, 112], + [255, 136, 136], + [255, 149, 149], + [255, 56, 56], + [255, 50, 50], + [255, 35, 35], + [255, 14, 14]], + + [[255, 3, 3], + [255, 124, 124], + [255, 188, 188], + [255, 143, 143], + [255, 132, 132], + [255, 176, 176], + [255, 190, 190], + [255, 87, 87], + [255, 80, 80], + [255, 49, 49], + [255, 4, 4]], + + [[255, 9, 9], + [255, 124, 124], + [255, 203, 203], + [255, 201, 201], + [255, 210, 210], + [255, 228, 228], + [255, 234, 234], + [255, 199, 199], + [255, 196, 196], + [255, 120, 120], + [255, 9, 9]], + + [[255, 54, 54], + [255, 99, 99], + [255, 130, 130], + [255, 132, 132], + [255, 157, 157], + [255, 199, 199], + [255, 209, 209], + [255, 135, 135], + [255, 130, 130], + [255, 99, 99], + [255, 54, 54]], + + [[255, 93, 93], + [255, 108, 108], + [255, 119, 119], + [255, 120, 120], + [255, 149, 149], + [255, 194, 194], + [255, 205, 205], + [255, 124, 124], + [255, 119, 119], + [255, 108, 108], + [255, 93, 93]], + + [[255, 102, 102], + [255, 119, 119], + [255, 131, 131], + [255, 133, 133], + [255, 158, 158], + [255, 199, 199], + [255, 209, 209], + [255, 136, 136], + [255, 131, 131], + [255, 119, 119], + [255, 102, 102]], + + [[255, 16, 16], + [255, 19, 19], + [255, 21, 21], + [255, 24, 24], + [255, 72, 72], + [255, 149, 149], + [255, 168, 168], + [255, 29, 29], + [255, 21, 21], + [255, 19, 19], + [255, 16, 16]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 1, 1], + [255, 25, 25], + [255, 63, 63], + [255, 73, 73], + [255, 4, 4], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 3, 3], + [255, 7, 7], + [255, 8, 8], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]]], dtype=uint8), array([[[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[212, 6, 150], + [212, 7, 151], + [212, 7, 151], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[224, 77, 180], + [225, 84, 183], + [226, 89, 185], + ..., + [225, 80, 182], + [223, 70, 177], + [221, 59, 173]], + + ..., + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [218, 40, 165], + [219, 49, 168], + [221, 61, 173]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]]], dtype=uint8), array([[[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 2, 128, 2], + [ 5, 129, 5], + [ 4, 129, 4], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 26, 140, 26], + [ 63, 159, 63], + [ 60, 157, 60], + ..., + [ 79, 167, 79], + [ 64, 159, 64], + [ 59, 157, 59]], + + ..., + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 38, 146, 38], + [ 55, 155, 55], + [ 61, 157, 61]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]]], dtype=uint8), array([[[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 25, 87, 255], + [ 30, 90, 255], + [ 22, 85, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 36, 95, 255], + [ 63, 115, 255], + [ 33, 93, 255], + [ 10, 76, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 34, 94, 255], + [ 47, 103, 255], + [ 24, 86, 255], + [ 6, 73, 255], + [ 25, 87, 255], + [ 50, 105, 255], + [ 50, 105, 255], + [ 16, 80, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 53, 107, 255], + [ 87, 132, 255], + [ 90, 135, 255], + [ 49, 104, 255], + [ 67, 118, 255], + [118, 155, 255], + [151, 179, 255], + [113, 151, 255], + [ 85, 131, 255], + [ 62, 114, 255], + [ 41, 99, 255], + [ 7, 74, 255], + [ 83, 129, 255], + [121, 157, 255], + [ 80, 127, 255], + [ 67, 118, 255], + [ 93, 137, 255], + [122, 158, 255], + [122, 157, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 53, 107, 255]], + + [[ 73, 121, 255], + [160, 185, 255], + [196, 212, 255], + [147, 177, 255], + [205, 218, 255], + [235, 240, 255], + [243, 246, 255], + [233, 239, 255], + [226, 233, 255], + [190, 208, 255], + [124, 160, 255], + [ 24, 86, 255], + [138, 169, 255], + [206, 220, 255], + [158, 184, 255], + [190, 208, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [184, 203, 255], + [160, 185, 255]], + + [[ 17, 81, 255], + [ 66, 117, 255], + [ 88, 133, 255], + [ 66, 117, 255], + [123, 159, 255], + [183, 203, 255], + [214, 225, 255], + [178, 199, 255], + [152, 180, 255], + [104, 146, 255], + [ 52, 107, 255], + [ 53, 108, 255], + [156, 183, 255], + [176, 197, 255], + [ 73, 122, 255], + [179, 200, 255], + [197, 213, 255], + [182, 201, 255], + [182, 201, 255], + [202, 216, 255], + [155, 182, 255], + [ 75, 124, 255]], + + [[ 93, 137, 255], + [121, 157, 255], + [108, 147, 255], + [ 40, 98, 255], + [ 98, 141, 255], + [167, 191, 255], + [205, 218, 255], + [162, 187, 255], + [130, 164, 255], + [ 77, 126, 255], + [ 36, 95, 255], + [113, 152, 255], + [185, 204, 255], + [166, 190, 255], + [ 47, 103, 255], + [178, 199, 255], + [198, 213, 255], + [176, 197, 255], + [176, 197, 255], + [204, 217, 255], + [148, 177, 255], + [ 50, 105, 255]], + + [[150, 178, 255], + [196, 212, 255], + [176, 197, 255], + [ 68, 118, 255], + [125, 160, 255], + [184, 203, 255], + [214, 225, 255], + [179, 200, 255], + [154, 182, 255], + [108, 148, 255], + [ 73, 122, 255], + [165, 189, 255], + [207, 220, 255], + [175, 196, 255], + [ 77, 125, 255], + [184, 203, 255], + [199, 215, 255], + [181, 201, 255], + [181, 201, 255], + [204, 218, 255], + [159, 185, 255], + [ 78, 126, 255]], + + [[ 37, 96, 255], + [165, 189, 255], + [223, 231, 255], + [160, 186, 255], + [211, 223, 255], + [237, 242, 255], + [245, 248, 255], + [236, 241, 255], + [234, 239, 255], + [207, 219, 255], + [169, 192, 255], + [170, 193, 255], + [202, 216, 255], + [207, 220, 255], + [173, 195, 255], + [194, 211, 255], + [200, 215, 255], + [199, 214, 255], + [199, 214, 255], + [200, 215, 255], + [188, 206, 255], + [169, 193, 255]], + + [[ 12, 78, 255], + [156, 183, 255], + [190, 208, 255], + [ 53, 108, 255], + [ 69, 119, 255], + [141, 171, 255], + [196, 212, 255], + [157, 184, 255], + [189, 207, 255], + [187, 206, 255], + [150, 179, 255], + [ 87, 133, 255], + [163, 188, 255], + [201, 215, 255], + [152, 180, 255], + [150, 179, 255], + [145, 175, 255], + [140, 171, 255], + [140, 171, 255], + [147, 176, 255], + [151, 179, 255], + [153, 180, 255]], + + [[ 44, 101, 255], + [169, 192, 255], + [188, 206, 255], + [ 45, 102, 255], + [ 23, 85, 255], + [ 97, 140, 255], + [162, 187, 255], + [111, 150, 255], + [143, 174, 255], + [140, 171, 255], + [100, 142, 255], + [ 39, 98, 255], + [144, 174, 255], + [183, 202, 255], + [ 97, 140, 255], + [108, 148, 255], + [118, 155, 255], + [130, 164, 255], + [152, 180, 255], + [126, 161, 255], + [107, 147, 255], + [ 99, 141, 255]], + + [[109, 148, 255], + [182, 202, 255], + [197, 212, 255], + [118, 155, 255], + [ 76, 124, 255], + [117, 155, 255], + [159, 185, 255], + [117, 154, 255], + [127, 162, 255], + [104, 145, 255], + [ 57, 111, 255], + [ 29, 91, 255], + [142, 173, 255], + [162, 187, 255], + [ 31, 92, 255], + [ 80, 128, 255], + [125, 160, 255], + [165, 189, 255], + [200, 215, 255], + [119, 155, 255], + [ 60, 113, 255], + [ 32, 92, 255]], + + [[144, 173, 255], + [125, 160, 255], + [127, 162, 255], + [163, 187, 255], + [185, 204, 255], + [205, 218, 255], + [216, 226, 255], + [210, 222, 255], + [212, 223, 255], + [186, 204, 255], + [129, 163, 255], + [ 40, 99, 255], + [142, 173, 255], + [154, 181, 255], + [ 9, 76, 255], + [ 91, 135, 255], + [173, 195, 255], + [209, 221, 255], + [145, 175, 255], + [ 53, 108, 255], + [ 9, 76, 255], + [ 5, 73, 255]], + + [[ 62, 114, 255], + [ 47, 103, 255], + [ 47, 103, 255], + [ 70, 120, 255], + [ 84, 130, 255], + [ 91, 135, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 18, 82, 255], + [ 60, 113, 255], + [ 65, 116, 255], + [ 2, 71, 255], + [ 38, 97, 255], + [ 74, 123, 255], + [ 89, 134, 255], + [ 55, 109, 255], + [ 17, 81, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 1, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 3, 71, 255], + [ 3, 71, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]]], dtype=uint8)],([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255]),{'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []},{'line_thickness': 1, 'boxLine_thickness': 1, 'fontSize': 0.4, 'waterLineColor': (0, 255, 255), 'segLineShow': False, 'waterLineWidth': 1, 'wordSize': 8, 'label_location': 'leftTop'},{'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4},others,None) @ aiHelper.py:101 in AI_process + 13:38:03.604 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 139, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:160 in model_process + 13:38:03.605 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 13:38:45.764 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 13:38:45.785 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 13:38:45.812 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 13:38:45.812 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 13:38:45.979 [INFO] - 模型初始化时间:0.19443655014038086, requestId:1234 @ ModelUtils.py:107 in __init__ + 13:38:45.980 [INFO] - 模型编号: 019 +模型参数: ( at 0x7fbee58625f0>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 13:38:45.980 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 13:38:45.984 [INFO] - model_process( + im0s=[None], + model=, + segmodel=None, + names=['车', 'T角点', 'L角点', '违停'], + label_arraylist=[array([[[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 15, 15], + [255, 48, 48], + [255, 61, 61], + [255, 33, 33], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 34, 34], + [255, 50, 50], + [255, 83, 83], + [255, 129, 129], + [255, 143, 143], + [255, 104, 104], + [255, 61, 61], + [255, 61, 61], + [255, 61, 61], + [255, 48, 48], + [255, 29, 29]], + + [[255, 104, 104], + [255, 154, 154], + [255, 203, 203], + [255, 232, 232], + [255, 222, 222], + [255, 205, 205], + [255, 189, 189], + [255, 186, 186], + [255, 186, 186], + [255, 145, 145], + [255, 87, 87]], + + [[255, 48, 48], + [255, 104, 104], + [255, 168, 168], + [255, 217, 217], + [255, 141, 141], + [255, 134, 134], + [255, 137, 137], + [255, 90, 90], + [255, 87, 87], + [255, 68, 68], + [255, 40, 40]], + + [[255, 16, 16], + [255, 106, 106], + [255, 170, 170], + [255, 168, 168], + [255, 112, 112], + [255, 136, 136], + [255, 149, 149], + [255, 56, 56], + [255, 50, 50], + [255, 35, 35], + [255, 14, 14]], + + [[255, 3, 3], + [255, 124, 124], + [255, 188, 188], + [255, 143, 143], + [255, 132, 132], + [255, 176, 176], + [255, 190, 190], + [255, 87, 87], + [255, 80, 80], + [255, 49, 49], + [255, 4, 4]], + + [[255, 9, 9], + [255, 124, 124], + [255, 203, 203], + [255, 201, 201], + [255, 210, 210], + [255, 228, 228], + [255, 234, 234], + [255, 199, 199], + [255, 196, 196], + [255, 120, 120], + [255, 9, 9]], + + [[255, 54, 54], + [255, 99, 99], + [255, 130, 130], + [255, 132, 132], + [255, 157, 157], + [255, 199, 199], + [255, 209, 209], + [255, 135, 135], + [255, 130, 130], + [255, 99, 99], + [255, 54, 54]], + + [[255, 93, 93], + [255, 108, 108], + [255, 119, 119], + [255, 120, 120], + [255, 149, 149], + [255, 194, 194], + [255, 205, 205], + [255, 124, 124], + [255, 119, 119], + [255, 108, 108], + [255, 93, 93]], + + [[255, 102, 102], + [255, 119, 119], + [255, 131, 131], + [255, 133, 133], + [255, 158, 158], + [255, 199, 199], + [255, 209, 209], + [255, 136, 136], + [255, 131, 131], + [255, 119, 119], + [255, 102, 102]], + + [[255, 16, 16], + [255, 19, 19], + [255, 21, 21], + [255, 24, 24], + [255, 72, 72], + [255, 149, 149], + [255, 168, 168], + [255, 29, 29], + [255, 21, 21], + [255, 19, 19], + [255, 16, 16]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 1, 1], + [255, 25, 25], + [255, 63, 63], + [255, 73, 73], + [255, 4, 4], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 3, 3], + [255, 7, 7], + [255, 8, 8], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]], + + [[255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0], + [255, 0, 0]]], dtype=uint8), array([[[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[212, 6, 150], + [212, 7, 151], + [212, 7, 151], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[224, 77, 180], + [225, 84, 183], + [226, 89, 185], + ..., + [225, 80, 182], + [223, 70, 177], + [221, 59, 173]], + + ..., + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [218, 40, 165], + [219, 49, 168], + [221, 61, 173]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]], + + [[211, 0, 148], + [211, 0, 148], + [211, 0, 148], + ..., + [211, 0, 148], + [211, 0, 148], + [211, 0, 148]]], dtype=uint8), array([[[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 2, 128, 2], + [ 5, 129, 5], + [ 4, 129, 4], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 26, 140, 26], + [ 63, 159, 63], + [ 60, 157, 60], + ..., + [ 79, 167, 79], + [ 64, 159, 64], + [ 59, 157, 59]], + + ..., + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 38, 146, 38], + [ 55, 155, 55], + [ 61, 157, 61]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]], + + [[ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0], + ..., + [ 0, 127, 0], + [ 0, 127, 0], + [ 0, 127, 0]]], dtype=uint8), array([[[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 25, 87, 255], + [ 30, 90, 255], + [ 22, 85, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 36, 95, 255], + [ 63, 115, 255], + [ 33, 93, 255], + [ 10, 76, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 34, 94, 255], + [ 47, 103, 255], + [ 24, 86, 255], + [ 6, 73, 255], + [ 25, 87, 255], + [ 50, 105, 255], + [ 50, 105, 255], + [ 16, 80, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 53, 107, 255], + [ 87, 132, 255], + [ 90, 135, 255], + [ 49, 104, 255], + [ 67, 118, 255], + [118, 155, 255], + [151, 179, 255], + [113, 151, 255], + [ 85, 131, 255], + [ 62, 114, 255], + [ 41, 99, 255], + [ 7, 74, 255], + [ 83, 129, 255], + [121, 157, 255], + [ 80, 127, 255], + [ 67, 118, 255], + [ 93, 137, 255], + [122, 158, 255], + [122, 157, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 53, 107, 255]], + + [[ 73, 121, 255], + [160, 185, 255], + [196, 212, 255], + [147, 177, 255], + [205, 218, 255], + [235, 240, 255], + [243, 246, 255], + [233, 239, 255], + [226, 233, 255], + [190, 208, 255], + [124, 160, 255], + [ 24, 86, 255], + [138, 169, 255], + [206, 220, 255], + [158, 184, 255], + [190, 208, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [201, 215, 255], + [184, 203, 255], + [160, 185, 255]], + + [[ 17, 81, 255], + [ 66, 117, 255], + [ 88, 133, 255], + [ 66, 117, 255], + [123, 159, 255], + [183, 203, 255], + [214, 225, 255], + [178, 199, 255], + [152, 180, 255], + [104, 146, 255], + [ 52, 107, 255], + [ 53, 108, 255], + [156, 183, 255], + [176, 197, 255], + [ 73, 122, 255], + [179, 200, 255], + [197, 213, 255], + [182, 201, 255], + [182, 201, 255], + [202, 216, 255], + [155, 182, 255], + [ 75, 124, 255]], + + [[ 93, 137, 255], + [121, 157, 255], + [108, 147, 255], + [ 40, 98, 255], + [ 98, 141, 255], + [167, 191, 255], + [205, 218, 255], + [162, 187, 255], + [130, 164, 255], + [ 77, 126, 255], + [ 36, 95, 255], + [113, 152, 255], + [185, 204, 255], + [166, 190, 255], + [ 47, 103, 255], + [178, 199, 255], + [198, 213, 255], + [176, 197, 255], + [176, 197, 255], + [204, 217, 255], + [148, 177, 255], + [ 50, 105, 255]], + + [[150, 178, 255], + [196, 212, 255], + [176, 197, 255], + [ 68, 118, 255], + [125, 160, 255], + [184, 203, 255], + [214, 225, 255], + [179, 200, 255], + [154, 182, 255], + [108, 148, 255], + [ 73, 122, 255], + [165, 189, 255], + [207, 220, 255], + [175, 196, 255], + [ 77, 125, 255], + [184, 203, 255], + [199, 215, 255], + [181, 201, 255], + [181, 201, 255], + [204, 218, 255], + [159, 185, 255], + [ 78, 126, 255]], + + [[ 37, 96, 255], + [165, 189, 255], + [223, 231, 255], + [160, 186, 255], + [211, 223, 255], + [237, 242, 255], + [245, 248, 255], + [236, 241, 255], + [234, 239, 255], + [207, 219, 255], + [169, 192, 255], + [170, 193, 255], + [202, 216, 255], + [207, 220, 255], + [173, 195, 255], + [194, 211, 255], + [200, 215, 255], + [199, 214, 255], + [199, 214, 255], + [200, 215, 255], + [188, 206, 255], + [169, 193, 255]], + + [[ 12, 78, 255], + [156, 183, 255], + [190, 208, 255], + [ 53, 108, 255], + [ 69, 119, 255], + [141, 171, 255], + [196, 212, 255], + [157, 184, 255], + [189, 207, 255], + [187, 206, 255], + [150, 179, 255], + [ 87, 133, 255], + [163, 188, 255], + [201, 215, 255], + [152, 180, 255], + [150, 179, 255], + [145, 175, 255], + [140, 171, 255], + [140, 171, 255], + [147, 176, 255], + [151, 179, 255], + [153, 180, 255]], + + [[ 44, 101, 255], + [169, 192, 255], + [188, 206, 255], + [ 45, 102, 255], + [ 23, 85, 255], + [ 97, 140, 255], + [162, 187, 255], + [111, 150, 255], + [143, 174, 255], + [140, 171, 255], + [100, 142, 255], + [ 39, 98, 255], + [144, 174, 255], + [183, 202, 255], + [ 97, 140, 255], + [108, 148, 255], + [118, 155, 255], + [130, 164, 255], + [152, 180, 255], + [126, 161, 255], + [107, 147, 255], + [ 99, 141, 255]], + + [[109, 148, 255], + [182, 202, 255], + [197, 212, 255], + [118, 155, 255], + [ 76, 124, 255], + [117, 155, 255], + [159, 185, 255], + [117, 154, 255], + [127, 162, 255], + [104, 145, 255], + [ 57, 111, 255], + [ 29, 91, 255], + [142, 173, 255], + [162, 187, 255], + [ 31, 92, 255], + [ 80, 128, 255], + [125, 160, 255], + [165, 189, 255], + [200, 215, 255], + [119, 155, 255], + [ 60, 113, 255], + [ 32, 92, 255]], + + [[144, 173, 255], + [125, 160, 255], + [127, 162, 255], + [163, 187, 255], + [185, 204, 255], + [205, 218, 255], + [216, 226, 255], + [210, 222, 255], + [212, 223, 255], + [186, 204, 255], + [129, 163, 255], + [ 40, 99, 255], + [142, 173, 255], + [154, 181, 255], + [ 9, 76, 255], + [ 91, 135, 255], + [173, 195, 255], + [209, 221, 255], + [145, 175, 255], + [ 53, 108, 255], + [ 9, 76, 255], + [ 5, 73, 255]], + + [[ 62, 114, 255], + [ 47, 103, 255], + [ 47, 103, 255], + [ 70, 120, 255], + [ 84, 130, 255], + [ 91, 135, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 93, 137, 255], + [ 82, 129, 255], + [ 59, 112, 255], + [ 18, 82, 255], + [ 60, 113, 255], + [ 65, 116, 255], + [ 2, 71, 255], + [ 38, 97, 255], + [ 74, 123, 255], + [ 89, 134, 255], + [ 55, 109, 255], + [ 17, 81, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 1, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 3, 71, 255], + [ 3, 71, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]], + + [[ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255], + [ 0, 69, 255]]], dtype=uint8)],([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255]),{'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []},{'line_thickness': 1, 'boxLine_thickness': 1, 'fontSize': 0.4, 'waterLineColor': (0, 255, 255), 'segLineShow': False, 'waterLineWidth': 1, 'wordSize': 8, 'label_location': 'leftTop'},{'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4},others,None) @ aiHelper.py:101 in AI_process + 13:38:45.988 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 139, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:160 in model_process + 13:38:45.990 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 13:39:31.577 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 13:39:31.598 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 13:39:31.623 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 13:39:31.623 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 13:39:31.778 [INFO] - 模型初始化时间:0.18051886558532715, requestId:1234 @ ModelUtils.py:107 in __init__ + 13:39:31.779 [INFO] - 模型编号: 019 +模型参数: ( at 0x7feee6aa25f0>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 13:39:31.779 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 13:39:31.782 [INFO] - model_process( + im0s=[None], + model=, + segmodel=None, + names=['车', 'T角点', 'L角点', '违停'], + rainbows=([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255]),{'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []},{'line_thickness': 1, 'boxLine_thickness': 1, 'fontSize': 0.4, 'waterLineColor': (0, 255, 255), 'segLineShow': False, 'waterLineWidth': 1, 'wordSize': 8, 'label_location': 'leftTop'},{'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4},others,None) @ aiHelper.py:101 in AI_process + 13:39:31.783 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 139, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:160 in model_process + 13:39:31.784 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 13:40:31.679 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 13:40:31.702 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 13:40:31.728 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 13:40:31.728 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 13:40:31.887 [INFO] - 模型初始化时间:0.18517684936523438, requestId:1234 @ ModelUtils.py:107 in __init__ + 13:40:31.888 [INFO] - 模型编号: 019 +模型参数: ( at 0x7f8f4d962830>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 13:40:31.888 [INFO] - at 0x7f8f4d97c3a0> @ main.py:67 in + 13:40:31.889 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 13:40:31.892 [INFO] - model_process( + im0s=[None], + model=, + segmodel=None, + names=['车', 'T角点', 'L角点', '违停'], + rainbows=([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255]),{'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []},{'line_thickness': 1, 'boxLine_thickness': 1, 'fontSize': 0.4, 'waterLineColor': (0, 255, 255), 'segLineShow': False, 'waterLineWidth': 1, 'wordSize': 8, 'label_location': 'leftTop'},{'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4},others,None) @ aiHelper.py:101 in AI_process + 13:40:31.893 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 139, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:160 in model_process + 13:40:31.894 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 13:41:19.104 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 13:41:19.126 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 13:41:19.152 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 13:41:19.152 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 13:41:19.320 [INFO] - 模型初始化时间:0.19472265243530273, requestId:1234 @ ModelUtils.py:107 in __init__ + 13:41:19.321 [INFO] - 模型编号: 019 +模型参数: ( at 0x7f93bf8fa830>)>, {'model': , 'segmodel': None, 'objectPar': {'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []}, 'segPar': {'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4}, 'mode': 'others', 'postPar': None}, [0, 1, 2, 3], ['车', 'T角点', 'L角点', '违停'], ([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255])) @ main.py:52 in + 13:41:19.321 [INFO] - model= at 0x7f93bf9103a0> @ main.py:67 in + 13:41:19.321 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 13:41:19.325 [INFO] - model_process( + im0s=[None], + model=, + segmodel=None, + names=['车', 'T角点', 'L角点', '违停'], + rainbows=([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255]),{'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []},{'line_thickness': 1, 'boxLine_thickness': 1, 'fontSize': 0.4, 'waterLineColor': (0, 255, 255), 'segLineShow': False, 'waterLineWidth': 1, 'wordSize': 8, 'label_location': 'leftTop'},{'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4},others,None) @ aiHelper.py:101 in AI_process + 13:41:19.326 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 139, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:160 in model_process + 13:41:19.327 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 13:41:33.399 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 13:41:33.420 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 13:41:33.448 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 13:41:33.448 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 13:41:33.625 [INFO] - 模型初始化时间:0.2046341896057129, requestId:1234 @ ModelUtils.py:107 in __init__ + 13:41:33.625 [INFO] - model= at 0x7fe14cec03a0> @ main.py:67 in + 13:41:33.626 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:290 in get_label_arraylist + 13:41:33.629 [INFO] - model_process( + im0s=[None], + model=, + segmodel=None, + names=['车', 'T角点', 'L角点', '违停'], + rainbows=([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255]),{'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []},{'line_thickness': 1, 'boxLine_thickness': 1, 'fontSize': 0.4, 'waterLineColor': (0, 255, 255), 'segLineShow': False, 'waterLineWidth': 1, 'wordSize': 8, 'label_location': 'leftTop'},{'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4},others,None) @ aiHelper.py:101 in AI_process + 13:41:33.630 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 151, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 139, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:160 in model_process + 13:41:33.631 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 13:46:52.738 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 13:47:04.293 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 13:47:28.563 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 13:47:31.817 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:55 in __init__ + 13:47:35.475 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 13:47:36.362 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:65 in __init__ + 13:48:03.364 [INFO] - 模型初始化时间:34.780102014541626, requestId:1234 @ ModelUtils.py:107 in __init__ + 14:04:47.515 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 14:04:47.535 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:56 in __init__ + 14:04:47.535 [INFO] - __init__(device=0, allowedList=[0, 1, 2, 3], requestId=1234, modeType=ModelType.ILLPARKING_MODEL, gpu_name=3090, base_dir=/home/thsw/chenbw/DrGraph, env=test) @ ModelUtils.py:58 in __init__ + 14:04:47.559 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 14:04:47.560 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:68 in __init__ + 14:04:47.705 [INFO] - 模型初始化时间:0.16959834098815918, requestId:1234 @ ModelUtils.py:110 in __init__ + 14:04:47.705 [INFO] - model= at 0x7fcede974550> @ main.py:67 in + 14:04:47.705 [INFO] - fontPath:./appIOs/conf/platech.ttf @ ModelUtils.py:293 in get_label_arraylist + 14:04:47.708 [INFO] - model_process( + im0s=[None], + model=, + segmodel=None, + names=['车', 'T角点', 'L角点', '违停'], + rainbows=([255, 0, 0], [211, 0, 148], [0, 127, 0], [0, 69, 255], [0, 255, 0], [255, 0, 255], [0, 0, 127], [127, 0, 255], [255, 129, 0], [139, 139, 0], [255, 255, 0], [127, 255, 0], [0, 127, 255], [0, 255, 127], [255, 127, 255], [8, 101, 139], [171, 130, 255], [139, 112, 74], [205, 205, 180], [0, 0, 255]),{'half': True, 'device': device(type='cuda', index=0), 'conf_thres': 0.25, 'ovlap_thres_crossCategory': None, 'iou_thres': 0.25, 'segRegionCnt': 2, 'trtFlag_det': True, 'trtFlag_seg': False, 'score_byClass': None, 'fiterList': []},{'line_thickness': 1, 'boxLine_thickness': 1, 'fontSize': 0.4, 'waterLineColor': (0, 255, 255), 'segLineShow': False, 'waterLineWidth': 1, 'wordSize': 8, 'label_location': 'leftTop'},{'mixFunction': {'function': , 'pars': {}}, 'seg_nclass': 4},others,None) @ aiHelper.py:101 in AI_process + 14:04:47.709 [ERROR] - 算法模型分析异常:Traceback (most recent call last): + File "/home/thsw/chenbw/DrGraph/appIOs/conf/ModelUtils.py", line 154, in model_process + return aiHelper.AI_process([frame], model_param['model'], model_param['segmodel'], names, model_param['label_arraylist'], + File "/home/thsw/chenbw/DrGraph/DrUtils/aiHelper.py", line 139, in AI_process + half,device,conf_thres,iou_thres,allowedList = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'],objectPar['allowedList'] +KeyError: 'allowedList' +, requestId:1234 @ ModelUtils.py:163 in model_process + 14:04:47.710 [ERROR] - 异常编码:SP018, 异常描述:算法模型分析异常! @ ModelUtils.py:44 in __str__ + 14:05:59.543 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 14:09:47.229 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:56 in __init__ + 14:09:50.069 [INFO] - __init__(device=0, allowedList=[0, 1, 2, 3], requestId=1234, modeType=ModelType.ILLPARKING_MODEL, gpu_name=3090, base_dir=/home/thsw/chenbw/DrGraph, env=test) @ ModelUtils.py:58 in __init__ + 14:09:53.713 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 14:09:54.929 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:68 in __init__ + 14:12:57.575 [INFO] - 模型初始化时间:267.6965844631195, requestId:1234 @ ModelUtils.py:110 in __init__ + 14:22:25.623 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 14:23:15.452 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:56 in __init__ + 14:23:17.027 [INFO] - __init__(device=0, allowedList=[0, 1, 2, 3], requestId=1234, modeType=ModelType.ILLPARKING_MODEL, gpu_name=3090, base_dir=/home/thsw/chenbw/DrGraph, env=test) @ ModelUtils.py:58 in __init__ + 14:25:00.221 [INFO] - select_device YOLOv5 🚀 2025-9-19 torch 2.0.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3090, 24258.625MB) + @ torchHelper.py:73 in select_device + 14:25:08.495 [INFO] - 加载模型:./weights/illParking/yolov5_3090_fp16.engine @ ModelUtils.py:68 in __init__ + 14:31:15.038 [INFO] - 模型编号: 019, 检查目标: [0, 1, 2, 3], requestId: 1234 @ main.py:21 in get_model + 14:31:28.575 [INFO] - ########################加载车辆违停模型########################, requestId:1234 @ ModelUtils.py:56 in __init__ + 14:31:29.837 [INFO] - __init__(device=0, allowedList=[0, 1, 2, 3], requestId=1234, modeType=ModelType.ILLPARKING_MODEL, gpu_name=3090, base_dir=/home/thsw/chenbw/DrGraph, env=test) @ ModelUtils.py:58 in __init__ diff --git a/DrGraph/appIOs/results/illParking/1.jpg b/DrGraph/appIOs/results/illParking/1.jpg new file mode 100644 index 0000000..373114f Binary files /dev/null and b/DrGraph/appIOs/results/illParking/1.jpg differ diff --git a/DrGraph/appIOs/results/illParking/1.txt b/DrGraph/appIOs/results/illParking/1.txt new file mode 100644 index 0000000..1b2e97a --- /dev/null +++ b/DrGraph/appIOs/results/illParking/1.txt @@ -0,0 +1 @@ +147,241,234,284,0.8705368041992188,3 diff --git a/DrGraph/appIOs/results/illParking/2.jpg b/DrGraph/appIOs/results/illParking/2.jpg new file mode 100644 index 0000000..84349a3 Binary files /dev/null and b/DrGraph/appIOs/results/illParking/2.jpg differ diff --git a/DrGraph/appIOs/results/illParking/2.txt b/DrGraph/appIOs/results/illParking/2.txt new file mode 100644 index 0000000..499bb7e --- /dev/null +++ b/DrGraph/appIOs/results/illParking/2.txt @@ -0,0 +1,7 @@ +562,1,593,53,0.8735775947570801,3 +278,0,308,51,0.876518726348877,3 +159,0,189,45,0.8780574798583984,3 +40,0,73,39,0.8795464038848877,3 +397,41,428,115,0.8820486068725586,3 +356,36,389,113,0.8837814331054688,3 +475,39,510,112,0.8847465515136719,3 diff --git a/DrGraph/appIOs/results/illParking/3.jpg b/DrGraph/appIOs/results/illParking/3.jpg new file mode 100644 index 0000000..84349a3 Binary files /dev/null and b/DrGraph/appIOs/results/illParking/3.jpg differ diff --git a/DrGraph/appIOs/results/illParking/3.txt b/DrGraph/appIOs/results/illParking/3.txt new file mode 100644 index 0000000..499bb7e --- /dev/null +++ b/DrGraph/appIOs/results/illParking/3.txt @@ -0,0 +1,7 @@ +562,1,593,53,0.8735775947570801,3 +278,0,308,51,0.876518726348877,3 +159,0,189,45,0.8780574798583984,3 +40,0,73,39,0.8795464038848877,3 +397,41,428,115,0.8820486068725586,3 +356,36,389,113,0.8837814331054688,3 +475,39,510,112,0.8847465515136719,3 diff --git a/DrGraph/appIOs/results/illParking/4.jpg b/DrGraph/appIOs/results/illParking/4.jpg new file mode 100644 index 0000000..84349a3 Binary files /dev/null and b/DrGraph/appIOs/results/illParking/4.jpg differ diff --git a/DrGraph/appIOs/results/illParking/4.txt b/DrGraph/appIOs/results/illParking/4.txt new file mode 100644 index 0000000..499bb7e --- /dev/null +++ b/DrGraph/appIOs/results/illParking/4.txt @@ -0,0 +1,7 @@ +562,1,593,53,0.8735775947570801,3 +278,0,308,51,0.876518726348877,3 +159,0,189,45,0.8780574798583984,3 +40,0,73,39,0.8795464038848877,3 +397,41,428,115,0.8820486068725586,3 +356,36,389,113,0.8837814331054688,3 +475,39,510,112,0.8847465515136719,3 diff --git a/DrGraph/appIOs/results/illParking/5.jpg b/DrGraph/appIOs/results/illParking/5.jpg new file mode 100644 index 0000000..84349a3 Binary files /dev/null and b/DrGraph/appIOs/results/illParking/5.jpg differ diff --git a/DrGraph/appIOs/results/illParking/5.txt b/DrGraph/appIOs/results/illParking/5.txt new file mode 100644 index 0000000..499bb7e --- /dev/null +++ b/DrGraph/appIOs/results/illParking/5.txt @@ -0,0 +1,7 @@ +562,1,593,53,0.8735775947570801,3 +278,0,308,51,0.876518726348877,3 +159,0,189,45,0.8780574798583984,3 +40,0,73,39,0.8795464038848877,3 +397,41,428,115,0.8820486068725586,3 +356,36,389,113,0.8837814331054688,3 +475,39,510,112,0.8847465515136719,3 diff --git a/DrGraph/appIOs/samples/illParking/1.jpg b/DrGraph/appIOs/samples/illParking/1.jpg new file mode 100644 index 0000000..e3669f2 Binary files /dev/null and b/DrGraph/appIOs/samples/illParking/1.jpg differ diff --git a/DrGraph/appIOs/samples/illParking/2.jpg b/DrGraph/appIOs/samples/illParking/2.jpg new file mode 100644 index 0000000..b7ddfe8 Binary files /dev/null and b/DrGraph/appIOs/samples/illParking/2.jpg differ diff --git a/DrGraph/appIOs/samples/illParking/3.jpg b/DrGraph/appIOs/samples/illParking/3.jpg new file mode 100644 index 0000000..9b97cbc Binary files /dev/null and b/DrGraph/appIOs/samples/illParking/3.jpg differ diff --git a/DrGraph/appIOs/samples/illParking/4.jpg b/DrGraph/appIOs/samples/illParking/4.jpg new file mode 100644 index 0000000..9b97cbc Binary files /dev/null and b/DrGraph/appIOs/samples/illParking/4.jpg differ diff --git a/DrGraph/appIOs/samples/illParking/5.jpg b/DrGraph/appIOs/samples/illParking/5.jpg new file mode 100644 index 0000000..9b97cbc Binary files /dev/null and b/DrGraph/appIOs/samples/illParking/5.jpg differ diff --git a/DrGraph/enums/AnalysisStatusEnum.py b/DrGraph/enums/AnalysisStatusEnum.py new file mode 100644 index 0000000..ac30040 --- /dev/null +++ b/DrGraph/enums/AnalysisStatusEnum.py @@ -0,0 +1,21 @@ +from enum import Enum, unique + + +# 分析状态枚举 +@unique +class AnalysisStatus(Enum): + + # 等待 + WAITING = "waiting" + + # 分析中 + RUNNING = "running" + + # 分析完成 + SUCCESS = "success" + + # 超时 + TIMEOUT = "timeout" + + # 失败 + FAILED = "failed" diff --git a/DrGraph/enums/AnalysisTypeEnum.py b/DrGraph/enums/AnalysisTypeEnum.py new file mode 100644 index 0000000..6172d2a --- /dev/null +++ b/DrGraph/enums/AnalysisTypeEnum.py @@ -0,0 +1,25 @@ +from enum import Enum, unique + + +# 分析类型枚举 +@unique +class AnalysisType(Enum): + # 在线 + ONLINE = "1" + + # 离线 + OFFLINE = "2" + + # 图片 + IMAGE = "3" + + # 录屏 + RECORDING = "9999" + + # 转推流 + PULLTOPUSH = "10000" + + + + + diff --git a/DrGraph/enums/BaiduSdkEnum.py b/DrGraph/enums/BaiduSdkEnum.py new file mode 100644 index 0000000..8ea05cd --- /dev/null +++ b/DrGraph/enums/BaiduSdkEnum.py @@ -0,0 +1,188 @@ +from enum import Enum, unique + +''' + ocr官方文档: https://ai.baidu.com/ai-doc/OCR/zkibizyhz + 官方文档: https://ai.baidu.com/ai-doc/VEHICLE/rk3inf9tj + 参数1: 异常编号 + 参数2: 异常英文描述 + 参数3: 异常中文描述 + 参数4: 0-异常信息统一输出为内部异常 + 1-异常信息可以输出 + 2-输出空的异常信息 + 参数5: 指定异常重试的次数 +''' + + +# 异常枚举 +@unique +class BaiduSdkErrorEnum(Enum): + + UNKNOWN_ERROR = (1, "Unknown error", "未知错误", 0, 0) + + SERVICE_TEMPORARILY_UNAVAILABLE = (2, "Service temporarily unavailable", "服务暂不可用,请再次请求", 0, 3) + + UNSUPPORTED_OPENAPI_METHOD = (3, "Unsupported openapi method", "调用的API不存在", 0, 0) + + API_REQUEST_LIMIT_REACHED = (4, "Open api request limit reached", "请求量限制, 请稍后再试!", 1, 5) + + NO_PERMISSION_TO_ACCESS_DATA = (6, "No permission to access data", "无权限访问该用户数据", 1, 0) + + GET_SERVICE_TOKEN_FAILED = (13, "Get service token failed", "获取token失败", 0, 2) + + IAM_CERTIFICATION_FAILED = (14, "IAM Certification failed", "IAM 鉴权失败", 0, 1) + + APP_NOT_EXSITS_OR_CREATE_FAILED = (15, "app not exsits or create failed", "应用不存在或者创建失败", 0, 0) + + API_DAILY_REQUEST_LIMIT_REACHED = (17, "Open api daily request limit reached", "每天请求量超限额!", 1, 2) + + API_QPS_REQUEST_LIMIT_REACHED = (18, "Open api qps request limit reached", "QPS超限额!", 1, 10) + + API_TOTAL_REQUEST_LIMIT_REACHED = (19, "Open api total request limit reached", "请求总量超限额!", 1, 2) + + INVALID_TOKEN = (100, "Invalid parameter", "无效的access_token参数,token拉取失败", 0, 1) + + ACCESS_TOKEN_INVALID_OR_NO_LONGER_VALID = (110, "Access token invalid or no longer valid", "access_token无效,token有效期为30天", 0, 1) + + ACCESS_TOKEN_EXPIRED = (111, "Access token expired", "access token过期,token有效期为30天", 0, 1) + + INTERNAL_ERROR = (282000, "internal error", "服务器内部错误", 0, 1) + + INVALID_PARAM = (216100, "invalid param", "请求中包含非法参数!", 0, 1) + + NOT_ENOUGH_PARAM = (216101, "not enough param", "缺少必须的参数!", 0, 0) + + SERVICE_NOT_SUPPORT = (216102, "service not support", "请求了不支持的服务,请检查调用的url", 0, 0) + + PARAM_TOO_LONG = (216103, "param too long", "请求中某些参数过长!", 1, 0) + + APPID_NOT_EXIST = (216110, "appid not exist", "appid不存在", 0, 0) + + EMPTY_IMAGE = (216200, "empty image", "图片为空!", 1, 0) + + IMAGE_FORMAT_ERROR = (216201, "image format error", "上传的图片格式错误,现阶段我们支持的图片格式为:PNG、JPG、JPEG、BMP", 1, 0) + + IMAGE_SIZE_ERROR = (216202, "image size error", "上传的图片大小错误,分辨率不高于4096*4096", 1, 0) + + IMAGE_SIZE_BASE_ERROR = (216203, "image size error", "上传的图片编码有误", 1, 0) + + RECOGNIZE_ERROR = (216630, "recognize error", "识别错误", 2, 2) + + DETECT_ERROR = (216634, "detect error", "检测错误", 2, 2) + + MISSING_PARAMETERS = (282003, "missing parameters: {参数名}", "请求参数缺失", 0, 0) + + BATCH_ROCESSING_ERROR = (282005, "batch processing error", "处理批量任务时发生部分或全部错误", 0, 5) + + BATCH_TASK_LIMIT_REACHED = (282006, "batch task limit reached", "批量任务处理数量超出限制,请将任务数量减少到10或10以下", 1, 5) + + IMAGE_TRANSCODE_ERROR = (282100, "image transcode error", "图片压缩转码错误", 0, 1) + + IMAGE_SPLIT_LIMIT_REACHED = (282101, "image split limit reached", "长图片切分数量超限!", 1, 1) + + TARGET_DETECT_ERROR = (282102, "target detect error", "未检测到图片中识别目标!", 2, 1) + + TARGET_RECOGNIZE_ERROR = (282103, "target recognize error", "图片目标识别错误!", 2, 1) + + URLS_NOT_EXIT = (282110, "urls not exit", "URL参数不存在,请核对URL后再次提交!", 1, 0) + + URL_FORMAT_ILLEGAL = (282111, "url format illegal", "URL格式非法!", 1, 0) + + URL_DOWNLOAD_TIMEOUT = (282112, "url download timeout", "URL格式非法!", 1, 0) + + URL_RESPONSE_INVALID = (282113, "url response invalid", "URL返回无效参数!", 1, 0) + + URL_SIZE_ERROR = (282114, "url size error", "URL长度超过1024字节或为0!", 1, 0) + + REQUEST_ID_NOT_EXIST = (282808, "request id: xxxxx not exist", "request id xxxxx 不存在", 0, 0) + + RESULT_TYPE_ERROR = (282809, "result type error", "返回结果请求错误(不属于excel或json)", 0, 0) + + IMAGE_RECOGNIZE_ERROR = (282810, "image recognize error", "图像识别错误", 2, 1) + + INVALID_ARGUMENT = (283300, "Invalid argument", "入参格式有误,可检查下图片编码、代码格式是否有误", 1, 0) + + INTERNAL_ERROR_2 = (336000, "Internal error", "服务器内部错误", 0, 0) + + INVALID_ARGUMENT_2 = (336001, "Invalid Argument", "入参格式有误,比如缺少必要参数、图片编码错误等等,可检查下图片编码、代码格式是否有误", 0, 0) + + SDK_IMAGE_SIZE_ERROR = ('SDK100', "image size error", "图片大小超限,最短边至少50px,最长边最大4096px ,建议长宽比3:1以内,图片请求格式支持:PNG、JPG、BMP", 1, 0) + + SDK_IMAGE_LENGTH_ERROR = ('SDK101', "image length error", "图片边长不符合要求,最短边至少50px,最长边最大4096px ,建议长宽比3:1以内", 1, 0) + + SDK_READ_IMAGE_FILE_ERROR = ('SDK102', "read image file error", "读取图片文件错误", 0, 1) + + SDK_CONNECTION_OR_READ_DATA_TIME_OUT = ('SDK108', "connection or read data time out", "连接超时或读取数据超时,请检查本地网络设置、文件读取设置", 0, 3) + + SDK_UNSUPPORTED_IMAGE_FORMAT = ('SDK109', "unsupported image format", "不支持的图片格式,当前支持以下几类图片:PNG、JPG、BMP", 1, 0) + + +BAIDUERRORDATA = { + BaiduSdkErrorEnum.UNKNOWN_ERROR.value[0]: BaiduSdkErrorEnum.UNKNOWN_ERROR, + BaiduSdkErrorEnum.SERVICE_TEMPORARILY_UNAVAILABLE.value[0]: BaiduSdkErrorEnum.SERVICE_TEMPORARILY_UNAVAILABLE, + BaiduSdkErrorEnum.UNSUPPORTED_OPENAPI_METHOD.value[0]: BaiduSdkErrorEnum.UNSUPPORTED_OPENAPI_METHOD, + BaiduSdkErrorEnum.API_REQUEST_LIMIT_REACHED.value[0]: BaiduSdkErrorEnum.API_REQUEST_LIMIT_REACHED, + BaiduSdkErrorEnum.NO_PERMISSION_TO_ACCESS_DATA.value[0]: BaiduSdkErrorEnum.NO_PERMISSION_TO_ACCESS_DATA, + BaiduSdkErrorEnum.GET_SERVICE_TOKEN_FAILED.value[0]: BaiduSdkErrorEnum.GET_SERVICE_TOKEN_FAILED, + BaiduSdkErrorEnum.IAM_CERTIFICATION_FAILED.value[0]: BaiduSdkErrorEnum.IAM_CERTIFICATION_FAILED, + BaiduSdkErrorEnum.APP_NOT_EXSITS_OR_CREATE_FAILED.value[0]: BaiduSdkErrorEnum.APP_NOT_EXSITS_OR_CREATE_FAILED, + BaiduSdkErrorEnum.API_DAILY_REQUEST_LIMIT_REACHED.value[0]: BaiduSdkErrorEnum.API_DAILY_REQUEST_LIMIT_REACHED, + BaiduSdkErrorEnum.API_QPS_REQUEST_LIMIT_REACHED.value[0]: BaiduSdkErrorEnum.API_QPS_REQUEST_LIMIT_REACHED, + BaiduSdkErrorEnum.API_TOTAL_REQUEST_LIMIT_REACHED.value[0]: BaiduSdkErrorEnum.API_TOTAL_REQUEST_LIMIT_REACHED, + BaiduSdkErrorEnum.INVALID_TOKEN.value[0]: BaiduSdkErrorEnum.INVALID_TOKEN, + BaiduSdkErrorEnum.ACCESS_TOKEN_INVALID_OR_NO_LONGER_VALID.value[0]: BaiduSdkErrorEnum.ACCESS_TOKEN_INVALID_OR_NO_LONGER_VALID, + BaiduSdkErrorEnum.ACCESS_TOKEN_EXPIRED.value[0]: BaiduSdkErrorEnum.ACCESS_TOKEN_EXPIRED, + BaiduSdkErrorEnum.INTERNAL_ERROR.value[0]: BaiduSdkErrorEnum.INTERNAL_ERROR, + BaiduSdkErrorEnum.INVALID_PARAM.value[0]: BaiduSdkErrorEnum.INVALID_PARAM, + BaiduSdkErrorEnum.NOT_ENOUGH_PARAM.value[0]: BaiduSdkErrorEnum.NOT_ENOUGH_PARAM, + BaiduSdkErrorEnum.SERVICE_NOT_SUPPORT.value[0]: BaiduSdkErrorEnum.SERVICE_NOT_SUPPORT, + BaiduSdkErrorEnum.PARAM_TOO_LONG.value[0]: BaiduSdkErrorEnum.PARAM_TOO_LONG, + BaiduSdkErrorEnum.APPID_NOT_EXIST.value[0]: BaiduSdkErrorEnum.APPID_NOT_EXIST, + BaiduSdkErrorEnum.EMPTY_IMAGE.value[0]: BaiduSdkErrorEnum.EMPTY_IMAGE, + BaiduSdkErrorEnum.IMAGE_FORMAT_ERROR.value[0]: BaiduSdkErrorEnum.IMAGE_FORMAT_ERROR, + BaiduSdkErrorEnum.IMAGE_SIZE_ERROR.value[0]: BaiduSdkErrorEnum.IMAGE_SIZE_ERROR, + BaiduSdkErrorEnum.IMAGE_SIZE_BASE_ERROR.value[0]: BaiduSdkErrorEnum.IMAGE_SIZE_BASE_ERROR, + BaiduSdkErrorEnum.RECOGNIZE_ERROR.value[0]: BaiduSdkErrorEnum.RECOGNIZE_ERROR, + BaiduSdkErrorEnum.DETECT_ERROR.value[0]: BaiduSdkErrorEnum.DETECT_ERROR, + BaiduSdkErrorEnum.MISSING_PARAMETERS.value[0]: BaiduSdkErrorEnum.MISSING_PARAMETERS, + BaiduSdkErrorEnum.BATCH_ROCESSING_ERROR.value[0]: BaiduSdkErrorEnum.BATCH_ROCESSING_ERROR, + BaiduSdkErrorEnum.BATCH_TASK_LIMIT_REACHED.value[0]: BaiduSdkErrorEnum.BATCH_TASK_LIMIT_REACHED, + BaiduSdkErrorEnum.IMAGE_TRANSCODE_ERROR.value[0]: BaiduSdkErrorEnum.IMAGE_TRANSCODE_ERROR, + BaiduSdkErrorEnum.IMAGE_SPLIT_LIMIT_REACHED.value[0]: BaiduSdkErrorEnum.IMAGE_SPLIT_LIMIT_REACHED, + BaiduSdkErrorEnum.TARGET_DETECT_ERROR.value[0]: BaiduSdkErrorEnum.TARGET_DETECT_ERROR, + BaiduSdkErrorEnum.TARGET_RECOGNIZE_ERROR.value[0]: BaiduSdkErrorEnum.TARGET_RECOGNIZE_ERROR, + BaiduSdkErrorEnum.URL_SIZE_ERROR.value[0]: BaiduSdkErrorEnum.URL_SIZE_ERROR, + BaiduSdkErrorEnum.REQUEST_ID_NOT_EXIST.value[0]: BaiduSdkErrorEnum.REQUEST_ID_NOT_EXIST, + BaiduSdkErrorEnum.RESULT_TYPE_ERROR.value[0]: BaiduSdkErrorEnum.RESULT_TYPE_ERROR, + BaiduSdkErrorEnum.IMAGE_RECOGNIZE_ERROR.value[0]: BaiduSdkErrorEnum.IMAGE_RECOGNIZE_ERROR, + BaiduSdkErrorEnum.INVALID_ARGUMENT.value[0]: BaiduSdkErrorEnum.INVALID_ARGUMENT, + BaiduSdkErrorEnum.INTERNAL_ERROR_2.value[0]: BaiduSdkErrorEnum.INTERNAL_ERROR_2, + BaiduSdkErrorEnum.INVALID_ARGUMENT_2.value[0]: BaiduSdkErrorEnum.INVALID_ARGUMENT_2, + BaiduSdkErrorEnum.SDK_IMAGE_SIZE_ERROR.value[0]: BaiduSdkErrorEnum.SDK_IMAGE_SIZE_ERROR, + BaiduSdkErrorEnum.SDK_IMAGE_LENGTH_ERROR.value[0]: BaiduSdkErrorEnum.SDK_IMAGE_LENGTH_ERROR, + BaiduSdkErrorEnum.SDK_READ_IMAGE_FILE_ERROR.value[0]: BaiduSdkErrorEnum.SDK_READ_IMAGE_FILE_ERROR, + BaiduSdkErrorEnum.SDK_CONNECTION_OR_READ_DATA_TIME_OUT.value[0]: BaiduSdkErrorEnum.SDK_CONNECTION_OR_READ_DATA_TIME_OUT, + BaiduSdkErrorEnum.SDK_UNSUPPORTED_IMAGE_FORMAT.value[0]: BaiduSdkErrorEnum.SDK_UNSUPPORTED_IMAGE_FORMAT, + BaiduSdkErrorEnum.URLS_NOT_EXIT.value[0]: BaiduSdkErrorEnum.URLS_NOT_EXIT, + BaiduSdkErrorEnum.URL_FORMAT_ILLEGAL.value[0]: BaiduSdkErrorEnum.URL_FORMAT_ILLEGAL, + BaiduSdkErrorEnum.URL_DOWNLOAD_TIMEOUT.value[0]: BaiduSdkErrorEnum.URL_DOWNLOAD_TIMEOUT, + BaiduSdkErrorEnum.URL_RESPONSE_INVALID.value[0]: BaiduSdkErrorEnum.URL_RESPONSE_INVALID +} + +@unique +class VehicleEnum(Enum): + CAR = ("car", "小汽车", 0) + TRICYCLE = ("tricycle", "三轮车", 1) + MOTORBIKE = ("motorbike", "摩托车", 2) + CARPLATE = ("carplate", "车牌", 3) + TRUCK = ("truck", "卡车", 4) + BUS = ("bus", "巴士", 5) + + +VehicleEnumVALUE={ + VehicleEnum.CAR.value[0]: VehicleEnum.CAR, + VehicleEnum.TRICYCLE.value[0]: VehicleEnum.TRICYCLE, + VehicleEnum.MOTORBIKE.value[0]: VehicleEnum.MOTORBIKE, + VehicleEnum.CARPLATE.value[0]: VehicleEnum.CARPLATE, + VehicleEnum.TRUCK.value[0]: VehicleEnum.TRUCK, + VehicleEnum.BUS.value[0]: VehicleEnum.BUS +} \ No newline at end of file diff --git a/DrGraph/enums/ExceptionEnum.py b/DrGraph/enums/ExceptionEnum.py new file mode 100644 index 0000000..59859b7 --- /dev/null +++ b/DrGraph/enums/ExceptionEnum.py @@ -0,0 +1,86 @@ +from enum import Enum, unique + + +# 异常枚举 +@unique +class ExceptionType(Enum): + + OR_VIDEO_ADDRESS_EXCEPTION = ("SP000", "未拉取到视频流, 请检查拉流地址是否有视频流!") + + ANALYSE_TIMEOUT_EXCEPTION = ("SP001", "AI分析超时!") + + PULLSTREAM_TIMEOUT_EXCEPTION = ("SP002", "原视频拉流超时!") + + READSTREAM_TIMEOUT_EXCEPTION = ("SP003", "原视频读取视频流超时!") + + GET_VIDEO_URL_EXCEPTION = ("SP004", "获取视频播放地址失败!") + + GET_VIDEO_URL_TIMEOUT_EXCEPTION = ("SP005", "获取原视频播放地址超时!") + + PULL_STREAM_URL_EXCEPTION = ("SP006", "拉流地址不能为空!") + + PUSH_STREAM_URL_EXCEPTION = ("SP007", "推流地址不能为空!") + + PUSH_STREAM_TIME_EXCEPTION = ("SP008", "未生成本地视频地址!") + + AI_MODEL_MATCH_EXCEPTION = ("SP009", "未匹配到对应的AI模型!") + + ILLEGAL_PARAMETER_FORMAT = ("SP010", "非法参数格式!") + + PUSH_STREAMING_CHANNEL_IS_OCCUPIED = ("SP011", "推流通道可能被占用, 请稍后再试!") + + VIDEO_RESOLUTION_EXCEPTION = ("SP012", "不支持该分辨率类型的视频,请切换分辨率再试!") + + READ_IAMGE_URL_EXCEPTION = ("SP013", "未能解析图片地址!") + + DETECTION_TARGET_TYPES_ARE_NOT_SUPPORTED = ("SP014", "不支持该类型的检测目标!") + + WRITE_STREAM_EXCEPTION = ("SP015", "写流异常!") + + OR_VIDEO_DO_NOT_EXEIST_EXCEPTION = ("SP016", "原视频不存在!") + + MODEL_LOADING_EXCEPTION = ("SP017", "模型加载异常!") + + MODEL_ANALYSE_EXCEPTION = ("SP018", "算法模型分析异常!") + + AI_MODEL_CONFIG_EXCEPTION = ("SP019", "模型配置不能为空!") + + AI_MODEL_GET_CONFIG_EXCEPTION = ("SP020", "获取模型配置异常, 请检查模型配置是否正确!") + + MODEL_GROUP_LIMIT_EXCEPTION = ("SP021", "模型组合个数超过限制!") + + MODEL_NOT_SUPPORT_VIDEO_EXCEPTION = ("SP022", "%s不支持视频识别!") + + MODEL_NOT_SUPPORT_IMAGE_EXCEPTION = ("SP023", "%s不支持图片识别!") + + THE_DETECTION_TARGET_CANNOT_BE_EMPTY = ("SP024", "检测目标不能为空!") + + URL_ADDRESS_ACCESS_FAILED = ("SP025", "URL地址访问失败, 请检测URL地址是否正确!") + + UNIVERSAL_TEXT_RECOGNITION_FAILED = ("SP026", "识别失败!") + + COORDINATE_ACQUISITION_FAILED = ("SP027", "飞行坐标识别异常!") + + PUSH_STREAM_EXCEPTION = ("SP028", "推流异常!") + + MODEL_DUPLICATE_EXCEPTION = ("SP029", "存在重复模型配置!") + + DETECTION_TARGET_NOT_SUPPORT = ("SP031", "存在不支持的检测目标!") + + TASK_EXCUTE_TIMEOUT = ("SP032", "任务执行超时!") + + PUSH_STREAM_URL_IS_NULL = ("SP033", "拉流、推流地址不能为空!") + + PULL_STREAM_NUM_LIMIT_EXCEPTION = ("SP034", "转推流数量超过限制!") + + NOT_REQUESTID_TASK_EXCEPTION = ("SP993", "未查询到该任务,无法停止任务!") + + NO_RESOURCES = ("SP995", "服务器暂无资源可以使用,请稍后30秒后再试!") + + NO_CPU_RESOURCES = ("SP996", "暂无CPU资源可以使用,请稍后再试!") + + SERVICE_COMMON_EXCEPTION = ("SP997", "公共服务异常!") + + NO_GPU_RESOURCES = ("SP998", "暂无GPU资源可以使用,请稍后再试!") + + SERVICE_INNER_EXCEPTION = ("SP999", "系统内部异常!") diff --git a/DrGraph/enums/ModelTypeEnum2.py b/DrGraph/enums/ModelTypeEnum2.py new file mode 100644 index 0000000..b462e3f --- /dev/null +++ b/DrGraph/enums/ModelTypeEnum2.py @@ -0,0 +1,762 @@ +import sys +from enum import Enum, unique + +from DrGraph.util.Constant import COLOR + +sys.path.extend(['..', '../AIlib2']) +from segutils.segmodel import SegModel +from utilsK.queRiver import riverDetSegMixProcess_N +from segutils.trafficUtils import tracfficAccidentMixFunction_N +from utilsK.drownUtils import mixDrowing_water_postprocess_N +from utilsK.noParkingUtils import mixNoParking_road_postprocess_N +from utilsK.illParkingUtils import illParking_postprocess +from DMPR import DMPRModel +from DMPRUtils.jointUtil import dmpr_yolo +from yolov5 import yolov5Model +from stdc import stdcModel +from AI import default_mix +from DMPRUtils.jointUtil import dmpr_yolo_stdc + +''' +参数说明 +1. 编号 +2. 模型编号 +3. 模型名称 +4. 选用的模型名称 +''' + + +@unique +class ModelType2(Enum): + WATER_SURFACE_MODEL = ("1", "001", "河道模型", 'river', lambda device, gpuName: { + 'device': device, + 'labelnames': ["排口", "水生植被", "其它", "漂浮物", "污染排口", "菜地", "违建", "岸坡垃圾"], + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [0,1,2,3,4,5,6,7] ],###控制哪些检测类别显示、输出 + 'trackPar': { + 'sort_max_age': 2, # 跟踪链断裂时允许目标消失最大的次数。超过之后,会认为是新的目标。 + 'sort_min_hits': 3, # 每隔目标连续出现的次数,超过这个次数才认为是一个目标。 + 'sort_iou_thresh': 0.2, # 检测最小的置信度。 + 'det_cnt': 10, # 每隔几次做一个跟踪和检测,默认10。 + 'windowsize': 29, # 轨迹平滑长度,一定是奇数,表示每隔几帧做一平滑,默认29。一个目标在多个帧中出现,每一帧中都有一个位置,这些位置的连线交轨迹。 + 'patchCnt': 100, # 每次送入图像的数量,不宜少于100帧。 + }, + 'postProcess':{'function':riverDetSegMixProcess_N,'pars':{'slopeIndex':[1,3,4,7], 'riverIou':0.1}}, #分割和检测混合处理的函数 + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.45, + "classes": 5, + "rainbows": COLOR + }, + 'txtFontSize': 80, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'segLineShow': False, + 'waterLineColor': (0, 255, 255), + 'waterLineWidth': 3 + }, + 'models': + [ + { + 'weight':"../AIlib2/weights/river/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ + 'half':True, + 'device':'cuda:0' , + 'conf_thres':0.25, + 'iou_thres':0.45, + 'allowedList':[0,1,2,3], + 'segRegionCnt':1, + 'trtFlag_det':False, + 'trtFlag_seg':False, + "score_byClass":{"0":0.25,"1":0.3,"2":0.3,"3":0.3 } }, + }, + { + 'weight':'../AIlib2/weights/conf/river/stdc_360X640.pth', + 'par':{ + 'modelSize':(640,360), + 'mean':(0.485, 0.456, 0.406), + 'std' :(0.229, 0.224, 0.225), + 'numpy':False, + 'RGB_convert_first':True, + 'seg_nclass':2},###分割模型预处理参数 + 'model':stdcModel, + 'name':'stdc' + } + + ], + }) + + FOREST_FARM_MODEL = ("2", "002", "森林模型", 'forest2', lambda device, gpuName: { + 'device': device, + 'labelnames': ["林斑", "病死树", "行人", "火焰", "烟雾"], + 'models': + [ + { + 'weight':"../AIlib2/weights/forest2/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ 'half':True, + 'device':'cuda:0' , + 'conf_thres':0.25, + 'iou_thres':0.45, + 'allowedList':[0,1,2,3], + 'segRegionCnt':1, + 'trtFlag_det':False, + 'trtFlag_seg':False, + "score_byClass":{"0":0.25,"1":0.3,"2":0.3,"3":0.3 } + }, + } + ], + 'trackPar':{'sort_max_age':2,'sort_min_hits':3,'sort_iou_thresh':0.2,'det_cnt':10,'windowsize':29,'patchCnt':100}, + 'postProcess':{'function':default_mix,'pars':{ }}, + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.45, + "classes": 5, + "rainbows": COLOR + }, + 'txtFontSize': 80, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'segLineShow': False, + 'waterLineColor': (0, 255, 255), + 'waterLineWidth': 3 + } + }) + + TRAFFIC_FARM_MODEL = ("3", "003", "交通模型", 'highWay2', lambda device, gpuName: { + 'device': device, + 'labelnames': ["行人", "车辆", "纵向裂缝", "横向裂缝", "修补", "网状裂纹", "坑槽", "块状裂纹", "积水", "事故"], + 'trackPar':{'sort_max_age':2,'sort_min_hits':3,'sort_iou_thresh':0.2,'det_cnt':5,'windowsize':29,'patchCnt':100}, + 'postProcess':{ + 'function':tracfficAccidentMixFunction_N, + 'pars':{ + 'RoadArea': 16000, + 'vehicleArea': 10, + 'roadVehicleAngle': 15, + 'speedRoadVehicleAngleMax': 75, + 'radius': 50 , + 'roundness': 1.0, + 'cls': 9, + 'vehicleFactor': 0.1, + 'cls':9, + 'confThres':0.25, + 'roadIou':0.6, + 'vehicleFlag':False, + 'distanceFlag': False, + 'modelSize':(640,360), + } + }, + 'models': + [ + { + 'weight':"../AIlib2/weights/highWay2/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ + 'half':True, + 'device':'cuda:0' , + 'conf_thres':0.25, + 'iou_thres':0.45, + 'allowedList':[0,1,2,3], + 'segRegionCnt':1, + 'trtFlag_det':False, + 'trtFlag_seg':False, + "score_byClass":{"0":0.25,"1":0.3,"2":0.3,"3":0.3 } }, + }, + { + 'weight':'../AIlib2/weights/conf/highWay2/stdc_360X640.pth', + 'par':{ + 'modelSize':(640,360), + 'mean':(0.485, 0.456, 0.406), + 'std' :(0.229, 0.224, 0.225), + 'predResize':True, + 'numpy':False, + 'RGB_convert_first':True, + 'seg_nclass':3},###分割模型预处理参数 + 'model':stdcModel, + 'name':'stdc' + } + ], + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [0,1,2,3,5,6,7,8,9] ],###控制哪些检测类别显示、输出 + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.25, + "classes": 9, + "rainbows": COLOR + }, + 'txtFontSize': 20, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'waterLineColor': (0, 255, 255), + 'segLineShow': False, + 'waterLineWidth': 2 + } + }) + + EPIDEMIC_PREVENTION_MODEL = ("4", "004", "防疫模型", None, None) + + PLATE_MODEL = ("5", "005", "车牌模型", None, None) + + VEHICLE_MODEL = ("6", "006", "车辆模型", 'vehicle', lambda device, gpuName: { + 'device': device, + 'labelnames': ["车辆"], + 'trackPar':{'sort_max_age':2,'sort_min_hits':3,'sort_iou_thresh':0.2,'det_cnt':10,'windowsize':29,'patchCnt':100}, + 'postProcess':{'function':default_mix,'pars':{ }}, + 'models': + [ + { + 'weight':"../AIlib2/weights/vehicle/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ 'half':True, + 'device':'cuda:0' , + 'conf_thres':0.25, + 'iou_thres':0.45, + 'allowedList':[0,1,2,3], + 'segRegionCnt':1, + 'trtFlag_det':False, + 'trtFlag_seg':False, + "score_byClass":{"0":0.25,"1":0.3,"2":0.3,"3":0.3 } }, + } + ], + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [0,1,2,3,4,5,6] ],###控制哪些检测类别显示、输出 + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.45, + "classes": 5, + "rainbows": COLOR + }, + 'txtFontSize': 40, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'waterLineColor': (0, 255, 255), + 'segLineShow': False, + 'waterLineWidth': 3 + } + }) + + PEDESTRIAN_MODEL = ("7", "007", "行人模型", 'pedestrian', lambda device, gpuName: { + 'device': device, + 'labelnames': ["行人"], + 'trackPar':{'sort_max_age':2,'sort_min_hits':3,'sort_iou_thresh':0.2,'det_cnt':10,'windowsize':29,'patchCnt':100}, + 'postProcess':{'function':default_mix,'pars':{ }}, + 'models': + [ + { + 'weight':"../AIlib2/weights/pedestrian/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'allowedList':[0,1,2,3],'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False, "score_byClass":{"0":0.25,"1":0.3,"2":0.3,"3":0.3 } }, + } + ], + + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [0,1,2,3,4,5,6] ],###控制哪些检测类别显示、输出 + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.45, + "classes": 5, + "rainbows": COLOR + }, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'segLineShow': False, + 'waterLineColor': (0, 255, 255), + 'waterLineWidth': 3 + } + }) + + SMOGFIRE_MODEL = ("8", "008", "烟火模型", 'smogfire', lambda device, gpuName: { + 'device': device, + 'labelnames': ["烟雾", "火焰"], + 'trackPar':{'sort_max_age':2,'sort_min_hits':3,'sort_iou_thresh':0.2,'det_cnt':10,'windowsize':29,'patchCnt':100}, + 'postProcess':{'function':default_mix,'pars':{ }}, + 'models': + [ + { + 'weight':"../AIlib2/weights/smogfire/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + #'weight':'../AIlib2/weights/conf/%s/yolov5.pt'%(opt['business'] ), + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'allowedList':[0,1,2,3],'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False, "score_byClass":{"0":0.25,"1":0.3,"2":0.3,"3":0.3 } }, + } + ], + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [0,1,2,3,4,5,6] ],###控制哪些检测类别显示、输出 + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.45, + "classes": 5, + "rainbows": COLOR + }, + 'txtFontSize': 40, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'segLineShow': False, + 'waterLineColor': (0, 255, 255), + 'waterLineWidth': 3 + } + }) + + ANGLERSWIMMER_MODEL = ("9", "009", "钓鱼游泳模型", 'AnglerSwimmer', lambda device, gpuName: { + 'device': device, + 'labelnames': ["钓鱼", "游泳"], + 'trackPar':{'sort_max_age':2,'sort_min_hits':3,'sort_iou_thresh':0.2,'det_cnt':10,'windowsize':29,'patchCnt':100}, + 'postProcess':{'function':default_mix,'pars':{ }}, + 'models': + [ + { + 'weight':"../AIlib2/weights/AnglerSwimmer/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'allowedList':[0,1,2,3],'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False, "score_byClass":{"0":0.25,"1":0.3,"2":0.3,"3":0.3 } }, + } + ], + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [0,1,2,3,4,5,6] ],###控制哪些检测类别显示、输出 + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.45, + "classes": 5, + "rainbows": COLOR + }, + 'txtFontSize': 40, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'segLineShow': False, + 'waterLineColor': (0, 255, 255), + 'waterLineWidth': 3 + }, + }) + + COUNTRYROAD_MODEL = ("10", "010", "乡村模型", 'countryRoad', lambda device, gpuName: { + 'device': device, + 'labelnames': ["违法种植"], + 'trackPar':{'sort_max_age':2,'sort_min_hits':3,'sort_iou_thresh':0.2,'det_cnt':10,'windowsize':29,'patchCnt':100}, + 'postProcess':{'function':default_mix,'pars':{ }}, + 'models': + [ + { + 'weight':"../AIlib2/weights/countryRoad/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'allowedList':[0,1,2,3],'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False, "score_byClass":{"0":0.25,"1":0.3,"2":0.3,"3":0.3 } }, + } + ], + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [0,1,2,3,4,5,6] ],###控制哪些检测类别显示、输出 + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.45, + "classes": 5, + "rainbows": COLOR + }, + 'txtFontSize': 40, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'segLineShow': False, + 'waterLineColor': (0, 255, 255), + 'waterLineWidth': 3 + } + }) + + SHIP_MODEL = ("11", "011", "船只模型", 'ship2', lambda device, gpuName: { + 'obbModelPar': { + 'labelnames': ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "船只"], + 'model_size': (608, 608), + 'K': 100, + 'conf_thresh': 0.3, + 'down_ratio': 4, + 'num_classes': 15, + 'dataset': 'dota', + 'heads': { + 'hm': None, + 'wh': 10, + 'reg': 2, + 'cls_theta': 1 + }, + 'mean': (0.5, 0.5, 0.5), + 'std': (1, 1, 1), + 'half': False, + 'test_flag': True, + 'decoder': None, + 'weights': '../AIlib2/weights/ship2/obb_608X608_%s_fp16.engine' % gpuName + }, + 'trackPar': { + 'sort_max_age': 2, # 跟踪链断裂时允许目标消失最大的次数。超过之后,会认为是新的目标。 + 'sort_min_hits': 3, # 每隔目标连续出现的次数,超过这个次数才认为是一个目标。 + 'sort_iou_thresh': 0.2, # 检测最小的置信度。 + 'det_cnt': 10, # 每隔几次做一个跟踪和检测,默认10。 + 'windowsize': 29, # 轨迹平滑长度,一定是奇数,表示每隔几帧做一平滑,默认29。一个目标在多个帧中出现,每一帧中都有一个位置,这些位置的连线交轨迹。 + 'patchCnt': 100, # 每次送入图像的数量,不宜少于100帧。 + }, + 'device': "cuda:%s" % device, + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.45, + "classes": 5, + "rainbows": COLOR + }, + 'drawBox': False, + 'drawPar': { + "rainbows": COLOR, + 'digitWordFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'wordSize': 40, + 'fontSize': 1.0, + 'label_location': 'leftTop' + } + }, + 'labelnames': ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "船只"] + }) + + BAIDU_MODEL = ("12", "012", "百度AI图片识别模型", None, None) + + CHANNEL_EMERGENCY_MODEL = ("13", "013", "航道模型", 'channelEmergency', lambda device, gpuName: { + 'device': device, + 'labelnames': ["人"], + 'trackPar':{'sort_max_age':2,'sort_min_hits':3,'sort_iou_thresh':0.2,'det_cnt':10,'windowsize':29,'patchCnt':100}, + 'postProcess':{'function':default_mix,'pars':{ }}, + 'models': + [ + { + 'weight':"../AIlib2/weights/channelEmergency/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + #'weight':'../AIlib2/weights/conf/%s/yolov5.pt'%(opt['business'] ), + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'allowedList':[0,1,2,3],'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False, "score_byClass":{"0":0.25,"1":0.3,"2":0.3,"3":0.3 } }, + } + ], + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [] ],###控制哪些检测类别显示、输出 + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.45, + "classes": 5, + "rainbows": COLOR + }, + 'txtFontSize': 40, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'segLineShow': False, + 'waterLineColor': (0, 255, 255), + 'waterLineWidth': 3 + } + }) + + RIVER2_MODEL = ("15", "015", "河道检测模型", 'river2', lambda device, gpuName: { + 'device': device, + 'labelnames': ["漂浮物", "岸坡垃圾", "排口", "违建", "菜地", "水生植物", "河湖人员", "钓鱼人员", "船只", + "蓝藻"], + 'trackPar':{'sort_max_age':2,'sort_min_hits':3,'sort_iou_thresh':0.2,'det_cnt':10,'windowsize':29,'patchCnt':100}, + 'postProcess':{'function':riverDetSegMixProcess_N,'pars':{'slopeIndex':[1,3,4,7], 'riverIou':0.1}}, #分割和检测混合处理的函数 + 'models': + [ + { + 'weight':"../AIlib2/weights/river2/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'allowedList':[0,1,2,3],'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False, "score_byClass":{"0":0.25,"1":0.3,"2":0.3,"3":0.3 } }, + }, + { + 'weight':'../AIlib2/weights/conf/river2/stdc_360X640.pth', + 'par':{ + 'modelSize':(640,360),'mean':(0.485, 0.456, 0.406),'std' :(0.229, 0.224, 0.225),'numpy':False, 'RGB_convert_first':True,'seg_nclass':2},###分割模型预处理参数 + 'model':stdcModel, + 'name':'stdc' + } + ], + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [0,1,2,3,4,5,6] ],###控制哪些检测类别显示、输出 + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.3, + "ovlap_thres_crossCategory": 0.65, + "classes": 5, + "rainbows": COLOR + }, + 'txtFontSize': 80, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'segLineShow': False, + 'waterLineColor': (0, 255, 255), + 'waterLineWidth': 3 + } + }) + + CITY_MANGEMENT_MODEL = ("16", "016", "城管模型", 'cityMangement2', lambda device, gpuName: { + 'device': device, + 'labelnames': ["车辆", "垃圾", "商贩", "违停"], + 'trackPar':{'sort_max_age':2,'sort_min_hits':3,'sort_iou_thresh':0.2,'det_cnt':5,'windowsize':29,'patchCnt':100}, + 'postProcess':{ + 'function':dmpr_yolo_stdc, + 'pars':{'carCls':0 ,'illCls':3,'scaleRatio':0.5,'border':80} + }, + 'models':[ + { + 'weight':"../AIlib2/weights/cityMangement3/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'allowedList':[0,1,2,3],'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False, "score_byClass":{"0":0.8,"1":0.5,"2":0.5,"3":0.5 } } + + }, + { + 'weight':"../AIlib2/weights/cityMangement3/dmpr_%s.engine"% gpuName,###DMPR模型路径 + 'par':{ + 'depth_factor':32,'NUM_FEATURE_MAP_CHANNEL':6,'dmpr_thresh':0.3, 'dmprimg_size':640, + 'name':'dmpr' + }, + 'model':DMPRModel, + 'name':'dmpr' + }, + { + 'weight':"../AIlib2/weights/cityMangement3/stdc_360X640_%s_fp16.engine"% gpuName,###分割模型路径 + 'par':{ + 'modelSize':(640,360),'mean':(0.485, 0.456, 0.406),'std' :(0.229, 0.224, 0.225),'predResize':True,'numpy':False, 'RGB_convert_first':True,'seg_nclass':2},###分割模型预处理参数 + 'model':stdcModel, + 'name':'stdc' + + } + ], + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [0,1,2,3,5,6,7,8,9] ],###控制哪些检测类别显示、输出 + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.45, + "classes": 5, + "rainbows": COLOR + }, + 'txtFontSize': 20, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'segLineShow': False, + 'waterLineColor': (0, 255, 255), + 'waterLineWidth': 2 + } + }) + + DROWING_MODEL = ("17", "017", "人员落水模型", 'drowning', lambda device, gpuName: { + 'device': device, + 'labelnames': ["人头", "人", "船只"], + 'trackPar':{'sort_max_age':2,'sort_min_hits':3,'sort_iou_thresh':0.2,'det_cnt':10,'windowsize':29,'patchCnt':100}, + 'postProcess':{'function':mixDrowing_water_postprocess_N, + 'pars':{ }}, + 'models': + [ + { + 'weight':"../AIlib2/weights/drowning/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'allowedList':[0,1,2,3],'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False, "score_byClass":{"0":0.25,"1":0.3,"2":0.3,"3":0.3 } }, + }, + { + 'weight':'../AIlib2/weights/conf/drowning/stdc_360X640.pth', + 'par':{ + 'modelSize':(640,360),'mean':(0.485, 0.456, 0.406),'std' :(0.229, 0.224, 0.225),'predResize':True,'numpy':False, 'RGB_convert_first':True,'seg_nclass':2},###分割模型预处理参数 + 'model':stdcModel, + 'name':'stdc' + } + ], + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [0,1,2,3,5,6,7,8,9] ],###控制哪些检测类别显示、输出 + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.25, + "classes": 9, + "rainbows": COLOR + }, + 'txtFontSize': 20, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'waterLineColor': (0, 255, 255), + 'segLineShow': False, + 'waterLineWidth': 2 + } + }) + + NOPARKING_MODEL = ( + "18", "018", "城市违章模型", 'noParking', lambda device, gpuName: { + 'device': device, + 'labelnames': ["车辆", "违停"], + 'trackPar':{'sort_max_age':2,'sort_min_hits':3,'sort_iou_thresh':0.2,'det_cnt':10,'windowsize':29,'patchCnt':100}, + 'postProcess':{'function':mixNoParking_road_postprocess_N, + 'pars': { 'roundness': 0.3, 'cls': 9, 'laneArea': 10, 'laneAngleCha': 5 ,'RoadArea': 16000,'fitOrder':2, 'modelSize':(640,360)} + } , + 'models': + [ + { + 'weight':"../AIlib2/weights/noParking/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'allowedList':[0,1,2,3],'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False, "score_byClass":{"0":0.25,"1":0.3,"2":0.3,"3":0.3 } }, + }, + { + 'weight':'../AIlib2/weights/conf/noParking/stdc_360X640.pth', + 'par':{ + 'modelSize':(640,360),'mean':(0.485, 0.456, 0.406),'std' :(0.229, 0.224, 0.225),'predResize':True,'numpy':False, 'RGB_convert_first':True,'seg_nclass':4},###分割模型预处理参数 + 'model':stdcModel, + 'name':'stdc' + } + ], + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [0,1,2,3,5,6,7,8,9] ],###控制哪些检测类别显示、输出 + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.25, + "classes": 9, + "rainbows": COLOR + }, + 'txtFontSize': 20, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'waterLineColor': (0, 255, 255), + 'segLineShow': False, + 'waterLineWidth': 2 + } + } + ) + + CITYROAD_MODEL = ("20", "020", "城市公路模型", 'cityRoad', lambda device, gpuName: { + 'device': device, + 'labelnames': ["护栏", "交通标志", "非交通标志", "施工", "施工"], + 'trackPar':{'sort_max_age':2,'sort_min_hits':3,'sort_iou_thresh':0.2,'det_cnt':10,'windowsize':29,'patchCnt':100}, + 'postProcess':{'function':default_mix,'pars':{ }}, + 'models': + [ + { + 'weight':"../AIlib2/weights/cityRoad/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.8,'iou_thres':0.45,'allowedList':[0,1,2,3],'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False, "score_byClass":{"0":0.25,"1":0.3,"2":0.3,"3":0.3 } }, + } + ], + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [0,1,2,3,4,5,6] ],###控制哪些检测类别显示、输出 + 'postFile': { + "name": "post_process", + "conf_thres": 0.8, + "iou_thres": 0.45, + "classes": 5, + "rainbows": COLOR + }, + 'txtFontSize': 40, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'segLineShow': False, + 'waterLineColor': (0, 255, 255), + 'waterLineWidth': 3 + } + }) + + POTHOLE_MODEL = ("23", "023", "坑槽检测模型", 'pothole', lambda device, gpuName: { # 目前集成到另外的模型中去了 不单独使用 + 'device': device, + 'labelnames': ["坑槽"], + 'trackPar':{'sort_max_age':2,'sort_min_hits':3,'sort_iou_thresh':0.2,'det_cnt':3,'windowsize':29,'patchCnt':100}, + 'postProcess':{'function':default_mix,'pars':{ }}, + 'models': + [ + { + 'weight':"../AIlib2/weights/pothole/yolov5_%s_fp16.engine"% gpuName,###检测模型路径 + 'name':'yolov5', + 'model':yolov5Model, + 'par':{ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'allowedList':[0,1,2,3],'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False, "score_byClass":{"0":0.25,"1":0.3,"2":0.3,"3":0.3}}, + } + ], + 'detModelpara':[{"id":str(x),"config":{"k1":"v1","k2":"v2"}} for x in [0]],###控制哪些检测类别显示、输出 + 'postFile': { + "name": "post_process", + "conf_thres": 0.25, + "iou_thres": 0.45, + "classes": 5, + "rainbows": COLOR + }, + 'txtFontSize': 40, + 'digitFont': { + 'line_thickness': 2, + 'boxLine_thickness': 1, + 'fontSize': 1.0, + 'segLineShow': False, + 'waterLineColor': (0, 255, 255), + 'waterLineWidth': 3 + }, + }) + + + @staticmethod + def checkCode(code): + for model in ModelType2: + if model.value[1] == code: + return True + return False + + +''' + 参数1: 检测目标名称 + 参数2: 检测目标 + 参数3: 初始化百度检测客户端 +''' + + +@unique +class BaiduModelTarget2(Enum): + VEHICLE_DETECTION = ( + "车辆检测", 0, lambda client0, client1, url, request_id: client0.vehicleDetectUrl(url, request_id)) + + HUMAN_DETECTION = ( + "人体检测与属性识别", 1, lambda client0, client1, url, request_id: client1.bodyAttr(url, request_id)) + + PEOPLE_COUNTING = ("人流量统计", 2, lambda client0, client1, url, request_id: client1.bodyNum(url, request_id)) + + +BAIDU_MODEL_TARGET_CONFIG2 = { + BaiduModelTarget2.VEHICLE_DETECTION.value[1]: BaiduModelTarget2.VEHICLE_DETECTION, + BaiduModelTarget2.HUMAN_DETECTION.value[1]: BaiduModelTarget2.HUMAN_DETECTION, + BaiduModelTarget2.PEOPLE_COUNTING.value[1]: BaiduModelTarget2.PEOPLE_COUNTING +} + +EPIDEMIC_PREVENTION_CONFIG = {1: "行程码", 2: "健康码"} + + +# 模型分析方式 +@unique +class ModelMethodTypeEnum2(Enum): + # 方式一: 正常识别方式 + NORMAL = 1 + + # 方式二: 追踪识别方式 + TRACE = 2 diff --git a/DrGraph/enums/RecordingStatusEnum.py b/DrGraph/enums/RecordingStatusEnum.py new file mode 100644 index 0000000..c7bcad7 --- /dev/null +++ b/DrGraph/enums/RecordingStatusEnum.py @@ -0,0 +1,18 @@ +from enum import Enum, unique + + +# 录屏状态枚举 +@unique +class RecordingStatus(Enum): + + RECORDING_WAITING = ("5", "待录制") + + RECORDING_RETRYING = ("10", "重试中") + + RECORDING_RUNNING = ("15", "录制中") + + RECORDING_SUCCESS = ("20", "录制完成") + + RECORDING_TIMEOUT = ("25", "录制超时") + + RECORDING_FAILED = ("30", "录制失败") diff --git a/DrGraph/enums/StatusEnum.py b/DrGraph/enums/StatusEnum.py new file mode 100644 index 0000000..0a8c4b3 --- /dev/null +++ b/DrGraph/enums/StatusEnum.py @@ -0,0 +1,33 @@ +from enum import Enum, unique + + +@unique +class PushStreamStatus(Enum): + WAITING = (5, "待推流") + + RETRYING = (10, "重试中") + + RUNNING = (15, "推流中") + + STOPPING = (20, "停止中") + + SUCCESS = (25, "完成") + + TIMEOUT = (30, "超时") + + FAILED = (35, "失败") + + +@unique +class ExecuteStatus(Enum): + WAITING = (5, "待执行") + + RUNNING = (10, "执行中") + + STOPPING = (15, "停止中") + + SUCCESS = (20, "执行完成") + + TIMEOUT = (25, "超时") + + FAILED = (30, "失败") diff --git a/DrGraph/enums/__init__.py b/DrGraph/enums/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/DrGraph/enums/__pycache__/AnalysisStatusEnum.cpython-310.pyc b/DrGraph/enums/__pycache__/AnalysisStatusEnum.cpython-310.pyc new file mode 100644 index 0000000..2fb5211 Binary files /dev/null and b/DrGraph/enums/__pycache__/AnalysisStatusEnum.cpython-310.pyc differ diff --git a/DrGraph/enums/__pycache__/AnalysisStatusEnum.cpython-38.pyc b/DrGraph/enums/__pycache__/AnalysisStatusEnum.cpython-38.pyc new file mode 100644 index 0000000..c675f37 Binary files /dev/null and b/DrGraph/enums/__pycache__/AnalysisStatusEnum.cpython-38.pyc differ diff --git a/DrGraph/enums/__pycache__/AnalysisTypeEnum.cpython-310.pyc b/DrGraph/enums/__pycache__/AnalysisTypeEnum.cpython-310.pyc new file mode 100644 index 0000000..c92dbb7 Binary files /dev/null and b/DrGraph/enums/__pycache__/AnalysisTypeEnum.cpython-310.pyc differ diff --git a/DrGraph/enums/__pycache__/AnalysisTypeEnum.cpython-38.pyc b/DrGraph/enums/__pycache__/AnalysisTypeEnum.cpython-38.pyc new file mode 100644 index 0000000..48b682c Binary files /dev/null and b/DrGraph/enums/__pycache__/AnalysisTypeEnum.cpython-38.pyc differ diff --git a/DrGraph/enums/__pycache__/BaiduSdkEnum.cpython-310.pyc b/DrGraph/enums/__pycache__/BaiduSdkEnum.cpython-310.pyc new file mode 100644 index 0000000..667d868 Binary files /dev/null and b/DrGraph/enums/__pycache__/BaiduSdkEnum.cpython-310.pyc differ diff --git a/DrGraph/enums/__pycache__/BaiduSdkEnum.cpython-38.pyc b/DrGraph/enums/__pycache__/BaiduSdkEnum.cpython-38.pyc new file mode 100644 index 0000000..1777100 Binary files /dev/null and b/DrGraph/enums/__pycache__/BaiduSdkEnum.cpython-38.pyc differ diff --git a/DrGraph/enums/__pycache__/ExceptionEnum.cpython-310.pyc b/DrGraph/enums/__pycache__/ExceptionEnum.cpython-310.pyc new file mode 100644 index 0000000..a8faef2 Binary files /dev/null and b/DrGraph/enums/__pycache__/ExceptionEnum.cpython-310.pyc differ diff --git a/DrGraph/enums/__pycache__/ExceptionEnum.cpython-38.pyc b/DrGraph/enums/__pycache__/ExceptionEnum.cpython-38.pyc new file mode 100644 index 0000000..81b1e66 Binary files /dev/null and b/DrGraph/enums/__pycache__/ExceptionEnum.cpython-38.pyc differ diff --git a/DrGraph/enums/__pycache__/ModelTypeEnum.cpython-310.pyc b/DrGraph/enums/__pycache__/ModelTypeEnum.cpython-310.pyc new file mode 100644 index 0000000..c9f50d4 Binary files /dev/null and b/DrGraph/enums/__pycache__/ModelTypeEnum.cpython-310.pyc differ diff --git a/DrGraph/enums/__pycache__/ModelTypeEnum.cpython-38.pyc b/DrGraph/enums/__pycache__/ModelTypeEnum.cpython-38.pyc new file mode 100644 index 0000000..6e84230 Binary files /dev/null and b/DrGraph/enums/__pycache__/ModelTypeEnum.cpython-38.pyc differ diff --git a/DrGraph/enums/__pycache__/ModelTypeEnum2.cpython-310.pyc b/DrGraph/enums/__pycache__/ModelTypeEnum2.cpython-310.pyc new file mode 100644 index 0000000..21c9570 Binary files /dev/null and b/DrGraph/enums/__pycache__/ModelTypeEnum2.cpython-310.pyc differ diff --git a/DrGraph/enums/__pycache__/ModelTypeEnum2.cpython-38.pyc b/DrGraph/enums/__pycache__/ModelTypeEnum2.cpython-38.pyc new file mode 100644 index 0000000..a0559d4 Binary files /dev/null and b/DrGraph/enums/__pycache__/ModelTypeEnum2.cpython-38.pyc differ diff --git a/DrGraph/enums/__pycache__/RecordingStatusEnum.cpython-310.pyc b/DrGraph/enums/__pycache__/RecordingStatusEnum.cpython-310.pyc new file mode 100644 index 0000000..dd3cdef Binary files /dev/null and b/DrGraph/enums/__pycache__/RecordingStatusEnum.cpython-310.pyc differ diff --git a/DrGraph/enums/__pycache__/RecordingStatusEnum.cpython-38.pyc b/DrGraph/enums/__pycache__/RecordingStatusEnum.cpython-38.pyc new file mode 100644 index 0000000..da4594e Binary files /dev/null and b/DrGraph/enums/__pycache__/RecordingStatusEnum.cpython-38.pyc differ diff --git a/DrGraph/enums/__pycache__/StatusEnum.cpython-310.pyc b/DrGraph/enums/__pycache__/StatusEnum.cpython-310.pyc new file mode 100644 index 0000000..d0bc0d3 Binary files /dev/null and b/DrGraph/enums/__pycache__/StatusEnum.cpython-310.pyc differ diff --git a/DrGraph/enums/__pycache__/StatusEnum.cpython-38.pyc b/DrGraph/enums/__pycache__/StatusEnum.cpython-38.pyc new file mode 100644 index 0000000..b58687e Binary files /dev/null and b/DrGraph/enums/__pycache__/StatusEnum.cpython-38.pyc differ diff --git a/DrGraph/enums/__pycache__/__init__.cpython-310.pyc b/DrGraph/enums/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..c9758aa Binary files /dev/null and b/DrGraph/enums/__pycache__/__init__.cpython-310.pyc differ diff --git a/DrGraph/enums/__pycache__/__init__.cpython-38.pyc b/DrGraph/enums/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..7e99132 Binary files /dev/null and b/DrGraph/enums/__pycache__/__init__.cpython-38.pyc differ diff --git a/DrGraph/util/Constant.py b/DrGraph/util/Constant.py new file mode 100644 index 0000000..1cd515d --- /dev/null +++ b/DrGraph/util/Constant.py @@ -0,0 +1,443 @@ +# -*- coding: utf-8 -*- +# 编码格式 +UTF_8 = "utf-8" + +# 文件读模式 +R = 'r' +ON_OR = "_on_or_" +ON_AI = "_on_ai_" +MP4 = ".mp4" +# 初始化进度 +init_progess = "0.0000" +# 进度100% +success_progess = "1.0000" + +# 拉流每帧图片缩小宽度大小限制, 大于1400像素缩小一半, 小于1400像素不变 +width = 1400 + +COLOR = ( + [255, 0, 0], + [211, 0, 148], + [0, 127, 0], + [0, 69, 255], + [0, 255, 0], + [255, 0, 255], + [0, 0, 127], + [127, 0, 255], + [255, 129, 0], + [139, 139, 0], + [255, 255, 0], + [127, 255, 0], + [0, 127, 255], + [0, 255, 127], + [255, 127, 255], + [8, 101, 139], + [171, 130, 255], + [139, 112, 74], + [205, 205, 180], + [0, 0, 255],) + +ONLINE = "online" +OFFLINE = "offline" +PHOTO = "photo" +RECORDING = "recording" + +ONLINE_START_SCHEMA = { + "request_id": { + 'type': 'string', + 'required': True, + 'empty': False, + 'regex': r'^[a-zA-Z0-9]{1,36}$' + }, + "command": { + 'type': 'string', + 'required': True, + 'allowed': ["start"] + }, + "pull_url": { + 'type': 'string', + 'required': True, + 'empty': False, + 'maxlength': 255 + }, + "push_url": { + 'type': 'string', + 'required': True, + 'empty': False, + 'maxlength': 255 + }, + "logo_url": { + 'type': 'string', + 'required': False, + 'nullable': True, + 'maxlength': 255 + }, + "models": { + 'type': 'list', + 'required': True, + 'nullable': False, + 'minlength': 1, + 'maxlength': 3, + 'schema': { + 'type': 'dict', + 'required': True, + 'schema': { + "code": { + 'type': 'string', + 'required': True, + 'empty': False, + 'dependencies': "categories", + 'regex': r'^[a-zA-Z0-9]{1,255}$' + }, + "is_video": { + 'type': 'string', + 'required': True, + 'empty': False, + 'dependencies': "code", + 'allowed': ["0", "1"] + }, + "is_image": { + 'type': 'string', + 'required': True, + 'empty': False, + 'dependencies': "code", + 'allowed': ["0", "1"] + }, + "categories": { + 'type': 'list', + 'required': True, + 'dependencies': "code", + 'schema': { + 'type': 'dict', + 'required': True, + 'schema': { + "id": { + 'type': 'string', + 'required': True, + 'empty': False, + 'regex': r'^[a-zA-Z0-9]{0,255}$'}, + "config": { + 'type': 'dict', + 'required': False, + 'dependencies': "id", + } + } + } + } + } + } + } +} + +ONLINE_STOP_SCHEMA = { + "request_id": { + 'type': 'string', + 'required': True, + 'empty': False, + 'regex': r'^[a-zA-Z0-9]{1,36}$' + }, + "command": { + 'type': 'string', + 'required': True, + 'allowed': ["stop"] + } +} + +OFFLINE_START_SCHEMA = { + "request_id": { + 'type': 'string', + 'required': True, + 'empty': False, + 'regex': r'^[a-zA-Z0-9]{1,36}$' + }, + "command": { + 'type': 'string', + 'required': True, + 'allowed': ["start"] + }, + "push_url": { + 'type': 'string', + 'required': True, + 'empty': False, + 'maxlength': 255 + }, + "pull_url": { + 'type': 'string', + 'required': True, + 'empty': False, + 'maxlength': 255 + }, + "logo_url": { + 'type': 'string', + 'required': False, + 'nullable': True, + 'maxlength': 255 + }, + "models": { + 'type': 'list', + 'required': True, + 'maxlength': 3, + 'minlength': 1, + 'schema': { + 'type': 'dict', + 'required': True, + 'schema': { + "code": { + 'type': 'string', + 'required': True, + 'empty': False, + 'dependencies': "categories", + 'regex': r'^[a-zA-Z0-9]{1,255}$' + }, + "is_video": { + 'type': 'string', + 'required': True, + 'empty': False, + 'dependencies': "code", + 'allowed': ["0", "1"] + }, + "is_image": { + 'type': 'string', + 'required': True, + 'empty': False, + 'dependencies': "code", + 'allowed': ["0", "1"] + }, + "categories": { + 'type': 'list', + 'required': True, + 'dependencies': "code", + 'schema': { + 'type': 'dict', + 'required': True, + 'schema': { + "id": { + 'type': 'string', + 'required': True, + 'empty': False, + 'regex': r'^[a-zA-Z0-9]{0,255}$'}, + "config": { + 'type': 'dict', + 'required': False, + 'dependencies': "id", + } + } + } + } + } + } + } +} + +OFFLINE_STOP_SCHEMA = { + "request_id": { + 'type': 'string', + 'required': True, + 'empty': False, + 'regex': r'^[a-zA-Z0-9]{1,36}$' + }, + "command": { + 'type': 'string', + 'required': True, + 'allowed': ["stop"] + } +} + +IMAGE_SCHEMA = { + "request_id": { + 'type': 'string', + 'required': True, + 'empty': False, + 'regex': r'^[a-zA-Z0-9]{1,36}$' + }, + "command": { + 'type': 'string', + 'required': True, + 'allowed': ["start"] + }, + "logo_url": { + 'type': 'string', + 'required': False, + 'nullable': True, + 'maxlength': 255 + }, + "image_urls": { + 'type': 'list', + 'required': True, + 'minlength': 1, + 'schema': { + 'type': 'string', + 'required': True, + 'empty': False, + 'maxlength': 5000 + } + }, + "models": { + 'type': 'list', + 'required': True, + 'schema': { + 'type': 'dict', + 'required': True, + 'schema': { + "code": { + 'type': 'string', + 'required': True, + 'empty': False, + 'dependencies': "categories", + 'regex': r'^[a-zA-Z0-9]{1,255}$' + }, + "is_video": { + 'type': 'string', + 'required': True, + 'empty': False, + 'dependencies': "code", + 'allowed': ["0", "1"] + }, + "is_image": { + 'type': 'string', + 'required': True, + 'empty': False, + 'dependencies': "code", + 'allowed': ["0", "1"] + }, + "categories": { + 'type': 'list', + 'required': True, + 'dependencies': "code", + 'schema': { + 'type': 'dict', + 'required': True, + 'schema': { + "id": { + 'type': 'string', + 'required': True, + 'empty': False, + 'regex': r'^[a-zA-Z0-9]{0,255}$'}, + "config": { + 'type': 'dict', + 'required': False, + 'dependencies': "id", + } + } + } + } + } + } + } +} + +RECORDING_START_SCHEMA = { + "request_id": { + 'type': 'string', + 'required': True, + 'empty': False, + 'regex': r'^[a-zA-Z0-9]{1,36}$' + }, + "command": { + 'type': 'string', + 'required': True, + 'allowed': ["start"] + }, + "pull_url": { + 'type': 'string', + 'required': True, + 'empty': False, + 'maxlength': 255 + }, + "push_url": { + 'type': 'string', + 'required': False, + 'empty': True, + 'maxlength': 255 + }, + "logo_url": { + 'type': 'string', + 'required': False, + 'nullable': True, + 'maxlength': 255 + } +} + +RECORDING_STOP_SCHEMA = { + "request_id": { + 'type': 'string', + 'required': True, + 'empty': False, + 'regex': r'^[a-zA-Z0-9]{1,36}$' + }, + "command": { + 'type': 'string', + 'required': True, + 'allowed': ["stop"] + } +} + +PULL2PUSH_START_SCHEMA = { + "request_id": { + 'type': 'string', + 'required': True, + 'empty': False, + 'regex': r'^[a-zA-Z0-9]{1,36}$' + }, + "command": { + 'type': 'string', + 'required': True, + 'allowed': ["start"] + }, + "video_urls": { + 'type': 'list', + 'required': True, + 'nullable': False, + 'schema': { + 'type': 'dict', + 'required': True, + 'schema': { + "id": { + 'type': 'string', + 'required': True, + 'empty': False, + 'dependencies': "pull_url", + 'regex': r'^[a-zA-Z0-9]{1,255}$' + }, + "pull_url": { + 'type': 'string', + 'required': True, + 'empty': False, + 'dependencies': "push_url", + 'regex': r'^(https|http|rtsp|rtmp|artc|webrtc|ws)://\w.+$' + }, + "push_url": { + 'type': 'string', + 'required': True, + 'empty': False, + 'dependencies': "id", + 'regex': r'^(https|http|rtsp|rtmp|artc|webrtc|ws)://\w.+$' + } + } + } + } +} +PULL2PUSH_STOP_SCHEMA = { + "request_id": { + 'type': 'string', + 'required': True, + 'empty': False, + 'regex': r'^[a-zA-Z0-9]{1,36}$' + }, + "command": { + 'type': 'string', + 'required': True, + 'allowed': ["start", "stop"] + }, + "video_ids": { + 'type': 'list', + 'required': False, + 'nullable': True, + 'schema': { + 'type': 'string', + 'required': True, + 'empty': False, + 'regex': r'^[a-zA-Z0-9]{1,255}$' + } + } +} diff --git a/DrGraph/util/LogUtils copy.py b/DrGraph/util/LogUtils copy.py new file mode 100644 index 0000000..58059a1 --- /dev/null +++ b/DrGraph/util/LogUtils copy.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +import sys +from os import makedirs +from os.path import join, exists +from loguru import logger +from util.RWUtils import getConfigs + +def S(*args, **kwargs): + """ + 将所有参数组合成字符串表示形式 + """ + # 将位置参数转换为字符串 + args_str = [str(arg) for arg in args] + + # 将关键字参数转换为字符串,格式为 key=value + kwargs_str = [f"{key}={value}" for key, value in kwargs.items()] + + # 合并所有参数并用逗号连接成一个字符串 + all_args = args_str + kwargs_str + return " ".join(all_args) + +# 初始化日志配置 +def init_log(base_dir, env): + log_config = getConfigs(join(base_dir, './appIOs/conf/logger/%s_logger.yml' % env)) + # 判断日志文件是否存在,不存在创建 + base_path = join(base_dir, log_config.get("base_path")) + if not exists(base_path): + makedirs(base_path) + # 移除日志设置 + logger.remove(handler_id=None) + # 打印日志到文件 + if bool(log_config.get("enable_file_log")): + logger.add(join(base_path, log_config.get("log_name")), + rotation=log_config.get("rotation"), + retention=log_config.get("retention"), + format=log_config.get("log_fmt"), + level=log_config.get("level"), + enqueue=True, + encoding=log_config.get("encoding")) + # 控制台输出 + if bool(log_config.get("enable_stderr")): + logger.add(sys.stderr, + format=log_config.get("log_fmt"), + level=log_config.get("level"), + enqueue=True) diff --git a/DrGraph/util/LogUtils.py b/DrGraph/util/LogUtils.py new file mode 100644 index 0000000..5163d8e --- /dev/null +++ b/DrGraph/util/LogUtils.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +import sys +from os import makedirs +from os.path import join, exists +from loguru import logger +from json import loads +from ruamel.yaml import safe_load + +def getConfigs(path, read_type='yml'): + with open(path, 'r', encoding="utf-8") as f: + if read_type == 'json': + return loads(f.read()) + if read_type == 'yml': + return safe_load(f) + raise Exception('路径: %s未获取配置信息' % path) + + +def readFile(file, ty="rb"): + with open(file, ty) as f: + return f.read() + +# 初始化日志配置 +def init_log(base_dir, env): + log_config = getConfigs(join(base_dir, './DrGraph/appIOs/conf/logger/%s_logger.yml' % env)) + # 判断日志文件是否存在,不存在创建 + base_path = join(base_dir, log_config.get("base_path")) + if not exists(base_path): + makedirs(base_path) + # 移除日志设置 + logger.remove(handler_id=None) + # 打印日志到文件 + if bool(log_config.get("enable_file_log")): + logger.add(join(base_path, log_config.get("log_name")), + rotation=log_config.get("rotation"), + retention=log_config.get("retention"), + format=log_config.get("log_fmt"), + level=log_config.get("level"), + enqueue=True, + encoding=log_config.get("encoding")) + # 控制台输出 + if bool(log_config.get("enable_stderr")): + logger.add(sys.stderr, + format=log_config.get("log_fmt"), + level=log_config.get("level"), + enqueue=True) diff --git a/DrGraph/util/PlotsUtils.py b/DrGraph/util/PlotsUtils.py new file mode 100644 index 0000000..ff26e98 --- /dev/null +++ b/DrGraph/util/PlotsUtils.py @@ -0,0 +1,476 @@ +import cv2 +import numpy as np +from PIL import Image, ImageDraw, ImageFont +import unicodedata +from loguru import logger +FONT_PATH = "./DrGraph/appIOs/conf/platech.ttf" + +zhFont = ImageFont.truetype(FONT_PATH, 20, encoding="utf-8") + +def get_label_array(color=None, label=None, font=None, fontSize=40, unify=False): + if unify: + x, y, width, height = font.getbbox("标") # 统一数组大小 + else: + x, y, width, height = font.getbbox(label) + text_image = np.zeros((height, width, 3), dtype=np.uint8) + text_image = Image.fromarray(text_image) + draw = ImageDraw.Draw(text_image) + draw.rectangle((0, 0, width, height), fill=tuple(color)) + draw.text((0, -1), label, fill=(255, 255, 255), font=font) + im_array = np.asarray(text_image) + # scale = fontSize / height + # im_array = cv2.resize(im_array, (0, 0), fx=scale, fy=scale) + scale = height / fontSize + im_array = cv2.resize(im_array, (0, 0), fx=scale, fy=scale) + return im_array + +def get_label_arrays(labelNames, colors, fontSize=40, fontPath="platech.ttf"): + font = ImageFont.truetype(fontPath, fontSize, encoding='utf-8') + label_arraylist = [get_label_array(colors[i % 20], label_name, font, fontSize) for i, label_name in + enumerate(labelNames)] + return label_arraylist + +def get_label_array_dict(colors, fontSize=40, fontPath="platech.ttf"): + font = ImageFont.truetype(fontPath, fontSize, encoding='utf-8') + all_chinese_characters = [] + for char in range(0x4E00, 0x9FFF + 1): # 中文 + chinese_character = chr(char) + if unicodedata.category(chinese_character) == 'Lo': + all_chinese_characters.append(chinese_character) + for char in range(0x0041, 0x005B): # 大写字母 + all_chinese_characters.append(chr(char)) + for char in range(0x0061, 0x007B): # 小写字母 + all_chinese_characters.append(chr(char)) + for char in range(0x0030, 0x003A): # 数字 + all_chinese_characters.append(chr(char)) + zh_dict = {} + for code in all_chinese_characters: + arr = get_label_array(colors[2], code, font, fontSize, unify=True) + zh_dict[code] = arr + return zh_dict + +def get_label_left(x0,y1,label_array,img): + imh, imw = img.shape[0:2] + lh, lw = label_array.shape[0:2] + # x1 框框左上x位置 + 描述的宽 + # y0 框框左上y位置 - 描述的高 + x1, y0 = x0 + lw, y1 - lh + # 如果y0小于0, 说明超过上边框 + if y0 < 0: + y0 = 0 + # y1等于文字高度 + y1 = y0 + lh + # 如果y1框框的高大于图片高度 + if y1 > imh: + # y1等于图片高度 + y1 = imh + # y0等于y1减去文字高度 + y0 = y1 - lh + # 如果x0小于0 + if x0 < 0: + x0 = 0 + x1 = x0 + lw + if x1 > imw: + x1 = imw + x0 = x1 - lw + return x0,y0,x1,y1 + +def get_label_right(x1,y0,label_array): + lh, lw = label_array.shape[0:2] + # x1 框框右上x位置 + 描述的宽 + # y0 框框右上y位置 - 描述的高 + x0, y1 = x1 - lw, y0 - lh + # 如果y0小于0, 说明超过上边框 + if y0 < 0 or y1 < 0: + y1 = 0 + # y1等于文字高度 + y0 = y1 + lh + # 如果x0小于0 + if x0 < 0 or x1 < 0: + x0 = 0 + x1 = x0 + lw + + return x0,y1,x1,y0 + +def xywh2xyxy(box): + if not isinstance(box[0], (list, tuple, np.ndarray)): + xc, yc, w, h = int(box[0]), int(box[1]), int(box[2]), int(box[3]) + bw, bh = int(w / 2), int(h / 2) + lt, yt, rt, yr = xc - bw, yc - bh, xc + bw, yc + bh + box = [(lt, yt), (rt, yt), (rt, yr), (lt, yr)] + return box + +def xywh2xyxy2(param): + if not isinstance(param[0], (list, tuple, np.ndarray)): + xc, yc, x2, y2 = int(param[0]), int(param[1]), int(param[2]), int(param[3]) + return [(xc, yc), (x2, yc), (x2, y2), (xc, y2)], float(param[4]), int(param[5]) + # bw, bh = int(w / 2), int(h / 2) + # lt, yt, rt, yr = xc - bw, yc - bh, xc + bw, yc + bh + # return [(lt, yt), (rt, yt), (rt, yr), (lt, yr)] + return np.asarray(param[0][0:4], np.int32), float(param[1]), int(param[2]) + +def xy2xyxy(box): + if not isinstance(box[0], (list, tuple, np.ndarray)): + x1, y1, x2, y2 = int(box[0]), int(box[1]), int(box[2]), int(box[3]) + # 顺时针 + box = [(x1, y1), (x2, y1), (x2, y2), (x1, y2)] + return box + +def draw_painting_joint(box, img, label_array, score=0.5, color=None, config=None, isNew=False, border=None): + # 识别问题描述图片的高、宽 + # 图片的长度和宽度 + if border is not None: + border = np.array(border,np.int32) + color,label_array=draw_name_border(box,color,label_array,border) + #img = draw_transparent_red_polygon(img,border,'',alpha=0.1) + + lh, lw = label_array.shape[0:2] + tl = config[0] + if isinstance(box[-1], np.ndarray): + return draw_name_points(img,box,color) + + label = ' %.2f' % score + box = xywh2xyxy(box) + # 框框左上的位置 + x0, y1 = box[0][0], box[0][1] + x0, y0, x1, y1 = get_label_left(x0, y1, label_array, img) + # box_tl = max(int(round(imw / 1920 * 3)), 1) or round(0.002 * (imh + imw) / 2) + 1 + ''' + 1. img(array) 为ndarray类型(可以为cv.imread)直接读取的数据 + 2. box(array):为所画多边形的顶点坐标 + 3. 所画四边形是否闭合,通常为True + 4. color(tuple):BGR三个通道的值 + 5. thickness(int):画线的粗细 + 6. shift:顶点坐标中小数的位数 + ''' + img[y0:y1, x0:x1, :] = label_array + box1 = np.asarray(box, np.int32) + cv2.polylines(img, [box1], True, color, tl) + pts_cls = [(x0, y0), (x1, y1)] + # 把英文字符score画到类别旁边 + # tl = max(int(round(imw / 1920 * 3)), 1) or round(0.002 * (imh + imw) / 2) + 1 + # tf = max(tl, 1) + # fontScale = float(format(imw / 1920 * 1.1, '.2f')) or tl * 0.33 + # fontScale = tl * 0.33 + ''' + 1. text:要计算大小的文本内容,类型为字符串。 + 2. fontFace:字体类型,例如cv2.FONT_HERSHEY_SIMPLEX等。 + 3. fontScale:字体大小的缩放因子,例如1.2表示字体大小增加20%。 + 4. thickness:文本线条的粗细,以像素为单位。 + 5. (text_width, text_height):给定文本在指定字体、字体大小、线条粗细下所占用的像素宽度和高度。 + ''' + # t_size = cv2.getTextSize(label, 0, fontScale=fontScale, thickness=tf)[0] + t_size = (config[1], config[2]) + # if socre_location=='leftTop': + p1, p2 = (pts_cls[1][0], pts_cls[0][1]), (pts_cls[1][0] + t_size[0], pts_cls[1][1]) + ''' + 1. img:要绘制矩形的图像 + 2. pt1:矩形框的左上角坐标,可以是一个包含两个整数的元组或列表,例如(x1, y1)或[x1, y1]。 + 3. pt2:矩形框的右下角坐标,可以是一个包含两个整数的元组或列表,例如(x2, y2)或[x2, y2]。 + 4. color:矩形框的颜色,可以是一个包含三个整数的元组或列表,例如(255, 0, 0)表示蓝色,或一个标量值,例如255表示白色。颜色顺序为BGR。 + 5. thickness:线条的粗细,以像素为单位。如果为负值,则表示要绘制填充矩形。默认值为1。 + 6. lineType:线条的类型,可以是cv2.LINE_AA表示抗锯齿线条,或cv2.LINE_4表示4连通线条,或cv2.LINE_8表示8连通线条。默认值为cv2.LINE_8。 + 7. shift:坐标点小数点位数。默认值为0。 + ''' + cv2.rectangle(img, p1, p2, color, -1, cv2.LINE_AA) + p3 = pts_cls[1][0], pts_cls[1][1] - (lh - t_size[1]) // 2 + ''' + 1. img:要在其上绘制文本的图像 + 2. text:要绘制的文本内容,类型为字符串 + 3. org:文本起始位置的坐标,可以是一个包含两个整数的元组或列表,例如(x, y)或[x, y]。 + 4. fontFace:字体类型,例如cv2.FONT_HERSHEY_SIMPLEX等。 + 5. fontScale:字体大小的缩放因子,例如1.2表示字体大小增加20%。 + 6. color:文本的颜色,可以是一个包含三个整数的元组或列表,例如(255, 0, 0)表示蓝色,或一个标量值,例如255表示白色。颜色顺序为BGR。 + 7. thickness:文本线条的粗细,以像素为单位。默认值为1。 + 8. lineType:线条的类型,可以是cv2.LINE_AA表示抗锯齿线条,或cv2.LINE_4表示4连通线条,或cv2.LINE_8表示8连通线条。默认值为cv2.LINE_8。 + 9. bottomLeftOrigin:文本起始位置是否为左下角。如果为True,则文本起始位置为左下角,否则为左上角。默认值为False。 + ''' + if isNew: + cv2.putText(img, label, p3, 0, config[3], [0, 0, 0], thickness=config[4], lineType=cv2.LINE_AA) + else: + cv2.putText(img, label, p3, 0, config[3], [225, 255, 255], thickness=config[4], lineType=cv2.LINE_AA) + return img, box + +# 动态标签 +def draw_name_joint(box, img, label_array_dict, score=0.5, color=None, config=None, name=""): + label_array = None + for zh in name: + if zh in label_array_dict: + if label_array is None: + label_array = label_array_dict[zh] + else: + label_array = np.concatenate((label_array,label_array_dict[zh]), axis= 1) + # 识别问题描述图片的高、宽 + if label_array is None: + lh, lw = 0, 0 + else: + lh, lw = label_array.shape[0:2] + # 图片的长度和宽度 + imh, imw = img.shape[0:2] + box = xywh2xyxy(box) + # 框框左上的位置 + x0, y1 = box[0][0], box[0][1] + x1, y0 = x0 + lw, y1 - lh + # 如果y0小于0, 说明超过上边框 + if y0 < 0: + y0 = 0 + # y1等于文字高度 + y1 = y0 + lh + # 如果y1框框的高大于图片高度 + if y1 > imh: + # y1等于图片高度 + y1 = imh + # y0等于y1减去文字高度 + y0 = y1 - lh + # 如果x0小于0 + if x0 < 0: + x0 = 0 + x1 = x0 + lw + if x1 > imw: + x1 = imw + x0 = x1 - lw + tl = config[0] + box1 = np.asarray(box, np.int32) + cv2.polylines(img, [box1], True, color, tl) + if label_array is not None: + img[y0:y1, x0:x1, :] = label_array + pts_cls = [(x0, y0), (x1, y1)] + # 把英文字符score画到类别旁边 + # tl = max(int(round(imw / 1920 * 3)), 1) or round(0.002 * (imh + imw) / 2) + 1 + label = ' %.2f' % score + t_size = (config[1], config[2]) + # if socre_location=='leftTop': + p1, p2 = (pts_cls[1][0], pts_cls[0][1]), (pts_cls[1][0] + t_size[0], pts_cls[1][1]) + cv2.rectangle(img, p1, p2, color, -1, cv2.LINE_AA) + p3 = pts_cls[1][0], pts_cls[1][1] - (lh - t_size[1]) // 2 + cv2.putText(img, label, p3, 0, config[3], [225, 255, 255], thickness=config[4], lineType=cv2.LINE_AA) + return img, box + +def draw_name_ocr(box, img, color, line_thickness=2, outfontsize=40): + font = ImageFont.truetype(FONT_PATH, outfontsize, encoding='utf-8') + # (color=None, label=None, font=None, fontSize=40, unify=False) + label_zh = get_label_array(color, box[0], font, outfontsize) + return plot_one_box_auto(box[1], img, color, line_thickness, label_zh) +def filterBox(det0, det1, pix_dis): + # det0为 (m1, 11) 矩阵 + # det1为 (m2, 12) 矩阵 + if len(det0.shape) == 1: + det0 = det0[np.newaxis,...] + if len(det1.shape) == 1: + det1 = det1[np.newaxis,...] + det1 = det1[...,0:11].copy() + m, n = det0.size, det1.size + if not m: + return det0 + # 在det0的列方向加一个元素flag代表该目标框中心点是否在之前目标框内(0代表不在,其他代表在) + flag = np.zeros([len(det0), 1]) + det0 = np.concatenate([det0, flag], axis=1) + det0_copy = det0.copy() + # det1_copy = det1.copy() + if not n: + return det0 + # det0转成 (m1, m2, 12) 的矩阵 + # det1转成 (m1, m2, 12) 的矩阵 + # det0与det1在第3维方向上拼接(6 + 7 = 13) + det0 = det0[:, np.newaxis, :].repeat(det1.shape[0], 1) + det1 = det1[np.newaxis, ...].repeat(det0.shape[0], 0) + joint_det = np.concatenate((det1, det0), axis=2) + # 分别求det0和det1的x1, y1, x2, y2(水平框的左上右下角点) + x1, y1, x2, y2 = joint_det[..., 0], joint_det[..., 1], joint_det[..., 4], joint_det[..., 5] + x3, y3, x4, y4 = joint_det[..., 11], joint_det[..., 12], joint_det[..., 15], joint_det[..., 16] + + x2_c, y2_c = (x1+x2)//2, (y1+y2)//2 + x_c, y_c = (x3+x4)//2, (y3+y4)//2 + dis = (x2_c - x_c)**2 + (y2_c - y_c)**2 + mask = (joint_det[..., 9] == joint_det[..., 20]) & (dis <= pix_dis**2) + + # 类别相同 & 中心点在上一帧的框内 判断为True + res = np.sum(mask, axis=1) + det0_copy[..., -1] = res + return det0_copy + +def plot_one_box_auto(box, img, color=None, line_thickness=2, label_array=None): + # print("省略 :%s, box:%s"%('+++' * 10, box)) + # 识别问题描述图片的高、宽 + lh, lw = label_array.shape[0:2] + # print("省略 :%s, lh:%s, lw:%s"%('+++' * 10, lh, lw)) + # 图片的长度和宽度 + imh, imw = img.shape[0:2] + points = None + box = xy2xyxy(box) + # 框框左上的位置 + x0, y1 = box[0][0], box[0][1] + # print("省略 :%s, x0:%s, y1:%s"%('+++' * 10, x0, y1)) + x1, y0 = x0 + lw, y1 - lh + # 如果y0小于0, 说明超过上边框 + if y0 < 0: + y0 = 0 + # y1等于文字高度 + y1 = y0 + lh + # 如果y1框框的高大于图片高度 + if y1 > imh: + # y1等于图片高度 + y1 = imh + # y0等于y1减去文字高度 + y0 = y1 - lh + # 如果x0小于0 + if x0 < 0: + x0 = 0 + x1 = x0 + lw + if x1 > imw: + x1 = imw + x0 = x1 - lw + # box_tl = max(int(round(imw / 1920 * 3)), 1) or round(0.002 * (imh + imw) / 2) + 1 + ''' + 1. img(array) 为ndarray类型(可以为cv.imread)直接读取的数据 + 2. box(array):为所画多边形的顶点坐标 + 3. 所画四边形是否闭合,通常为True + 4. color(tuple):BGR三个通道的值 + 5. thickness(int):画线的粗细 + 6. shift:顶点坐标中小数的位数 + ''' + # Plots one bounding box on image img + tl = line_thickness or round(0.002 * (img.shape[0] + img.shape[1]) / 2) + 1 # line/font thickness + box1 = np.asarray(box, np.int32) + cv2.polylines(img, [box1], True, color, tl) + img[y0:y1, x0:x1, :] = label_array + + return img, box + +def draw_name_crowd(dets, img, color, outfontsize=20): + font = ImageFont.truetype(FONT_PATH, outfontsize, encoding='utf-8') + if len(dets) == 2: + label = '当前人数:%d'%len(dets[0]) + detP = dets[0] + line = dets[1] + for p in detP: + img = cv2.circle(img, (int(p[0]), int(p[1])), line, color, -1) + label_arr = get_label_array(color, label, font, outfontsize) + lh, lw = label_arr.shape[0:2] + img[0:lh, 0:lw, :] = label_arr + elif len(dets) == 3: + detP = dets[1] + line = dets[2] + for p in detP: + img = cv2.circle(img, (int(p[0]), int(p[1])), line, color, -1) + + detM = dets[0] + h, w = img.shape[:2] + for b in detM: + label = '该建筑下行人及数量:%d'%(int(b[4])) + label_arr = get_label_array(color, label, font, outfontsize) + lh, lw = label_arr.shape[0:2] + # 框框左上的位置 + x0, y1 = int(b[0]), int(b[1]) + # print("省略 :%s, x0:%s, y1:%s"%('+++' * 10, x0, y1)) + x1, y0 = x0 + lw, y1 - lh + # 如果y0小于0, 说明超过上边框 + if y0 < 0: + y0 = 0 + # y1等于文字高度 + y1 = y0 + lh + # 如果y1框框的高大于图片高度 + if y1 > h: + # y1等于图片高度 + y1 = h + # y0等于y1减去文字高度 + y0 = y1 - lh + # 如果x0小于0 + if x0 < 0: + x0 = 0 + x1 = x0 + lw + if x1 > w: + x1 = w + x0 = x1 - lw + + cv2.polylines(img, [np.asarray(xy2xyxy(b), np.int32)], True, (0, 128, 255), 2) + img[y0:y1, x0:x1, :] = label_arr + + + return img, dets + +def draw_name_points(img,box,color): + font = ImageFont.truetype(FONT_PATH, 6, encoding='utf-8') + points = box[-1] + arrea = cv2.contourArea(points) + label = '火焰' + arealabel = '面积:%s' % f"{arrea:.1e}" + label_array_area = get_label_array(color, arealabel, font, 10) + label_array = get_label_array(color, label, font, 10) + lh_area, lw_area = label_array_area.shape[0:2] + box = box[:4] + # 框框左上的位置 + x0, y1 = box[0][0], max(box[0][1] - lh_area - 3, 0) + x1, y0 = box[1][0], box[1][1] + x0_label, y0_label, x1_label, y1_label = get_label_left(x0, y1, label_array, img) + x0_area, y0_area, x1_area, y1_area = get_label_right(x1, y0, label_array_area) + img[y0_label:y1_label, x0_label:x1_label, :] = label_array + img[y0_area:y1_area, x0_area:x1_area, :] = label_array_area + # cv2.drawContours(img, points, -1, color, tl) + cv2.polylines(img, [points], False, color, 2) + if lw_area < box[1][0] - box[0][0]: + box = [(x0, y1), (x1, y1), (x1, box[2][1]), (x0, box[2][1])] + else: + box = [(x0_label, y1), (x1, y1), (x1, box[2][1]), (x0_label, box[2][1])] + box = np.asarray(box, np.int32) + cv2.polylines(img, [box], True, color, 2) + return img, box + +def draw_name_border(box,color,label_array,border): + box = xywh2xyxy(box[:4]) + cx, cy = int((box[0][0] + box[2][0]) / 2), int((box[0][1] + box[2][1]) / 2) + flag = cv2.pointPolygonTest(border, (int(cx), int(cy)), + False) # 若为False,会找点是否在内,外,或轮廓上 + if flag == 1: + color = [0, 0, 255] + # 纯白色是(255, 255, 255),根据容差定义白色范围 + lower_white = np.array([255 - 30] * 3, dtype=np.uint8) + upper_white = np.array([255, 255, 255], dtype=np.uint8) + # 创建白色区域的掩码(白色区域为True,非白色为False) + white_mask = cv2.inRange(label_array, lower_white, upper_white) + # 创建与原图相同大小的目标颜色图像 + target_img = np.full_like(label_array, color, dtype=np.uint8) + # 先将非白色区域设为目标颜色,再将白色区域覆盖回原图颜色 + label_array = np.where(white_mask[..., None], label_array, target_img) + return color,label_array + +def draw_transparent_red_polygon(img, points, alpha=0.5): + """ + 在图像中指定的多边形区域绘制半透明红色 + + 参数: + image_path: 原始图像路径 + points: 多边形顶点坐标列表,格式为[(x1,y1), (x2,y2), ..., (xn,yn)] + output_path: 输出图像路径 + alpha: 透明度系数,0-1之间,值越小透明度越高 + """ + # 读取原始图像 + if img is None: + raise ValueError(f"无法读取图像") + + # 创建与原图大小相同的透明图层(RGBA格式) + overlay = np.zeros((img.shape[0], img.shape[1], 4), dtype=np.uint8) + + # 将点列表转换为适合cv2.fillPoly的格式 + #pts = np.array(points, np.int32) + pts = points.reshape((-1, 1, 2)) + + # 在透明图层上绘制红色多边形(BGR为0,0,255) + # 最后一个通道是Alpha值,控制透明度,黄色rgb + cv2.fillPoly(overlay, [pts], (255, 0, 0, int(alpha * 255))) + + # 将透明图层转换为BGR格式(用于与原图混合) + overlay_bgr = cv2.cvtColor(overlay, cv2.COLOR_RGBA2BGR) + + # 创建掩码,用于提取红色区域 + mask = overlay[:, :, 3] / 255.0 + mask = np.stack([mask] * 3, axis=-1) # 转换为3通道 + + # 混合原图和透明红色区域 + img = img * (1 - mask) + overlay_bgr * mask + img = img.astype(np.uint8) + + # # 保存结果 + # cv2.imwrite(output_path, result) + + return img \ No newline at end of file diff --git a/DrGraph/util/RWUtils.py b/DrGraph/util/RWUtils.py new file mode 100644 index 0000000..86d5923 --- /dev/null +++ b/DrGraph/util/RWUtils.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from json import loads + +from ruamel.yaml import safe_load + + +def getConfigs(path, read_type='yml'): + with open(path, 'r', encoding="utf-8") as f: + if read_type == 'json': + return loads(f.read()) + if read_type == 'yml': + return safe_load(f) + raise Exception('路径: %s未获取配置信息' % path) + + +def readFile(file, ty="rb"): + with open(file, ty) as f: + return f.read() + diff --git a/DrGraph/util/__pycache__/Constant.cpython-310.pyc b/DrGraph/util/__pycache__/Constant.cpython-310.pyc new file mode 100644 index 0000000..4e92e10 Binary files /dev/null and b/DrGraph/util/__pycache__/Constant.cpython-310.pyc differ diff --git a/DrGraph/util/__pycache__/LogUtils.cpython-310.pyc b/DrGraph/util/__pycache__/LogUtils.cpython-310.pyc new file mode 100644 index 0000000..6affda3 Binary files /dev/null and b/DrGraph/util/__pycache__/LogUtils.cpython-310.pyc differ diff --git a/DrGraph/util/__pycache__/PlotsUtils.cpython-310.pyc b/DrGraph/util/__pycache__/PlotsUtils.cpython-310.pyc new file mode 100644 index 0000000..66c59ed Binary files /dev/null and b/DrGraph/util/__pycache__/PlotsUtils.cpython-310.pyc differ diff --git a/DrGraph/util/__pycache__/aiHelper.cpython-310.pyc b/DrGraph/util/__pycache__/aiHelper.cpython-310.pyc new file mode 100644 index 0000000..4c5dca7 Binary files /dev/null and b/DrGraph/util/__pycache__/aiHelper.cpython-310.pyc differ diff --git a/DrGraph/util/__pycache__/drHelper.cpython-310.pyc b/DrGraph/util/__pycache__/drHelper.cpython-310.pyc new file mode 100644 index 0000000..eb7040e Binary files /dev/null and b/DrGraph/util/__pycache__/drHelper.cpython-310.pyc differ diff --git a/DrGraph/util/__pycache__/general.cpython-310.pyc b/DrGraph/util/__pycache__/general.cpython-310.pyc new file mode 100644 index 0000000..c784e39 Binary files /dev/null and b/DrGraph/util/__pycache__/general.cpython-310.pyc differ diff --git a/DrGraph/util/__pycache__/google_utils.cpython-310.pyc b/DrGraph/util/__pycache__/google_utils.cpython-310.pyc new file mode 100644 index 0000000..348ae53 Binary files /dev/null and b/DrGraph/util/__pycache__/google_utils.cpython-310.pyc differ diff --git a/DrGraph/util/__pycache__/masterUtils.cpython-310.pyc b/DrGraph/util/__pycache__/masterUtils.cpython-310.pyc new file mode 100644 index 0000000..012203e Binary files /dev/null and b/DrGraph/util/__pycache__/masterUtils.cpython-310.pyc differ diff --git a/DrGraph/util/__pycache__/metrics.cpython-310.pyc b/DrGraph/util/__pycache__/metrics.cpython-310.pyc new file mode 100644 index 0000000..8d33e63 Binary files /dev/null and b/DrGraph/util/__pycache__/metrics.cpython-310.pyc differ diff --git a/DrGraph/util/__pycache__/stdc.cpython-310.pyc b/DrGraph/util/__pycache__/stdc.cpython-310.pyc new file mode 100644 index 0000000..3d9b9a4 Binary files /dev/null and b/DrGraph/util/__pycache__/stdc.cpython-310.pyc differ diff --git a/DrGraph/util/__pycache__/torchHelper.cpython-310.pyc b/DrGraph/util/__pycache__/torchHelper.cpython-310.pyc new file mode 100644 index 0000000..ef9b563 Binary files /dev/null and b/DrGraph/util/__pycache__/torchHelper.cpython-310.pyc differ diff --git a/DrGraph/util/__pycache__/yoloHelper.cpython-310.pyc b/DrGraph/util/__pycache__/yoloHelper.cpython-310.pyc new file mode 100644 index 0000000..c5c33e0 Binary files /dev/null and b/DrGraph/util/__pycache__/yoloHelper.cpython-310.pyc differ diff --git a/DrGraph/util/aiHelper.py b/DrGraph/util/aiHelper.py new file mode 100644 index 0000000..8c4f03e --- /dev/null +++ b/DrGraph/util/aiHelper.py @@ -0,0 +1,817 @@ +from loguru import logger +import json, cv2, time, os, torch, glob +from PIL import Image, ImageDraw, ImageFont +import numpy as np +import torch.nn.functional as F +from copy import deepcopy +from scipy import interpolate + +from DrGraph.util import yoloHelper, torchHelper +from DrGraph.util.drHelper import * + +from DrGraph.util.segutils.trtUtils import segtrtEval,yolov5Trtforward,OcrTrtForward + +def getDetectionsFromPreds(pred,img,im0,conf_thres=0.2,iou_thres=0.45,ovlap_thres=0.6,padInfos=None): + ''' + 对YOLO模型的预测结果进行后处理,包括NMS、坐标还原和格式转换等操作。 + + 参数: + pred (torch.Tensor): 检测模型输出的结果,通常是包含边界框、置信度和类别信息的张量。 + img (torch.Tensor): 输入检测模型时的图像张量,用于坐标变换参考。 + im0 (numpy.ndarray): 原始输入图像,用于将检测框映射回原始尺寸。 + conf_thres (float): 第一次非极大值抑制(NMS)中置信度的阈值,默认为0.2。 + iou_thres (float): 第一次非极大值抑制中IoU的阈值,默认为0.45。 + ovlap_thres (float): 可选的二次NMS中IoU的阈值,若为0则不执行,默认为0.6。 + padInfos (list or None): 图像resize时的填充信息,用于准确还原检测框位置。 + + 返回: + list: 包含以下内容的列表: + - img (numpy.ndarray): 原始图像。 + - im0 (numpy.ndarray): 同上,重复项以保持接口一致性。 + - det_xywh (list of lists): 检测结果列表,每个元素为 [x0, y0, x1, y1, score, cls]。 + - 0 (int): 无实际意义,仅为兼容旧接口保留。 + ''' + with TimeDebugger('预测结果后处理') as td: + # 执行第一次非极大值抑制(NMS),过滤低置信度和重叠的检测框 + pred = yoloHelper.non_max_suppression(pred, conf_thres, iou_thres, classes=None, agnostic=False) + # 如果设置了二次NMS阈值,则执行重叠框抑制 + if ovlap_thres: + pred = yoloHelper.overlap_box_suppression(pred, ovlap_thres) + td.addStep("NMS") + i=0;det=pred[0]###一次检测一张图片 + det_xywh=[] + + # 如果存在检测结果,则进行坐标还原和格式转换 + if len(det)>0: + #将坐标恢复成原始尺寸的大小 + H,W = im0.shape[0:2] + det[:, :4] = imgHelper.scale_back( det[:, :4],padInfos).round() \ + if padInfos \ + else imgHelper.scale_coords(img.shape[2:], det[:, :4],im0.shape).round() + + #转换坐标格式,及tensor转换为cpu中的numpy格式。 + for *xyxy, conf, cls in reversed(det): + cls_c = cls.cpu().numpy() + conf_c = conf.cpu().numpy() + tt=[ int(x.cpu()) for x in xyxy] + x0,y0,x1,y1 = tt[0:4] + x0 = max(0,x0);y0 = max(0,y0); + x1 = min(W-1,x1);y1 = min(H-1,y1) + #line = [float(cls_c), *tt, float(conf_c)] # label format , + line = [ x0,y0,x1,y1, float(conf_c),float(cls_c)] # label format 2023.08.03--修改 + #print('###line305:',line) + det_xywh.append(line) + + td.addStep('ScaleBack') + return [im0,im0,det_xywh,0] ###0,没有意义,只是为了和过去保持一致长度4个元素。 + +def score_filter_byClass(pdetections,score_para_2nd): + """ + 根据类别特定的置信度阈值过滤检测结果 + + 参数: + pdetections: 检测结果列表,每个元素包含[x1, y1, x2, y2, score, class]格式的检测框信息 + score_para_2nd: 字典类型,键为类别标识(整数或字符串),值为对应的置信度阈值 + + 返回值: + ret: 过滤后的检测结果列表,只保留置信度高于对应类别阈值的检测框 + """ + ret=[] + for det in pdetections: + # 获取当前检测框的置信度和类别 + score,cls = det[4],det[5] + # 根据类别查找对应的置信度阈值,优先查找整数键,其次查找字符串键,都没有则使用默认阈值0.7 + if int(cls) in score_para_2nd.keys(): + score_th = score_para_2nd[int(cls)] + elif str(int(cls)) in score_para_2nd.keys(): + score_th = score_para_2nd[str(int(cls))] + else: + score_th = 0.7 + # 只保留置信度高于阈值的检测框 + if score > score_th: + ret.append(det) + return ret + +def AI_process(im0s, model, segmodel, names, label_arraylist, rainbows, + objectPar={ 'half':True,'device':'cuda:0' ,'conf_thres':0.25,'iou_thres':0.45,'allowedList':[0,1,2,3],'segRegionCnt':1, 'trtFlag_det':False,'trtFlag_seg':False,'score_byClass':{x:0.1 for x in range(30)} }, + font={ 'line_thickness':None, 'fontSize':None,'boxLine_thickness':None,'waterLineColor':(0,255,255),'waterLineWidth':3}, + segPar={'modelSize':(640,360),'mean':(0.485, 0.456, 0.406),'std' :(0.229, 0.224, 0.225),'numpy':False, 'RGB_convert_first':True}, + mode='others', postPar=None): + # logger.info("AI_process(\n\rim0s={}, \n\rmodel={},\n\rsegmodel={},\n\rnames={},\n\rrainbows={},\n\robjectPar={},\n\rfont={},\n\rsegPar={},\n\rmode={},\n\rpostPar={})", \ + # im0s, model, segmodel, names, rainbows, \ + # objectPar, font, segPar, mode, postPar) + """ + 对输入图像进行目标检测和分割处理,返回处理后的图像及检测结果。 + + 参数: + im0s (list): 原始图像列表。 + model: 检测模型对象。 + segmodel: 分割模型对象,若未使用则为 None。 + names (list): 类别名称列表。 + label_arraylist: 标签数组列表。 + rainbows: 颜色映射相关参数。 + objectPar (dict): 目标检测相关参数配置,默认包含: + - half (bool): 是否使用半精度(FP16)。 + - device (str): 使用的设备(如 'cuda:0')。 + - conf_thres (float): 置信度阈值。 + - iou_thres (float): IOU 阈值。 + - allowedList (list): 允许检测的类别列表。 + - segRegionCnt (int): 分割区域数量。 + - trtFlag_det (bool): 是否使用 TensorRT 加速检测。 + - trtFlag_seg (bool): 是否使用 TensorRT 加速分割。 + - score_byClass (dict): 每个类别的最低置信度阈值。 + font (dict): 字体和绘制相关参数配置。 + segPar (dict): 分割模型相关参数配置。 + mode (str): 处理模式标识。 + postPar: 后处理参数,当前未使用。 + + 返回: + tuple: 包含两个元素的元组: + - list: 处理结果列表,格式为 [原始图像, 处理后图像, 检测框信息, 帧号]。 + 其中检测框信息是一个列表,每个元素表示一个目标,格式为: + [xc, yc, w, h, conf_c, cls_c], + xc, yc 为中心坐标,w, h 为目标宽高,conf_c 为置信度,cls_c 为类别编号。 + - str: 各阶段处理耗时信息字符串。 + """ + + # 从 objectPar 中提取关键参数 + half,device,conf_thres,iou_thres = objectPar['half'],objectPar['device'],objectPar['conf_thres'],objectPar['iou_thres'] + + trtFlag_det,trtFlag_seg,segRegionCnt = objectPar['trtFlag_det'],objectPar['trtFlag_seg'],objectPar['segRegionCnt'] + if 'ovlap_thres_crossCategory' in objectPar.keys(): ovlap_thres = objectPar['ovlap_thres_crossCategory'] + else: ovlap_thres = None + + if 'score_byClass' in objectPar.keys(): score_byClass = objectPar['score_byClass'] + else: score_byClass = None + + with TimeDebugger('AI_process') as td: # enabled logAtExit - 结束时输出用时分析日志 + # 图像预处理:根据是否使用 TensorRT 进行不同的图像填充或 letterbox 操作 + if trtFlag_det: + img, padInfos = imgHelper.img_pad(im0s[0], size=(640,640,3)) + img = [img] + else: + #print('####line72:',im0s[0][10:12,10:12,2]) + img = [imgHelper.letterbox(x, 640, auto=True, stride=32)[0] for x in im0s] + padInfos=None + img_height, img_width = img[0].shape[0:2] # 获取高和宽 + #print('####line74:',img[0][10:12,10:12,2]) + # 将图像堆叠并转换为模型输入格式(BGR 转 RGB,HWC 转 CHW) + img = np.stack(img, 0) + img = img[:, :, :, ::-1].transpose(0, 3, 1, 2) # BGR to RGB, to bsx3x416x416 + img = np.ascontiguousarray(img) + td.addStep("img_pad" if trtFlag_det else "letterbox") + + # 转换为 PyTorch 张量并归一化到 [0, 1] + img = torch.from_numpy(img) + td.addStep(f"from_numpy({img_height} x {img_width})") + img = img.to(device) + td.addStep(f"to GPU({img_height} x {img_width})" ) + + img = img.half() if half else img.float() # uint8 to fp16/32 + img /= 255.0 + # td.addStep("seg") + + # 如果提供了分割模型,则执行分割推理 + if segmodel: + seg_pred,segstr = segmodel.eval(im0s[0] ) + segFlag=True + else: + seg_pred = None;segFlag=False;segstr='Not implemented' + td.addStep("infer") + # 执行目标检测推理 + if trtFlag_det: + pred = yolov5Trtforward(model,img) + else: + #print('####line96:',img[0,0,10:12,10:12]) + pred = model(img,augment=False)[0] + td.addStep('yolov5Trtforward' if trtFlag_det else 'model') + + # 对检测结果进行后处理,包括 NMS 和坐标还原 + p_result = getDetectionsFromPreds(pred,img,im0s[0],conf_thres=conf_thres,iou_thres=iou_thres,ovlap_thres=ovlap_thres,padInfos=padInfos) + # 根据类别分别设置置信度阈值过滤 + if score_byClass: + p_result[2] = score_filter_byClass(p_result[2],score_byClass) + td.addStep('后处理') + #print('-'*10,p_result[2]) + #if mode=='highWay3.0': + #if segmodel: + # 如果启用了混合后处理函数(如结合分割结果优化检测框),则执行该函数 + if segPar and segPar['mixFunction']['function']: + mixFunction = segPar['mixFunction']['function']; + H,W = im0s[0].shape[0:2] + parMix = segPar['mixFunction']['pars'];#print('###line117:',parMix,p_result[2]) + parMix['imgSize'] = (W,H) + #print(' -----------line149: ',p_result[2] ,'\n', seg_pred, parMix ,' sumpSeg:',np.sum(seg_pred)) + logger.warning('启用混合后处理函数') + p_result[2] , timeMixPost = mixFunction(p_result[2], seg_pred, pars=parMix ) + #print(' -----------line112: ',p_result[2] ) + p_result.append(seg_pred) + + else: + timeMixPost=':0 ms' + time_info = td.getReportInfo() + return p_result,time_info + +def AI_process_N(im0s,modelList,postProcess): + + #输入参数 + ## im0s---原始图像列表 + ## modelList--所有的模型 + # postProcess--字典{},包括后处理函数,及其参数 + #输出参数 + ##ret[0]--检测结果; + ##ret[1]--时间信息 + + #modelList包括模型,每个模型是一个类,里面的eval函数可以输出该模型的推理结果 + modelRets=[ model.eval(im0s[0]) for model in modelList] + + timeInfos = [ x[1] for x in modelRets] + timeInfos=''.join(timeInfos) + timeInfos=timeInfos + + #postProcess['function']--后处理函数,输入的就是所有模型输出结果 + mixFunction =postProcess['function'] + predsList = [ modelRet[0] for modelRet in modelRets ] + H,W = im0s[0].shape[0:2] + postProcess['pars']['imgSize'] = (W,H) + + #ret就是混合处理后的结果 + ret = mixFunction( predsList, postProcess['pars']) + + return ret[0],timeInfos+ret[1] + +def getMaxScoreWords(detRets0): + maxScore=-1;maxId=0 + for i,detRet in enumerate(detRets0): + if detRet[4]>maxScore: + maxId=i + maxScore = detRet[4] + return maxId + +def AI_process_C(im0s,modelList,postProcess): + #函数定制的原因: + ## 之前模型处理流是 + ## 图片---> 模型1-->result1;图片---> 模型2->result2;[result1,result2]--->后处理函数 + ## 本函数的处理流程是 + ## 图片---> 模型1-->result1;[图片,result1]---> 模型2->result2;[result1,result2]--->后处理函数 + ## 模型2的输入,是有模型1的输出决定的。如模型2是ocr模型,需要将模型1检测出来的船名抠图出来输入到模型2. + ## 之前的模型流都是模型2是分割模型,输入就是原始图片,与模型1的输出无关。 + #输入参数 + ## im0s---原始图像列表 + ## modelList--所有的模型 + # postProcess--字典{},包括后处理函数,及其参数 + #输出参数 + ##ret[0]--检测结果; + ##ret[1]--时间信息 + + #modelList包括模型,每个模型是一个类,里面的eval函数可以输出该模型的推理结果 + + t0=time.time() + detRets0 = modelList[0].eval(im0s[0]) + + #detRets0=[[12, 46, 1127, 1544, 0.2340087890625, 2.0], [1884, 1248, 2992, 1485, 0.64208984375, 1.0]] + detRets0 = detRets0[0] + parsIn=postProcess['pars'] + + _detRets0_obj = list(filter(lambda x: x[5] in parsIn['objs'], detRets0 )) + _detRets0_others = list(filter(lambda x: x[5] not in parsIn['objs'], detRets0 )) + _detRets0 = [] + if postProcess['name']=='channel2': + if len(_detRets0_obj)>0: + maxId=getMaxScoreWords(_detRets0_obj) + _detRets0 = _detRets0_obj[maxId:maxId+1] + else: _detRets0 = detRets0 + + + t1=time.time() + imagePatches = [ im0s[0][int(x[1]):int(x[3] ) ,int(x[0]):int(x[2])] for x in _detRets0 ] + detRets1 = [modelList[1].eval(patch) for patch in imagePatches] + print('###line240:',detRets1) + if postProcess['name']=='crackMeasurement': + detRets1 = [x[0]*255 for x in detRets1] + t2=time.time() + mixFunction =postProcess['function'] + crackInfos = [mixFunction(patchMask,par=parsIn) for patchMask in detRets1] + + rets = [ _detRets0[i]+ crackInfos[i] for i in range(len(imagePatches)) ] + t3=time.time() + outInfos='total:%.1f (det:%.1f %d次segs:%.1f mixProcess:%.1f) '%( (t3-t0)*1000, (t1-t0)*1000, len(detRets1),(t2-t1)*1000, (t3-t2)*1000 ) + elif postProcess['name']=='channel2': + H,W = im0s[0].shape[0:2];parsIn['imgSize'] = (W,H) + mixFunction =postProcess['function'] + _detRets0_others = mixFunction([_detRets0_others], parsIn) + ocrInfo='no ocr' + if len(_detRets0_obj)>0: + res_real = detRets1[0][0] + res_real="".join( list(filter(lambda x:(ord(x) >19968 and ord(x)<63865 ) or (ord(x) >47 and ord(x)<58 ),res_real))) + + #detRets1[0][0]="".join( list(filter(lambda x:(ord(x) >19968 and ord(x)<63865 ) or (ord(x) >47 and ord(x)<58 ),detRets1[0][0]))) + _detRets0_obj[maxId].append(res_real ) + _detRets0_obj = [_detRets0_obj[maxId]]##只输出有OCR的那个船名结果 + ocrInfo=detRets1[0][1] + print( ' _detRets0_obj:{} _detRets0_others:{} '.format( _detRets0_obj, _detRets0_others ) ) + rets=_detRets0_obj+_detRets0_others + t3=time.time() + outInfos='total:%.1f ,where det:%.1f, ocr:%s'%( (t3-t0)*1000, (t1-t0)*1000, ocrInfo) + + #print('###line233:',detRets1,detRets0 ) + + return rets,outInfos + +def post_process_(datas,conf_thres, iou_thres,names,label_arraylist,rainbows,iframe,ObjectPar={ 'object_config':[0,1,2,3,4], 'slopeIndex':[5,6,7] ,'segmodel':True,'segRegionCnt':1 },font={ 'line_thickness':None, 'fontSize':None,'boxLine_thickness':None,'waterLineColor':(0,255,255),'waterLineWidth':3},padInfos=None ,ovlap_thres=None): + object_config,slopeIndex,segmodel,segRegionCnt=ObjectPar['object_config'],ObjectPar['slopeIndex'],ObjectPar['segmodel'],ObjectPar['segRegionCnt'] + ##输入dataset genereate 生成的数据,model预测的结果pred,nms参数 + ##主要操作NMS ---> 坐标转换 ---> 画图 + ##输出原图、AI处理后的图、检测结果 + time0=time.time() + path, img, im0s, vid_cap ,pred,seg_pred= datas[0:6]; + #segmodel=True + pred = yoloHelper.non_max_suppression(pred, conf_thres, iou_thres, classes=None, agnostic=False) + if ovlap_thres: + pred = yoloHelper.overlap_box_suppression(pred, ovlap_thres) + time1=time.time() + i=0;det=pred[0]###一次检测一张图片 + time1_1 = time.time() + #p, s, im0 = path[i], '%g: ' % i, im0s[i].copy() + p, s, im0 = path[i], '%g: ' % i, im0s[i] + time1_2 = time.time() + gn = torch.tensor(im0.shape)[[1, 0, 1, 0]] # normalization gain whwh + time1_3 = time.time() + det_xywh=[]; + #im0_brg=cv2.cvtColor(im0,cv2.COLOR_RGB2BGR); + if segmodel: + if len(seg_pred)==2: + im0,water = illBuildings(seg_pred,im0) + else: + river={ 'color':font['waterLineColor'],'line_width':font['waterLineWidth'],'segRegionCnt':segRegionCnt,'segLineShow':font['segLineShow'] } + im0,water = drawWater(seg_pred,im0,river) + time2=time.time() + #plt.imshow(im0);plt.show() + if len(det)>0: + # Rescale boxes from img_size to im0 size + if not padInfos: + det[:, :4] = imgHelper.scale_coords(img.shape[2:], det[:, :4],im0.shape).round() + else: + #print('####line131:',det[:, :]) + det[:, :4] = imgHelper.scale_back( det[:, :4],padInfos).round() + #print('####line133:',det[:, :]) + #用seg模型,确定有效检测匡及河道轮廓线 + if segmodel: + cls_indexs = det[:, 5].clone().cpu().numpy().astype(np.int32) + ##判断哪些目标属于岸坡的 + slope_flag = np.array([x in slopeIndex for x in cls_indexs ] ) + + det_c = det.clone(); det_c=det_c.cpu().numpy() + try: + area_factors = np.array([np.sum(water[int(x[1]):int(x[3]), int(x[0]):int(x[2])] )*1.0/(1.0*(x[2]-x[0])*(x[3]-x[1])+0.00001) for x in det_c] ) + except: + print('*****************************line143: error:',det_c) + water_flag = np.array(area_factors>0.1) + det = det[water_flag|slope_flag]##如果是水上目标,则需要与水的iou超过0.1;如果是岸坡目标,则直接保留。 + #对检测匡绘图 + + for *xyxy, conf, cls in reversed(det): + xywh = (mathHelper.xyxy2xywh(torch.tensor(xyxy).view(1, 4)) / gn).view(-1).tolist() # normalized xywh + cls_c = cls.cpu().numpy() + + + conf_c = conf.cpu().numpy() + tt=[ int(x.cpu()) for x in xyxy] + #line = [float(cls_c), *tt, float(conf_c)] # label format + line = [*tt, float(conf_c), float(cls_c)] # label format + det_xywh.append(line) + label = f'{names[int(cls)]} {conf:.2f}' + #print('- '*20, ' line165:',xyxy,cls,conf ) + if int(cls_c) not in object_config: ###如果不是所需要的目标,则不显示 + continue + #print('- '*20, ' line168:',xyxy,cls,conf ) + im0 = drawHelper.draw_painting_joint(xyxy,im0,label_arraylist[int(cls)],score=conf,color=rainbows[int(cls)%20],font=font) + time3=time.time() + strout='nms:%s drawWater:%s,copy:%s,toTensor:%s,detDraw:%s '% ( \ + timeHelper.deltaTime_MS(time0,time1), + timeHelper.deltaTime_MS(time1,time2), + timeHelper.deltaTime_MS(time1_1,time1_2), + timeHelper.deltaTime_MS(time1_2,time1_3), + timeHelper.deltaTime_MS(time2,time3) ) + return [im0s[0],im0,det_xywh,iframe],strout + +def AI_process_forest(im0s,model,segmodel,names,label_arraylist,rainbows,half=True,device=' cuda:0',conf_thres=0.25, iou_thres=0.45, + allowedList=[0,1,2,3], font={ 'line_thickness':None, 'fontSize':None,'boxLine_thickness':None,'waterLineColor':(0,255,255),'waterLineWidth':3} ,trtFlag_det=False,SecNms=None): + #输入参数 + # im0s---原始图像列表 + # model---检测模型,segmodel---分割模型(如若没有用到,则为None) + #输出:两个元素(列表,字符)构成的元组,[im0s[0],im0,det_xywh,iframe],strout + # [im0s[0],im0,det_xywh,iframe]中, + # im0s[0]--原始图像,im0--AI处理后的图像,iframe--帧号/暂时不需用到。 + # det_xywh--检测结果,是一个列表。 + # 其中每一个元素表示一个目标构成如:[ xc,yc,w,h, float(conf_c),float(cls_c)],#2023.08.03,修改输出格式 + # #cls_c--类别,如0,1,2,3; xc,yc,w,h--中心点坐标及宽;conf_c--得分, 取值范围在0-1之间 + # #strout---统计AI处理个环节的时间 + + # Letterbox + time0=time.time() + if trtFlag_det: + img, padInfos = imgHelper.img_pad(im0s[0], size=(640,640,3)) ;img = [img] + else: + img = [imgHelper.letterbox(x, 640, auto=True, stride=32)[0] for x in im0s];padInfos=None + #img = [letterbox(x, 640, auto=True, stride=32)[0] for x in im0s] + # Stack + img = np.stack(img, 0) + # Convert + img = img[:, :, :, ::-1].transpose(0, 3, 1, 2) # BGR to RGB, to bsx3x416x416 + img = np.ascontiguousarray(img) + + img = torch.from_numpy(img).to(device) + img = img.half() if half else img.float() # uint8 to fp16/32 + + img /= 255.0 # 0 - 255 to 0.0 - 1.0 + if segmodel: + seg_pred,segstr = segmodel.eval(im0s[0] ) + segFlag=True + else: + seg_pred = None;segFlag=False + time1=time.time() + pred = yolov5Trtforward(model,img) if trtFlag_det else model(img,augment=False)[0] + + + time2=time.time() + datas = [[''], img, im0s, None,pred,seg_pred,10] + + ObjectPar={ 'object_config':allowedList, 'slopeIndex':[] ,'segmodel':segFlag,'segRegionCnt':0 } + p_result,timeOut = post_process_(datas,conf_thres, iou_thres,names,label_arraylist,rainbows,10,ObjectPar=ObjectPar,font=font,padInfos=padInfos,ovlap_thres=SecNms) + #print('###line274:',p_result[2]) + #p_result,timeOut = post_process_(datas,conf_thres, iou_thres,names,label_arraylist,rainbows,10,object_config=allowedList,segmodel=segFlag,font=font,padInfos=padInfos) + time_info = 'letterbox:%.1f, infer:%.1f, '%( (time1-time0)*1000,(time2-time1)*1000 ) + return p_result,time_info+timeOut + + +def AI_det_track( im0s_in,modelPar,processPar,sort_tracker,segPar=None): + im0s,iframe=im0s_in[0],im0s_in[1] + model = modelPar['det_Model'] + segmodel = modelPar['seg_Model'] + half,device,conf_thres, iou_thres,trtFlag_det = processPar['half'], processPar['device'], processPar['conf_thres'], processPar['iou_thres'],processPar['trtFlag_det'] + if 'score_byClass' in processPar.keys(): score_byClass = processPar['score_byClass'] + else: score_byClass = None + + iou2nd = processPar['iou2nd'] + time0=time.time() + + if trtFlag_det: + img, padInfos = imgHelper.img_pad(im0s[0], size=(640,640,3)) + img = [img] + else: + img = [imgHelper.letterbox(x, 640, auto=True, stride=32)[0] for x in im0s];padInfos=None + img = np.stack(img, 0) + # Convert + img = img[:, :, :, ::-1].transpose(0, 3, 1, 2) # BGR to RGB, to bsx3x416x416 + img = np.ascontiguousarray(img) + + img = torch.from_numpy(img).to(device) + img = img.half() if half else img.float() # uint8 to fp16/32 + + img /= 255.0 # 0 - 255 to 0.0 - 1.0 + + seg_pred = None;segFlag=False + time1=time.time() + pred = yolov5Trtforward(model,img) if trtFlag_det else model(img,augment=False)[0] + + time2=time.time() + + #p_result,timeOut = getDetections(datas,conf_thres, iou_thres,names,label_arraylist,rainbows,10,ObjectPar=ObjectPar,font=font,padInfos=padInfos) + p_result, timeOut = getDetectionsFromPreds(pred,img,im0s[0],conf_thres=conf_thres,iou_thres=iou_thres,ovlap_thres=iou2nd,padInfos=padInfos) + if score_byClass: + p_result[2] = score_filter_byClass(p_result[2],score_byClass) + if segmodel: + seg_pred,segstr = segmodel.eval(im0s[0] ) + segFlag=True + else: + seg_pred = None;segFlag=False;segstr='No segmodel' + + + if segPar and segPar['mixFunction']['function']: + mixFunction = segPar['mixFunction']['function'] + + H,W = im0s[0].shape[0:2] + parMix = segPar['mixFunction']['pars'];#print('###line117:',parMix,p_result[2]) + parMix['imgSize'] = (W,H) + + + p_result[2],timeInfos_post = mixFunction(p_result[2], seg_pred, pars=parMix ) + timeInfos_seg_post = 'segInfer:%s ,postMixProcess:%s'%( segstr, timeInfos_post ) + else: + timeInfos_seg_post = ' ' + ''' + if segmodel: + timeS1=time.time() + #seg_pred,segstr = segtrtEval(segmodel,im0s[0],par=segPar) if segPar['trtFlag_seg'] else segmodel.eval(im0s[0] ) + seg_pred,segstr = segmodel.eval(im0s[0] ) + timeS2=time.time() + mixFunction = segPar['mixFunction']['function'] + + p_result[2],timeInfos_post = mixFunction(p_result[2], seg_pred, pars=segPar['mixFunction']['pars'] ) + + timeInfos_seg_post = 'segInfer:%.1f ,postProcess:%s'%( (timeS2-timeS1)*1000, timeInfos_post ) + + else: + timeInfos_seg_post = ' ' + #print('######line341:',seg_pred.shape,np.max(seg_pred),np.min(seg_pred) , len(p_result[2]) ) + ''' + time_info = 'letterbox:%.1f, detinfer:%.1f, '%( (time1-time0)*1000,(time2-time1)*1000 ) + + if sort_tracker: + #在这里增加设置调用追踪器的频率 + #..................USE TRACK FUNCTION.................... + #pass an empty array to sort + dets_to_sort = np.empty((0,7), dtype=np.float32) + + # NOTE: We send in detected object class too + #for detclass,x1,y1,x2,y2,conf in p_result[2]: + for x1,y1,x2,y2,conf, detclass in p_result[2]: + #print('#######line342:',x1,y1,x2,y2,img.shape,[x1, y1, x2, y2, conf, detclass,iframe]) + dets_to_sort = np.vstack((dets_to_sort, + np.array([x1, y1, x2, y2, conf, detclass,iframe],dtype=np.float32) )) + + # Run SORT + tracked_dets = deepcopy(sort_tracker.update(dets_to_sort) ) + tracks =sort_tracker.getTrackers() + p_result.append(tracked_dets) ###index=4 + p_result.append(tracks) ###index=5 + + return p_result,time_info+timeOut+timeInfos_seg_post +def AI_det_track_batch(imgarray_list, iframe_list ,modelPar,processPar,sort_tracker,trackPar,segPar=None): + ''' + 输入: + imgarray_list--图像列表 + iframe_list -- 帧号列表 + modelPar--模型参数,字典,modelPar={'det_Model':,'seg_Model':} + processPar--字典,存放检测相关参数,'half', 'device', 'conf_thres', 'iou_thres','trtFlag_det' + sort_tracker--对象,初始化的跟踪对象。为了保持一致,即使是单帧也要有。 + trackPar--跟踪参数,关键字包括:det_cnt,windowsize + segPar--None,分割模型相关参数。如果用不到,则为None + 输入:retResults,timeInfos + retResults:list + retResults[0]--imgarray_list + retResults[1]--所有结果用numpy格式,所有的检测结果,包括8类,每列分别是x1, y1, x2, y2, conf, detclass,iframe,trackId + retResults[2]--所有结果用list表示,其中每一个元素为一个list,表示每一帧的检测结果,每一个结果是由多个list构成,每个list表示一个框,格式为[ x0 ,y0 ,x1 ,y1 ,conf, cls ,ifrmae,trackId ],如 retResults[2][j][k]表示第j帧的第k个框。2023.08.03,修改输出格式 + ''' + + det_cnt,windowsize = trackPar['det_cnt'] ,trackPar['windowsize'] + trackers_dic={} + index_list = list(range( 0, len(iframe_list) ,det_cnt )); + if len(index_list)>1 and index_list[-1]!= iframe_list[-1]: + index_list.append( len(iframe_list) - 1 ) + + if len(imgarray_list)==1: #如果是单帧图片,则不用跟踪 + retResults = [] + p_result,timeOut = AI_det_track( [ [imgarray_list[0]] ,iframe_list[0] ],modelPar,processPar,None,segPar ) + ##下面4行内容只是为了保持格式一致 + detArray = np.array(p_result[2]) + #print('##line371:',detArray) + if len(p_result[2])==0:res=[] + else: + cnt = detArray.shape[0];trackIds=np.zeros((cnt,1));iframes = np.zeros((cnt,1)) + iframe_list[0] + + #detArray = np.hstack( (detArray[:,1:5], detArray[:,5:6] ,detArray[:,0:1],iframes, trackIds ) ) + detArray = np.hstack( (detArray[:,0:4], detArray[:,4:6] ,iframes, trackIds ) ) ##2023.08.03 修改输入格式 + res = [[ b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7] ] for b in detArray ] + retResults=[imgarray_list,detArray,res ] + #print('##line380:',retResults[2]) + return retResults,timeOut + + else: + t0 = time.time() + timeInfos_track='' + for iframe_index, index_frame in enumerate(index_list): + p_result,timeOut = AI_det_track( [ [imgarray_list[index_frame]] ,iframe_list[index_frame] ],modelPar,processPar,sort_tracker,segPar ) + timeInfos_track='%s:%s'%(timeInfos_track,timeOut) + + for tracker in p_result[5]: + trackers_dic[tracker.id]=deepcopy(tracker) + t1 = time.time() + + track_det_result = np.empty((0,8)) + for trackId in trackers_dic.keys(): + tracker = trackers_dic[trackId] + bbox_history = np.array(tracker.bbox_history) + if len(bbox_history)<2: continue + ###把(x0,y0,x1,y1)转换成(xc,yc,w,h) + xcs_ycs = (bbox_history[:,0:2] + bbox_history[:,2:4] )/2 + whs = bbox_history[:,2:4] - bbox_history[:,0:2] + bbox_history[:,0:2] = xcs_ycs;bbox_history[:,2:4] = whs; + + arrays_box = bbox_history[:,0:7].transpose();frames=bbox_history[:,6] + #frame_min--表示该批次图片的起始帧,如该批次是[1,100],则frame_min=1,[101,200]--frame_min=101 + #frames[0]--表示该目标出现的起始帧,如[1,11,21,31,41],则frames[0]=1,frames[0]可能会在frame_min之前出现,即一个横跨了多个批次。 + + ##如果要最好化插值范围,则取内区间[frame_min,则frame_max ]和[frames[0],frames[-1] ]的交集 + #inter_frame_min = int(max(frame_min, frames[0])); inter_frame_max = int(min( frame_max, frames[-1] )) ## + + ##如果要求得到完整的目标轨迹,则插值区间要以目标出现的起始点为准 + inter_frame_min=int(frames[0]);inter_frame_max=int(frames[-1]) + new_frames= np.linspace(inter_frame_min,inter_frame_max,inter_frame_max-inter_frame_min+1 ) + f_linear = interpolate.interp1d(frames,arrays_box); interpolation_x0s = (f_linear(new_frames)).transpose() + move_cnt_use =(len(interpolation_x0s)+1)//2*2-1 if len(interpolation_x0s)1 and index_list[-1]!= iframe_list[-1]: + index_list.append( len(iframe_list) - 1 ) + + if len(imgarray_list)==1: #如果是单帧图片,则不用跟踪 + retResults = [] + p_result,timeOut = AI_det_track_N( [ [imgarray_list[0]] ,iframe_list[0] ],modelList,postProcess,None ) + ##下面4行内容只是为了保持格式一致 + detArray = np.array(p_result[2]) + if len(p_result[2])==0:res=[] + else: + cnt = detArray.shape[0];trackIds=np.zeros((cnt,1));iframes = np.zeros((cnt,1)) + iframe_list[0] + + #detArray = np.hstack( (detArray[:,1:5], detArray[:,5:6] ,detArray[:,0:1],iframes, trackIds ) ) + detArray = np.hstack( (detArray[:,0:4], detArray[:,4:6] ,iframes, trackIds ) ) ##2023.08.03 修改输入格式 + res = [[ b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7] ] for b in detArray ] + retResults=[imgarray_list,detArray,res ] + #print('##line380:',retResults[2]) + return retResults,timeOut + + else: + t0 = time.time() + timeInfos_track='' + for iframe_index, index_frame in enumerate(index_list): + p_result,timeOut = AI_det_track_N( [ [imgarray_list[index_frame]] ,iframe_list[index_frame] ],modelList,postProcess,sort_tracker ) + timeInfos_track='%s:%s'%(timeInfos_track,timeOut) + + for tracker in p_result[5]: + trackers_dic[tracker.id]=deepcopy(tracker) + t1 = time.time() + + track_det_result = np.empty((0,8)) + for trackId in trackers_dic.keys(): + tracker = trackers_dic[trackId] + bbox_history = np.array(tracker.bbox_history).copy() + if len(bbox_history)<2: continue + ###把(x0,y0,x1,y1)转换成(xc,yc,w,h) + xcs_ycs = (bbox_history[:,0:2] + bbox_history[:,2:4] )/2 + whs = bbox_history[:,2:4] - bbox_history[:,0:2] + bbox_history[:,0:2] = xcs_ycs;bbox_history[:,2:4] = whs; + + #2023.11.17添加的。目的是修正跟踪链上所有的框的类别一样 + chainClsId = get_tracker_cls(bbox_history,scId=4,clsId=5) + bbox_history[:,5] = chainClsId + + arrays_box = bbox_history[:,0:7].transpose();frames=bbox_history[:,6] + #frame_min--表示该批次图片的起始帧,如该批次是[1,100],则frame_min=1,[101,200]--frame_min=101 + #frames[0]--表示该目标出现的起始帧,如[1,11,21,31,41],则frames[0]=1,frames[0]可能会在frame_min之前出现,即一个横跨了多个批次。 + + ##如果要最好化插值范围,则取内区间[frame_min,则frame_max ]和[frames[0],frames[-1] ]的交集 + #inter_frame_min = int(max(frame_min, frames[0])); inter_frame_max = int(min( frame_max, frames[-1] )) ## + + ##如果要求得到完整的目标轨迹,则插值区间要以目标出现的起始点为准 + inter_frame_min=int(frames[0]);inter_frame_max=int(frames[-1]) + new_frames= np.linspace(inter_frame_min,inter_frame_max,inter_frame_max-inter_frame_min+1 ) + f_linear = interpolate.interp1d(frames,arrays_box); interpolation_x0s = (f_linear(new_frames)).transpose() + move_cnt_use =(len(interpolation_x0s)+1)//2*2-1 if len(interpolation_x0s)