|
@@ -224,6 +224,34 @@ public class TargetDetectionServiceImpl extends BaseServiceImpl<TargetDetectionM
|
|
|
return this.removeByIds(Arrays.asList(ids));
|
|
|
}
|
|
|
|
|
|
+ public String getTrainInputPath(SysOssVo ossEntity) {
|
|
|
+ // todo
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getTrainOutputPath(ToInfrared entity, SysOssVo ossEntity) {
|
|
|
+ // todo
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPredictInputPath(SysOssVo ossEntity) {
|
|
|
+ // todo
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPredictOutputPath(TargetDetection entity, SysOssVo ossEntity) {
|
|
|
+ // todo
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ private String getLogFileName(TargetDetection entity) {
|
|
|
+ return entity.getId() + BizConstant.TARGET_DETECTION_SUFFIX + ".log";
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getLogFilePath(TargetDetection entity) {
|
|
|
+ return entity.getOutputPath() + File.separator + getLogFileName(entity);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public CommonResult start(Long id) {
|
|
|
TargetDetection entity = getById(id);
|
|
@@ -265,7 +293,7 @@ public class TargetDetectionServiceImpl extends BaseServiceImpl<TargetDetectionM
|
|
|
|
|
|
startTaskConfig.setSource_dir(entity.getInputPath());
|
|
|
startTaskConfig.setResult_dir(entity.getOutputPath());
|
|
|
- startTaskConfig.setLog_path(entity.getOutputPath() + File.separator + getLogFileName(entity));
|
|
|
+ startTaskConfig.setLog_path(getLogFilePath(entity));
|
|
|
|
|
|
if (BizConstant.AlgorithmType.REASONING.equals(algorithmConfigTrack.getType())) {
|
|
|
String modelPath = algorithmModelTrack.getModelAddress();
|
|
@@ -399,15 +427,10 @@ public class TargetDetectionServiceImpl extends BaseServiceImpl<TargetDetectionM
|
|
|
return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + file.getName() + "\"").header(HttpHeaders.CONTENT_TYPE, "application/octet-stream").body(resource);
|
|
|
}
|
|
|
|
|
|
- private String getLogFileName(TargetDetection entity) {
|
|
|
- return entity.getId() + BizConstant.TARGET_DETECTION_SUFFIX + ".log";
|
|
|
- }
|
|
|
-
|
|
|
@Override
|
|
|
public CommonResult getLog(Long id) {
|
|
|
TargetDetection entity = getById(id);
|
|
|
- String outPutPath = entity.getOutputPath();
|
|
|
- String logPath = outPutPath + File.separator + getLogFileName(entity);
|
|
|
+ String logPath = getLogFilePath(entity);
|
|
|
System.out.println(logPath);
|
|
|
File file = new File(logPath);
|
|
|
if (!file.exists()) {
|