|
@@ -201,11 +201,11 @@ public class TargetIdentificationTaskServiceImpl extends BaseServiceImpl<TargetI
|
|
|
|
|
|
Map<String, String> records = null;
|
|
|
// 创建训练子任务
|
|
|
- if(taskDto.getTaskItemList().contains(CreateTargetIdentificationTaskDto.TASK_TYPE_SINGLE_DATA_AND_MORE_ALGORITHM)){
|
|
|
+ if(taskDto.getTaskItemList().contains("1")){
|
|
|
records = createTrainTask(taskBo.getId(),taskDto);
|
|
|
}
|
|
|
// 创建测试子任务
|
|
|
- if (taskDto.getTaskItemList().contains(CreateTargetIdentificationTaskDto.TASK_TYPE_SINGLE_DATA_AND_MORE_ALGORITHM)){
|
|
|
+ if (taskDto.getTaskItemList().contains("2")){
|
|
|
createTestTask(taskBo.getId(),taskDto, records);
|
|
|
}
|
|
|
return null;
|
|
@@ -263,7 +263,8 @@ public class TargetIdentificationTaskServiceImpl extends BaseServiceImpl<TargetI
|
|
|
return records;
|
|
|
}
|
|
|
|
|
|
- public static final String PATH_PREFIX = "ObjectDetection_Web/task";
|
|
|
+ public static final String PATH_PREFIX = "/home/ObjectDetection_Web/task";
|
|
|
+ public static final String WORK_DIR = "/home/ObjectDetection_Web";
|
|
|
/**
|
|
|
* 移动文件到对应文件夹
|
|
|
* @param batch
|
|
@@ -295,7 +296,7 @@ public class TargetIdentificationTaskServiceImpl extends BaseServiceImpl<TargetI
|
|
|
List<DataVo> dataVoList = dataService.getDataByBatchNum(batchNum);
|
|
|
for (DataVo dataVo : dataVoList) {
|
|
|
String[] strings = dataVo.getUrl().split("/profile");
|
|
|
- String relativePath = "ObjectDetection_Web" + strings[strings.length - 1];
|
|
|
+ String relativePath = WORK_DIR + strings[strings.length - 1];
|
|
|
File file = new File(relativePath);
|
|
|
System.out.println(file.getAbsolutePath());
|
|
|
if (file.exists()) {
|
|
@@ -310,7 +311,7 @@ public class TargetIdentificationTaskServiceImpl extends BaseServiceImpl<TargetI
|
|
|
}
|
|
|
if (dataVo.getLabelurl() != null) {
|
|
|
strings = dataVo.getLabelurl().split("/profile");
|
|
|
- relativePath = "ObjectDetection_Web" + strings[strings.length - 1];
|
|
|
+ relativePath = WORK_DIR + strings[strings.length - 1];
|
|
|
file = new File(relativePath);
|
|
|
if (file.exists()) {
|
|
|
try {
|