Browse Source

feat: None

WANGKANG 3 months ago
parent
commit
a9ff1b7780

+ 2 - 2
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/ToInfraredServiceImpl.java

@@ -324,7 +324,7 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
         } else if (algorithmConfig.getType().equals(BizConstant.AlgorithmType.REASONING)) {
             String source_dir = getPredictInputPath(ossEntity);
             String result_dir = getPredictOutputPath(entity, ossEntity);
-            String log_path = getLogFilePath(result_dir, entity.getId(), BizConstant.TO_INFRARED_SUFFIX);
+            String log_path = getLogFilePath(source_dir, entity.getId(), BizConstant.TO_INFRARED_SUFFIX);
             String model_path = getModelPath(entity);
             result.put("source_dir", source_dir);
             result.put("result_dir", result_dir);
@@ -428,7 +428,7 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
     }
 
     public String getPredictOutputPath(ToInfrared entity, SysOssVo ossEntity) {
-        return getUnZipDirPath(ossEntity) + File.separator + BizConstant.TO_INFRARED_PREDICT_OUTPUT_DIR;
+        return getPredictInputPath(ossEntity) + File.separator + BizConstant.TO_INFRARED_PREDICT_OUTPUT_DIR;
     }
 
     public static String getLogFilePath(String outputPath, Long id, String suffix) {

+ 5 - 22
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/TrackSequenceServiceImpl.java

@@ -623,33 +623,16 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
     @Override
     public CommonResult previewPredictResult(Long id) {
         TrackSequence entity = getById(id);
+        String inputPath = entity.getInputPath() + File.separator + "images";
+        String outputPath = entity.getOutputPath() + File.separator + "gaze" + File.separator + "images";
 
-        SysOssVo inputOssEntity = ossService.getById(entity.getInputOssId());
-
-        String filePath = inputOssEntity.getFileName();
-        String localPath = TaaisConfig.getProfile();
-        String resourcePath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX);
-
-        String fileName = StringUtils.substringAfterLast(filePath, "/");
-        String fileName_without_suffix = removeFileExtension(fileName);
-
-        Path path = Paths.get(resourcePath);
-        Path inputPath = path
-                .resolveSibling(fileName_without_suffix + BizConstant.UNZIP_SUFFIX + File.separator + "images");
-        Path outputPath = path.resolveSibling(entity.getId().toString() + BizConstant.TRACK_SEQUENCE_SUFFIX
-                + File.separator + "gaze" + File.separator + "images");
-
-        File outputPathDir = new File(outputPath.toString());
+        File outputPathDir = new File(outputPath);
         if (!outputPathDir.exists()) {
-            outputPath = path.resolveSibling(
-                    entity.getId().toString() + BizConstant.TRACK_SEQUENCE_SUFFIX + File.separator + "images");
+            outputPath = entity.getOutputPath() + File.separator + "images";
         }
 
-        // String urlPrefix = inputOssEntity.getUrl().substring(0,
-        // inputOssEntity.getUrl().indexOf(Constants.RESOURCE_PREFIX) +
-        // Constants.RESOURCE_PREFIX.length());
         String urlPrefix = Constants.RESOURCE_PREFIX;
-        return getCompareImage(urlPrefix, inputPath.toString(), outputPath.toString());
+        return getCompareImage(urlPrefix, inputPath, outputPath);
     }
 
     @Override