perf(sam2): code

This commit is contained in:
zhangheng
2026-04-10 13:51:52 +08:00
parent 140df9202d
commit 033f11fb9b
4 changed files with 176 additions and 463 deletions

View File

@@ -108,18 +108,6 @@ export const getLabelImage = (activeImage: string, path: string) => {
})
}
// 辅助标注
export const getAuxiliaryAnnotation = (data: any) => {
return httpFetch<any>({
url: BASE_LABEL_API + "/api/model_server/sam2/sa",
method: "POST",
body: JSON.stringify(data),
headerAttr: {
responseType: "arraybuffer",
},
})
}
const BASE_SAM_API =
process.env.NEXT_PUBLIC_ENV === "production"
? "http://172.16.103.224:8000"
@@ -127,7 +115,7 @@ const BASE_SAM_API =
? "http://172.30.21.211:8000"
: "http://172.30.21.211:8000"
export const getAuxiliaryAnnotation2 = (data: {
export const getAuxiliaryAnnotation = (data: {
project_id: number
image_name: string
prompt: {
@@ -146,18 +134,6 @@ export const getAuxiliaryAnnotation2 = (data: {
})
}
// 模型标注 追踪
export const getTrackingAuxiliaryAnnotation = (data: any) => {
return httpFetch<any>({
url: BASE_LABEL_API + "/api/model_server/sam2/vos",
method: "POST",
body: JSON.stringify(data),
headerAttr: {
responseType: "arraybuffer",
},
})
}
// 用户登录
export const userLogin = (data: { name: string; password: string }) => {
return httpFetch<LoginInfo>({