classification pt파일 경로 수정

This commit is contained in:
2026-07-24 10:02:58 +09:00
parent 73b0a39826
commit 6d6ebf8c33

View File

@@ -13,8 +13,11 @@ import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;
@@ -27,6 +30,12 @@ public class InferenceManualApiController {
private final InferenceManualService inferenceManualService;
private final InferenceCommonService inferenceCommonService;
@Value("${file.pt-path}")
private String ptPath;
@Value("${file.pt-FileName}")
private String ptFileName;
@Operation(summary = "추론 결과로 추론 목록 및 shp 생성", description = "추론 결과로 추론 목록 및 shp 생성")
@ApiResponses(
value = {
@@ -92,10 +101,14 @@ public class InferenceManualApiController {
@Parameter(description = "batch_ids", example = "2026,2027") @RequestParam
List<Integer> batchIds) {
String defaultPath = ptPath;
String defaultFileName = ptFileName;
Path ptPath = Paths.get(defaultPath, defaultFileName);
InferenceClassificationDto.ClassificationRequestDto request =
new InferenceClassificationDto.ClassificationRequestDto();
request.setBatch_ids(batchIds);
request.setCls_model_path("/data/ckpt/model/v6-cls-checkpoints/yolov8_6th-6m.pt");
request.setCls_model_path(ptPath.toString());
request.setCls_model_version("testing-re-cls");
// Classification 실행 api 호출