def __init__(self, protoTXTPath, weightsPath):
import caffe
caffe.set_mode_cpu()
self.net = caffe.Net(protoTXTPath, weightsPath, caffe.TEST)
self.mean = cv2.imread(os.path.join(Predictor.ROOT, 'trainMean.png')).astype('float')
self.mean = cv2.resize(self.mean, (60,60), interpolation=cv2.INTER_CUBIC)
self.std = cv2.imread(os.path.join(Predictor.ROOT,'trainSTD.png')).astype('float')
self.std = cv2.resize(self.std, (60,60), interpolation=cv2.INTER_CUBIC)
评论列表
文章目录