MtcnnDetector.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:MTCNN_face_detection_caffe 作者: LucyLu-LX 项目源码 文件源码
def __init__(self,
                 minsize = 20,
                 threshold = [0.6, 0.7, 0.7],
                 factor = 0.709,
                 fastresize = False,
                 gpuid = 0):

        self.minsize = minsize
        self.threshold = threshold
        self.factor = factor
        self.fastresize = fastresize

        model_P = './model/det1.prototxt'
        weights_P = './model/det1.caffemodel'
        model_R = './model/det2.prototxt'
        weights_R = './model/det2.caffemodel'
        model_O = './model/det3.prototxt'
        weights_O = './model/det3.caffemodel'

        caffe.set_mode_gpu()
        caffe.set_device(gpuid)

        self.PNet = caffe.Net(model_P, weights_P, caffe.TEST) 
        self.RNet = caffe.Net(model_R, weights_R, caffe.TEST)
        self.ONet = caffe.Net(model_O, weights_O, caffe.TEST)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号