public class FaceUtils extends Object
| 构造器和说明 |
|---|
FaceUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static DetectionResponse |
convertToDetectionResponse(ai.djl.modality.cv.output.DetectedObjects detection,
ai.djl.modality.cv.Image img)
转换为FaceDetectedResult
|
static DetectionResponse |
convertToDetectionResponse(com.seeta.sdk.SeetaRect[] seetaResult,
FaceModelConfig config,
List<com.seeta.sdk.SeetaPointF[]> seetaPointFSList)
转换为FaceDetectedResult
|
static DetectionResponse |
convertToDetectionResponse(com.seeta.sdk.SeetaRect[] seetaResult,
List<com.seeta.sdk.SeetaPointF[]> seetaPointFSList,
List<LivenessStatus> livenessStatusList)
转换为FaceDetectedResult
|
static EyeStatus |
convertToEyeStatus(com.seeta.sdk.EyeStateDetector.EYE_STATE eyeState)
转为EyeStatus
|
static DetectionResponse |
convertToFaceAttributeResponse(com.seeta.sdk.SeetaRect[] seetaResult,
List<com.seeta.sdk.SeetaPointF[]> seetaPointFSList,
List<FaceAttribute> faceAttributeList) |
static GenderType |
convertToGenderType(com.seeta.sdk.GenderPredictor.GENDER gender)
转为GenderType
|
static LivenessStatus |
convertToLivenessStatus(com.seeta.sdk.FaceAntiSpoofing.Status status)
将SeetaAntiSpoofing.Status转换为LivenessStatus
|
static com.seeta.sdk.SeetaPointF[] |
convertToSeetaPointF(List<Point> pointList)
将PointList转换为SeetaPointF[]
|
static com.seeta.sdk.SeetaRect |
convertToSeetaRect(DetectionRectangle detectionRectangle)
将DetectionRectangle转换为SeetaRect
|
static DetectionRectangle |
correctRect(DetectionRectangle rectangle,
int imageWidth,
int imageHeight)
修正检测框
|
static BufferedImage |
drawBoundingBoxes(BufferedImage sourceImage,
DetectionResponse detectionResponse)
绘制人脸框
|
static void |
drawBoundingBoxes(BufferedImage sourceImage,
DetectionResponse detectionResponse,
String savePath)
绘制人脸框
|
static void |
drawBoxesWithFaceAttribute(BufferedImage sourceImage,
DetectionResponse detectionResponse,
String savePath)
绘制人脸属性
|
static double[][] |
facePoints(List<Point> points)
子图中人脸关键点坐标 - Coordinates of key points in the image
|
static double[][] |
facePoints(com.seeta.sdk.SeetaPointF[] pointFS)
子图中人脸关键点坐标 - Coordinates of key points in the image
|
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
|
static BufferedImage |
toBufferedImage(com.seeta.sdk.SeetaImageData seetaImageData)
bgr转图片
|
public static DetectionResponse convertToDetectionResponse(ai.djl.modality.cv.output.DetectedObjects detection, ai.djl.modality.cv.Image img)
detection - img - public static DetectionResponse convertToDetectionResponse(com.seeta.sdk.SeetaRect[] seetaResult, FaceModelConfig config, List<com.seeta.sdk.SeetaPointF[]> seetaPointFSList)
seetaResult - public static void drawBoundingBoxes(BufferedImage sourceImage, DetectionResponse detectionResponse, String savePath) throws IOException
sourceImage - detectionResponse - savePath - IOExceptionpublic static BufferedImage drawBoundingBoxes(BufferedImage sourceImage, DetectionResponse detectionResponse) throws IOException
sourceImage - detectionResponse - IOExceptionpublic static DetectionRectangle correctRect(DetectionRectangle rectangle, int imageWidth, int imageHeight)
rectangle - imageWidth - imageHeight - public static double[][] facePoints(List<Point> points)
points - public static double[][] facePoints(com.seeta.sdk.SeetaPointF[] pointFS)
pointFS - public static ai.djl.ndarray.NDArray faceTemplate512x512(ai.djl.ndarray.NDManager manager)
manager - public static BufferedImage toBufferedImage(com.seeta.sdk.SeetaImageData seetaImageData)
public static com.seeta.sdk.SeetaRect convertToSeetaRect(DetectionRectangle detectionRectangle)
detectionRectangle - public static com.seeta.sdk.SeetaPointF[] convertToSeetaPointF(List<Point> pointList)
pointList - public static LivenessStatus convertToLivenessStatus(com.seeta.sdk.FaceAntiSpoofing.Status status)
status - public static GenderType convertToGenderType(com.seeta.sdk.GenderPredictor.GENDER gender)
gender - public static EyeStatus convertToEyeStatus(com.seeta.sdk.EyeStateDetector.EYE_STATE eyeState)
eyeState - public static DetectionResponse convertToFaceAttributeResponse(com.seeta.sdk.SeetaRect[] seetaResult, List<com.seeta.sdk.SeetaPointF[]> seetaPointFSList, List<FaceAttribute> faceAttributeList)
public static DetectionResponse convertToDetectionResponse(com.seeta.sdk.SeetaRect[] seetaResult, List<com.seeta.sdk.SeetaPointF[]> seetaPointFSList, List<LivenessStatus> livenessStatusList)
seetaResult - public static void drawBoxesWithFaceAttribute(BufferedImage sourceImage, DetectionResponse detectionResponse, String savePath) throws IOException
sourceImage - detectionResponse - savePath - IOExceptionCopyright © 2025. All rights reserved.