Commit 7f6cb362 by 翟柏林

[chg]提取匹配分数配置

1 parent 9df8b083
......@@ -208,8 +208,9 @@ public class ReidController {
public Object getSimilarPerson(@RequestParam Long[] picIdArr, @RequestParam Long packId,
@RequestParam Long size, @RequestParam(required = false) Integer timeInterval,
@RequestParam(required = false) String currentPerson,
@RequestParam(required = false,defaultValue = "0") Integer recursion ) {
Map<String, Map<String, List<SubTask>>> similarPerson = reidService.getSimilarPerson(picIdArr, packId, size, timeInterval, currentPerson,recursion);
@RequestParam(required = false,defaultValue = "0") Integer recursion,
@RequestParam(required = false,defaultValue = "60") Integer score) {
Map<String, Map<String, List<SubTask>>> similarPerson = reidService.getSimilarPerson(picIdArr, packId, size, timeInterval, currentPerson,recursion,score);
return JsonMessageUtil.getSuccessJsonMsg("success", similarPerson);
}
......
......@@ -507,7 +507,7 @@ public class ReidService {
/**
* 根据所选择的图片获取相似的人
*/
public Map<String, Map<String, List<SubTask>>> getSimilarPerson(Long[] subTaskIdArr, Long packId, Long size, Integer timeInterval, String currentPerson, Integer recursion) {
public Map<String, Map<String, List<SubTask>>> getSimilarPerson(Long[] subTaskIdArr, Long packId, Long size, Integer timeInterval, String currentPerson, Integer recursion,Integer score) {
List<BodyFeature> bodyFeatures = new ArrayList<>();
String reidPoolName = Constants.getReidPoolName(packId);
Date countTimeGTE = null;
......@@ -556,7 +556,7 @@ public class ReidService {
List<Person> matchBodies = result.getMatchBodies();
for (Person match : matchBodies) {
String personId = match.getPersonId();
if (match.getScore() < 60F || personUnidSet.contains(personId)) {
if (match.getScore() < score.floatValue() || personUnidSet.contains(personId)) {
continue;
}
personScoreMap.put(personId, match.getScore());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!