This commit is contained in:
zcr
2026-03-27 14:46:19 +08:00
parent a3cfa429ac
commit dd3c070f4d

View File

@@ -94,11 +94,13 @@ class SimpleLitAPI(ls.LitAPI):
rgba_np = np.array(rgba_image)
rgba_np[:, :, 3] = mask.astype(np.uint8) * 255
object_name = f"{request.user_id}/seg_anything/{uuid.uuid4()}"
bucket = request.bucket
object_name = request.object_name
req = oss_upload_image(
oss_client=minio_client,
bucket="aida-users",
object_name=f"{object_name}.png",
bucket=bucket,
object_name=object_name,
image_bytes=cv2.imencode('.png', rgba_np)[1]
)
return {"output": f"{req.bucket_name}/{req.object_name}"}