Ubuntu LabelMe AI 识别

1.创建虚拟环境

conda create -n labelme python=3.9

2.激活虚拟环境

conda activate labelme

3.安装labelme

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辅助识别(需要特殊网络环境下载模型)

# 特殊环境,启动labelme
all_proxy=socks5://127.0.0.1:1080 labelme

5.解决AI辅助识别中发生的一些错误

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)

解决方法:

# 卸载onnx, onnxruntime等
pip uninstall -y onnx onnxruntime onnxruntime-gpu onnxruntime-silicon
# 重装指定版本onnx和onnxruntime
pip install onnx==1.14.0 onnxruntime==1.15.0

6.再次运行labelme成功

labelme

你可能感兴趣的:(ubuntu,人工智能,linux)