      face_detect = face_alignment.Extract(frame,
                                           detector,
                                           mtcnn_kwargs,
                                           verbose)
      for face in face_detect.landmarks:
          ax_x, ax_y = face[0][0], face[0][1]
          right, bottom = face[0][2], face[0][3]
          landmarks = face[1]
 
</s> remove def detect_faces(frame, detector, verbose, rotation=0, mtcnn_kwargs=None):
 </s> add def detect_faces(frame, detector, verbose, rotation=0,
                 dlib_buffer=64, mtcnn_kwargs=None): </s> remove class DetectedFace(object):
 </s> add class DetectedFace(): </s> remove         self.initialize(detector, mtcnn_kwargs)
 </s> add         self.initialize(detector, mtcnn_kwargs, dlib_buffer) </s> remove         faces = detect_faces(image, self.args.detector, self.args.verbose,
                             rotation=rotation, mtcnn_kwargs=self.mtcnn_kwargs)
 </s> add         faces = detect_faces(image,
                             self.args.detector,
                             self.args.verbose,
                             rotation=rotation,
                             dlib_buffer=self.args.dlib_buffer,
                             mtcnn_kwargs=self.mtcnn_kwargs) </s> remove     def __init__(self, input_image_bgr, detector, mtcnn_kwargs=None,
                 verbose=False, input_is_predetected_face=False):
 </s> add     def __init__(self, input_image_bgr, detector, dlib_buffer=64,
                 mtcnn_kwargs=None, verbose=False,
                 input_is_predetected_face=False):
                                         dlib_buffer,
      face_detect = face_alignment.Extract(frame,
                                           detector,
                                         dlib_buffer,
                                           mtcnn_kwargs,
                                           verbose)
      for face in face_detect.landmarks:
          ax_x, ax_y = face[0][0], face[0][1]
          right, bottom = face[0][2], face[0][3]
          landmarks = face[1]
keep add keep keep keep keep keep keep
 Add option to change dlib-cnn buffer size 
lib/faces_detect.py