public class CommonLivenessModel extends Object implements LivenessDetModel
| 限定符和类型 | 字段和说明 |
|---|---|
protected LivenessConfig |
config |
protected ai.djl.repository.zoo.ZooModel<ai.djl.modality.cv.Image,Float> |
model |
protected org.apache.commons.pool2.impl.GenericObjectPool<ai.djl.inference.Predictor<ai.djl.modality.cv.Image,Float>> |
predictorPool |
| 构造器和说明 |
|---|
CommonLivenessModel() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
R<DetectionResponse> |
detect(BufferedImage image)
活体检测(多人脸)
|
R<LivenessResult> |
detect(BufferedImage image,
DetectionRectangle faceDetectionRectangle)
活体检测(单人脸)
|
R<List<LivenessResult>> |
detect(BufferedImage image,
DetectionResponse faceDetectionResponse)
活体检测(多人脸)
|
R<DetectionResponse> |
detect(byte[] imageData)
活体检测(多人脸)
|
R<LivenessResult> |
detect(byte[] imageData,
DetectionRectangle faceDetectionRectangle)
活体检测(单人脸)
|
R<List<LivenessResult>> |
detect(byte[] imageData,
DetectionResponse faceDetectionResponse)
活体检测(多人脸)
|
R<DetectionResponse> |
detect(String imagePath)
活体检测(多人脸)
|
R<LivenessResult> |
detect(String imagePath,
DetectionRectangle faceDetectionRectangle)
活体检测(单人脸)
|
R<List<LivenessResult>> |
detect(String imagePath,
DetectionResponse faceDetectionResponse)
活体检测(多人脸)
|
R<DetectionResponse> |
detectBase64(String base64Image)
活体检测(多人脸)
|
R<LivenessResult> |
detectBase64(String base64Image,
DetectionRectangle faceDetectionRectangle)
活体检测(单人脸)
|
R<List<LivenessResult>> |
detectBase64(String base64Image,
DetectionResponse faceDetectionResponse)
活体检测(多人脸)
|
R<LivenessResult> |
detectTopFace(BufferedImage image)
活体检测(分数最高人脸)
|
R<LivenessResult> |
detectTopFace(byte[] imageData)
活体检测(分数最高人脸)
|
R<LivenessResult> |
detectTopFace(String imagePath)
活体检测(分数最高人脸)
|
R<LivenessResult> |
detectTopFaceBase64(String base64Image)
活体检测(分数最高人脸)
|
R<LivenessResult> |
detectVideo(InputStream videoInputStream)
视频活体检测
|
R<LivenessResult> |
detectVideo(String videoPath)
视频活体检测
|
org.apache.commons.pool2.impl.GenericObjectPool<ai.djl.inference.Predictor<ai.djl.modality.cv.Image,Float>> |
getPool() |
void |
loadModel(LivenessConfig config)
加载模型
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdetect, detect, detect, detectBase64protected org.apache.commons.pool2.impl.GenericObjectPool<ai.djl.inference.Predictor<ai.djl.modality.cv.Image,Float>> predictorPool
protected LivenessConfig config
protected ai.djl.repository.zoo.ZooModel<ai.djl.modality.cv.Image,Float> model
public void loadModel(LivenessConfig config)
LivenessDetModelloadModel 在接口中 LivenessDetModelpublic R<LivenessResult> detect(BufferedImage image, DetectionRectangle faceDetectionRectangle)
LivenessDetModeldetect 在接口中 LivenessDetModelimage - BufferedImagefaceDetectionRectangle - 人脸检测结果-人脸框public R<LivenessResult> detect(String imagePath, DetectionRectangle faceDetectionRectangle)
LivenessDetModeldetect 在接口中 LivenessDetModelimagePath - 图片路径faceDetectionRectangle - 人脸检测结果-人脸框public R<LivenessResult> detect(byte[] imageData, DetectionRectangle faceDetectionRectangle)
LivenessDetModeldetect 在接口中 LivenessDetModelfaceDetectionRectangle - 人脸检测结果-人脸框public R<LivenessResult> detectBase64(String base64Image, DetectionRectangle faceDetectionRectangle)
LivenessDetModeldetectBase64 在接口中 LivenessDetModelfaceDetectionRectangle - 人脸检测结果-人脸框public R<List<LivenessResult>> detect(String imagePath, DetectionResponse faceDetectionResponse)
LivenessDetModeldetect 在接口中 LivenessDetModelimagePath - 图片路径faceDetectionResponse - 人脸检测结果public R<List<LivenessResult>> detect(byte[] imageData, DetectionResponse faceDetectionResponse)
LivenessDetModeldetect 在接口中 LivenessDetModelimageData - 图片数据faceDetectionResponse - 人脸检测结果public R<List<LivenessResult>> detect(BufferedImage image, DetectionResponse faceDetectionResponse)
LivenessDetModeldetect 在接口中 LivenessDetModelimage - BufferedImagefaceDetectionResponse - 人脸检测结果public R<List<LivenessResult>> detectBase64(String base64Image, DetectionResponse faceDetectionResponse)
LivenessDetModeldetectBase64 在接口中 LivenessDetModelfaceDetectionResponse - 人脸检测结果public R<LivenessResult> detectTopFace(BufferedImage image)
LivenessDetModeldetectTopFace 在接口中 LivenessDetModelpublic R<LivenessResult> detectTopFace(String imagePath)
LivenessDetModeldetectTopFace 在接口中 LivenessDetModelpublic R<LivenessResult> detectTopFace(byte[] imageData)
LivenessDetModeldetectTopFace 在接口中 LivenessDetModelpublic R<LivenessResult> detectTopFaceBase64(String base64Image)
LivenessDetModeldetectTopFaceBase64 在接口中 LivenessDetModelpublic R<DetectionResponse> detect(String imagePath)
LivenessDetModeldetect 在接口中 LivenessDetModelimagePath - 图片路径public R<DetectionResponse> detect(BufferedImage image)
LivenessDetModeldetect 在接口中 LivenessDetModelimage - BufferedImagepublic R<DetectionResponse> detect(byte[] imageData)
LivenessDetModeldetect 在接口中 LivenessDetModelimageData - 图片字节流public R<DetectionResponse> detectBase64(String base64Image)
LivenessDetModeldetectBase64 在接口中 LivenessDetModelpublic R<LivenessResult> detectVideo(InputStream videoInputStream)
LivenessDetModeldetectVideo 在接口中 LivenessDetModelpublic R<LivenessResult> detectVideo(String videoPath)
LivenessDetModeldetectVideo 在接口中 LivenessDetModelpublic org.apache.commons.pool2.impl.GenericObjectPool<ai.djl.inference.Predictor<ai.djl.modality.cv.Image,Float>> getPool()
getPool 在接口中 LivenessDetModelpublic void close()
throws Exception
close 在接口中 AutoCloseableExceptionCopyright © 2025. All rights reserved.