新增家具分割接口
This commit is contained in:
@@ -20,7 +20,8 @@ async def seg_anything(request_data: SAMRequestModel):
|
|||||||
通过传入图片路径和点击的点坐标,返回分割后的掩码数据。
|
通过传入图片路径和点击的点坐标,返回分割后的掩码数据。
|
||||||
|
|
||||||
### 参数说明:
|
### 参数说明:
|
||||||
- **user_id**:用户id 用于存储分割图
|
- **bucket**: minio bucket name
|
||||||
|
- **object_name**: minio object name
|
||||||
- **image_path**: 图片在服务器或云端的相对路径。
|
- **image_path**: 图片在服务器或云端的相对路径。
|
||||||
- **type**: 推理类型
|
- **type**: 推理类型
|
||||||
- **box**: 框选矩形点位信息
|
- **box**: 框选矩形点位信息
|
||||||
@@ -33,8 +34,8 @@ async def seg_anything(request_data: SAMRequestModel):
|
|||||||
```json
|
```json
|
||||||
point
|
point
|
||||||
{
|
{
|
||||||
"user_id": 1,
|
"bucket": "test",
|
||||||
"image_path": "aida-users/89/sketch/4e8fe37d-7068-400a-ac94-c01647fa5f6f.png",
|
"object_name": "7068-400a-ac94-c01647fa5f6f.png",
|
||||||
"type":"point",
|
"type":"point",
|
||||||
"points": [[310, 403], [493, 375], [261, 266], [404, 484]],
|
"points": [[310, 403], [493, 375], [261, 266], [404, 484]],
|
||||||
"labels": [1, 1, 0, 1]
|
"labels": [1, 1, 0, 1]
|
||||||
@@ -42,7 +43,8 @@ async def seg_anything(request_data: SAMRequestModel):
|
|||||||
|
|
||||||
box
|
box
|
||||||
{
|
{
|
||||||
"user_id": 1,
|
"bucket": "test",
|
||||||
|
"object_name": "7068-400a-ac94-c01647fa5f6f.png",
|
||||||
"image_path": "aida-users/89/sketch/4e8fe37d-7068-400a-ac94-c01647fa5f6f.png",
|
"image_path": "aida-users/89/sketch/4e8fe37d-7068-400a-ac94-c01647fa5f6f.png",
|
||||||
"type":"box",
|
"type":"box",
|
||||||
"box": [350, 286, 544, 520]
|
"box": [350, 286, 544, 520]
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ from pydantic import BaseModel, Field
|
|||||||
|
|
||||||
|
|
||||||
class SAMRequestModel(BaseModel):
|
class SAMRequestModel(BaseModel):
|
||||||
user_id: int = Field(..., description="用户id, 必填字段")
|
bucket: str = Field(..., description="minio bucket name ")
|
||||||
|
object_name: str = Field(..., description="minio object name ")
|
||||||
image_path: str = Field(..., description="图片路径,必填字段")
|
image_path: str = Field(..., description="图片路径,必填字段")
|
||||||
type: str = Field(..., description="推理类型,必填字段")
|
type: str = Field(..., description="推理类型,必填字段")
|
||||||
points: Optional[List[List[float]]] | None = None
|
points: Optional[List[List[float]]] | None = None
|
||||||
|
|||||||
Reference in New Issue
Block a user