1.创建虚拟环境
bash
conda create -n labelme python=3.9
2.激活虚拟环境
bash
conda activate labelme
3.安装labelme
bash
pip install pyqt5 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install pillow -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install labelme -i https://pypi.tuna.tsinghua.edu.cn/simple
4.开启AI辅助识别(需要特殊网络环境下载模型)
bash
# 特殊环境,启动labelme
all_proxy=socks5://127.0.0.1:1080 labelme
5.解决AI辅助识别中发生的一些错误
bash
ValueError: This ORT build has ['AzureExecutionProvider',
'CPUExecutionProvider'] enabled. Since ORT 1.9,
you are required to explicitly set the providers parameter when instantiating InferenceSession.
For example, onnxruntime.InferenceSession(..., providers=['AzureExecutionProvider', 'CPUExecutionProvider'], ...)
Aborted (core dumped)
解决方法:
bash
# 卸载onnx, onnxruntime等
pip uninstall -y onnx onnxruntime onnxruntime-gpu onnxruntime-silicon
bash
# 重装指定版本onnx和onnxruntime
pip install onnx==1.14.0 onnxruntime==1.15.0
6.再次运行labelme成功
bash
labelme