类 FaceUtils


  • public class FaceUtils
    extends Object
    人脸检测相关工具类
    作者:
    dwj
    • 构造器详细资料

      • FaceUtils

        public FaceUtils()
    • 方法详细资料

      • convertToDetectionResponse

        public static DetectionResponse convertToDetectionResponse​(ai.djl.modality.cv.output.DetectedObjects detection,
                                                                   ai.djl.modality.cv.Image img)
        转换为FaceDetectedResult
        参数:
        detection -
        img -
        返回:
      • convertToDetectionResponse

        public static DetectionResponse convertToDetectionResponse​(com.seeta.sdk.SeetaRect[] seetaResult,
                                                                   FaceModelConfig config,
                                                                   List<com.seeta.sdk.SeetaPointF[]> seetaPointFSList)
        转换为FaceDetectedResult
        参数:
        seetaResult -
        返回:
      • correctRect

        public static DetectionRectangle correctRect​(DetectionRectangle rectangle,
                                                     int imageWidth,
                                                     int imageHeight)
        修正检测框
        参数:
        rectangle -
        imageWidth -
        imageHeight -
        返回:
      • facePoints

        public static double[][] facePoints​(List<Point> points)
        子图中人脸关键点坐标 - Coordinates of key points in the image
        参数:
        points -
        返回:
      • facePoints

        public static double[][] facePoints​(com.seeta.sdk.SeetaPointF[] pointFS)
        子图中人脸关键点坐标 - Coordinates of key points in the image
        参数:
        pointFS -
        返回:
      • faceTemplate512x512

        public static ai.djl.ndarray.NDArray faceTemplate512x512​(ai.djl.ndarray.NDManager manager)
        512x512的目标点 - Target point of 512x512 standard 5 landmarks for FFHQ faces with 512 x 512
        参数:
        manager -
        返回:
      • toBufferedImage

        public static BufferedImage toBufferedImage​(com.seeta.sdk.SeetaImageData seetaImageData)
        bgr转图片
        返回:
        图片