추론 결과 bbox, bbox point 추가
This commit is contained in:
@@ -262,7 +262,7 @@ public class InferenceResultApiController {
|
||||
})
|
||||
@GetMapping("/infer-result-info")
|
||||
public ApiResponseDto<InferenceDetailDto.AnalResultInfo> getInferenceResultInfo(
|
||||
@Parameter(description = "회차 uuid", example = "f30e8817-9625-4fff-ba43-c1e6ed2067c4")
|
||||
@Parameter(description = "회차 uuid", example = "5799eb21-4780-48b0-a82e-e58dcbb8806b")
|
||||
@RequestParam
|
||||
UUID uuid) {
|
||||
return ApiResponseDto.ok(inferenceResultService.getInferenceResultInfo(uuid));
|
||||
|
||||
@@ -3,6 +3,9 @@ package com.kamco.cd.kamcoback.inference.dto;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.kamco.cd.kamcoback.common.enums.DetectionClassification;
|
||||
import com.kamco.cd.kamcoback.common.enums.ImageryFitStatus;
|
||||
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||
@@ -431,6 +434,7 @@ public class InferenceDetailDto {
|
||||
|
||||
@Schema(name = "AnalResultInfo", description = "추론결과 기본정보")
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public static class AnalResultInfo {
|
||||
@@ -449,6 +453,29 @@ public class InferenceDetailDto {
|
||||
private String elapsedDuration;
|
||||
private String subUid;
|
||||
|
||||
private String bboxGeom;
|
||||
private String bboxCenterPoint;
|
||||
|
||||
@JsonProperty("bboxGeom")
|
||||
public JsonNode getBboxGeom() {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
return mapper.readTree(this.bboxGeom);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@JsonProperty("bboxCenterPoint")
|
||||
public JsonNode getBboxCenterPoint() {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
return mapper.readTree(this.bboxCenterPoint);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public AnalResultInfo(
|
||||
String analTitle,
|
||||
String modelVer1,
|
||||
@@ -492,6 +519,16 @@ public class InferenceDetailDto {
|
||||
}
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class BboxPointDto {
|
||||
|
||||
private String bboxGeom;
|
||||
private String bboxCenterPoint;
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
|
||||
@@ -574,6 +574,12 @@ public class InferenceResultService {
|
||||
return dto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 추론결과 기본정보
|
||||
*
|
||||
* @param uuid uuid
|
||||
* @return
|
||||
*/
|
||||
public AnalResultInfo getInferenceResultInfo(UUID uuid) {
|
||||
return inferenceResultCoreService.getInferenceResultInfo(uuid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user