def __init__(self, paths, classifier_path, input_resize=None, output_resize=None, root='.', margin_ratio=0.3):
"""
:param paths: image files :see: https://github.com/pfnet/chainer/blob/master/chainer/datasets/image_dataset.py
:param classifier_path: XML of pre-trained face detector.
You can find it from https://github.com/opencv/opencv/tree/master/data/haarcascades
:param input_resize: set it if you want to resize image **before** running face detector
:param output_resize: target size of output image
"""
super().__init__(paths=paths, resize=input_resize, root=root)
self.classifier = cv2.CascadeClassifier(classifier_path)
self.margin_ratio = margin_ratio
self.output_resize = output_resize
face_dataset.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录