|
@@ -6,6 +6,7 @@ import com.mybatisflex.core.query.QueryWrapper;
|
|
|
import com.taais.biz.constant.BizConstant;
|
|
|
import com.taais.biz.domain.HttpResponseEntity;
|
|
|
import com.taais.biz.domain.DataAugmentation;
|
|
|
+import com.taais.biz.domain.TransmissionObject;
|
|
|
import com.taais.biz.domain.bo.DataAugmentationBo;
|
|
|
import com.taais.biz.domain.bo.DataAugmentationStartResultBo;
|
|
|
import com.taais.biz.domain.vo.DataAugmentationVo;
|
|
@@ -232,12 +233,12 @@ public class DataAugmentationServiceImpl extends BaseServiceImpl<DataAugmentatio
|
|
|
Path path = Paths.get(resourcePath);
|
|
|
Path inputPath = path.resolveSibling(fileName_without_suffix + "_images");
|
|
|
Path outputPath = path.resolveSibling(fileName_without_suffix + "_stable");
|
|
|
-
|
|
|
+ Path logPath = path.resolveSibling(fileName_without_suffix + "_log");
|
|
|
makeDir(inputPath.toString());
|
|
|
makeDir(outputPath.toString());
|
|
|
|
|
|
ZipUtils.unzip(resourcePath, inputPath.toString());
|
|
|
-
|
|
|
+ dataAugmentation.setLog(logPath.toString());
|
|
|
dataAugmentation.setInputPath(inputPath.toString());
|
|
|
dataAugmentation.setOutputPath(outputPath.toString());
|
|
|
|
|
@@ -253,7 +254,16 @@ public class DataAugmentationServiceImpl extends BaseServiceImpl<DataAugmentatio
|
|
|
return CommonResult.fail("未设置数据增强算法推理的url!请在数据字典中设置该算法的推理url!");
|
|
|
}
|
|
|
String data_augmentation_start_url = sysDictDataVos.get(0).getDictValue();
|
|
|
- HttpResponseEntity responseEntity = sendPostMsg(data_augmentation_start_url, dataAugmentation);
|
|
|
+ //设置传输对象
|
|
|
+ TransmissionObject transmissionObject = new TransmissionObject();
|
|
|
+ transmissionObject.setBizId(dataAugmentation.getId());
|
|
|
+ transmissionObject.setBizType(dataAugmentation.getTaskType());
|
|
|
+ transmissionObject.setLogPath(dataAugmentation.getLog());
|
|
|
+ transmissionObject.setSourcePath(dataAugmentation.getInputPath());
|
|
|
+ transmissionObject.setResultPath(dataAugmentation.getOutputPath());
|
|
|
+ transmissionObject.setOtherParams(dataAugmentation.getHyperparameterConfiguration());
|
|
|
+ HttpResponseEntity responseEntity = sendPostMsg(data_augmentation_start_url, transmissionObject);
|
|
|
+
|
|
|
if (responseEntity.getStatus() == 200) {
|
|
|
dataAugmentation.setStatus(BizConstant.VideoStatus.FAILED);
|
|
|
updateById(dataAugmentation);
|
|
@@ -353,7 +363,7 @@ public class DataAugmentationServiceImpl extends BaseServiceImpl<DataAugmentatio
|
|
|
return CommonResult.fail("未设置数据增强算法停止推理的url!请在数据字典中设置该算法的停止推理地址!");
|
|
|
}
|
|
|
String data_augmentation_stop_url = sysDictDataVos.get(0).getDictValue();
|
|
|
- HttpResponseEntity responseEntity = sendPostMsg(data_augmentation_stop_url, dataAugmentation);
|
|
|
+ HttpResponseEntity responseEntity = sendPostMsg(data_augmentation_stop_url, null);
|
|
|
if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
|
|
|
dataAugmentation.setStatus(BizConstant.VideoStatus.INTERRUPTED);
|
|
|
updateById(dataAugmentation);
|