From 87adc1d36f338cc103aed4f20ce2888aa03797e8 Mon Sep 17 00:00:00 2001 From: fanyinbo <1553199396@qq.com> Date: Mon, 20 May 2024 14:05:52 +0800 Subject: [PATCH] Change the address given to the model to the external network address. Signed-off-by: fanyinbo <1553199396@qq.com> --- .../api/job/converter/ModelCocoRequestConverter.java | 4 ++-- .../converter/PointCloudDetectionModelReqConverter.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/ai/basic/x1/adapter/api/job/converter/ModelCocoRequestConverter.java b/backend/src/main/java/ai/basic/x1/adapter/api/job/converter/ModelCocoRequestConverter.java index b808d8aa..df55ab5a 100644 --- a/backend/src/main/java/ai/basic/x1/adapter/api/job/converter/ModelCocoRequestConverter.java +++ b/backend/src/main/java/ai/basic/x1/adapter/api/job/converter/ModelCocoRequestConverter.java @@ -27,9 +27,9 @@ public static ImageDetectionReqDTO convert(ModelMessageBO message) { var fileNodeBO = fileNodes.get(0); String url; if (fileNodeBO.getType().equals(FILE)) { - url = fileNodeBO.getFile().getInternalUrl(); + url = fileNodeBO.getFile().getUrl(); } else { - url = fileNodeBO.getFiles().get(0).getFile().getInternalUrl(); + url = fileNodeBO.getFiles().get(0).getFile().getUrl(); } if (StrUtil.isEmpty(url)) { throw new IllegalArgumentException("file url is empty"); diff --git a/backend/src/main/java/ai/basic/x1/adapter/api/job/converter/PointCloudDetectionModelReqConverter.java b/backend/src/main/java/ai/basic/x1/adapter/api/job/converter/PointCloudDetectionModelReqConverter.java index 1fdb5df4..dcfe92d0 100644 --- a/backend/src/main/java/ai/basic/x1/adapter/api/job/converter/PointCloudDetectionModelReqConverter.java +++ b/backend/src/main/java/ai/basic/x1/adapter/api/job/converter/PointCloudDetectionModelReqConverter.java @@ -52,19 +52,19 @@ private static void traverFile(DataInfoBO.FileNodeBO fileNodeBO, DataInfo dataIn if (prePath.startsWith(CAMERA_IMAGE)) { if (CollUtil.isEmpty(dataInfo.getImageUrls())) { List imageUrlList = new ArrayList<>(); - imageUrlList.add(fileNodeBO.getFile().getInternalUrl()); + imageUrlList.add(fileNodeBO.getFile().getUrl()); dataInfo.setImageUrls(imageUrlList); } else { - dataInfo.getImageUrls().add(fileNodeBO.getFile().getInternalUrl()); + dataInfo.getImageUrls().add(fileNodeBO.getFile().getUrl()); } } //pcd if (prePath.startsWith(LIDAR_POINT_CLOUD)) { - dataInfo.setPointCloudUrl(getFileBO(fileNodeBO.getFile()).getInternalUrl()); + dataInfo.setPointCloudUrl(getFileBO(fileNodeBO.getFile()).getUrl()); } //cameraConfig if (prePath.startsWith(CAMERA_CONFIG)) { - dataInfo.setCameraConfigUrl(fileNodeBO.getFile().getInternalUrl()); + dataInfo.setCameraConfigUrl(fileNodeBO.getFile().getUrl()); } } if (DIRECTORY.equals(fileNodeBO.getType()) && CollUtil.isNotEmpty(fileNodeBO.getFiles())) {