       "image": <four channel source image>,
       "detected_faces": <list of bounding box dicts from lib/plugins/extract/detect/_base>
      """
  
  import logging
  import os
  import traceback
  import cv2
  import numpy as np
  import keras
  
  from io import StringIO
 
</s> remove     For each source item, the plugin must pass a dict to finalize containing:
    {"filename": <filename of source frame>,
     "image": <four channel source image>,
     "detected_faces": <list of bounding box dicts from lib/plugins/extract/detect/_base>
    """
 </s> add The plugin will receive a dict containing:

>>> {"filename": <filename of source frame>,
>>>  "image": <source image>,
>>>  "detected_faces": <list of bounding box dicts from lib/plugins/extract/detect/_base>}

For each source item, the plugin must pass a dict to finalize containing: </s> remove import keras
 </s> add  </s> remove from io import StringIO
from lib.faces_detect import DetectedFace
from lib.aligner import Extract
 </s> add  </s> remove     The plugin will receive a dict containing:
    {"filename": <filename of source frame>,
     "image": <source image>,
     "detected_faces": <list of bounding box dicts from lib/plugins/extract/detect/_base>}
 </s> add See the override methods for which methods are required. </s> remove import cv2
import keras
 </s> add 
>>> {"filename": <filename of source frame>,
>>>  "image": <four channel source image>,
>>>  "detected_faces": <list of bounding box dicts from lib/plugins/extract/detect/_base>}
"""

import base64
import zlib
       "image": <four channel source image>,
       "detected_faces": <list of bounding box dicts from lib/plugins/extract/detect/_base>
      """
  
>>> {"filename": <filename of source frame>,
>>>  "image": <four channel source image>,
>>>  "detected_faces": <list of bounding box dicts from lib/plugins/extract/detect/_base>}
"""

import base64
import zlib
>>> {"filename": <filename of source frame>,
>>>  "image": <four channel source image>,
>>>  "detected_faces": <list of bounding box dicts from lib/plugins/extract/detect/_base>}
"""

import base64
import zlib
>>> {"filename": <filename of source frame>,
>>>  "image": <four channel source image>,
>>>  "detected_faces": <list of bounding box dicts from lib/plugins/extract/detect/_base>}
"""

import base64
import zlib
  import cv2
  import numpy as np
  import keras
  
  from io import StringIO
keep keep keep keep replace replace replace keep keep keep keep keep
 Mask plugin cleanup

- PEP8 Fixes
- Remove config for non NN Masks
- Tidy up defaults helptext
- cli.py fix typos
- Remove unused imports and functions _base.py
- Standardize input_size param
- Enable and update documentation
- Change references from `aligner` to `masker`
- Change  input_size, output_size and coverage_ratio from kwargs to params
- Move load_aligned to batch input iterator
- Remove unnecessary self.input param
- Add softmax layer append function to KSession
- Remove references to KSession protected objects
- Standardize plugin output into finalize method
- Make masks full frame and add to lib.faces_detect
- Add masks to alignments.json (temporary zipped base64 solution) 
plugins/extract/mask/_base.py