add 增加人脸对比
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Dlhis.InfoCheck.Api.Requests;
|
||||
using Dlhis.InfoCheck.Api.Response;
|
||||
using Kurisu.RemoteCall.Attributes;
|
||||
|
||||
namespace Dlhis.InfoCheck.Api;
|
||||
@@ -17,4 +18,12 @@ public interface IInfoCheckApi
|
||||
/// <returns></returns>
|
||||
[Post("/api/face/detection")]
|
||||
Task<List<string>> FaceDetectAsync(FaceDetectRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// 人脸对比
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[Post("/api/face/recognize")]
|
||||
Task<FaceRecognizeResponse> FaceRecognizeAsync(FaceRecognizeRequest request);
|
||||
}
|
||||
14
Src/Dlhis.InfoCheck.Api/Requests/FaceRecognizeRequest.cs
Normal file
14
Src/Dlhis.InfoCheck.Api/Requests/FaceRecognizeRequest.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Dlhis.InfoCheck.Api.Requests;
|
||||
|
||||
public class FaceRecognizeRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 第一张图片
|
||||
/// </summary>
|
||||
public string FirstBase64 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 第二张图片
|
||||
/// </summary>
|
||||
public string SecondBase64 { get; set; }
|
||||
}
|
||||
14
Src/Dlhis.InfoCheck.Api/Response/FaceRecognizeResponse.cs
Normal file
14
Src/Dlhis.InfoCheck.Api/Response/FaceRecognizeResponse.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Dlhis.InfoCheck.Api.Response;
|
||||
|
||||
public class FaceRecognizeResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 相似度
|
||||
/// </summary>
|
||||
public float Similarity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 同一人
|
||||
/// </summary>
|
||||
public bool IsSelf { get; set; }
|
||||
}
|
||||
@@ -1,14 +1,18 @@
|
||||
namespace Dlhis.InfoCheck.Request;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Dlhis.InfoCheck.Request;
|
||||
|
||||
public class FaceRecognizeRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 第一张图片
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string FirstBase64 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 第二张图片
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string SecondBase64 { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user