|
@@ -623,33 +623,16 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
|
|
|
@Override
|
|
|
public CommonResult previewPredictResult(Long id) {
|
|
|
TrackSequence entity = getById(id);
|
|
|
+ String inputPath = entity.getInputPath() + File.separator + "images";
|
|
|
+ String outputPath = entity.getOutputPath() + File.separator + "gaze" + File.separator + "images";
|
|
|
|
|
|
- SysOssVo inputOssEntity = ossService.getById(entity.getInputOssId());
|
|
|
-
|
|
|
- String filePath = inputOssEntity.getFileName();
|
|
|
- String localPath = TaaisConfig.getProfile();
|
|
|
- String resourcePath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX);
|
|
|
-
|
|
|
- String fileName = StringUtils.substringAfterLast(filePath, "/");
|
|
|
- String fileName_without_suffix = removeFileExtension(fileName);
|
|
|
-
|
|
|
- Path path = Paths.get(resourcePath);
|
|
|
- Path inputPath = path
|
|
|
- .resolveSibling(fileName_without_suffix + BizConstant.UNZIP_SUFFIX + File.separator + "images");
|
|
|
- Path outputPath = path.resolveSibling(entity.getId().toString() + BizConstant.TRACK_SEQUENCE_SUFFIX
|
|
|
- + File.separator + "gaze" + File.separator + "images");
|
|
|
-
|
|
|
- File outputPathDir = new File(outputPath.toString());
|
|
|
+ File outputPathDir = new File(outputPath);
|
|
|
if (!outputPathDir.exists()) {
|
|
|
- outputPath = path.resolveSibling(
|
|
|
- entity.getId().toString() + BizConstant.TRACK_SEQUENCE_SUFFIX + File.separator + "images");
|
|
|
+ outputPath = entity.getOutputPath() + File.separator + "images";
|
|
|
}
|
|
|
|
|
|
- // String urlPrefix = inputOssEntity.getUrl().substring(0,
|
|
|
- // inputOssEntity.getUrl().indexOf(Constants.RESOURCE_PREFIX) +
|
|
|
- // Constants.RESOURCE_PREFIX.length());
|
|
|
String urlPrefix = Constants.RESOURCE_PREFIX;
|
|
|
- return getCompareImage(urlPrefix, inputPath.toString(), outputPath.toString());
|
|
|
+ return getCompareImage(urlPrefix, inputPath, outputPath);
|
|
|
}
|
|
|
|
|
|
@Override
|