1. 安装
1.1 从源码进行安装(推荐)
1.1.1 先决条件: 从官网安装anaconda|miniconda
1
2
3
| # 使用 Python 版本 3.10 或更高版本创建新的 conda 环境,然后将其激活。
conda create --name x-anylabeling python=3.10 -y
conda activate x-anylabeling
|
1.1.2 安装 ONNX 运行时
1
2
3
4
5
6
7
8
| # Install ONNX Runtime CPU
pip install onnxruntime
# Install ONNX Runtime GPU (CUDA 11.x)
pip install onnxruntime-gpu==x.x.x
# Install ONNX Runtime GPU (CUDA 12.x)
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
|
**1.2 Git 克隆存储库 **
1
2
| git clone https://github.com/CVHub520/X-AnyLabeling.git
cd X-AnyLabeling
|
1.3 安装 requirements.txt
文件.
依赖项文件 | 操作系统 | 运行时环境 | 可编译 |
---|
requirements.txt | Windows/Linux | CPU | No |
requirements-dev.txt | Windows/Linux | CPU | Yes |
requirements-gpu.txt | Windows/Linux | GPU | No |
requirements-gpu-dev.txt | Windows/Linux | GPU | Yes |
1
| pip install -r requirements-[xxx].txt
|
**1.4 启动 **
1.4.1 完成必要的步骤后,使用以下命令生成资源
1
| pyrcc5 -o anylabeling/resources/resources.py anylabeling/resources/resources.qrc
|
1.4.2 为避免潜在冲突,请使用以下命令卸载 AnyLabeling 的任何现有安装:
1
| pip uninstall anylabeling -y
|
1.4.3 设置环境变量:
1
2
3
4
| # linux or macos
export PYTHONPATH=/path/to/X-AnyLabeling
# windows
set PYTHONPATH=C:\path\to\X-AnyLabeling
|
1.4.4 要运行该应用程序,请执行以下命令
1
| python anylabeling/app.py
|
1.4.5 再次启动
1
2
3
4
5
6
| # 激活conda环境
conda activate x-anylabeling
# 进入软件安装目录
cd /path/to/X-AnyLabeling
# 运行应用程序
python anylabeling/app.py
|
2. 用户手册
3. 自动化标注
3.1 导入导出的 *.onnx
文件 使用 Netron 在线工具检查输入和输出节点信息,确保尺寸和其他详细信息符合预期
3.2 可以浏览 Model Zoo 文件以查找并复制相应模型的配置文件
以YOLO11为例
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| type: yolo11
name: yolo11s-r20240930
provider: Ultralytics
display_name: YOLO11s
model_path: best.onnx
iou_threshold: 0.45
conf_threshold: 0.25
classes:
- blackball
- blueball
- bluetarget
- redball
- redtarget
- yellowball
|
3.3 将yaml文件和*.onnx
文件置于/path/to/xanylabeling_data/models/your_model/
3.4 加载模型进行标注
3.5 导出YOLO格式的数据集