  import cv2
  
  from pathlib import Path
  from lib.cli import DirectoryProcessor, FullPaths
  from lib.utils import BackgroundGenerator
  from lib.faces_detect import detect_faces
  
 
</s> remove             for idx, face in faces:
                image = converter.patch_image(image, face)
 </s> add             skip = False
            try:
                if self.frame_ranges is not None:
                    # grab the index with last number regex
                    idx = int(self.imageidxre.findall(filename)[0])
                    # only skip if the current index is not between any of the frame ranges.
                    skip = not any(map(lambda b: b[0]<=idx<=b[1], self.frame_ranges))
            except:
                # if we error, dont skip
                skip = False

            if not skip: # process as normal
                for idx, face in faces:
                    image = converter.patch_image(image, face)
import re
  import cv2
import re
  from pathlib import Path
  from lib.cli import DirectoryProcessor, FullPaths
  from lib.utils import BackgroundGenerator
  from lib.faces_detect import detect_faces
  
keep replace keep keep keep keep keep
 frame-range option for convert (#90)

* extended arguments for convert re https://github.com/deepfakes/faceswap/issues/85

* forgot to change helptext for extended arguments.

* Added -fr --frame-range argument to convert

accepts a list of frame ranges like `-fr 40-50 90-100`

still writes out frames that havent been converted.

* added --discard-frames argument

--discard-frames discards frames not included in --frame-range instead
of writing them out unchanged. 
scripts/convert.py