feat 人脸检测
This commit is contained in:
13
Src/Dlhis.InfoCheck.Api/Dlhis.InfoCheck.Api.csproj
Normal file
13
Src/Dlhis.InfoCheck.Api/Dlhis.InfoCheck.Api.csproj
Normal file
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Kurisu.RemoteCall" Version="0.4.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
20
Src/Dlhis.InfoCheck.Api/IInfoCheckApi.cs
Normal file
20
Src/Dlhis.InfoCheck.Api/IInfoCheckApi.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Dlhis.InfoCheck.Api.Requests;
|
||||
using Kurisu.RemoteCall.Attributes;
|
||||
using Kurisu.RemoteCall.Default;
|
||||
|
||||
namespace Dlhis.InfoCheck.Api;
|
||||
|
||||
/// <summary>
|
||||
/// 信息检查
|
||||
/// </summary>
|
||||
[EnableRemoteClient(Name = "infocheck-service", BaseUrl = "${InternalRequest:InfoCheckRequestUrl}")]
|
||||
public interface IInfoCheckApi
|
||||
{
|
||||
/// <summary>
|
||||
/// 检测人脸质量
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[Post("/api/face/detection")]
|
||||
Task<DefaultApiResult<List<string>>> FaceDetectAsync(FaceDetectRequest request);
|
||||
}
|
||||
17
Src/Dlhis.InfoCheck.Api/Requests/FaceDetectRequest.cs
Normal file
17
Src/Dlhis.InfoCheck.Api/Requests/FaceDetectRequest.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Dlhis.InfoCheck.Api.Requests;
|
||||
|
||||
public class FaceDetectRequest
|
||||
{
|
||||
[Required]
|
||||
public string Base64 { get; set; }
|
||||
|
||||
public List<FaceDetectCheckRequest> CheckList { get; set; }
|
||||
}
|
||||
|
||||
public class FaceDetectCheckRequest
|
||||
{
|
||||
public int Type { get; set; }
|
||||
public int Level { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user