类 AbstractFaceModel
- java.lang.Object
-
- cn.smartjavaai.face.AbstractFaceModel
-
-
构造器概要
构造器 构造器 说明 AbstractFaceModel()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 floatcalculSimilar(float[] feature1, float[] feature2)计算相似度longclearFace()清空人脸库数据DetectionResponsedetect(byte[] imageData)人脸检测DetectionResponsedetect(BufferedImage image)人脸检测DetectionResponsedetect(InputStream imageInputStream)人脸检测DetectionResponsedetect(String imagePath)人脸检测BufferedImagedetectAndDraw(BufferedImage sourceImage)检测并绘制人脸voiddetectAndDraw(String imagePath, String outputPath)检测并绘制人脸List<float[]>extractFeatures(byte[] imageData)特征提取(使用默认配置)List<float[]>extractFeatures(byte[] imageData, FaceExtractConfig config)特征提取(使用自定义配置)List<float[]>extractFeatures(BufferedImage image)特征提取(使用默认配置)List<float[]>extractFeatures(BufferedImage image, FaceExtractConfig config)特征提取(使用自定义配置) 强制裁剪操作List<float[]>extractFeatures(String imagePath)特征提取(使用默认配置)List<float[]>extractFeatures(String imagePath, FaceExtractConfig config)特征提取(使用自定义配置)float[]extractTopFaceFeature(byte[] imageData)提取分数最高人脸特征(使用默认配置)float[]extractTopFaceFeature(byte[] imageData, FaceExtractConfig config)提取分数最高人脸特征(使用自定义配置)float[]extractTopFaceFeature(BufferedImage image)提取分数最高人脸特征(使用默认配置)float[]extractTopFaceFeature(BufferedImage image, FaceExtractConfig config)提取分数最高人脸特征(使用自定义配置)float[]extractTopFaceFeature(String imagePath)提取分数最高人脸特征(使用默认配置)float[]extractTopFaceFeature(String imagePath, FaceExtractConfig config)提取分数最高人脸特征(使用自定义配置)floatfeatureComparison(byte[] imageData1, byte[] imageData2)特征比较floatfeatureComparison(BufferedImage sourceImage1, BufferedImage sourceImag2)特征比较floatfeatureComparison(InputStream inputStream1, InputStream inputStream2)特征比较floatfeatureComparison(String imagePath1, String imagePath2)特征比较voidloadModel(FaceModelConfig config)加载模型booleanregister(String key, byte[] imageData)注册人脸booleanregister(String key, BufferedImage sourceImage)注册人脸booleanregister(String key, InputStream inputStream)注册人脸booleanregister(String key, String imagePath)注册人脸longremoveRegister(String... keys)删除已标记人脸FaceResultsearch(byte[] imageData)查询人脸FaceResultsearch(BufferedImage sourceImage)查询人脸FaceResultsearch(InputStream inputStream)查询人脸FaceResultsearch(String imagePath)查询人脸
-
-
-
方法详细资料
-
loadModel
public void loadModel(FaceModelConfig config)
从接口复制的说明:FaceModel加载模型
-
detect
public DetectionResponse detect(String imagePath)
从接口复制的说明:FaceModel人脸检测
-
detect
public DetectionResponse detect(InputStream imageInputStream)
从接口复制的说明:FaceModel人脸检测
-
detect
public DetectionResponse detect(BufferedImage image)
从接口复制的说明:FaceModel人脸检测
-
detect
public DetectionResponse detect(byte[] imageData)
从接口复制的说明:FaceModel人脸检测
-
detectAndDraw
public void detectAndDraw(String imagePath, String outputPath)
从接口复制的说明:FaceModel检测并绘制人脸- 指定者:
detectAndDraw在接口中FaceModel- 参数:
imagePath- 图片输入路径(包含文件名称)outputPath- 图片输出路径(包含文件名称)
-
detectAndDraw
public BufferedImage detectAndDraw(BufferedImage sourceImage)
从接口复制的说明:FaceModel检测并绘制人脸- 指定者:
detectAndDraw在接口中FaceModel- 返回:
-
calculSimilar
public float calculSimilar(float[] feature1, float[] feature2)从接口复制的说明:FaceModel计算相似度- 指定者:
calculSimilar在接口中FaceModel- 参数:
feature1- 图1特征feature2- 图2特征- 返回:
-
featureComparison
public float featureComparison(String imagePath1, String imagePath2)
从接口复制的说明:FaceModel特征比较- 指定者:
featureComparison在接口中FaceModel- 参数:
imagePath1- 图1路径imagePath2- 图2路径- 返回:
-
featureComparison
public float featureComparison(InputStream inputStream1, InputStream inputStream2)
从接口复制的说明:FaceModel特征比较- 指定者:
featureComparison在接口中FaceModel- 参数:
inputStream1- 图1输入流inputStream2- 图2输入流- 返回:
-
register
public boolean register(String key, InputStream inputStream)
从接口复制的说明:FaceModel注册人脸
-
register
public boolean register(String key, BufferedImage sourceImage)
从接口复制的说明:FaceModel注册人脸
-
search
public FaceResult search(String imagePath)
从接口复制的说明:FaceModel查询人脸
-
search
public FaceResult search(InputStream inputStream)
从接口复制的说明:FaceModel查询人脸
-
removeRegister
public long removeRegister(String... keys)
从接口复制的说明:FaceModel删除已标记人脸- 指定者:
removeRegister在接口中FaceModel- 返回:
-
featureComparison
public float featureComparison(BufferedImage sourceImage1, BufferedImage sourceImag2)
从接口复制的说明:FaceModel特征比较- 指定者:
featureComparison在接口中FaceModel- 参数:
sourceImage1- 图1BufferedImagesourceImag2- 图2BufferedImage- 返回:
-
featureComparison
public float featureComparison(byte[] imageData1, byte[] imageData2)从接口复制的说明:FaceModel特征比较- 指定者:
featureComparison在接口中FaceModel- 返回:
-
search
public FaceResult search(BufferedImage sourceImage)
从接口复制的说明:FaceModel查询人脸
-
search
public FaceResult search(byte[] imageData)
从接口复制的说明:FaceModel查询人脸
-
extractFeatures
public List<float[]> extractFeatures(String imagePath)
从接口复制的说明:FaceModel特征提取(使用默认配置)- 指定者:
extractFeatures在接口中FaceModel- 参数:
imagePath- 图片路径- 返回:
-
extractFeatures
public List<float[]> extractFeatures(byte[] imageData)
从接口复制的说明:FaceModel特征提取(使用默认配置)- 指定者:
extractFeatures在接口中FaceModel- 参数:
imageData- 图片字节流- 返回:
-
extractFeatures
public List<float[]> extractFeatures(BufferedImage image)
从接口复制的说明:FaceModel特征提取(使用默认配置)- 指定者:
extractFeatures在接口中FaceModel- 参数:
image- BufferedImage- 返回:
-
extractFeatures
public List<float[]> extractFeatures(BufferedImage image, FaceExtractConfig config)
从接口复制的说明:FaceModel特征提取(使用自定义配置) 强制裁剪操作- 指定者:
extractFeatures在接口中FaceModel- 参数:
image- BufferedImage- 返回:
-
extractFeatures
public List<float[]> extractFeatures(String imagePath, FaceExtractConfig config)
从接口复制的说明:FaceModel特征提取(使用自定义配置)- 指定者:
extractFeatures在接口中FaceModel- 参数:
imagePath- 图片路径- 返回:
-
extractFeatures
public List<float[]> extractFeatures(byte[] imageData, FaceExtractConfig config)
从接口复制的说明:FaceModel特征提取(使用自定义配置)- 指定者:
extractFeatures在接口中FaceModel- 参数:
imageData- 图片字节流- 返回:
-
extractTopFaceFeature
public float[] extractTopFaceFeature(BufferedImage image)
从接口复制的说明:FaceModel提取分数最高人脸特征(使用默认配置)- 指定者:
extractTopFaceFeature在接口中FaceModel- 参数:
image- BufferedImage- 返回:
-
extractTopFaceFeature
public float[] extractTopFaceFeature(String imagePath)
从接口复制的说明:FaceModel提取分数最高人脸特征(使用默认配置)- 指定者:
extractTopFaceFeature在接口中FaceModel- 参数:
imagePath- 图片路径- 返回:
-
extractTopFaceFeature
public float[] extractTopFaceFeature(byte[] imageData)
从接口复制的说明:FaceModel提取分数最高人脸特征(使用默认配置)- 指定者:
extractTopFaceFeature在接口中FaceModel- 参数:
imageData- 图片字节流- 返回:
-
extractTopFaceFeature
public float[] extractTopFaceFeature(BufferedImage image, FaceExtractConfig config)
从接口复制的说明:FaceModel提取分数最高人脸特征(使用自定义配置)- 指定者:
extractTopFaceFeature在接口中FaceModel- 参数:
image- BufferedImage- 返回:
-
extractTopFaceFeature
public float[] extractTopFaceFeature(String imagePath, FaceExtractConfig config)
从接口复制的说明:FaceModel提取分数最高人脸特征(使用自定义配置)- 指定者:
extractTopFaceFeature在接口中FaceModel- 参数:
imagePath- 图片路径- 返回:
-
extractTopFaceFeature
public float[] extractTopFaceFeature(byte[] imageData, FaceExtractConfig config)从接口复制的说明:FaceModel提取分数最高人脸特征(使用自定义配置)- 指定者:
extractTopFaceFeature在接口中FaceModel- 参数:
imageData- 图片字节流- 返回:
-
-