align_dlib.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:icyface_api 作者: bupticybee 项目源码 文件源码
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 []
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号