免费xxxx大片国产片_精品在线一区_亚洲午夜福利av_亚洲色大成人一区二区_无码熟妇人妻AV在线影片免费

您的位置:首頁 >聚焦 > 關(guān)注 >

YOLOv6人臉Landmark檢測_今日訊

2023-06-23 15:33:32 來源:面包芯語


(資料圖片)

defwrap_detection(self,input_image,out_data):confidences=[]boxes=[]kypts=[]rows=out_data.shape[0]image_width,image_height,_=input_image.shapex_factor=image_width/640.0y_factor=image_height/640.0sd=np.zeros((5,2),dtype=np.float32)sd[0:5]=(x_factor,y_factor)sd=np.squeeze(sd.reshape((-1,1)),1)#xyxy,lmdks,conf,cls,forrinrange(rows):row=out_data[r]conf=row[14]cls=row[15]if(conf>0.25andcls>0.25):confidences.append(conf)x,y,w,h=row[0].item(),row[1].item(),row[2].item(),row[3].item()left=int((x-0.5*w)*x_factor)top=int((y-0.5*h)*y_factor)width=int(w*x_factor)height=int(h*y_factor)box=np.array([left,top,width,height])boxes.append(box)kypts.append(np.multiply(row[4:14],sd))indexes=cv.dnn.NMSBoxes(boxes,confidences,0.25,0.25)result_confidences=[]result_boxes=[]result_kypts=[]foriinindexes:result_confidences.append(confidences[i])result_boxes.append(boxes[i])result_kypts.append(kypts[i])returnresult_kypts,result_confidences,result_boxes

掃碼查看OpenCV+OpenVIO+Pytorch系統(tǒng)化學習路線圖