半自動(dòng)化標(biāo)注-Label-Studio的安裝和簡單使用
參考文獻(xiàn)https://mp.weixin.qq.com/s/7e28NOnGJi09GqPzzVUPuA
Label Studio 是一款優(yōu)秀的標(biāo)注軟件,覆蓋圖像分類、目標(biāo)檢測、分割等領(lǐng)域數(shù)據(jù)集標(biāo)注的功能。
LabelStudio
├── backend // 后端功能
│ ├── examples // label studio ml 官方示例(非必須)
│ ├── mmdetection // mmdetection 人臉檢測模型
│ ├── model // label studio ml 生成的后端服務(wù) (自動(dòng)生成)
│ ├── workdir // 模型訓(xùn)練時(shí)工作目錄
│ | ├── fcos_common_base.pth // 后端模型基礎(chǔ)權(quán)重文件
│ | └── latest.pth // 后端模型最新權(quán)重文件
│ └── runbackend.bat // 生成并啟動(dòng)后端服務(wù)的腳本文件
├── dataset // 實(shí)驗(yàn)所用數(shù)據(jù)集(非必須)
├── label_studio.sqlite3 // label studio 數(shù)據(jù)庫文件
├── media
│ ├── export
│ └── upload // 上傳的待標(biāo)記數(shù)據(jù)集
└── run.bat // 啟動(dòng) 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
在線安裝segment-anything
pip install git+https://github.com/facebookresearch/segment-anything.git
或者離線安裝
https://github.com/facebookresearch/segment-anything
pip install -e .
下載Seg模型權(quán)重,選擇權(quán)重(選擇其一)(可用瀏覽器下載)
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth
# 最優(yōu)
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth
安裝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
啟動(dòng)label-studio-ml
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 返回外接多邊形的標(biāo)注
啟動(dòng) Label-Studio
set ML_TIMEOUT_SETUP=40
label-studio start
注冊(cè)登錄,創(chuàng)建項(xiàng)目
上傳圖像(數(shù)據(jù))
刪除標(biāo)簽
添加標(biāo)簽
<View>
<Image name="image" value="$image"/>
<RectangleLabels name="label" toName="image">
<Label value="cat" background="#FFA39E"/><Label value="dog" background="#D4380D"/></RectangleLabels>
</View>
標(biāo)注
選擇標(biāo)注類型
開始繪制(只有選了標(biāo)注類型,才能進(jìn)行標(biāo)注)
刪除標(biāo)注
點(diǎn)擊提交或更新,完成標(biāo)注
文章來源:http://www.zghlxwxcb.cn/news/detail-554861.html
報(bào)錯(cuò)解決-not found ruamel方案:
報(bào)錯(cuò)的py文件里內(nèi)容改為import ruamel_yaml as yaml
文章來源地址http://www.zghlxwxcb.cn/news/detail-554861.html
到了這里,關(guān)于(Windows)半自動(dòng)化標(biāo)注-Label-Studio的安裝和簡單使用的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!