Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixes. #299

Merged
merged 21 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
92c299b
[docs]update info in readme
jotamotk Mar 4, 2024
99079b6
Revert "[docs]update info in readme"
jotamotk Mar 4, 2024
7330a9a
Merge pull request #214 from xtreme1-io/main
jaggerwang Mar 4, 2024
9d65104
Merge branch 'fix-TrackLineAndRgb' into dev
guhaomine Mar 13, 2024
81f271f
Merge branch 'hotfix-nginx-body-size' into dev
jaggerwang Mar 15, 2024
9528b34
Merge pull request #229 from xtreme1-io/main
jaggerwang Apr 2, 2024
111e5a4
Merge pull request #231 from xtreme1-io/main
jaggerwang Apr 10, 2024
5b75bf4
Merge pull request #233 from xtreme1-io/main
jaggerwang Apr 12, 2024
eda2ba7
Merge branch 'main' into dev
fanyinbo Apr 23, 2024
221ec56
Merge pull request #246 from xtreme1-io/main
jaggerwang May 7, 2024
2412086
Merge branch 'fix-parseIntensityError' into dev
guhaomine May 11, 2024
371afd0
Merge branch 'hotfix-0.8.1' into dev
fanyinbo May 20, 2024
ddaf7cb
Merge remote-tracking branch 'origin/dev' into dev
fanyinbo May 20, 2024
911877f
Merge pull request #253 from xtreme1-io/main
jaggerwang May 20, 2024
8dc0b1d
Merge pull request #255 from xtreme1-io/main
jaggerwang May 20, 2024
973a521
Merge pull request #277 from xtreme1-io/main
jaggerwang Aug 16, 2024
ca21007
Merge pull request #282 from xtreme1-io/main
jaggerwang Sep 6, 2024
2d3bb31
Merge pull request #289 from xtreme1-io/main
jaggerwang Oct 8, 2024
4543067
Fixed data export in COCO format
fanyinbo Nov 13, 2024
357e930
Merge branch 'main' into dev
fanyinbo Nov 13, 2024
d49e75a
Merge remote-tracking branch 'origin/dev' into dev
fanyinbo Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN --mount=type=cache,target=/root/.m2 mvn package
FROM openjdk:11-jre
RUN apt update && \
apt install -y iputils-ping curl wget netcat python3 python3-pip git
RUN pip3 install --upgrade --force-reinstall git+https://github.com/xtreme1-io/xtreme1-sdk.git@d0cf4cc
RUN pip3 install --upgrade --force-reinstall git+https://github.com/xtreme1-io/xtreme1-sdk.git@6b53a73
WORKDIR /app
COPY --from=build /build/target/xtreme1-backend-0.9.1-SNAPSHOT.jar ./app.jar
RUN mkdir -p config
Expand Down
10 changes: 8 additions & 2 deletions backend/src/main/java/ai/basic/x1/usecase/ExportUseCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,20 +144,26 @@ private <Q extends BaseQueryBO> void getDataAndUpload(ExportRecord record, Strin
var zipPath = srcPath + ".zip";
File zipFile;
var path = String.format("%s/%s", rootPath, FileUtil.getName(zipPath));

if (DataFormatEnum.COCO.equals(query.getDataFormat())) {
var basePath = String.format("%s/%s", tempPath, IdUtil.fastSimpleUUID());
var respPath = String.format("%s/resp.json", basePath);
var baseOutPath = String.format("%s/%s", basePath, FileUtil.getPrefix(zipPath));
var outPathNew = String.format("%s/result", baseOutPath);
FileUtil.move(Path.of(String.format("%s/image", srcPath)), Path.of(String.format("%s/image", baseOutPath)), true);
//FileUtil.move(Path.of(String.format("%s/image", srcPath)), Path.of(String.format("%s/image", baseOutPath)), true);
ZipUtil.zip(srcPath, zipPath, true);
FileUtil.mkdir(outPathNew);
DataFormatUtil.convert(Constants.CONVERT_EXPORT, zipPath, outPathNew, respPath);
if (FileUtil.exist(respPath) && UsecaseCode.OK.equals(DefaultConverter.convert(JSONUtil.readJSONObject(FileUtil.file(respPath), Charset.defaultCharset()), ApiResult.class).getCode())) {
zipFile = ZipUtil.zip(baseOutPath, zipPath, true);
} else {
FileUtil.del(basePath);
throw new UsecaseException("convert coco error");
var exportRecordBO = exportRecordBOBuilder
.status(ExportStatusEnum.FAILED)
.updatedAt(OffsetDateTime.now())
.build();
exportRecordUsecase.saveOrUpdate(exportRecordBO);
return;
}
FileUtil.del(basePath);
} else {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main/java/ai/basic/x1/util/DataFormatUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static void convert(String type, String srcPath, String outPath, String r
FileUtil.mkParentDirs(respPath);
ProcessBuilder builder = new ProcessBuilder();
FileUtil.mkParentDirs(respPath);
String command = String.format("xtreme1_ctl --mode '%s' -src '%s' -out '%s' --rps '%s' --format=coco", type, srcPath, outPath, respPath);
String command = String.format("script_ctl --mode '%s' --src '%s' --dst '%s' --rps '%s' --fmt=coco", type, srcPath, outPath, respPath);
builder.command("sh", "-c", command);
Process process = builder.start();
BufferedReader in = new BufferedReader(new InputStreamReader(process.getErrorStream()));
Expand Down
Loading