人脸检索

This commit is contained in:
Jerry Yan 2025-03-28 14:24:22 +08:00
parent a1eb29c49d
commit e128101563

View File

@ -221,8 +221,7 @@ public class TaskFaceServiceImpl implements TaskFaceService {
}
}
final float _threshold = threshold;
List<Long> reject = new ArrayList<>();
List<Long> faceSampleIds = new ArrayList<>();
List<Long> faceSampleIds;
try {
SearchFaceResponse response = client.getAcsResponse(request);
log.fillResponse(response);
@ -272,7 +271,6 @@ public class TaskFaceServiceImpl implements TaskFaceService {
if (device != null) {
record.setDeviceName(device.getName());
}
record.setMatched(item.getScore() > _threshold);
record.setAccept(faceSampleIds.contains(optionalFse.get().getId()));
record.setFaceUrl(optionalFse.get().getFaceUrl());
record.setShotDate(optionalFse.get().getCreateAt());
@ -281,6 +279,7 @@ public class TaskFaceServiceImpl implements TaskFaceService {
record.setFaceUrl(getFaceUrl(record.getFaceSampleId()));
}
record.setScore(item.getScore());
record.setMatched(item.getScore() > _threshold);
record.setConfidence(item.getConfidence());
collect.add(record);
}