Exemple #1
0
 def bboxes_decode(self, feat_localizations, anchors, scope='ssd_bboxes_decode'):
     """Encode labels and bounding boxes.
     """
     return ssd_common.tf_ssd_bboxes_decode(
         feat_localizations, anchors,
         prior_scaling=self.params.prior_scaling,
         scope=scope)
 def bboxes_decode(self, feat_localizations, anchors,
                   scope='ssd_bboxes_decode'):
     """Encode labels and bounding boxes.
     """
     return ssd_common.tf_ssd_bboxes_decode(
         feat_localizations, anchors,
         prior_scaling=self.params.prior_scaling,
         scope=scope)
Exemple #3
0
 def bboxes_decode(self, feat_localizations, anchors,  #解码,用锚点框信息,锚点框与预测真实框间的转换值,得到真是的预测框(ymin,xmin,ymax,xmax)
                   scope='ssd_bboxes_decode'):
     """Encode labels and bounding boxes.
     """
     return ssd_common.tf_ssd_bboxes_decode(
         feat_localizations, anchors,
         prior_scaling=self.params.prior_scaling,
         scope=scope)
    def decode_bboxes_all_layers_tf(self, feat_localizations):
        """convert ssd boxes from relative to input image anchors to relative to input width/height

        Return:
          numpy array NlayersxNx4: ymin, xmin, ymax, xmax
        """
        anchors = self.ssd_anchors_all_layers()
        return ssd_common.tf_ssd_bboxes_decode(
            feat_localizations, anchors, prior_scaling=self.prior_scaling)