大模型EfficientSam用于图像语义分割自动标注

安装labelme

Labelme安装及使用教程-优快云博客

pip install labelme -i https://pypi.tuna.tsinghua.edu.cn/simple

在安装的过程中因为会需要pyqt5

error: subprocess-exited-with-error

× Building wheel for PyQt5-sip (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [5 lines of output]
running bdist_wheel
running build
running build_ext
building 'PyQt5.sip' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for PyQt5-sip
Building wheel for pyreadline (setup.py) ... done
Created wheel for pyreadline: filename=pyreadline-2.1-py3-none-any.whl size=93852 sha256=c980633ea551b05da9609d81c36f79c7920c9a2c1d08c2f27d1a9b89e5f34461
Stored in directory: c:\users\administrator\appdata\local\pip\cache\wheels\fd\c8\66\b978274a31abe8e43360ac389c18def59a35528ef7bdcd5c17
Successfully built labelme imgviz pyreadline
Failed to build PyQt5-sip
ERROR: Could not build wheels for PyQt5-sip, which is required to install pyproject.toml-based projects

Microsoft C++ Build Tools - Visual Studio (https://visualstudio.microsoft.com/visual-cpp-build-tools/)
HTML · 213 KB

这个错误信息表明在构建 PyQt5-sip 时遇到了问题,需要 Microsoft Visual C++ 14.0 或更高版本来成功构建。你可以通过安装 "Microsoft C++ Build Tools" 来获取所需的编译工具。

所以我还下载了Microsoft C++ Build Tools

Microsoft C++ 生成工具 - Visual Studio

跟着提示安装:

启动labelme

在OpenDir选择需要标注的文件夹目录:

安装对应模型

选择AI-Model:(EfficientSam)

右键选择“Create AI-Polygon”:

开始下载:

From: https://github.com/labelmeai/efficient-sam/releases/download/onnx-models-20231225/efficient_sam_vits_encoder.onnx
To: C:\Users\Administrator\.cache/gdown\https-COLON--SLASH--SLASH-github.com-SLASH-labelmeai-SLASH-efficient-sam-SLASH-releases-SLASH-download-SLASH-onnx-models-20231225-SLASH-efficient_sam_vits_encoder.onnx

From: https://github.com/labelmeai/efficient-sam/releases/download/onnx-models-20231225/efficient_sam_vits_decoder.onnx
To: C:\Users\Administrator\.cache/gdown\https-COLON--SLASH--SLASH-github.com-SLASH-labelmeai-SLASH-efficient-sam-SLASH-releases-SLASH-download-SLASH-onnx-models-20231225-SLASH-efficient_sam_vits_decoder.onnx 

存放的位置:(一个encoder  85M,一个decoder  15M)

标注过程

然后模型就开始推理了:

在路面点击一个提示点,模型自动预测出道路的边界点:

选择road:

同样,在草地上点一个点:

最终整幅图的标注:

使用大模型自动标注大大提升了语义分割标注效率,并且效果不比人工标注差。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值