SphereFace python抽取人脸特征

  • Post author:
  • Post category:python


def getFeat(imgPath):
  img = cv2.imread(imgPath)
  img = (img - 128.0) / 128.0
  img = img.transpose((2,0,1)) 
  img = img[None,:] # add singleton dimension

  out = net.forward_all( data = img ) # out is probability
  return out['fc5'][0]



版权声明:本文为honghu549599AAA原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。