當前位置: 首頁>>代碼示例>>Python>>正文


Python dlib.rectangles方法代碼示例

本文整理匯總了Python中dlib.rectangles方法的典型用法代碼示例。如果您正苦於以下問題:Python dlib.rectangles方法的具體用法?Python dlib.rectangles怎麽用?Python dlib.rectangles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在dlib的用法示例。


在下文中一共展示了dlib.rectangles方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: getAllFaceBoundingBoxes

# 需要導入模塊: import dlib [as 別名]
# 或者: from dlib import rectangles [as 別名]
def getAllFaceBoundingBoxes(self, rgbImg):
        """
        Find all face bounding boxes in an image.

        :param rgbImg: RGB image to process. Shape: (height, width, 3)
        :type rgbImg: numpy.ndarray
        :return: All face bounding boxes in an image.
        :rtype: dlib.rectangles
        """
        assert rgbImg is not None

        try:
            return self.detector(rgbImg, 1)
        except Exception as e: #pylint: disable=broad-except
            print("Warning: {}".format(e))
            # In rare cases, exceptions are thrown.
            return [] 
開發者ID:deepinsight,項目名稱:insightface,代碼行數:19,代碼來源:align_dlib.py

示例2: getAllFaceBoundingBoxes

# 需要導入模塊: import dlib [as 別名]
# 或者: from dlib import rectangles [as 別名]
def getAllFaceBoundingBoxes(self, rgbImg):
        """
        Find all face bounding boxes in an image.
        :param rgbImg: RGB image to process. Shape: (height, width, 3)
        :type rgbImg: numpy.ndarray
        :return: All face bounding boxes in an image.
        :rtype: dlib.rectangles
        """
        assert rgbImg is not None

        try:
            return self.detector(rgbImg, 1)
        except Exception as e:
            print("Warning: {}".format(e))
            # In rare cases, exceptions are thrown.
            return [] 
開發者ID:yeziyang1992,項目名稱:Python-Tensorflow-Face-v2.0,代碼行數:18,代碼來源:align_dlib.py

示例3: getAllFaceBoundingBoxes

# 需要導入模塊: import dlib [as 別名]
# 或者: from dlib import rectangles [as 別名]
def getAllFaceBoundingBoxes(self, rgbImg):
        """
        Find all face bounding boxes in an image.

        :param rgbImg: RGB image to process. Shape: (height, width, 3)
        :type rgbImg: numpy.ndarray
        :return: All face bounding boxes in an image.
        :rtype: dlib.rectangles
        """
        assert rgbImg is not None

        try:
            return self.detector(rgbImg, 1)
        except Exception as e:
            print("Warning: {}".format(e))
            # In rare cases, exceptions are thrown.
            return [] 
開發者ID:tornadomeet,項目名稱:mxnet-face,代碼行數:19,代碼來源:align_face.py


注:本文中的dlib.rectangles方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。