Ver código fonte

feat: CAT模型评估对接完成

WANGKANG 8 meses atrás
pai
commit
ffd2cf0987

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

@@ -278,7 +278,7 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
 
         StartTaskConfig startTaskConfig = new StartTaskConfig();
 
-        if (algorithmConfigTrack.getType().equals(BizConstant.AlgorithmType.TEST) && entity.getName().startsWith(MASC)) {
+        if (algorithmConfigTrack.getType().equals(BizConstant.AlgorithmType.TEST) && (entity.getName().startsWith(MASC) || entity.getName().startsWith(CAT))) {
             startTaskConfig.setBizType(BizConstant.BizType.TRACK_SEQUENCE);
             startTaskConfig.setBizId(entity.getId());
 
@@ -561,7 +561,24 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
         TrackSequence evaluate_entity = new TrackSequence();
         evaluate_entity.setStatus(NOT_START);
         evaluate_entity.setUrl(entity.getUrl());
-        evaluate_entity.setInputPath(entity.getInputPath() + ";" + entity.getOutputPath() + File.separator + "gaze" + File.separator + "txt");
+        if (addEvaluate.getName().startsWith(MASC)) {
+            evaluate_entity.setInputPath(entity.getInputPath() + ";" + entity.getOutputPath() + File.separator + "gaze" + File.separator + "txt");
+        } else if (addEvaluate.getName().startsWith(CAT)) {
+            File file________ = new File(entity.getInputPath());
+            if (!file________.exists()) {
+                return CommonResult.fail("数据集为空!");
+            }
+            if (file________.listFiles() != null && file________.listFiles().length > 0) {
+                for (File file___________________tmp : file________.listFiles()) {
+                    if (file___________________tmp.isDirectory()) {
+                        evaluate_entity.setInputPath(file___________________tmp.getPath()+ ";" + entity.getOutputPath() + File.separator + "txt");
+                        break;
+                    }
+                }
+            }
+        } else {
+            return CommonResult.fail("命名错误!");
+        }
         evaluate_entity.setZipFilePath(entity.getZipFilePath());
         evaluate_entity.setAlgorithmModelId(entity.getAlgorithmModelId());
         evaluate_entity.setInputOssId(entity.getInputOssId());