          """Compute softmax values for each sets of scores in x."""
          return np.exp(inp - logsumexp(inp, axis=axis, keepdims=True))
  
      @staticmethod
      def decode(loc, priors, variances):
          """Decode locations from predictions using priors to undo
          the encoding we did for offset regression at train time.
          Args:
              loc (tensor): location predictions for loc layers,
                  Shape: [num_priors,4]
 
</s> remove                 loc = np.ascontiguousarray(oreg[0, :, hindex, windex]).reshape((1, 4))
                priors = np.array([[axc / 1.0, ayc / 1.0, stride * 4 / 1.0, stride * 4 / 1.0]])
                variances = [0.1, 0.2]
                box = self.decode(loc, priors, variances)
                x_1, y_1, x_2, y_2 = box[0] * 1.0
                retval.append([x_1, y_1, x_2, y_2, score])
        retval = np.array(retval)
        if len(retval) == 0:
            retval = np.zeros((1, 5))
        return retval
 </s> add                 if score >= self.confidence:
                    loc = np.ascontiguousarray(oreg[0, :, hindex, windex]).reshape((1, 4))
                    priors = np.array([[axc / 1.0, ayc / 1.0, stride * 4 / 1.0, stride * 4 / 1.0]])
                    box = self.decode(loc, priors)
                    x_1, y_1, x_2, y_2 = box[0] * 1.0
                    retval.append([x_1, y_1, x_2, y_2, score])
        return_numpy = np.array(retval) if len(retval) != 0 else np.zeros((1, 5))
        return return_numpy </s> remove     def post_process(self, bboxlist):
 </s> add     def _post_process(self, bboxlist): </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 finalize_predictions(self, bboxlists):
 </s> add     def finalize_predictions(self, bounding_boxes_scales): </s> remove         batch = batch - np.array([104.0, 117.0, 123.0])
 </s> add         batch = batch - self.average_img
    def decode(loc, priors):
          """Compute softmax values for each sets of scores in x."""
          return np.exp(inp - logsumexp(inp, axis=axis, keepdims=True))
  
      @staticmethod
    def decode(loc, priors):
          """Decode locations from predictions using priors to undo
          the encoding we did for offset regression at train time.
          Args:
              loc (tensor): location predictions for loc layers,
                  Shape: [num_priors,4]
keep keep keep keep replace keep keep keep keep keep
 Refine S3FD post-processing: NMS box voting (#902) 
plugins/extract/detect/s3fd.py