Skip to content

iFREEGROUP/samc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

samc - 分割、角度标注工具

运行

BASE_DIR=/path/to/images/待标注的目录 python app/main.py

USE_TINY=true ./server /path/to/images/待标注的目录 # 使用 mobile-sam 模型

使用外部分割API

USE_API=https://example.com/api/sam BASE_DIR=/path/to/images/待标注的目录 python app/main.py

API 需要实现以下请求参数:
```json
{
    "images": "base64编码的图片",
    "inputs":[
        [640, 640, 1],
        [640, 660, 1],
        [640, 680, 0]
    ],
    "masks":"numpy string"
}

> 其中 inputs 是一个二维数组,表示每个输入的坐标,格式为 [height, width, x], x 只能是0 或 1,0表示背景,1表示前景

API 只需要返回以下格式即可:

{
    "mask":"base64编码的掩码",
    "inputs":[
        //...
    ]
}

screenshot-20240517-224120

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published