16 Commits

Author SHA1 Message Date
30f0e1a885 merge develop 2026-02-26 11:57:52 +09:00
a63b81008a inference_hard_coding 2026-02-26 11:52:51 +09:00
2309357c0d 파일경로를 application.yml에서 가져올수있게 동적으로 처리 (#100)
Reviewed-on: #100
Co-authored-by: dean[백병남] <byungnam.baek@dabeeo.com>
Co-committed-by: dean[백병남] <byungnam.baek@dabeeo.com>
2026-02-26 11:49:49 +09:00
ee76389d6c 파일경로를 application.yml에서 가져올수있게 동적으로 처리 2026-02-26 11:46:17 +09:00
2508f59a72 운영환경일때 ai팀경로수정 2026-02-26 10:36:10 +09:00
f2307ff0f4 운영환경일때 ai팀경로수정 2026-02-26 10:29:10 +09:00
6f44319d33 운영환경일때 ai팀경로수정 2026-02-26 10:24:29 +09:00
4a120ae5fd 운영환경일때 ai팀경로수정 2026-02-26 09:23:00 +09:00
7c200b057a 운영환경일때 ai팀경로수정 2026-02-26 08:36:53 +09:00
8ac0a00311 운영환경일때 ai팀경로수정 2026-02-26 08:33:53 +09:00
48b46035fd Merge branch 'develop' of https://kamco.git.gs.dabeeo.com/MVPTeam/kamco-cd-api into develop 2026-02-25 21:45:44 +09:00
1b9c7faf22 aibabo 2026-02-25 21:45:11 +09:00
fcdba49430 Merge pull request '추론 run 추가' (#98) from feat/infer_dev_260211 into develop
Reviewed-on: #98
2026-02-25 19:15:19 +09:00
7599c99025 추론 run 추가 2026-02-25 19:15:02 +09:00
8fd1948d7c Merge pull request '추론 run 추가' (#97) from feat/infer_dev_260211 into develop
Reviewed-on: #97
2026-02-25 18:44:24 +09:00
2c1047a014 추론 run 추가 2026-02-25 18:44:04 +09:00
15 changed files with 259 additions and 132 deletions

View File

@@ -279,7 +279,9 @@ public class FIleChecker {
return true; return true;
} }
public static List<Folder> getFolderAll(String dirPath, String sortType, int maxDepth) { // kamco-nfs를 확인하는곳이 있어서 파라미터 추가 사용용도확인후 처리
public static List<Folder> getFolderAll(
String dirPath, String sortType, int maxDepth, String nfsRootDir) {
Path startPath = Paths.get(dirPath); Path startPath = Paths.get(dirPath);
@@ -308,8 +310,12 @@ public class FIleChecker {
String parentPath = path.getParent().toString(); String parentPath = path.getParent().toString();
String fullPath = path.toAbsolutePath().toString(); String fullPath = path.toAbsolutePath().toString();
// 이것이 필요한건가?
// boolean isShowHide =
// !parentFolderNm.equals("kamco-nfs"); // 폴더 리스트에
// kamco-nfs 하위만 나오도록 처리
boolean isShowHide = boolean isShowHide =
!parentFolderNm.equals("kamco-nfs"); // 폴더 리스트에 kamco-nfs 하위만 나오도록 처리 !parentFolderNm.equals(nfsRootDir); // 폴더 리스트에 nfsRootDir 하위만 나오도록 처리
File file = new File(fullPath); File file = new File(fullPath);
int childCnt = getChildFolderCount(file); int childCnt = getChildFolderCount(file);
String lastModified = getLastModified(file); String lastModified = getLastModified(file);
@@ -357,8 +363,8 @@ public class FIleChecker {
return folderList; return folderList;
} }
public static List<Folder> getFolderAll(String dirPath) { public static List<Folder> getFolderAll(String dirPath, String nfsRootDir) {
return getFolderAll(dirPath, "name", 1); return getFolderAll(dirPath, "name", 1, nfsRootDir);
} }
public static int getChildFolderCount(File directory) { public static int getChildFolderCount(File directory) {

View File

@@ -83,7 +83,7 @@ public class ChngDetectMastDto {
@Schema( @Schema(
description = "탐지결과 절대경로명 /kamco_nas/export/{chnDtctId}", description = "탐지결과 절대경로명 /kamco_nas/export/{chnDtctId}",
example = "/kamco-nfs/dataset/export/D5F192EC76D34F6592035BE63A84F591") example = "{file.nfs}/dataset/export/D5F192EC76D34F6592035BE63A84F591")
private String pathNm; private String pathNm;
@Schema(description = "사원번호", example = "123456") @Schema(description = "사원번호", example = "123456")

View File

@@ -66,8 +66,11 @@ public class GukYuinApiService {
@Value("${gukyuin.cdi}") @Value("${gukyuin.cdi}")
private String gukyuinCdiUrl; private String gukyuinCdiUrl;
@Value("${file.dataset-dir}") @Value("${file.nfs}")
private String datasetDir; private String nfs;
// @Value("${file.dataset-dir}")
// private String datasetDir;
@Transactional @Transactional
public ChngDetectMastDto.RegistResDto regist( public ChngDetectMastDto.RegistResDto regist(
@@ -453,7 +456,10 @@ public class GukYuinApiService {
return new ResponseObj(ApiResponseCode.DUPLICATE_DATA, "이미 국유인 연동을 한 회차입니다."); return new ResponseObj(ApiResponseCode.DUPLICATE_DATA, "이미 국유인 연동을 한 회차입니다.");
} }
if (!Files.isDirectory(Path.of("/kamco-nfs/dataset/export/" + info.getUid()))) { // String kamconfsDatasetExportPathfsDatasetExportPath = "/kamco-nfs/dataset/export/";
String kamconfsDatasetExportPathfsDatasetExportPath =
String.format("%s%s", nfs, "/dataset/export/");
if (!Files.isDirectory(Path.of(kamconfsDatasetExportPathfsDatasetExportPath + info.getUid()))) {
return new ResponseObj( return new ResponseObj(
ApiResponseCode.NOT_FOUND_DATA, "파일 경로에 회차 실행 파일이 생성되지 않았습니다. 확인 부탁드립니다."); ApiResponseCode.NOT_FOUND_DATA, "파일 경로에 회차 실행 파일이 생성되지 않았습니다. 확인 부탁드립니다.");
} }
@@ -468,7 +474,7 @@ public class GukYuinApiService {
reqDto.setCrtrYr(String.valueOf(info.getTargetYyyy())); reqDto.setCrtrYr(String.valueOf(info.getTargetYyyy()));
reqDto.setChnDtctSno(String.valueOf(maxStage + 1)); reqDto.setChnDtctSno(String.valueOf(maxStage + 1));
reqDto.setChnDtctId(info.getUid()); reqDto.setChnDtctId(info.getUid());
reqDto.setPathNm("/kamco-nfs/dataset/export/" + info.getUid()); reqDto.setPathNm(kamconfsDatasetExportPathfsDatasetExportPath + info.getUid());
// 1회차를 종료 상태로 처리하고 2회차를 보내야 함 // 1회차를 종료 상태로 처리하고 2회차를 보내야 함
// 추론(learn), 학습데이터(inference) 둘 다 종료 처리 // 추론(learn), 학습데이터(inference) 둘 다 종료 처리

View File

@@ -151,7 +151,7 @@ public class InferenceResultApiController {
@RequestBody @RequestBody
@Valid @Valid
InferenceResultDto.RegReq req) { InferenceResultDto.RegReq req) {
UUID uuid = inferenceResultService.saveInferenceInfo(req); UUID uuid = inferenceResultService.run(req);
return ApiResponseDto.ok(uuid); return ApiResponseDto.ok(uuid);
} }

View File

@@ -5,8 +5,10 @@ import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import lombok.ToString; import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
/** AI API 추론 실행 DTO */ /** AI API 추론 실행 DTO */
@Slf4j
@Getter @Getter
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor

View File

@@ -45,6 +45,7 @@ import java.time.ZonedDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
@@ -116,6 +117,124 @@ public class InferenceResultService {
return dto.getUuid(); return dto.getUuid();
} }
@Transactional
public UUID run(InferenceResultDto.RegReq req) {
List<MngListDto> targetDtoList = mapSheetMngCoreService.getHstMapSheetList(req);
List<String> compareList = mapSheetMngCoreService.getMapSheetMngHst(req.getCompareYyyy());
List<String> targetList =
mapSheetMngCoreService.getHstMapSheetList(req).stream()
.map(MngListDto::getMapSheetNum)
.filter(Objects::nonNull)
.distinct()
.toList();
log.info(
"hst list count compareList = {}, targetList = {}", compareList.size(), targetList.size());
Set<String> compareSet = new HashSet<>(compareList);
Set<String> targetSet = new HashSet<>(targetList);
long intersectionCount =
targetSet.stream()
.distinct()
.filter(compareSet::contains)
.count(); // compare와 target에 공통으로 존재하는 도협 수
long excludedTargetCount =
targetSet.stream()
.distinct()
.filter(s -> !compareSet.contains(s))
.count(); // target 에만 존재하는 도협 수 (compare 에는 없음)
long onlyCompareCount =
compareSet.stream()
.distinct()
.filter(s -> !targetSet.contains(s))
.count(); // compare 에만 존재하는 도협 수 (target 에는 없음)
log.info(
"""
===== MapSheet Year Comparison =====
target Total: {}
compare Total: {}
Intersection: {}
target Only (Excluded from compare): {}
compare Only: {}
====================================
""",
targetSet.size(),
compareSet.size(),
intersectionCount,
excludedTargetCount,
onlyCompareCount);
List<String> filteredTargetList =
targetSet.stream() // target 기준으로
.filter(compareSet::contains) // compare에 있는 도협만 남김
.toList();
Scene modelComparePath =
getSceneInference(req.getCompareYyyy().toString(), filteredTargetList, "", "");
Scene modelTargetPath =
getSceneInference(req.getTargetYyyy().toString(), filteredTargetList, "", "");
// 작은 쪽 기준으로 탐지건수/파일생성 리스트 결정
List<ImageFeature> imageFeatureList;
if (modelComparePath.getFeatures().size() <= modelTargetPath.getFeatures().size()) {
imageFeatureList = modelComparePath.getFeatures();
} else {
imageFeatureList = modelTargetPath.getFeatures();
}
// imageFeatureList 기준 sceneId Set
Set<String> sceneIdSet =
imageFeatureList.stream()
.map(ImageFeature::getSceneId)
.filter(Objects::nonNull)
.collect(Collectors.toSet());
// targetList(List<MngListDto>) 리턴용으로 필터링
List<MngListDto> newTargetList =
targetDtoList.stream()
.filter(m -> m.getMapSheetNum() != null)
.filter(m -> sceneIdSet.contains(m.getMapSheetNum()))
.toList();
// 목록 및 추론 대상 도엽정보 저장
UUID uuid = inferenceResultCoreService.saveInferenceInfo(req, newTargetList);
// ai 서버에 전달할 파라미터 생성
pred_requests_areas predRequestsAreas = new pred_requests_areas();
predRequestsAreas.setInput1_year(req.getCompareYyyy());
predRequestsAreas.setInput2_year(req.getTargetYyyy());
predRequestsAreas.setInput1_scene_path(modelComparePath.getFilePath());
predRequestsAreas.setInput2_scene_path(modelTargetPath.getFilePath());
InferenceSendDto m1 = this.getModelInfo(req.getModel1Uuid());
m1.setPred_requests_areas(predRequestsAreas);
log.info("[INFERENCE] Start m1 = {}", m1);
m1.setPred_requests_areas(predRequestsAreas);
// ai 추론 실행 api 호출
Long batchId = ensureAccepted(m1);
// ai 추론 실행후 응답값 update
SaveInferenceAiDto saveInferenceAiDto = new SaveInferenceAiDto();
saveInferenceAiDto.setUuid(uuid);
saveInferenceAiDto.setBatchId(batchId);
saveInferenceAiDto.setStatus(Status.IN_PROGRESS.getId());
saveInferenceAiDto.setType(ModelType.G1.getId());
saveInferenceAiDto.setInferStartDttm(ZonedDateTime.now());
saveInferenceAiDto.setModelComparePath(modelComparePath.getFilePath());
saveInferenceAiDto.setModelTargetPath(modelTargetPath.getFilePath());
saveInferenceAiDto.setModelStartDttm(ZonedDateTime.now());
inferenceResultCoreService.update(saveInferenceAiDto);
return uuid;
}
/** /**
* 변화탐지 실행 정보 생성 * 변화탐지 실행 정보 생성
* *
@@ -146,31 +265,31 @@ public class InferenceResultService {
List<TotalListDto> totalNumList = new ArrayList<>(); List<TotalListDto> totalNumList = new ArrayList<>();
if (DetectOption.EXCL.getId().equals(req.getDetectOption())) { // if (DetectOption.EXCL.getId().equals(req.getDetectOption())) {
// "추론제외" 일때 전년도 이전 값이 있어도 전년도 도엽이 없으면 비교 안함 // // "추론제외" 일때 전년도 이전 값이 있어도 전년도 도엽이 없으면 비교 안함
for (MngListCompareDto dto : compareList) { // for (MngListCompareDto dto : compareList) {
if (Objects.equals(dto.getBeforeYear(), req.getCompareYyyy())) { // if (Objects.equals(dto.getBeforeYear(), req.getCompareYyyy())) {
TotalListDto totalDto = new TotalListDto(); // TotalListDto totalDto = new TotalListDto();
totalDto.setBeforeYear(dto.getBeforeYear() == null ? 0 : dto.getBeforeYear()); // totalDto.setBeforeYear(dto.getBeforeYear() == null ? 0 : dto.getBeforeYear());
totalDto.setMapSheetNum(dto.getMapSheetNum()); // totalDto.setMapSheetNum(dto.getMapSheetNum());
totalNumList.add(totalDto); // totalNumList.add(totalDto);
} // }
} // }
} else if (DetectOption.PREV.getId().equals(req.getDetectOption())) { // } else if (DetectOption.PREV.getId().equals(req.getDetectOption())) {
// "이전 년도 도엽 사용" 이면 전년도 이전 도엽도 사용 // // "이전 년도 도엽 사용" 이면 전년도 이전 도엽도 사용
for (MngListCompareDto dto : compareList) { // for (MngListCompareDto dto : compareList) {
if (dto.getBeforeYear() != 0) { // if (dto.getBeforeYear() != 0) {
TotalListDto totalDto = new TotalListDto(); // TotalListDto totalDto = new TotalListDto();
totalDto.setBeforeYear(dto.getBeforeYear() == null ? 0 : dto.getBeforeYear()); // totalDto.setBeforeYear(dto.getBeforeYear() == null ? 0 : dto.getBeforeYear());
totalDto.setMapSheetNum(dto.getMapSheetNum()); // totalDto.setMapSheetNum(dto.getMapSheetNum());
totalNumList.add(totalDto); // totalNumList.add(totalDto);
} // }
} // }
} // }
//
if (totalNumList.isEmpty()) { // if (totalNumList.isEmpty()) {
throw new CustomApiException("NOT_FOUND_COMPARE_YEAR", HttpStatus.NOT_FOUND); // throw new CustomApiException("NOT_FOUND_COMPARE_YEAR", HttpStatus.NOT_FOUND);
} // }
// 사용할 영상파일 년도 기록 및 추론에 포함되는지 설정 // 사용할 영상파일 년도 기록 및 추론에 포함되는지 설정
for (MngListDto target : targetList) { for (MngListDto target : targetList) {
@@ -327,6 +446,7 @@ public class InferenceResultService {
* *
* @param dto * @param dto
*/ */
// 같은함수가 왜 두개지
private Long ensureAccepted(InferenceSendDto dto) { private Long ensureAccepted(InferenceSendDto dto) {
if (dto == null) { if (dto == null) {
@@ -334,6 +454,14 @@ public class InferenceResultService {
throw new CustomApiException("BAD_REQUEST", HttpStatus.BAD_REQUEST); throw new CustomApiException("BAD_REQUEST", HttpStatus.BAD_REQUEST);
} }
// [중복]운영환경일때 경로수정 dean 260226
if (profile != null && profile.equals("prod")) {
log.info("========================================================");
log.info("[CHANGE INFERENCE] profile = {} Inforence req", profile);
log.info("========================================================");
log.info("");
}
// 1) 요청 로그 // 1) 요청 로그
try { try {
log.debug("Inference request dto={}", objectMapper.writeValueAsString(dto)); log.debug("Inference request dto={}", objectMapper.writeValueAsString(dto));
@@ -342,13 +470,15 @@ public class InferenceResultService {
} }
// 2) local 환경 임시 처리 // 2) local 환경 임시 처리
if ("local".equals(profile)) { // if ("local".equals(profile)) {
if (dto.getPred_requests_areas() == null) { // if (dto.getPred_requests_areas() == null) {
throw new IllegalStateException("pred_requests_areas is null"); // throw new IllegalStateException("pred_requests_areas is null");
} // }
dto.getPred_requests_areas().setInput1_scene_path("/kamco-nfs/requests/2023_local.geojson"); //
dto.getPred_requests_areas().setInput2_scene_path("/kamco-nfs/requests/2024_local.geojson"); // dto.getPred_requests_areas().setInput1_scene_path("/kamco-nfs/requests/2023_local.geojson");
} //
// dto.getPred_requests_areas().setInput2_scene_path("/kamco-nfs/requests/2024_local.geojson");
// }
// 3) HTTP 호출 // 3) HTTP 호출
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
@@ -432,6 +562,7 @@ public class InferenceResultService {
sendDto.setCls_model_version(modelInfo.getModelVer()); sendDto.setCls_model_version(modelInfo.getModelVer());
sendDto.setCd_model_type(modelType); sendDto.setCd_model_type(modelType);
sendDto.setPriority(5d); sendDto.setPriority(5d);
log.info("[Inference Send]SendDto={}", sendDto);
return sendDto; return sendDto;
} }

View File

@@ -37,9 +37,13 @@ public class InferenceRunService {
private final ModelMngCoreService modelMngCoreService; private final ModelMngCoreService modelMngCoreService;
private final ObjectMapper objectMapper; private final ObjectMapper objectMapper;
@Value("${spring.profiles.active}")
private String profile;
@Value("${inference.url}") @Value("${inference.url}")
private String inferenceUrl; private String inferenceUrl;
// TODO 이거 쓰는건가?
public void run(Integer compareYear, Integer targetYear, UUID modelUuid) { public void run(Integer compareYear, Integer targetYear, UUID modelUuid) {
List<String> compareList = mapSheetMngCoreService.getMapSheetMngHst(compareYear); List<String> compareList = mapSheetMngCoreService.getMapSheetMngHst(compareYear);
@@ -128,7 +132,7 @@ public class InferenceRunService {
// 1) 요청 로그 // 1) 요청 로그
try { try {
log.debug("Inference request dto={}", objectMapper.writeValueAsString(dto)); log.info("Inference request dto={}", objectMapper.writeValueAsString(dto));
} catch (JsonProcessingException e) { } catch (JsonProcessingException e) {
log.warn("Failed to serialize inference dto", e); log.warn("Failed to serialize inference dto", e);
} }
@@ -214,7 +218,7 @@ public class InferenceRunService {
sendDto.setCls_model_path(cdClsModelPath); sendDto.setCls_model_path(cdClsModelPath);
sendDto.setCls_model_version(modelInfo.getModelVer()); sendDto.setCls_model_version(modelInfo.getModelVer());
sendDto.setCd_model_type(modelType); sendDto.setCd_model_type(modelType);
sendDto.setPriority(modelInfo.getPriority()); sendDto.setPriority(5.0);
return sendDto; return sendDto;
} }
} }

View File

@@ -47,6 +47,9 @@ public class MapSheetMngService {
private final UploadService uploadService; private final UploadService uploadService;
private final UserUtil userUtil = new UserUtil(); private final UserUtil userUtil = new UserUtil();
@Value("${file.root}")
private String nfsRootDir;
@Value("${file.sync-root-dir}") @Value("${file.sync-root-dir}")
private String syncRootDir; private String syncRootDir;
@@ -111,7 +114,6 @@ public class MapSheetMngService {
public DmlReturn uploadPair( public DmlReturn uploadPair(
MultipartFile tfwFile, String tifFile, Long hstUid, Long tifFileSize) { MultipartFile tfwFile, String tifFile, Long hstUid, Long tifFileSize) {
String rootPath = syncRootDir;
String tmpPath = syncTmpDir; String tmpPath = syncTmpDir;
DmlReturn dmlReturn = new DmlReturn("success", "UPLOAD COMPLETE"); DmlReturn dmlReturn = new DmlReturn("success", "UPLOAD COMPLETE");
@@ -133,6 +135,7 @@ public class MapSheetMngService {
return dmlReturn; return dmlReturn;
} }
// TODO 삭제?
MngDto mngDto = mapSheetMngCoreService.findMapSheetMng(errDto.getMngYyyy()); MngDto mngDto = mapSheetMngCoreService.findMapSheetMng(errDto.getMngYyyy());
// 중복체크 -> 도엽50k/uuid 경로에 업로드 할 거라 overwrite 되지 않음 // 중복체크 -> 도엽50k/uuid 경로에 업로드 할 거라 overwrite 되지 않음
@@ -340,7 +343,7 @@ public class MapSheetMngService {
log.info("[FIND_FOLDER] DIR : {}", dirPath); log.info("[FIND_FOLDER] DIR : {}", dirPath);
List<FIleChecker.Folder> folderList = List<FIleChecker.Folder> folderList =
FIleChecker.getFolderAll(dirPath).stream() FIleChecker.getFolderAll(dirPath, nfsRootDir).stream()
.filter(dir -> dir.getIsValid().equals(true)) .filter(dir -> dir.getIsValid().equals(true))
.toList(); .toList();

View File

@@ -1111,7 +1111,11 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
mapSheetMngHstEntity mapSheetMngHstEntity
.mngYyyy .mngYyyy
.eq(year) .eq(year)
.and(mapSheetMngHstEntity.syncState.eq("DONE")) .and(
mapSheetMngHstEntity
.syncState
.eq("DONE")
.or(mapSheetMngHstEntity.syncCheckState.eq("DONE")))
.and(mapSheetMngFileEntity.fileExt.eq("tif"))) .and(mapSheetMngFileEntity.fileExt.eq("tif")))
.fetch(); .fetch();
} }

View File

@@ -355,8 +355,7 @@ public class MapSheetInferenceJobService {
m.setCls_model_version(progressDto.getClsModelVersion()); m.setCls_model_version(progressDto.getClsModelVersion());
m.setCd_model_type(type); m.setCd_model_type(type);
m.setPriority(5d); m.setPriority(5d);
log.info("[BEFORE INFERENCE] BEFORE SendDto={}", m);
// log.info("InferenceSendDto={}", m);
// 추론 실행 api 호출 // 추론 실행 api 호출
Long batchId = ensureAccepted(m); Long batchId = ensureAccepted(m);
@@ -376,6 +375,7 @@ public class MapSheetInferenceJobService {
* @param dto * @param dto
* @return * @return
*/ */
// 같은함수가 왜 두개지
private Long ensureAccepted(InferenceSendDto dto) { private Long ensureAccepted(InferenceSendDto dto) {
if (dto == null) { if (dto == null) {
log.warn("not InferenceSendDto dto"); log.warn("not InferenceSendDto dto");
@@ -383,22 +383,28 @@ public class MapSheetInferenceJobService {
} }
// 1) 요청 로그 // 1) 요청 로그
log.info("Inference request dto={}", dto); log.info("");
log.info("========================================================");
log.info("[SEND INFERENCE] Inference request dto= {}", dto);
log.info("========================================================");
log.info("");
// 2) local 환경 임시 처리 // 2) local 환경 임시 처리
if ("local".equals(profile)) { // if ("local".equals(profile)) {
if (dto.getPred_requests_areas() == null) { // if (dto.getPred_requests_areas() == null) {
throw new IllegalStateException("pred_requests_areas is null"); // throw new IllegalStateException("pred_requests_areas is null");
} // }
dto.getPred_requests_areas().setInput1_scene_path("/kamco-nfs/requests/2023_local.geojson"); //
dto.getPred_requests_areas().setInput2_scene_path("/kamco-nfs/requests/2024_local.geojson"); // dto.getPred_requests_areas().setInput1_scene_path("/kamco-nfs/requests/2023_local.geojson");
} //
// dto.getPred_requests_areas().setInput2_scene_path("/kamco-nfs/requests/2024_local.geojson");
// }
// 3) HTTP 호출 // 3) HTTP 호출
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON); headers.setContentType(MediaType.APPLICATION_JSON);
headers.setAccept(List.of(MediaType.APPLICATION_JSON)); headers.setAccept(List.of(MediaType.APPLICATION_JSON));
// TODO 어떤 URL로 어떤파리티러로 요청한 로딩해야지
ExternalCallResult<String> result = ExternalCallResult<String> result =
externalHttpClient.call(inferenceUrl, HttpMethod.POST, dto, headers, String.class); externalHttpClient.call(inferenceUrl, HttpMethod.POST, dto, headers, String.class);
@@ -413,6 +419,7 @@ public class MapSheetInferenceJobService {
objectMapper.readValue(result.body(), new TypeReference<>() {}); objectMapper.readValue(result.body(), new TypeReference<>() {});
if (list.isEmpty()) { if (list.isEmpty()) {
// 어떤 URL로 어떤파리티러로 요청한 정보를 봐야 재현을 할듯하지요
throw new IllegalStateException("Inference response is empty"); throw new IllegalStateException("Inference response is empty");
} }

View File

@@ -31,7 +31,7 @@ public class TrainingDataReviewJobService {
@Value("${spring.profiles.active}") @Value("${spring.profiles.active}")
private String profile; private String profile;
@Value("${training-data.geojson-dir}") @Value("${file.training-data.geojson-dir}")
private String trainingDataDir; private String trainingDataDir;
private boolean isLocalProfile() { private boolean isLocalProfile() {

View File

@@ -89,36 +89,17 @@ mapsheet:
shp: shp:
baseurl: /app/tmp/detect/result #현재사용안함 baseurl: /app/tmp/detect/result #현재사용안함
file: file:
#sync-root-dir: D:/kamco-nfs/images/ root: kamco-nfs
sync-root-dir: /kamco-nfs/images/ nfs: /kamco-nfs
sync-tmp-dir: /kamco-nfs/requests/temp # image upload temp dir pt-path: ${file.nfs}/ckpt/model/v6-cls-checkpoints/
#sync-tmp-dir: ${file.sync-root-dir}/tmp
sync-file-extention: tfw,tif
# sync-auto-exception-start-year: 2024
# sync-auto-exception-before-year-cnt: 3
#dataset-dir: D:/kamco-nfs/model_output/
dataset-dir: /kamco-nfs/model_output/export/ # 마운트경로 AI 추론결과
dataset-tmp-dir: ${file.dataset-dir}tmp/
#model-dir: D:/kamco-nfs/ckpt/model/
model-dir: /kamco-nfs/ckpt/model/ # 학습서버에서 트레이닝한 모델업로드경로
model-tmp-dir: ${file.model-dir}tmp/
model-file-extention: pth,json,py
pt-path: /kamco-nfs/ckpt/model/v6-cls-checkpoints/
pt-FileName: yolov8_6th-6m.pt pt-FileName: yolov8_6th-6m.pt
dataset-response: /kamco-nfs/dataset/response/
inference: inference:
nfs: /kamco-nfs
url: http://192.168.2.183:8000/jobs url: http://192.168.2.183:8000/jobs
batch-url: http://192.168.2.183:8000/batches batch-url: http://192.168.2.183:8000/batches
geojson-dir: /kamco-nfs/requests/ # 추론실행을 위한 파일생성경로 jar-path: ${inference.nfs}/repo/jar/shp-exporter.jar
jar-path: /kamco-nfs/repo/jar/shp-exporter.jar
inference-server-name: server1,server2,server3,server4 inference-server-name: server1,server2,server3,server4
gukyuin: gukyuin:
@@ -126,9 +107,6 @@ gukyuin:
url: http://192.168.2.129:5301 url: http://192.168.2.129:5301
cdi: ${gukyuin.url}/api/kcd/cdi cdi: ${gukyuin.url}/api/kcd/cdi
training-data:
geojson-dir: /kamco-nfs/dataset/request/
layer: layer:
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com geoserver-url: https://kamco.geo-dev.gs.dabeeo.com
wms-path: geoserver/cd wms-path: geoserver/cd

View File

@@ -67,34 +67,17 @@ mapsheet:
shp: shp:
baseurl: /Users/bokmin/detect/result baseurl: /Users/bokmin/detect/result
file: file:
sync-root-dir: C:/Users/gypark/kamco-nfs/images/ root: kamco-nfs
#sync-root-dir: /kamco-nfs/images/ nfs: C:/Users/gypark/kamco-nfs
sync-tmp-dir: ${file.sync-root-dir}/tmp/ pt-path: ${file.nfs}/ckpt/classification/
sync-file-extention: tfw,tif
# sync-auto-exception-start-year: 2025
# sync-auto-exception-before-year-cnt: 3
dataset-dir: C:/Users/gypark/kamco-nfs/dataset/
#dataset-dir: /kamco-nfs/dataset/export/
dataset-tmp-dir: ${file.dataset-dir}tmp/
model-dir: C:/Users/gypark/kamco-nfs/ckpt/model/
#model-dir: /kamco-nfs/ckpt/model/
model-tmp-dir: ${file.model-dir}tmp/
model-file-extention: pth,json,py
pt-path: /kamco-nfs/ckpt/classification/
pt-FileName: v5-best.pt pt-FileName: v5-best.pt
dataset-response: /kamco-nfs/dataset/response/
inference: inference:
nfs: C:/Users/gyparkkamco-nfs
url: http://10.100.0.11:8000/jobs url: http://10.100.0.11:8000/jobs
batch-url: http://10.100.0.11:8000/batches batch-url: http://10.100.0.11:8000/batches
geojson-dir: /kamco-nfs/requests/ jar-path: jar/shp-exporter.jar
jar-path: jar/makeshp-1.0.0.jar
inference-server-name: server1,server2,server3,server4 inference-server-name: server1,server2,server3,server4
gukyuin: gukyuin:
@@ -102,9 +85,6 @@ gukyuin:
url: http://192.168.2.129:5301 url: http://192.168.2.129:5301
cdi: ${gukyuin.url}/api/kcd/cdi cdi: ${gukyuin.url}/api/kcd/cdi
training-data:
geojson-dir: /kamco-nfs/model_output/labeling/
layer: layer:
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com geoserver-url: https://kamco.geo-dev.gs.dabeeo.com
wms-path: geoserver/cd wms-path: geoserver/cd

View File

@@ -84,36 +84,23 @@ mapsheet:
baseurl: /app/detect/result #현재사용안함 baseurl: /app/detect/result #현재사용안함
file: file:
sync-root-dir: /kamco-nfs/images/ root: data
sync-tmp-dir: /kamco-nfs/repo/tmp # image upload temp dir nfs: /data
sync-file-extention: tfw,tif pt-path: ${file.nfs}/ckpt/model/v6-cls-checkpoints/
#dataset-dir: D:/kamco-nfs/model_output/ #변경 model_output
dataset-dir: /kamco-nfs/model_output/export/ # 마운트경로 AI 추론결과
dataset-tmp-dir: ${file.dataset-dir}tmp/
#model-dir: D:/kamco-nfs/ckpt/model/
model-dir: /kamco-nfs/ckpt/model/ # 학습서버에서 트레이닝한 모델업로드경로
model-tmp-dir: ${file.model-dir}tmp/
model-file-extention: pth,json,py
pt-path: /kamco-nfs/ckpt/v6-cls-checkpoints/
pt-FileName: yolov8_6th-6m.pt pt-FileName: yolov8_6th-6m.pt
dataset-response: /kamco-nfs/dataset/response/
inference: inference:
url: http://127.0.0.1:8000/jobs nfs: /data
batch-url: http://127.0.0.1:8000/batches url: http://172.16.4.56:8000/jobs
geojson-dir: /kamco-nfs/requests/ # 학습서버에서 트레이닝한 모델업로드경로 batch-url: http://172.16.4.56:8000/batches
jar-path: /kamco-nfs/repo/jar/shp-exporter.jar # 추론실행을 위한 파일생성경로 jar-path: ${inference.nfs}/repo/jar/shp-exporter.jar
inference-server-name: server1,server2,server3,server4 inference-server-name: server1,server2,server3,server4
gukyuin: gukyuin:
url: http://127.0.0.1:5301 url: http://127.0.0.1:5301
cdi: ${gukyuin.url}/api/kcd/cdi cdi: ${gukyuin.url}/api/kcd/cdi
training-data:
geojson-dir: /kamco-nfs/dataset/request/
layer: layer:
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com geoserver-url: https://kamco.geo-dev.gs.dabeeo.com

View File

@@ -67,3 +67,22 @@ management:
include: include:
- "health" - "health"
file:
root: kamco-nfs
nfs: /kamco-nfs
sync-root-dir: ${file.nfs}/images/
sync-tmp-dir: ${file.nfs}/requests/temp # image upload temp dir
sync-file-extention: tfw,tif
dataset-dir: ${file.nfs}/model_output/export/ # 마운트경로 AI 추론결과
dataset-tmp-dir: ${file.dataset-dir}tmp/
model-dir: ${file.nfs}/ckpt/model/ # 학습서버에서 트레이닝한 모델업로드경로
model-tmp-dir: ${file.model-dir}tmp/
model-file-extention: pth,json,py
pt-path: ${file.nfs}/ckpt/model/v6-cls-checkpoints/
dataset-response: ${file.nfs}/dataset/response/
training-data:
geojson-dir: ${file.nfs}/dataset/request/
inference:
nfs: /kamco-nfs
geojson-dir: ${inference.nfs}/requests/ # 추론실행을 위한 파일생성경로
jar-path: ${inference.nfs}/repo/jar/shp-exporter.jar