ZLHad / X-AnyLabeling

Effortless data labeling with AI support from Segment Anything and other awesome models.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

X-Anylabeling: Better, Faster, Stronger

GroundingDINO

📄 Table of Contents

🥳 What's New ⏏️

👋 Brief Introduction ⏏️

X-AnyLabeling is an awesome annotation tool built on LabelImg, Labelme and Anylabeling. What sets it apart is that it not only provides a variety of leading-edge SOTA models but also prioritizes practical applications, aiming to create an industrial-grade, feature-rich tool to assist developers in effortlessly achieving automated annotation and data processing for various complex tasks.
X-Anylabeling is designed to streamline the annotation workflow, allowing you to allocate more time to problem-solving and model optimization, thereby accelerating project progress and achieving outstanding results.

🔥 Highlight ⏏️

🗝️Key Features

  • Support for importing images and videos.
  • CPU and GPU inference support with on-demand selection.
  • Compatibility with multiple SOTA deep-learning algorithms.
  • Single-frame prediction and one-click processing for all images.
  • Export options for formats like COCO-JSON, VOC-XML, YOLOv5-TXT, and MOT-CSV.
  • Integration with popular frameworks such as PaddlePaddle, OpenMMLab, timm, and others.
  • Providing comprehensive help documentation along with active developer community support.
  • Accommodation of various visual tasks such as detection, segmentation, face recognition, and so on.
  • Modular design that empowers users to compile the system according to their specific needs and supports customization and further development.
  • Image annotation capabilities for polygons, rectangles, circles, lines, and points, as well as text detection, recognition, and KIE annotations.

⛏️Model Zoo

Object Detection SOD with SAHI Facial Landmark Detection 2D Pose Estimation
2D Lane Detection OCR MOT Instance Segmentation
SAM BC-SAM Skin-SAM Polyp-SAM

For more details, please refer to models_list.

📖 Tutorials ⏏️

🔜Quick Start

Download and run the GUI version directly from Release or 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 Windows and Linux. If you require executable programs for other operating systems, e.g., MacOS, please refer to the following steps for self-compilation.

👨🏼‍💻Build from source

  • Install the required libraries:
pip install -r requirements.txt

If you need to use GPU inference, install the corresponding requirements-gpu.txt file and download the appropriate version of onnxruntime-gpu based on your local CUDA and CuDNN versions. For more details, refer to the FAQ.

  • Generate resources [Option]:
pyrcc5 -o anylabeling/resources/resources.py anylabeling/resources/resources.qrc
  • Run the application:
python anylabeling/app.py

📦Build executable

#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-gpu
Note:
  1. Before compiling, please modify the __preferred_device__ parameter in the "anylabeling/app_info.py" file according to the appropriate GPU/CPU version.
  2. If you need to compile the GPU version, install the corresponding environment using "pip install -r requirements-gpu-dev.txt". Specifically, for compiling the Windows-GPU version, manually modify the "datas" list parameters in the "anylabeling-win-gpu.spec" file to include the relevant dynamic libraries (*.dll) of your local onnxruntime-gpu. Additionally, when downloading the onnxruntime-gpu package, ensure compatibility with your CUDA version. You can refer to the official documentation for the specific compatibility table.
  3. For macOS versions, you can make modifications by referring to the "anylabeling-win-*.spec" script.

📋 Usage ⏏️

📌Basic usage

  1. Build and launch using the instructions above.
  2. Click Change Output Dir in the Menu/File to specify a output directory; otherwise, it will save by default in the current image path.
  3. Click Open/Open Dir/Open Video to select a specific file, folder, or video.
  4. Click the Start drawing xxx button on the left-hand toolbar or the Auto Lalbeling control to initiate.
  5. Click and release left mouse to select a region to annotate the rect box. Alternatively, you can press the "Run (i)" key for one-click processing.

Note: The annotation will be saved to the folder you specify and you can refer to the below hotkeys to speed up your workflow.

🚀Advanced usage

  • Select AutoLalbeing Button on the left side or press the shortcut key "Ctrl + A" to activate auto labeling.
  • Select one of the Segment Anything-liked Models from the dropdown menu Model, where the Quant indicates the quantization of the model.
  • Use Auto segmentation marking tools to mark the object.
    • +Point: Add a point that belongs to the object.
    • -Point: Remove a point that you want to exclude from the object.
    • +Rect: Draw a rectangle that contains the object. Segment Anything will automatically segment the object.
    • Clear: Clear all auto segmentation markings.
    • Finish Object (f): Finish the current marking. After finishing the object, you can enter the label name and save the object.

📜Docs

🧷Hotkeys

Click to Expand/Collapse
Shortcut Function
d Open next file
a Open previous file
p Create polygon
o Create rotation
r Create rectangle
i Run model
r Create rectangle
+ +point of SAM mode
- -point of SAM mode
g Group selected shapes
u Ungroup selected shapes
Ctrl + q Quit
Ctrl + i Open image file
Ctrl + o Open video file
Ctrl + u Load all images from a directory
Ctrl + e Edit label
Ctrl + j Edit polygon
Ctrl + d Duplicate polygon
Ctrl + p Toggle keep previous mode
Ctrl + y Toggle auto use last label
Ctrl + m Batch processing of tasks
Ctrl + a Enable auto annotation
Ctrl + s Save current information
Ctrl + Shift + s Change output directory
Ctrl - Zoom out
Ctrl + 0 Zoom to Original
[Ctrl++, Ctrl+=] Zoom in
Ctrl + f Fit window
Ctrl + Shift + f Fit width
Ctrl + z Undo the last operation
Ctrl + Delete Delete file
Delete Delete polygon
Esc Cancel the selected object
Backspace Remove selected point
↑→↓← Keyboard arrows to move selected object
zxcv Keyboard to rotate selected rect box

📧 Contact ⏏️

🤗 Enjoying this project? Please give it a star! 🤗

If you find this project helpful or interesting, consider starring it to show your support, and if you have any questions or encounter any issues while using this project, feel free to reach out for assistance using the following methods:

✅ License ⏏️

This project is released under the GPL-3.0 license.

🏷️ Citing ⏏️

BibTeX

If you use this software in your research, please cite it as below:

@misc{X-AnyLabeling,
  year = {2023},
  author = {CVHub},
  publisher = {Github},
  journal = {Github repository},
  title = {Advanced Auto Labeling Solution with Added Features},
  howpublished = {\url{https://github.com/CVHub520/X-AnyLabeling}}
}

About

Effortless data labeling with AI support from Segment Anything and other awesome models.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%Language:Shell 0.0%