digitSize
This commit is contained in:
parent
69d04d8c8b
commit
da5d22f763
8
demo.py
8
demo.py
|
|
@ -26,7 +26,7 @@ def river_demo():
|
||||||
Segweights = '../AIlib/weights/STDC/model_maxmIOU75_1720_0.946_360640.pth' ##升级的分割模型
|
Segweights = '../AIlib/weights/STDC/model_maxmIOU75_1720_0.946_360640.pth' ##升级的分割模型
|
||||||
|
|
||||||
postFile= '../AIlib/conf/para.json'
|
postFile= '../AIlib/conf/para.json'
|
||||||
|
digitFont= { 'line_thickness':2, 'fontSize':1.0}
|
||||||
conf_thres,iou_thres,classes,rainbows=get_postProcess_para(postFile)
|
conf_thres,iou_thres,classes,rainbows=get_postProcess_para(postFile)
|
||||||
|
|
||||||
####模型选择参数用如下:
|
####模型选择参数用如下:
|
||||||
|
|
@ -67,7 +67,7 @@ def river_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(im0s,model,segmodel,names,label_arraylist,rainbows,half,device,conf_thres, iou_thres,allowedList,font=digitFont)
|
||||||
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 )
|
||||||
|
|
@ -153,6 +153,6 @@ def road_forest_demo(business ):
|
||||||
|
|
||||||
|
|
||||||
if __name__=="__main__":
|
if __name__=="__main__":
|
||||||
#river_demo()
|
river_demo()
|
||||||
road_forest_demo('forest' )
|
#road_forest_demo('forest' )
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue