추론 run 추가 #96

Merged
teddy merged 1 commits from feat/infer_dev_260211 into develop 2026-02-25 18:41:52 +09:00
2 changed files with 44 additions and 8 deletions

View File

@@ -41,6 +41,7 @@ public class InferenceRunService {
private String inferenceUrl;
public void run(Integer compareYear, Integer targetYear, UUID modelUuid) {
List<String> compareList = mapSheetMngCoreService.getMapSheetMngHst(compareYear);
List<String> targetList = mapSheetMngCoreService.getMapSheetMngHst(targetYear);
@@ -48,19 +49,49 @@ public class InferenceRunService {
"hst list count compareList = {}, targetList = {}", compareList.size(), targetList.size());
Set<String> compareSet = new HashSet<>(compareList);
Set<String> targetSet = new HashSet<>(targetList);
List<String> filteredTargetList =
targetList.stream().filter(compareSet::contains).distinct().toList();
long intersectionCount =
targetSet.stream()
.distinct()
.filter(compareSet::contains)
.count(); // compare와 target에 공통으로 존재하는 도협 수
long removedCount = targetList.size() - filteredTargetList.size();
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(
"target total count: {}, compare total count: {}, Excluded count: {}",
targetList.size(),
compareList.size(),
removedCount);
"""
===== 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(compareYear.toString(), filteredTargetList, "", "");
Scene modelTargetPath = getSceneInference(targetYear.toString(), filteredTargetList, "", "");
// ai 서버에 전달할 파라미터 생성

View File

@@ -1107,7 +1107,12 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
.from(mapSheetMngHstEntity)
.innerJoin(mapSheetMngFileEntity)
.on(mapSheetMngFileEntity.hstUid.eq(mapSheetMngHstEntity.hstUid))
.where(mapSheetMngHstEntity.mngYyyy.eq(year).and(mapSheetMngHstEntity.syncState.eq("DONE")))
.where(
mapSheetMngHstEntity
.mngYyyy
.eq(year)
.and(mapSheetMngHstEntity.syncState.eq("DONE"))
.and(mapSheetMngFileEntity.fileExt.eq("tif")))
.fetch();
}
}