This commit is contained in:
thsw 2022-08-14 20:56:03 +08:00
parent c6016289ae
commit bbdeaa94d8
1 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import sys
sys.path.extend(['..','../AIlib' ])
from AI import AI_process,get_postProcess_para
from AI import AI_process,AI_process_forest,get_postProcess_para
import cv2,os,time
from segutils.segmodel import SegModel
from models.experimental import attempt_load
@ -130,7 +130,8 @@ def forest_demo():
imgpath = os.path.join(impth, folders[i])
im0s=[cv2.imread(imgpath)]
time00 = time.time()
p_result,timeOut = AI_process(im0s,model,segmodel,names,label_arraylist,rainbows,half,device,conf_thres, iou_thres,allowedList)
#使用不同的函数。每一个领域采用一个函数
p_result,timeOut = AI_process_forest(im0s,model,segmodel,names,label_arraylist,rainbows,half,device,conf_thres, iou_thres,allowedList)
time11 = time.time()
image_array = p_result[1]
cv2.imwrite( os.path.join( outpth,folders[i] ) ,image_array )