X-AnyLabeling currently supports two modes of operation: running the source code, or downloading the precompiled GUI version directly.
To ensure access to the latest features and stable performance, it is highly recommended to run from the source code.
-
Download Source Code:
git clone https://github.com/CVHub520/X-AnyLabeling.git
-
Install Dependencies:
- Choose the appropriate dependency file based on the operating environment and runtime (CPU or GPU).
- Example:
# upgrade pip to its latest version pip install -U pip pip install -r requirements-dev.txt
-
Launch the Tool: Execute the following command in the
X-AnyLabelingproject directory:python anylabeling/app.py
Set the environment variable:
- Linux/MacOS:
export PYTHONPATH=/path/to/X-AnyLabeling - Windows:
set PYTHONPATH=C:\path\to\X-AnyLabeling
- Linux/MacOS:
Running in the GUI environment is convenient but may have limitations compared to running from the source code. Consider the pros and cons based on your specific needs and preferences.
Download Link: Release | Baidu Disk
Note:
-
For MacOS:
- After installation, go to the Applications folder.
- Right-click on the application and choose Open.
- From the second time onwards, you can open the application normally using Launchpad.
-
Due to the lack of necessary hardware, the current tool is only available in executable versions for
WindowsandLinux. If you require executable programs for other operating systems, e.g.,MacOS, please refer to the following steps for self-compilation.
X-AnyLabeling supports importing images or videos through shortcuts (Ctrl+I, Ctrl+U, Ctrl+O). Note that the default annotation file is saved in the import file path.
If you need to save to a different directory, you can click on the top-left File -> Save As, and then choose the destination directory for saving.
The tool supports various annotation styles (Polygon, Rectangle, Rotated Box, Circle, Line, Linestrip, Point). Use shortcut keys (e.g., P for Polygon, R for Rectangle, O for Rotation) for quick drawing.
| Annotation Style | Shortcut | Application |
|---|---|---|
| Polygon | P | Image Segmentation |
| Rectangle | R | Horizontal Object Detection |
| Rotated Box | O | Rotational Object Detection |
| Circle | - | Specific Scenarios |
| Line | - | Lane Detection |
| Polyline | - | Vessel Segmentation |
| Point | - | Key Point Detection |
Currently, the tools has two main interaction modes:
- Edit Mode: In this state, users can move, copy, paste, and modify objects.
- Draw Mode: In this state, only drawing of the corresponding annotation style is supported.
Note: for the annotation styles of Rectangle, Rotated Box, Circle, Line, and Point, when the drawing is completed, the tool will automatically switch to edit mode. For the other two styles, you can quickly switch by using the shortcut Ctrl+J.
For AI algorithm functions, click the AI icon or use the shortcut Ctrl+A to access the model list. Choose the desired model for use.
The "One-Click Run" feature automates annotation tasks for the current batch. Click the Play icon or use the shortcut Ctrl+M. Note that this feature requires an activated model and should be tested on a small batch before full deployment.
Please note that the following steps are not mandatory. This section is provided for users who may need to customize and compile the software for distribution in specific environments. If you are simply using the software, you can skip this step.
Expand/Collapse
To facilitate users running X-AnyLabeling on different platforms, the tool provides instructions for packaging and compilation, along with relevant considerations. Before executing the packaging commands below, modify the __preferred_device__ parameter in the app_info.py file according to your environment and requirements to select the appropriate GPU or CPU version for building.
Considerations:
-
Before compiling, ensure that the
__preferred_device__parameter in theanylabeling/app_info.pyfile has been modified according to the desired GPU/CPU version. -
If compiling the GPU version, activate the corresponding GPU runtime environment first, and execute
pip install | grep onnxruntime-gputo ensure it is correctly installed. -
For compiling the Windows-GPU version, manually modify the
dataslist parameter in theanylabeling-win-gpu.specfile to add the relevant*.dllfiles of the localonnxruntime-gpudynamic library to the list. -
For compiling the Linux-GPU version, manually modify the
dataslist parameter in theanylabeling-linux-gpu.specfile to add the relevant*.sofiles of the localonnxruntime-gpudynamic library to the list. Additionally, ensure that you download the matchingonnxruntime-gpupackage based on your CUDA version. Refer to the official documentation for detailed compatibility information.
Reference commands:
# Windows-CPU
bash scripts/build_executable.sh win-cpu
# Windows-GPU
bash scripts/build_executable.sh win-gpu
# Linux-CPU
bash scripts/build_executable.sh linux-cpu
# Linux-GPU
bash scripts/build_executable.sh linux-gpuNote: If you encounter permission issues when executing the above commands on Windows, after ensuring the preparation steps above are completed, you can directly execute the following commands as needed:
pyinstaller --noconfirm anylabeling-win-cpu.spec
pyinstaller --noconfirm anylabeling-win-gpu.spec