update
This commit is contained in:
parent
c6016289ae
commit
bbdeaa94d8
5
demo.py
5
demo.py
|
|
@ -1,7 +1,7 @@
|
||||||
import sys
|
import sys
|
||||||
sys.path.extend(['..','../AIlib' ])
|
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
|
import cv2,os,time
|
||||||
from segutils.segmodel import SegModel
|
from segutils.segmodel import SegModel
|
||||||
from models.experimental import attempt_load
|
from models.experimental import attempt_load
|
||||||
|
|
@ -130,7 +130,8 @@ def forest_demo():
|
||||||
imgpath = os.path.join(impth, folders[i])
|
imgpath = os.path.join(impth, folders[i])
|
||||||
im0s=[cv2.imread(imgpath)]
|
im0s=[cv2.imread(imgpath)]
|
||||||
time00 = time.time()
|
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()
|
time11 = time.time()
|
||||||
image_array = p_result[1]
|
image_array = p_result[1]
|
||||||
cv2.imwrite( os.path.join( outpth,folders[i] ) ,image_array )
|
cv2.imwrite( os.path.join( outpth,folders[i] ) ,image_array )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue