mirror of
https://gitee.com/open-visual/face-search.git
synced 2025-07-25 19:41:42 +08:00
commit
de2e20c614
@ -9,6 +9,8 @@ import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
@Api(tags="03、人脸数据管理")
|
||||
@RestController("visualFaceDataController")
|
||||
@RequestMapping("/visual/face")
|
||||
@ -18,7 +20,7 @@ public class FaceDataController extends FaceDataControllerImpl {
|
||||
@Override
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
public ResponseInfo<FaceDataRepVo> create(@RequestBody FaceDataReqVo face) {
|
||||
public ResponseInfo<FaceDataRepVo> create(@RequestBody @Valid FaceDataReqVo face) {
|
||||
return super.create(face);
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,8 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
|
||||
@Api(tags="04、人脸搜索服务")
|
||||
@RestController("visualFaceSearchController")
|
||||
@ -19,7 +21,7 @@ public class FaceSearchController extends FaceSearchControllerImpl {
|
||||
@Override
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/do", method = RequestMethod.POST)
|
||||
public ResponseInfo<List<FaceSearchRepVo>> search(@RequestBody FaceSearchReqVo search) {
|
||||
public ResponseInfo<List<FaceSearchRepVo>> search(@RequestBody @Valid FaceSearchReqVo search) {
|
||||
return super.search(search);
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags="02、人脸样本管理")
|
||||
@ -20,7 +21,7 @@ public class SampleDataController extends SampleDataControllerImpl {
|
||||
@Override
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
public ResponseInfo<Boolean> create(@RequestBody SampleDataReqVo sample) {
|
||||
public ResponseInfo<Boolean> create(@RequestBody @Valid SampleDataReqVo sample) {
|
||||
return super.create(sample);
|
||||
}
|
||||
|
||||
@ -28,7 +29,7 @@ public class SampleDataController extends SampleDataControllerImpl {
|
||||
@Override
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/update", method = RequestMethod.POST)
|
||||
public ResponseInfo<Boolean> update(@RequestBody SampleDataReqVo sample) {
|
||||
public ResponseInfo<Boolean> update(@RequestBody @Valid SampleDataReqVo sample) {
|
||||
return super.update(sample);
|
||||
}
|
||||
|
||||
|
@ -2,9 +2,8 @@ package com.visual.face.search.server.domain.request;
|
||||
|
||||
import com.visual.face.search.server.domain.base.BaseVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
public class FaceCompareReqVo extends BaseVo {
|
||||
|
||||
@ -19,7 +18,7 @@ public class FaceCompareReqVo extends BaseVo {
|
||||
private String imageBase64B;
|
||||
|
||||
/**人脸质量分数阈值**/
|
||||
@Size(min = 0, max = 100, message = "faceScoreThreshold is not in the range")
|
||||
@Range(min=0, max = 100, message = "faceScoreThreshold is not in the range")
|
||||
@ApiModelProperty(value="人脸质量分数阈值,范围:[0,100]:默认0。当设置为0时,会默认使用当前模型的默认值,该方法为推荐使用方式", position = 3,required = false)
|
||||
private Float faceScoreThreshold = 0f;
|
||||
|
||||
|
@ -2,9 +2,9 @@ package com.visual.face.search.server.domain.request;
|
||||
|
||||
import com.visual.face.search.server.domain.base.FaceDataVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
public class FaceDataReqVo extends FaceDataVo<FaceDataReqVo> {
|
||||
|
||||
@ -13,15 +13,15 @@ public class FaceDataReqVo extends FaceDataVo<FaceDataReqVo> {
|
||||
@ApiModelProperty(value="图像Base64编码值", position = 11,required = true)
|
||||
private String imageBase64;
|
||||
/**人脸质量分数阈值**/
|
||||
@Size(min = 0, max = 100, message = "faceScoreThreshold is not in the range")
|
||||
@Range(min=0, max = 100, message = "faceScoreThreshold is not in the range")
|
||||
@ApiModelProperty(value="人脸质量分数阈值,范围:[0,100]:默认0。当设置为0时,会默认使用当前模型的默认值,该方法为推荐使用方式", position = 12,required = false)
|
||||
private Float faceScoreThreshold = 0f;
|
||||
/**当前样本里,人脸自信度的最小阈值**/
|
||||
@Size(min = 0, max = 100, message = "minConfidenceThresholdWhitThisSample is not in the range")
|
||||
@Range(min = 0, max = 100, message = "minConfidenceThresholdWhitThisSample is not in the range")
|
||||
@ApiModelProperty(value="当前样本的人脸相似度的最小阈值,范围:[0,100]:默认0。当设置为0时,表示不做类间相似度判断逻辑,开启后对效率有较大影响", position = 13,required = false)
|
||||
private Float minConfidenceThresholdWithThisSample = 0f;
|
||||
/**当前样本与其他样本里,人脸自信度的最大阈值**/
|
||||
@Size(min = 0, max = 100, message = "maxConfidenceThresholdWhitOtherSample is not in the range")
|
||||
@Range(min = 0, max = 100, message = "maxConfidenceThresholdWhitOtherSample is not in the range")
|
||||
@ApiModelProperty(value="当前样本与其他样本的人脸相似度的最大阈值,范围:[0,100]:默认0。当设置为0时,表示不做类间相似度判断逻辑,开启后对效率有较大影响", position = 14,required = false)
|
||||
private Float maxConfidenceThresholdWithOtherSample = 0f;
|
||||
|
||||
|
@ -4,10 +4,9 @@ import com.visual.face.search.server.domain.base.BaseVo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
@ApiModel(value = "FaceSearchReqVo", description="人脸搜索参数")
|
||||
public class FaceSearchReqVo extends BaseVo {
|
||||
@ -24,13 +23,13 @@ public class FaceSearchReqVo extends BaseVo {
|
||||
@ApiModelProperty(value="图像Base64编码值", position = 2, required = true)
|
||||
private String imageBase64;
|
||||
/**人脸质量分数阈值:默认0,范围:[0,100]**/
|
||||
@Size(min = 0, max = 100, message = "faceScoreThreshold is not in the range")
|
||||
@Range(min = 0, max = 100, message = "faceScoreThreshold is not in the range")
|
||||
@ApiModelProperty(value="人脸质量分数阈值,范围:[0,100]:默认0。当设置为0时,会默认使用当前模型的默认值,该方法为推荐使用方式", position = 3, required = false)
|
||||
private Float faceScoreThreshold;
|
||||
private Float faceScoreThreshold = 0f;
|
||||
/**人脸匹配分数阈值:默认0,范围:[-100,100]**/
|
||||
@Size(min = -100, max = 100, message = "faceScoreThreshold is not in the range")
|
||||
@Range(min = -100, max = 100, message = "faceScoreThreshold is not in the range")
|
||||
@ApiModelProperty(value="人脸匹配分数阈值,范围:[-100,100]:默认0", position = 4, required = false)
|
||||
private Float confidenceThreshold;
|
||||
private Float confidenceThreshold = 0f;
|
||||
/**搜索条数:默认10**/
|
||||
@Min(value = 0, message = "limit must greater than or equal to 0")
|
||||
@ApiModelProperty(value="最大搜索条数:默认5", position = 5, required = false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user