  
      @staticmethod
      def prepare_batch(batch):
          """ Prepare a batch for prediction """
          batch = batch - np.array([104.0, 117.0, 123.0])
          batch = batch.transpose(0, 3, 1, 2)
          return batch
  
      def finalize_predictions(self, bboxlists):
          """ Detect faces """
 
</s> remove     @staticmethod
    def prepare_batch(batch):
 </s> add     def prepare_batch(self, batch): </s> remove     def finalize_predictions(self, bboxlists):
 </s> add     def finalize_predictions(self, bounding_boxes_scales): </s> remove         for i in range(bboxlists[0].shape[0]):
            bboxlist = [x[i:i+1, ...] for x in bboxlists]
            bboxlist = self.post_process(bboxlist)
            keep = self.nms(bboxlist, 0.3)
            bboxlist = bboxlist[keep, :]
            bboxlist = [x for x in bboxlist if x[-1] >= self.confidence]
            ret.append(np.array(bboxlist))
 </s> add         batch_size = range(bounding_boxes_scales[0].shape[0])
        for img in batch_size:
            bboxlist = [scale[img:img+1] for scale in bounding_boxes_scales]
            boxes = self._post_process(bboxlist)
            bboxlist = self._nms(boxes, 0.5)
            ret.append(bboxlist) </s> remove     def post_process(self, bboxlist):
 </s> add     def _post_process(self, bboxlist):
        batch = batch - self.average_img
  
      @staticmethod
      def prepare_batch(batch):
          """ Prepare a batch for prediction """
        batch = batch - self.average_img
          batch = batch.transpose(0, 3, 1, 2)
          return batch
  
      def finalize_predictions(self, bboxlists):
          """ Detect faces """
keep keep keep keep replace keep keep keep keep keep
 Refine S3FD post-processing: NMS box voting (#902) 
plugins/extract/detect/s3fd.py