X-AnyLabeling:Win10上安装使用X-AnyLabeling标注工具

X-AnyLabeling:Win10上安装使用X-AnyLabeling标注工具


前言

环境要求

bash 复制代码
Package                        Version
------------------------------ -------------
albumentations                 1.3.1
altgraph                       0.17.4
annotated-types                0.7.0
anyio                          4.10.0
astor                          0.8.1
attrs                          25.3.0
babel                          2.17.0
backports.tarfile              1.2.0
bce-python-sdk                 0.9.42
black                          25.1.0
blinker                        1.9.0
build                          1.3.0
certifi                        2025.8.3
chardet                        5.2.0
charset-normalizer             3.4.3
click                          8.2.1
colorama                       0.4.6
coloredlogs                    15.0.1
contourpy                      1.3.2
controlnet_aux                 0.0.10
cycler                         0.12.1
Cython                         3.1.1
decorator                      5.2.1
distro                         1.9.0
docutils                       0.22
exceptiongroup                 1.3.0
filelock                       3.19.1
flake8                         7.3.0
Flask                          3.1.2
flask-babel                    4.0.0
flask-cors                     6.0.1
flatbuffers                    25.2.10
fonttools                      4.59.1
fsspec                         2025.7.0
future                         1.0.0
h11                            0.16.0
httpcore                       1.0.9
httpx                          0.28.1
huggingface-hub                0.34.4
humanfriendly                  10.0
id                             1.5.0
idna                           3.10
imageio                        2.37.0
imgaug                         0.4.0
importlib_metadata             8.7.0
itsdangerous                   2.2.0
jaraco.classes                 3.4.0
jaraco.context                 6.0.1
jaraco.functools               4.3.0
Jinja2                         3.1.6
jiter                          0.10.0
joblib                         1.5.1
json_repair                    0.50.0
jsonlines                      4.0.0
keyring                        25.6.0
kiwisolver                     1.4.9
lap                            0.5.12
lapx                           0.5.5
lazy_loader                    0.4
llvmlite                       0.39.1
Markdown                       3.8.2
markdown-it-py                 4.0.0
MarkupSafe                     3.0.2
matplotlib                     3.10.5
mccabe                         0.7.0
mdurl                          0.1.2
more-itertools                 10.7.0
motmetrics                     1.4.0
mpmath                         1.3.0
mypy_extensions                1.1.0
natsort                        8.1.0
networkx                       3.4.2
nh3                            0.3.0
numba                          0.56.4
numpy                          1.23.5
onnx                           1.12.0
onnxruntime                    1.15.0
onnxruntime-gpu                1.16.0
onnxslim                       0.1.46
openai                         1.100.2
opencv-contrib-python-headless 4.7.0.72
opencv-python                  4.6.0.66
opencv-python-headless         4.11.0.86
opt-einsum                     3.3.0
packaging                      25.0
paddle-bfloat                  0.1.7
paddledet                      0.0.0
paddlepaddle-gpu               2.4.2.post116
paddleslim                     1.1.1
paddlex                        1.3.7
pandas                         2.3.1
pathspec                       0.12.1
pefile                         2023.2.7
Pillow                         9.5.0
pip                            25.1
platformdirs                   4.3.8
protobuf                       3.20.0
psutil                         7.0.0
py-cpuinfo                     9.0.0
pyclipper                      1.3.0.post6
pycocotools                    2.0.7
pycodestyle                    2.14.0
pycryptodome                   3.23.0
pydantic                       2.11.7
pydantic_core                  2.33.2
pyflakes                       3.4.0
Pygments                       2.19.2
pyinstaller                    6.15.0
pyinstaller-hooks-contrib      2025.8
pyparsing                      3.2.3
pyproject_hooks                1.2.0
PyQt5                          5.15.7
PyQt5-Qt5                      5.15.2
PyQt5_sip                      12.17.0
PyQtWebEngine                  5.15.7
PyQtWebEngine-Qt5              5.15.2
pyreadline3                    3.5.4
python-dateutil                2.9.0.post0
pytz                           2025.2
pywin32-ctypes                 0.2.3
PyYAML                         6.0.2
pyzmq                          27.0.2
qimage2ndarray                 1.10.0
qudida                         0.0.4
rarfile                        4.2
readme_renderer                44.0
requests                       2.32.5
requests-toolbelt              1.0.0
rfc3986                        2.0.0
rich                           14.1.0
ruamel.yaml                    0.18.14
ruamel.yaml.clib               0.2.12
scikit-image                   0.24.0
scikit-learn                   1.7.1
scipy                          1.15.3
seaborn                        0.13.2
setproctitle                   1.3.6
setuptools                     66.0.0
shapely                        2.0.7
six                            1.17.0
sklearn                        0.0
sniffio                        1.3.1
sympy                          1.14.0
termcolor                      1.1.0
terminaltables                 3.1.10
threadpoolctl                  3.6.0
tifffile                       2025.5.10
tokenizers                     0.21.4
tomli                          2.2.1
torch                          1.13.1+cu116
torchaudio                     0.13.1+cu116
torchvision                    0.14.1+cu116
tqdm                           4.67.1
twine                          6.1.0
typeguard                      4.4.0
typing_extensions              4.14.1
typing-inspection              0.4.1
tzdata                         2025.2
ultralytics                    8.3.134
ultralytics-thop               2.0.16
urllib3                        2.5.0
visualdl                       2.5.3
watchfiles                     1.1.0
Werkzeug                       3.1.3
wheel                          0.45.1
xlwt                           1.3.0
xmltodict                      0.14.2
zipp                           3.23.0

相关介绍

  • Python是一种跨平台的计算机程序设计语言。是一个高层次的结合了解释性、编译性、互动性和面向对象的脚本语言。最初被设计用于编写自动化脚本(shell),随着版本的不断更新和语言新功能的添加,越多被用于独立的、大型项目的开发。
  • PyTorch 是一个深度学习框架,封装好了很多网络和深度学习相关的工具方便我们调用,而不用我们一个个去单独写了。它分为 CPU 和 GPU 版本,其他框架还有 TensorFlow、Caffe 等。PyTorch 是由 Facebook 人工智能研究院(FAIR)基于 Torch 推出的,它是一个基于 Python 的可续计算包,提供两个高级功能:1、具有强大的 GPU 加速的张量计算(如 NumPy);2、构建深度神经网络时的自动微分机制。
  • X-Anylabeling是一种功能强大的注释工具,它集成了用于快速和自动标记的AI引擎。它是为多模式数据工程师设计的,为复杂任务提供工业级解决方案。
  • 功能
    • 同时处理图像和视频。
    • 通过 GPU 支持加速推理。
    • 允许自定义模型和二次开发。
    • 支持一键推理当前任务中的所有图像。
    • 支持 COCO、VOC、YOLO、DOTA、MOT、MASK、PPOCR、MMGD、VLM-R1 等格式的导入/导出。
    • 处理分类、检测、分割、标题、旋转、跟踪、估算、OCR 等任务。
    • 支持多种注释样式:多边形、矩形、旋转方框、圆、线、点以及用于文本检测、识别和 KIE 的注释。

安装使用X-AnyLabeling标注工具

下载X-AnyLabeling 3.2.1项目

Linux

bash 复制代码
git clone -b v3.2.1 https://github.com/CVHub520/X-AnyLabeling.git
cd X-AnyLabeling/

requirements-gpu.txt

bash 复制代码
# requirements-gpu.txt
ultralytics==8.3.134
opencv-contrib-python-headless==4.7.0.72
PyQt5==5.15.7
PyQtWebEngine==5.15.7
natsort==8.1.0
termcolor==1.1.0
onnxruntime-gpu==1.15.0
qimage2ndarray==1.10.0
lapx==0.5.5
numpy==1.26.4
pillow==9.5.0
openai
PyYAML
tqdm
scipy
shapely
pyclipper
tokenizers
jsonlines
json_repair
importlib_metadata
markdown
opencv-python==4.6.0.66
onnx==1.12.0
onnxslim==0.1.46
watchfiles==1.1.0
ruamel.yaml==0.18.14

# torch==1.13.1+cu116
# torchvision==0.14.1+cu116
# torchaudio==0.13.1

安装环境命令

bash 复制代码
# torch在线下载
# pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116 -i https://mirrors.aliyun.com/pypi/simple
# win下本地下载好的torch wheel
pip install torch-1.13.1+cu116-cp310-cp310-win_amd64.whl -i https://mirrors.aliyun.com/pypi/simple
pip install torchaudio-0.13.1+cu116-cp310-cp310-win_amd64.whl -i https://mirrors.aliyun.com/pypi/simple
pip install torchvision-0.14.1+cu116-cp310-cp310-win_amd64.whl -i https://mirrors.aliyun.com/pypi/simple

pip install ultralytics==8.3.134 -i https://mirrors.aliyun.com/pypi/simple
git clone -b v3.2.1 https://github.com/CVHub520/X-AnyLabeling.git
cd X-AnyLabeling/
pip install -r requirements-gpu-dev.txt -i https://mirrors.aliyun.com/pypi/simple

# paddle
python -m pip install paddlepaddle-gpu==2.4.2.post116 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/avx/stable.html -i https://mirrors.aliyun.com/pypi/simple 
cd PaddleDetection
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple
pip install onnx==1.12.0 onnxslim==0.1.46 onnxruntime==1.15.0 -i https://mirrors.aliyun.com/pypi/simple
# 编译安装paddledet
python setup.py install
# 测试
python ppdet/modeling/tests/test_architectures.py

如果没有报错,则安装成功。

运行X-AnyLabeling标注工具

复制代码
python anylabeling/app.py

准备数据集

目标检测标注

读取图片文件夹



标注Rectangle


准备对应类别的classes.txt文件

导出YOLO格式





导出COCO格式






json 复制代码
{
    "info": {
        "year": 2023,
        "version": "3.2.1",
        "description": "COCO Label Conversion",
        "contributor": "CVHub",
        "url": "https://github.com/CVHub520/X-AnyLabeling",
        "date_created": "2025-08-28"
    },
    "licenses": [
        {
            "id": 1,
            "url": "https://www.gnu.org/licenses/gpl-3.0.html",
            "name": "GNU GENERAL PUBLIC LICENSE Version 3"
        }
    ],
    "categories": [
        {
            "id": 1,
            "name": "car",
            "supercategory": ""
        },
        {
            "id": 2,
            "name": "cat",
            "supercategory": ""
        }
    ],
    "images": [
        {
            "license": 0,
            "url": null,
            "file_name": "1_1.jpg",
            "height": 968,
            "width": 1158,
            "date_captured": null,
            "id": 0
        },
        {
            "license": 0,
            "url": null,
            "file_name": "2_1.jpg",
            "height": 2160,
            "width": 3277,
            "date_captured": null,
            "id": 1
        }
    ],
    "annotations": [
        {
            "id": 0,
            "image_id": 0,
            "category_id": 1,
            "bbox": [
                130.5625,
                611.34375,
                331.25,
                271.875
            ],
            "area": 90058.59375,
            "iscrowd": 0,
            "ignore": 0,
            "segmentation": []
        },
        {
            "id": 1,
            "image_id": 0,
            "category_id": 1,
            "bbox": [
                618.0625,
                661.34375,
                239.0625,
                215.625
            ],
            "area": 51547.8515625,
            "iscrowd": 0,
            "ignore": 0,
            "segmentation": []
        },
        {
            "id": 2,
            "image_id": 1,
            "category_id": 2,
            "bbox": [
                52.78571428571438,
                160.35714285714297,
                3110.7142857142853,
                1739.2857142857142
            ],
            "area": 5410420.918367346,
            "iscrowd": 0,
            "ignore": 0,
            "segmentation": []
        }
    ]
}

实例分割标注

读取图片文件夹



标注Polygon


准备对应类别的classes.txt文件

导出YOLO格式



导出COCO格式



json 复制代码
{
    "info": {
        "year": 2023,
        "version": "3.2.1",
        "description": "COCO Label Conversion",
        "contributor": "CVHub",
        "url": "https://github.com/CVHub520/X-AnyLabeling",
        "date_created": "2025-08-28"
    },
    "licenses": [
        {
            "id": 1,
            "url": "https://www.gnu.org/licenses/gpl-3.0.html",
            "name": "GNU GENERAL PUBLIC LICENSE Version 3"
        }
    ],
    "categories": [
        {
            "id": 0,
            "name": "_background_",
            "supercategory": null
        },
        {
            "id": 1,
            "name": "car",
            "supercategory": null
        },
        {
            "id": 2,
            "name": "cat",
            "supercategory": null
        }
    ],
    "images": [
        {
            "license": 0,
            "url": null,
            "file_name": "1_1.jpg",
            "height": 968,
            "width": 1158,
            "date_captured": null,
            "id": 0
        },
        {
            "license": 0,
            "url": null,
            "file_name": "2_1.jpg",
            "height": 2160,
            "width": 3277,
            "date_captured": null,
            "id": 1
        }
    ],
    "annotations": [
        {
            "id": 0,
            "image_id": 0,
            "category_id": 1,
            "segmentation": [
                [
                    161.8125,
                    841.03125,
                    136.8125,
                    808.21875,
                    139.9375,
                    736.34375,
                    139.9375,
                    698.84375,
                    150.875,
                    683.21875,
                    166.5,
                    642.59375,
                    179.0,
                    630.09375,
                    257.125,
                    623.84375,
                    288.375,
                    630.09375,
                    325.875,
                    630.09375,
                    343.0625,
                    641.03125,
                    372.75,
                    637.90625,
                    391.5,
                    639.46875,
                    411.8125,
                    656.65625,
                    439.9375,
                    705.09375,
                    452.4375,
                    726.96875,
                    464.9375,
                    770.71875,
                    452.4375,
                    825.40625,
                    430.5625,
                    831.65625,
                    430.5625,
                    819.15625,
                    408.6875,
                    822.28125,
                    386.8125,
                    826.96875,
                    386.8125,
                    839.46875,
                    382.125,
                    875.40625,
                    369.625,
                    875.40625,
                    361.8125,
                    867.59375,
                    355.5625,
                    844.15625,
                    313.375,
                    845.71875,
                    249.3125,
                    845.71875,
                    183.6875,
                    845.71875
                ]
            ],
            "area": 63084.0,
            "bbox": [
                136.0,
                623.0,
                329.0,
                253.0
            ],
            "iscrowd": 0,
            "ignore": 0
        },
        {
            "id": 1,
            "image_id": 0,
            "category_id": 1,
            "segmentation": [
                [
                    629.0,
                    864.46875,
                    622.75,
                    795.71875,
                    621.1875,
                    742.59375,
                    630.5625,
                    726.96875,
                    619.625,
                    720.71875,
                    605.5625,
                    719.15625,
                    619.625,
                    708.21875,
                    635.25,
                    708.21875,
                    641.5,
                    692.59375,
                    647.75,
                    675.40625,
                    669.625,
                    670.71875,
                    699.3125,
                    666.03125,
                    741.5,
                    666.03125,
                    772.75,
                    666.03125,
                    794.625,
                    669.15625,
                    829.0,
                    711.34375,
                    849.3125,
                    741.03125,
                    858.6875,
                    769.15625,
                    858.6875,
                    798.84375,
                    857.125,
                    826.96875,
                    857.125,
                    856.65625,
                    844.625,
                    870.71875,
                    833.6875,
                    869.15625,
                    829.0,
                    855.09375,
                    827.4375,
                    845.71875,
                    661.8125,
                    837.90625,
                    666.5,
                    858.21875,
                    644.625,
                    866.03125
                ]
            ],
            "area": 39353.0,
            "bbox": [
                605.0,
                666.0,
                254.0,
                205.0
            ],
            "iscrowd": 0,
            "ignore": 0
        },
        {
            "id": 2,
            "image_id": 1,
            "category_id": 2,
            "segmentation": [
                [
                    2913.4999999999995,
                    192.5000000000001,
                    2688.4999999999995,
                    388.9285714285715,
                    2631.3571428571427,
                    367.5000000000001,
                    2595.642857142857,
                    374.6428571428572,
                    2542.0714285714284,
                    406.7857142857144,
                    2481.3571428571427,
                    442.50000000000006,
                    2474.2142857142853,
                    467.50000000000006,
                    2345.642857142857,
                    510.3571428571429,
                    2234.928571428571,
                    581.7857142857143,
                    2206.3571428571427,
                    617.5000000000001,
                    2095.642857142857,
                    617.5000000000001,
                    2006.357142857143,
                    624.6428571428572,
                    1963.5,
                    635.3571428571429,
                    1924.2142857142858,
                    621.0714285714287,
                    1881.357142857143,
                    603.2142857142858,
                    1849.2142857142858,
                    588.9285714285714,
                    1702.7857142857142,
                    517.5000000000001,
                    1606.357142857143,
                    485.3571428571429,
                    1517.0714285714287,
                    463.9285714285715,
                    1288.5,
                    413.9285714285715,
                    1202.7857142857142,
                    413.9285714285715,
                    1138.5,
                    413.9285714285715,
                    1056.357142857143,
                    435.35714285714295,
                    931.3571428571429,
                    463.9285714285715,
                    788.5,
                    513.9285714285716,
                    592.0714285714287,
                    621.0714285714287,
                    345.6428571428572,
                    817.5,
                    159.9285714285715,
                    1142.5,
                    31.357142857142946,
                    1574.642857142857,
                    102.78571428571436,
                    1778.2142857142858,
                    170.64285714285722,
                    1824.642857142857,
                    227.78571428571433,
                    1846.0714285714284,
                    481.35714285714295,
                    1878.2142857142856,
                    938.5,
                    1913.9285714285713,
                    1356.357142857143,
                    1856.7857142857142,
                    1681.357142857143,
                    1835.357142857143,
                    1709.9285714285713,
                    1767.5,
                    1784.9285714285713,
                    1721.0714285714284,
                    1959.9285714285713,
                    1699.642857142857,
                    1988.4999999999998,
                    1696.0714285714284,
                    2184.928571428571,
                    1838.9285714285713,
                    2327.7857142857138,
                    1849.642857142857,
                    2459.928571428571,
                    1849.642857142857,
                    2484.928571428571,
                    1810.357142857143,
                    2470.642857142857,
                    1753.2142857142858,
                    2427.7857142857138,
                    1688.9285714285713,
                    2402.7857142857138,
                    1663.9285714285713,
                    2331.3571428571427,
                    1660.357142857143,
                    2299.2142857142853,
                    1646.0714285714284,
                    2317.0714285714284,
                    1596.0714285714284,
                    2445.642857142857,
                    1549.642857142857,
                    2499.2142857142853,
                    1485.357142857143,
                    2527.7857142857138,
                    1449.642857142857,
                    2534.928571428571,
                    1421.0714285714287,
                    2531.3571428571427,
                    1378.2142857142858,
                    2524.2142857142853,
                    1346.0714285714287,
                    2552.7857142857138,
                    1313.9285714285713,
                    2606.3571428571427,
                    1242.5,
                    2681.3571428571427,
                    1221.0714285714287,
                    2695.642857142857,
                    1278.2142857142858,
                    2817.0714285714284,
                    1285.357142857143,
                    2967.0714285714284,
                    1249.642857142857,
                    3042.071428571428,
                    1206.7857142857142,
                    3106.3571428571427,
                    1153.2142857142858,
                    3152.7857142857138,
                    1099.642857142857,
                    3163.4999999999995,
                    1013.9285714285716,
                    3142.071428571428,
                    956.7857142857143,
                    3095.642857142857,
                    874.6428571428572,
                    3074.2142857142853,
                    831.7857142857143,
                    3074.2142857142853,
                    760.3571428571429,
                    3095.642857142857,
                    742.5,
                    3099.2142857142853,
                    717.5000000000001,
                    3056.3571428571427,
                    671.0714285714287,
                    3017.071428571428,
                    624.6428571428572,
                    2967.0714285714284,
                    556.7857142857143,
                    2938.4999999999995,
                    535.3571428571429,
                    2870.642857142857,
                    506.78571428571433,
                    2845.642857142857,
                    488.92857142857156,
                    2877.7857142857138,
                    363.9285714285715,
                    2920.642857142857,
                    267.5000000000001
                ]
            ],
            "area": 3501623.0,
            "bbox": [
                31.0,
                192.0,
                3133.0,
                1722.0
            ],
            "iscrowd": 0,
            "ignore": 0
        }
    ],
    "type": "instances"
}

更多功能

参考

1\] https://github.com/CVHub520/X-AnyLabeling.git > * 由于本人水平有限,难免出现错漏,敬请批评改正。 > * 更多精彩内容,可点击进入[Python日常小操作](https://blog.csdn.net/friendshiptang/category_11653584.html)专栏、[OpenCV-Python小应用](https://blog.csdn.net/friendshiptang/category_11975851.html)专栏、[YOLO系列](https://blog.csdn.net/friendshiptang/category_12168736.html)专栏、[自然语言处理](https://blog.csdn.net/friendshiptang/category_12396029.html)专栏、[人工智能混合编程实践](https://blog.csdn.net/friendshiptang/category_12915912.html)专栏或我的[个人主页](https://blog.csdn.net/FriendshipTang)查看 > * [人工智能混合编程实践:C++调用Python ONNX进行YOLOv8推理](https://blog.csdn.net/FriendshipTang/article/details/146188546) > * [人工智能混合编程实践:C++调用封装好的DLL进行YOLOv8实例分割](https://blog.csdn.net/FriendshipTang/article/details/149050653) > * [人工智能混合编程实践:C++调用Python ONNX进行图像超分重建](https://blog.csdn.net/FriendshipTang/article/details/146210258) > * [人工智能混合编程实践:C++调用Python AgentOCR进行文本识别](https://blog.csdn.net/FriendshipTang/article/details/146336798) > * [通过计算实例简单地理解PatchCore异常检测](https://blog.csdn.net/FriendshipTang/article/details/148877810) > * [Python将YOLO格式实例分割数据集转换为COCO格式实例分割数据集](https://blog.csdn.net/FriendshipTang/article/details/149101072) > * [YOLOv8 Ultralytics:使用Ultralytics框架训练RT-DETR实时目标检测模型](https://blog.csdn.net/FriendshipTang/article/details/132498898) > * [基于DETR的人脸伪装检测](https://blog.csdn.net/FriendshipTang/article/details/131670277) > * [YOLOv7训练自己的数据集(口罩检测)](https://blog.csdn.net/FriendshipTang/article/details/126513426) > * [YOLOv8训练自己的数据集(足球检测)](https://blog.csdn.net/FriendshipTang/article/details/129035180) > * [YOLOv5:TensorRT加速YOLOv5模型推理](https://blog.csdn.net/FriendshipTang/article/details/131023963) > * [YOLOv5:IoU、GIoU、DIoU、CIoU、EIoU](https://blog.csdn.net/FriendshipTang/article/details/129969044) > * [玩转Jetson Nano(五):TensorRT加速YOLOv5目标检测](https://blog.csdn.net/FriendshipTang/article/details/126696542) > * [YOLOv5:添加SE、CBAM、CoordAtt、ECA注意力机制](https://blog.csdn.net/FriendshipTang/article/details/130396540) > * [YOLOv5:yolov5s.yaml配置文件解读、增加小目标检测层](https://blog.csdn.net/FriendshipTang/article/details/130375883) > * [Python将COCO格式实例分割数据集转换为YOLO格式实例分割数据集](https://blog.csdn.net/FriendshipTang/article/details/131979248) > * [YOLOv5:使用7.0版本训练自己的实例分割模型(车辆、行人、路标、车道线等实例分割)](https://blog.csdn.net/FriendshipTang/article/details/131987249) > * [使用Kaggle GPU资源免费体验Stable Diffusion开源项目](https://blog.csdn.net/FriendshipTang/article/details/132238734) > * [Stable Diffusion:在服务器上部署使用Stable Diffusion WebUI进行AI绘图(v2.0)](https://blog.csdn.net/FriendshipTang/article/details/150287538) > * [Stable Diffusion:使用自己的数据集微调训练LoRA模型(v2.0)](https://blog.csdn.net/FriendshipTang/article/details/150283800)