Commit 7f6cb362 by 翟柏林

[chg]提取匹配分数配置

1 parent 9df8b083
...@@ -208,8 +208,9 @@ public class ReidController { ...@@ -208,8 +208,9 @@ public class ReidController {
public Object getSimilarPerson(@RequestParam Long[] picIdArr, @RequestParam Long packId, public Object getSimilarPerson(@RequestParam Long[] picIdArr, @RequestParam Long packId,
@RequestParam Long size, @RequestParam(required = false) Integer timeInterval, @RequestParam Long size, @RequestParam(required = false) Integer timeInterval,
@RequestParam(required = false) String currentPerson, @RequestParam(required = false) String currentPerson,
@RequestParam(required = false,defaultValue = "0") Integer recursion ) { @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 = "60") Integer score) {
Map<String, Map<String, List<SubTask>>> similarPerson = reidService.getSimilarPerson(picIdArr, packId, size, timeInterval, currentPerson,recursion,score);
return JsonMessageUtil.getSuccessJsonMsg("success", similarPerson); return JsonMessageUtil.getSuccessJsonMsg("success", similarPerson);
} }
......
...@@ -507,7 +507,7 @@ public class ReidService { ...@@ -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<>(); List<BodyFeature> bodyFeatures = new ArrayList<>();
String reidPoolName = Constants.getReidPoolName(packId); String reidPoolName = Constants.getReidPoolName(packId);
Date countTimeGTE = null; Date countTimeGTE = null;
...@@ -556,7 +556,7 @@ public class ReidService { ...@@ -556,7 +556,7 @@ public class ReidService {
List<Person> matchBodies = result.getMatchBodies(); List<Person> matchBodies = result.getMatchBodies();
for (Person match : matchBodies) { for (Person match : matchBodies) {
String personId = match.getPersonId(); String personId = match.getPersonId();
if (match.getScore() < 60F || personUnidSet.contains(personId)) { if (match.getScore() < score.floatValue() || personUnidSet.contains(personId)) {
continue; continue;
} }
personScoreMap.put(personId, match.getScore()); 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!