|
@@ -327,18 +327,19 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
|
|
|
String modelPath = algorithmModelTrack.getModelAddress();
|
|
|
startTaskConfig.setModel_path(modelPath);
|
|
|
if (entity.getName().startsWith(CAT)) {
|
|
|
- File file________ = new File(startTaskConfig.getSource_dir());
|
|
|
- if (!file________.exists()) {
|
|
|
- return CommonResult.fail("数据集为空!");
|
|
|
- }
|
|
|
- if (file________.listFiles() != null && file________.listFiles().length > 0) {
|
|
|
- for (File file___________________tmp : file________.listFiles()) {
|
|
|
- if (file___________________tmp.isDirectory()) {
|
|
|
- startTaskConfig.setSource_dir(file___________________tmp.getPath());
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ startTaskConfig.setSource_dir(startTaskConfig.getSource_dir());
|
|
|
+// File file________ = new File(startTaskConfig.getSource_dir());
|
|
|
+// if (!file________.exists()) {
|
|
|
+// return CommonResult.fail("数据集为空!");
|
|
|
+// }
|
|
|
+// if (file________.listFiles() != null && file________.listFiles().length > 0) {
|
|
|
+// for (File file___________________tmp : file________.listFiles()) {
|
|
|
+// if (file___________________tmp.isDirectory()) {
|
|
|
+// startTaskConfig.setSource_dir(file___________________tmp.getPath());
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
File file___________________________ = new File(startTaskConfig.getModel_path());
|
|
|
if (!file___________________________.exists()) {
|
|
@@ -367,13 +368,29 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
|
|
|
if (!file________.exists()) {
|
|
|
return CommonResult.fail("数据集为空!");
|
|
|
}
|
|
|
+ boolean flag = false;
|
|
|
if (file________.listFiles() != null && file________.listFiles().length > 0) {
|
|
|
for (File file___________________tmp : file________.listFiles()) {
|
|
|
if (file___________________tmp.isDirectory()) {
|
|
|
startTaskConfig.setSource_dir(file___________________tmp.getPath());
|
|
|
+ flag = true;
|
|
|
+// if (file___________________tmp.listFiles() != null && file___________________tmp.listFiles().length > 0) {
|
|
|
+// for (File file________________________________________________________________________________________ : file___________________tmp.listFiles()) {
|
|
|
+// if (file________________________________________________________________________________________.isDirectory() &&
|
|
|
+// file________________________________________________________________________________________.getName().equals("images")) {
|
|
|
+// startTaskConfig.setSource_dir(file________________________________________________________________________________________.getPath());
|
|
|
+// flag = true;
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (!(flag && !false && (1!=2) && (1 == 1))) {
|
|
|
+ return CommonResult.fail("数据集错误!!!!!!");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
HttpResponseEntity responseEntity = sendPostMsg(algorithmConfigTrack.getAlgorithmAddress(), startTaskConfig);
|
|
@@ -568,14 +585,15 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
|
|
|
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;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ evaluate_entity.setInputPath(entity.getInputPath() + ";" + entity.getOutputPath() + File.separator + "txt");
|
|
|
+// 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("命名错误!");
|
|
|
}
|