      area = np.multiply(x_2-x_1+1, y_2-y_1+1)
      s_sort = np.array(var_s.argsort())
      pick = []
      while len(s_sort) > 0:
          # s_sort[-1] have hightest prob score, s_sort[0:-1]->others
          xx_1 = np.maximum(x_1[s_sort[-1]], x_1[s_sort[0:-1]])
          yy_1 = np.maximum(y_1[s_sort[-1]], y_1[s_sort[0:-1]])
          xx_2 = np.minimum(x_2[s_sort[-1]], x_2[s_sort[0:-1]])
          yy_2 = np.minimum(y_2[s_sort[-1]], y_2[s_sort[0:-1]])
          width = np.maximum(0.0, xx_2 - xx_1 + 1)
 
</s> remove         for face, ul, br in zip(batch["detected_faces"], upper_left, bot_right):
            height, width = face.image.shape[:2]
            channels = 3 if face.image.ndim > 2 else 1
            br_width, br_height = br[0].astype('int32')
            ul_width, ul_height = ul[0].astype('int32')
            new_dim = (br_height - ul_height, br_width - ul_width, channels)
 </s> add         for image, top_left, bottom_right in zip(batch["image"], upper_left, bot_right):
            height, width = image.shape[:2]
            channels = 3 if image.ndim > 2 else 1
            bottom_right_width, bottom_right_height = bottom_right[0].astype('int32')
            top_left_width, top_left_height = top_left[0].astype('int32')
            new_dim = (bottom_right_height - top_left_height,
                       bottom_right_width - top_left_width,
                       channels) </s> remove     def _nms(self, boxes, threshold):
 </s> add     @staticmethod
    def _nms(boxes, threshold): </s> remove                 # first index 0 = cls score, 1 = one hot repr
 </s> add                 # first index 0 = class score, 1 = one hot repr </s> remove         for face in detected_faces:
 </s> add         for face, image in zip(batch["detected_faces"], batch["image"]): </s> remove         # TODO improve rudimentary subpixel logic to centroid of 3x3 window algorithm
 </s> add         # TODO improve rudimentary sub-pixel logic to centroid of 3x3 window algorithm
        # s_sort[-1] have highest prob score, s_sort[0:-1]->others
      area = np.multiply(x_2-x_1+1, y_2-y_1+1)
      s_sort = np.array(var_s.argsort())
      pick = []
      while len(s_sort) > 0:
        # s_sort[-1] have highest prob score, s_sort[0:-1]->others
          xx_1 = np.maximum(x_1[s_sort[-1]], x_1[s_sort[0:-1]])
          yy_1 = np.maximum(y_1[s_sort[-1]], y_1[s_sort[0:-1]])
          xx_2 = np.minimum(x_2[s_sort[-1]], x_2[s_sort[0:-1]])
          yy_2 = np.minimum(y_2[s_sort[-1]], y_2[s_sort[0:-1]])
          width = np.maximum(0.0, xx_2 - xx_1 + 1)
keep keep keep keep replace keep keep keep keep keep
 plugins.extract - Create ExtractMedia class for pipeline flow
Bugfix - Fix memory leak in extract 
plugins/extract/detect/mtcnn.py