  import face_recognition
  import face_recognition_models
  import dlib
  from .DetectedFace import DetectedFace
  
  def detect_faces(frame):
      face_locations = face_recognition.face_locations(frame)
      landmarks = _raw_face_landmarks(frame, face_locations)
      landmarks_as_tuples = [[(p.x, p.y) for p in landmark.parts()] for landmark in landmarks]
 
</s> remove     landmarks_as_tuples = [[(p.x, p.y) for p in landmark.parts()] for landmark in landmarks]
 </s> add  </s> remove     for ((top, right, bottom, left), landmarks) in zip(face_locations, landmarks_as_tuples):
        x = left
        y = top
        w = right - left
        h = bottom - top
        yield DetectedFace(frame[y: y + h, x: x + w], x, w, y, h, landmarks)
 </s> add     for ((y, right, bottom, x), landmarks) in zip(face_locations, landmarks):
        yield DetectedFace(frame[y: bottom, x: right], x, right - x, y, bottom - y, landmarks) </s> remove     parser = argparse.ArgumentParser()
 </s> add     parser = FullHelpArgumentParser()
  import face_recognition
  import face_recognition_models


  
  def detect_faces(frame):
      face_locations = face_recognition.face_locations(frame)
      landmarks = _raw_face_landmarks(frame, face_locations)
      landmarks_as_tuples = [[(p.x, p.y) for p in landmark.parts()] for landmark in landmarks]
keep keep replace replace keep keep keep keep keep
 Adding models as plugins + Face filtering (#53) + #39 + #43 + #44 + #49 (#61)

* Making Models as plugins

* Do not reload model on each image #39 + Adding FaceFilter #53

* Adding @lukaville PR for #43 and #44 (possibly)

* Training done in a separate thread

* Better log for plugin load

* Adding a prefetch to train.py #49
(Note that we prefetch 2 batches of images, due to the queue behavior)
+ More compact logging with verbose info included

* correction of DirectoryProcessor signature

* adding missing import

* Convert with parallel preprocessing of files

* Added coverage var for trainer

Added a var with comment. Feel free to add it as argument

* corrections

* Modifying preview and normalization of image + correction

* Cleanup 
lib/faces_detect.py