(Windows)半自动化标注-Label-Studio的安装和简单使用

04-19 1620阅读

半自动化标注-Label-Studio的安装和简单使用

参考文献https://mp.weixin.qq.com/s/7e28NOnGJi09GqPzzVUPuA

Label Studio 是一款优秀的标注软件,覆盖图像分类、目标检测、分割等领域数据集标注的功能。

LabelStudio
├── backend         // 后端功能
│   ├── examples    // label studio ml 官方示例(非必须)
│   ├── mmdetection // mmdetection 人脸检测模型
│   ├── model       // label studio ml 生成的后端服务 (自动生成)
│   ├── workdir     // 模型训练时工作目录
│   |   ├── fcos_common_base.pth    // 后端模型基础权重文件
│   |   └── latest.pth              // 后端模型最新权重文件
│   └── runbackend.bat  // 生成并启动后端服务的脚本文件
├── dataset         // 实验所用数据集(非必须)      
├── label_studio.sqlite3    // label studio 数据库文件
├── media      
│   ├── export
│   └── upload  // 上传的待标记数据集
└── run.bat     // 启动 label studio 的脚本文件(非必须)

SAM (Segment Anything) 是 Meta AI 推出的分割一切的模型。

安装pytorch

pip install torch==1.10.1+cpu torchvision==0.11.2+cpu torchaudio==0.10.1 -f https://download.pytorch.org/whl/cpu/torch_stable.html

安装所需工具包

pip install opencv-python pycocotools matplotlib onnxruntime onnx -i http://pypi.douban.com/simple/  --trusted-host pypi.douban.com

下载playground:https://github.com/open-mmlab/playground

(Windows)半自动化标注-Label-Studio的安装和简单使用

(Windows)半自动化标注-Label-Studio的安装和简单使用

在线安装segment-anything

pip install git+https://github.com/facebookresearch/segment-anything.git

(Windows)半自动化标注-Label-Studio的安装和简单使用

或者离线安装

https://github.com/facebookresearch/segment-anything

(Windows)半自动化标注-Label-Studio的安装和简单使用

pip install -e .

(Windows)半自动化标注-Label-Studio的安装和简单使用

下载Seg模型权重,选择权重(选择其一)(可用浏览器下载)

wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth
# 最优
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth

(Windows)半自动化标注-Label-Studio的安装和简单使用

(Windows)半自动化标注-Label-Studio的安装和简单使用

安装label-studio和label-studio-ml

pip install label-studio -i http://pypi.douban.com/simple/  --trusted-host pypi.douban.com --user
pip install label-studio-ml  -i http://pypi.douban.com/simple/  --trusted-host pypi.douban.com --user

启动label-studio-ml

(Windows)半自动化标注-Label-Studio的安装和简单使用

label-studio-ml start sam --port 8003 --with sam_config=vit_b sam_checkpoint_file=./sam_vit_b_01ec64.pth out_mask=True out_bbox=True device=cpu 
# device=cuda:0 为使用 GPU 推理,如果使用 cpu 推理,将 cuda:0 替换为 cpu
# out_poly=True 返回外接多边形的标注

(Windows)半自动化标注-Label-Studio的安装和简单使用

启动 Label-Studio

set ML_TIMEOUT_SETUP=40
label-studio start

(Windows)半自动化标注-Label-Studio的安装和简单使用

(Windows)半自动化标注-Label-Studio的安装和简单使用

注册登录,创建项目

(Windows)半自动化标注-Label-Studio的安装和简单使用

(Windows)半自动化标注-Label-Studio的安装和简单使用

(Windows)半自动化标注-Label-Studio的安装和简单使用

上传图像(数据)

(Windows)半自动化标注-Label-Studio的安装和简单使用

(Windows)半自动化标注-Label-Studio的安装和简单使用

(Windows)半自动化标注-Label-Studio的安装和简单使用

删除标签

(Windows)半自动化标注-Label-Studio的安装和简单使用

添加标签

(Windows)半自动化标注-Label-Studio的安装和简单使用

(Windows)半自动化标注-Label-Studio的安装和简单使用

  
  
    
    
  

(Windows)半自动化标注-Label-Studio的安装和简单使用

标注

选择标注类型

(Windows)半自动化标注-Label-Studio的安装和简单使用

开始绘制(只有选了标注类型,才能进行标注)

(Windows)半自动化标注-Label-Studio的安装和简单使用

删除标注

(Windows)半自动化标注-Label-Studio的安装和简单使用

点击提交或更新,完成标注

(Windows)半自动化标注-Label-Studio的安装和简单使用


报错解决-not found ruamel方案:

(Windows)半自动化标注-Label-Studio的安装和简单使用

报错的py文件里内容改为import ruamel_yaml as yaml

VPS购买请点击我

文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

目录[+]