This commit is contained in:
yatenglg 2023-04-25 23:05:34 +08:00
parent 21d12fe031
commit 0047a0cb37
2 changed files with 22 additions and 21 deletions

View File

@ -1,6 +1,6 @@
# ISAT with segment anything # ISAT with segment anything
# Image segmentation annotation tool with segment anything. ## Image segmentation annotation tool with segment anything.
[标注.gif](./display/标注%20-big-original.gif) ![annotate.gif](./display/标注%20-big-original.gif)
Quick annotate for image segmentation by [segment anything](https://github.com/facebookresearch/segment-anything) Quick annotate for image segmentation by [segment anything](https://github.com/facebookresearch/segment-anything)
@ -13,15 +13,15 @@ Demo Video[youtube](https://www.youtube.com/watch?v=yLdZCPmX-Bc)
[中文](README.md) [English](README-en.md) [中文](README.md) [English](README-en.md)
## INSTALL # INSTALL
### 1. Run the source code ## 1. Run the source code
#### (1) Create environment ### (1) Create environment
```shell ```shell
conda create -n ISAT_with_segment_anything python==3.8 conda create -n ISAT_with_segment_anything python==3.8
conda activate ISAT_with_segment_anything conda activate ISAT_with_segment_anything
``` ```
#### (2) Install Segment anything ### (2) Install Segment anything
```shell ```shell
git clone git@github.com:facebookresearch/segment-anything.git git clone git@github.com:facebookresearch/segment-anything.git
cd segment-anything cd segment-anything
@ -29,14 +29,14 @@ pip install -e .
cd .. cd ..
``` ```
#### (3) Install ISAT_with_segment_anything ### (3) Install ISAT_with_segment_anything
```shell ```shell
git clone https://github.com/yatengLG/ISAT_with_segment_anything.git git clone https://github.com/yatengLG/ISAT_with_segment_anything.git
cd ISAT_with_segment_anything cd ISAT_with_segment_anything
pip install -r requirements.txt pip install -r requirements.txt
``` ```
#### (4) Download Segment anything pretrained checkpoint. ### (4) Download Segment anything pretrained checkpoint.
Download the checkpointand save in the path: ISAT_with_segment_anything/segment_any Download the checkpointand save in the path: ISAT_with_segment_anything/segment_any
- H-checkpoint:[sam_vit_h_4b8939.pth](https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth) - H-checkpoint:[sam_vit_h_4b8939.pth](https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth)
@ -49,7 +49,7 @@ Download the checkpointand save in the path: ISAT_with_segment_anything/segme
B checkpoint has pool effect, but need less resources.VRAM needs at least 6G. B checkpoint has pool effect, but need less resources.VRAM needs at least 6G.
#### (5) Run ### (5) Run
```shell ```shell
python main.py python main.py
``` ```

View File

@ -1,6 +1,7 @@
# ISAT with segment anything # ISAT with segment anything
# ISAT 图像分割标注工具(集成segment anything) ## ISAT 图像分割标注工具(集成segment anything)
[标注.gif](./display/标注%20-big-original.gif)
![标注.gif](./display/标注%20-big-original.gif)
集成[segment anything](https://github.com/facebookresearch/segment-anything),实现图片分割快速标注。 集成[segment anything](https://github.com/facebookresearch/segment-anything),实现图片分割快速标注。
@ -11,7 +12,7 @@
Demo Video[youtube](https://www.youtube.com/watch?v=yLdZCPmX-Bc) Demo Video[youtube](https://www.youtube.com/watch?v=yLdZCPmX-Bc)
[中文](README.md) [English](README-en.md) [中文](README.md) [English](README-en.md)
## 特点 # 特点
1. 集成segment anything快速进行图像分割标注 1. 集成segment anything快速进行图像分割标注
- 通过鼠标左右键提示感兴趣区域调用segment anything自动计算分割掩码。不必再手动进行目标轮廓选取。 - 通过鼠标左右键提示感兴趣区域调用segment anything自动计算分割掩码。不必再手动进行目标轮廓选取。
@ -22,27 +23,27 @@ Demo Video[youtube](https://www.youtube.com/watch?v=yLdZCPmX-Bc)
- 保留了ISAT手动绘制多边形进行标注的功能可满足Segment anything无法分割目标的标注。 - 保留了ISAT手动绘制多边形进行标注的功能可满足Segment anything无法分割目标的标注。
- 手动标注较自动标注更加精确,但工作量也更大。 - 手动标注较自动标注更加精确,但工作量也更大。
## 安装 # 安装
### 1. 源码运行 ## 1. 源码运行
#### (1) 创建虚拟环境 ### (1) 创建虚拟环境
```shell ```shell
conda create -n ISAT_with_segment_anything python==3.8 conda create -n ISAT_with_segment_anything python==3.8
conda activate ISAT_with_segment_anything conda activate ISAT_with_segment_anything
``` ```
#### (2) 安装Segment anything ### (2) 安装Segment anything
```shell ```shell
git clone git@github.com:facebookresearch/segment-anything.git git clone git@github.com:facebookresearch/segment-anything.git
cd segment-anything cd segment-anything
pip install -e . pip install -e .
cd .. cd ..
``` ```
#### (3) 安装ISAT_with_segment_anything ### (3) 安装ISAT_with_segment_anything
```shell ```shell
git clone https://github.com/yatengLG/ISAT_with_segment_anything.git git clone https://github.com/yatengLG/ISAT_with_segment_anything.git
cd ISAT_with_segment_anything cd ISAT_with_segment_anything
pip install -r requirements.txt pip install -r requirements.txt
``` ```
#### (4) 下载Segment anything预训练模型 ### (4) 下载Segment anything预训练模型
下载任一模型并将模型存放于ISAT_with_segment_anything/segment_any目录下 下载任一模型并将模型存放于ISAT_with_segment_anything/segment_any目录下
请按照硬件下载合适的模型. 请按照硬件下载合适的模型.
@ -56,20 +57,20 @@ pip install -r requirements.txt
模型最小效果也最差显存至少需求6G演示时软件实际占用4149M 模型最小效果也最差显存至少需求6G演示时软件实际占用4149M
#### (5) 运行软件 ### (5) 运行软件
```shell ```shell
python main.py python main.py
``` ```
## 标注操作 # 标注操作
1. 通过鼠标左键(或右键)提示感兴趣区域(或不感兴趣区域),自动形成目标分割掩码。 1. 通过鼠标左键(或右键)提示感兴趣区域(或不感兴趣区域),自动形成目标分割掩码。
2. 可通过多次左右键提示,提升掩码质量。 2. 可通过多次左右键提示,提升掩码质量。
3. E键结束标注选择类别得到多边形标注区域。 3. E键结束标注选择类别得到多边形标注区域。
4. 拖拽多边形顶点,精细化调整标注。 4. 拖拽多边形顶点,精细化调整标注。
## 注意事项 # 注意事项
1. 自动分割效果受segment anything模型分割效果限制如需更为精确的分割效果可通过手动绘制多边形实现。 1. 自动分割效果受segment anything模型分割效果限制如需更为精确的分割效果可通过手动绘制多边形实现。
2. 如果没有GPU或只需要使用手动绘制多边形标注推荐使用[ISAT](https://github.com/yatengLG/ISAT)。 2. 如果没有GPU或只需要使用手动绘制多边形标注推荐使用[ISAT](https://github.com/yatengLG/ISAT)。
3. 软件对GPU显存有最低限制 3. 软件对GPU显存有最低限制