Giter VIP home page Giter VIP logo

x-anylabeling's Introduction

X-AnyLabeling-Demo.mp4

📄 Table of Contents

🥳 What's New ⏏️

  • Mar. 2024:
    • 🤗 Release the latest version 2.3.5 🤗
  • Feb. 2024:
    • Release version 2.3.4.
    • Enable label display feature.
    • Release version 2.3.3.
    • ✨✨✨ Support YOLO-World model.
    • Release version 2.3.2.
    • Support YOLOv9 model.
    • Support the conversion from a horizontal bounding box to a rotated bounding box.
    • Supports label deletion and renaming. For more details, please refer to the document.
    • Support for quick tag correction is available; please refer to this document for guidance.
    • Release version 2.3.1.
  • Jan. 2024:
    • 👏👏👏 Combining CLIP and SAM models for enhanced semantic and spatial understanding. An example can be found here.
    • 🔥🔥🔥 Adding support for the Depth Anything model in the depth estimation task.
    • Release version 2.3.0.
    • Support YOLOv8-OBB model.
    • Support RTMDet and RTMO model.
    • Release a chinese license plate detection and recognition model based on YOLOv5.
  • Dec. 2023:
    • Release version 2.2.0.
    • Support EdgeSAM to optimize for efficient execution on edge devices with minimal performance compromise.
    • Support YOLOv5-Cls and YOLOv8-Cls model.
  • Nov. 2023:
    • Release version 2.1.0.
    • Support InternImage model (CVPR'23).
    • Release version 2.0.0.
    • Added support for Grounding-SAM, combining GroundingDINO with HQ-SAM to achieve sota zero-shot high-quality predictions!
    • Enhanced support for HQ-SAM model to achieve high-quality mask predictions.
    • Support the PersonAttribute and VehicleAttribute model for multi-label classification task.
    • Introducing a new multi-label attribute annotation functionality.
    • Release version 1.1.0.
    • Support pose estimation: YOLOv8-Pose.
    • Support object-level tag with yolov5_ram.
    • Add a new feature enabling batch labeling for arbitrary unknown categories based on Grounding-DINO.
  • Oct. 2023:
    • Release version 1.0.0.
    • Add a new feature for rotation box.
    • Support YOLOv5-OBB with DroneVehicle and DOTA-v1.0/v1.5/v2.0 model.
    • SOTA Zero-Shot Object Detection - GroundingDINO is released.
    • SOTA Image Tagging Model - Recognize Anything is released.
    • Support YOLOv5-SAM and YOLOv8-EfficientViT_SAM union task.
    • Support YOLOv5 and YOLOv8 segmentation task.
    • Release Gold-YOLO and DAMO-YOLO models.
    • Release MOT algorithms: OC_Sort (CVPR'23).
    • Add a new feature for small object detection using SAHI.
  • Sep. 2023:
    • Release version 0.2.4.
    • Release EfficientViT-SAM (ICCV'23),SAM-Med2D, MedSAM and YOLOv5-SAM.
    • Support ByteTrack (ECCV'22) for MOT task.
    • Support PP-OCRv4 model.
    • Add video annotation feature.
    • Add yolo/coco/voc/mot/dota export functionality.
    • Add the ability to process all images at once.
  • Aug. 2023:
    • Release version 0.2.0.
    • Release LVMSAM and it's variants BUID, ISIC, Kvasir.
    • Support lane detection algorithm: CLRNet (CVPR'22).
    • Support 2D human whole-body pose estimation: DWPose (ICCV'23 Workshop).
  • Jul. 2023:
  • Jun. 2023:
  • May. 2023:

👋 Brief Introduction ⏏️

X-AnyLabeling stands out as a robust annotation tool seamlessly incorporating an AI inference engine alongside an array of sophisticated features. Tailored for practical applications, it is committed to delivering comprehensive, industrial-grade solutions for image data engineers. This tool excels in swiftly and automatically executing annotations across diverse and intricate tasks.

🔥 Highlight ⏏️

🗝️Key Features

  • Supports inference acceleration using GPU.
  • Handles both image and video processing.
  • Allows single-frame and batch predictions for all tasks.
  • Facilitates customization of models and supports secondary development design.
  • Enables one-click import and export of mainstream label formats such as COCO, VOC, YOLO, DOTA, MOT, and MASK.
  • Covers a range of visual tasks, including classification, detection, segmentation, caption, rotation, tracking, estimation, and ocr.
  • Supports various image annotation styles, including polygons, rectangles, rotated boxes, circles, lines, points, as well as annotations for text detection, recognition, and KIE.

⛏️Model Zoo

Object Detection SOD with SAHI Facial Landmark Detection 2D Pose Estimation
2D Lane Detection OCR MOT Instance Segmentation
Image Tagging Grounding DINO Recognition Rotation
SAM BC-SAM Skin-SAM Polyp-SAM

For more details, please refer to 👉 model_zoo 👈

📋 Usage ⏏️

Click to Expand/Collapse
Shortcut Function
d Open next file
a Open previous file
p or [Ctrl+n] Create polygon
o Create rotation
r or [Crtl+r] Create rectangle
i Run model
q positive point of SAM mode
e negative point of SAM mode
b Quickly clear points of SAM mode
g Group selected shapes
u Ungroup selected shapes
s Hide selected shapes
w Show 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 + c Copy selected shapes
Ctrl + v Paste selected shapes
Ctrl + d Duplicate polygon
Ctrl + g Display overview annotation statistics
Ctrl + h Toggle visibility shapes
Ctrl + p Toggle keep previous mode
Ctrl + y Toggle auto use last label
Ctrl + m Run all images at once
Ctrl + a Enable auto annotation
Ctrl + s Save current annotation
Ctrl + l Toggle visibility Labels
Ctrl + t Toggle visibility Texts
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.

🙏🏻 Acknowledgments ⏏️

I extend my heartfelt thanks to the developers and contributors of the projects LabelMe, LabelImg, roLabelImg, AnyLabeling, and Computer Vision Annotation Tool. Their dedication and contributions have played a crucial role in shaping the success of this project.

🏷️ Citing ⏏️

BibTeX

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

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

x-anylabeling's People

Contributors

clay-nuyoah avatar cvhub520 avatar david-19940718 avatar kbaicai avatar lartpang avatar limuhua avatar pairzhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

x-anylabeling's Issues

下载了gpu版本的exe文件,根据onnx1.14安装了CUDA 11.6以及cudnn 8.5.0.69,但是加载segment anything(Vit-b Quant)模型还是报错。

博主您好:
我下载了gpu版本的exe执行文件,运行加载segment anything模型报错,onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasn't able to be loaded. please install the correct version of CUDA and cuDNN as mentioned in the GPU requirements page,make sure they're in PATH,and that your GPU is supported。
1

以下是我的操作步骤,帮忙看看是什么问题,多谢多谢!!!

1.我检查了CUDA版本,nvcc-V :
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Fri_Dec_17_18:28:54_Pacific_Standard_Time_2021
Cuda compilation tools, release 11.6, V11.6.55
Build cuda_11.6.r11.6/compiler.30794723_0
2
3

2.安装onnx要求的cudnn 8.5.0.96版本,并且将所有lib,include,bin文件拷贝到了CUDA 11.6的文件夹中。

3.进入CUDA安装路径:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\extras\demo_suite运行bandwidthTest.exe以及deviceQuery.exe检测cudnn安装成功。
4
5

4.使用cup版本的exe,运行segment anything (Vit-b Quant)模型没有问题,只是运行gpu版本exe会报错。
6

5.onnxruntime的要注,下载的CUDA与cudn.
8

載入Segmentation相關的模型時報錯

vietanhdev/anylabeling#86

相同的錯誤有人回報在原版的issue區,我自己遇到的情況是這樣:
我原本裝的是CUDA 11.8跟cudnn 8.9.3,開啟原版的GPU版有成功載入onnxruntime的模型進行偵測,但才點到第三個物件,程式就崩潰。重開之後,就無法載入模型,出現該條錯誤。
嘗試裝上正確的CUDA跟cudnn,仍然出現同樣的錯誤。

改使用X-AnyLabeling,仍有同個錯誤,
但比較特別的是,X-AnyLabeling中新增的「YOLO相關的Segmentation模型」也會出現同樣錯誤(一般YOLO模型不會)

使用后的效果问题

屏幕截图 2023-06-20 225310 屏幕截图 2023-06-20 223646 为什么使用蔬菜图片效果很不错,但分析我自己的图片时,完全无法分割出任何物体呢?是模型加载问题还是图片问题

对象列表,支持按钮,进行分类查看,然后能够,所有对象,或按照分类过滤后的对象,根据在图片中位置,从左到右,从上到下,进行排序,方便快速筛查

  1. 关于分类查看
    image
    然后支持,在编辑模式下,全选对象对话框中,标签对话框选定的标签的对象

  2. 关于对象框中的排序
    对多目标标注,往往标注的顺序,有时在图片上不是从上向下的,尤其是自动标注,需要给一个按钮,点击后,自动排序对象对话框中的顺序,这样可以在编辑模式中,在放大图片的情况下,在不同视野下,以键盘上下键,从上向下,进行检查
    image

加载自定义模型闪退

没有任何报错或提示,程序直接退出
type: test
name: testA
display_name: Test
model_path: ‪D:/Auto/best.onnx
input_width: 640
input_height: 640
score_threshold: 0.45
classes:

  • enemy
  • friend

多目标跟踪

可以自动标注多目标跟踪MOT格式的数据集吗?

转换标注失败'gbk' codec can't decode byte 0xff in position 0: illegal multibyte sequence

windows 10
python 3.10

(.venv) D:\Projects\X-AnyLabeling>python tools/label_converter.py --src_path source/valid/ --dst_path source/valid/ --mode custom2yolo

# 报错信息如下
 File "D:\Projects\X-AnyLabeling\tools\label_converter.py", line 162, in custom_to_yolov5
    data = json.load(f.read())
UnicodeDecodeError: 'gbk' codec can't decode byte 0xff in position 0: illegal multibyte sequence

如何載入custom yolo-nas model進行標註

Hi 我目前有訓練了一個yolo-nas-s的model並將其轉為Onnx檔案
但在載入的時候雖然可以載入但卻無法偵測到物件想請問這個是什麼問題?
yaml檔設定
`
type: yolo_nas
name: yolo_nas_s-r20230615
display_name: YOLO-NAS-S Deci-AI
model_path: yolo_nas_s.onnx
input_width: 640
input_height: 640
nms_threshold: 0.45
score_threshold: 0.5
classes:

  • connector
  • ic
  • capacitor_sme
  • capacitor_smc
  • diode
  • usb
  • power_jack
  • clock
  • so
  • sot23
  • xresistor
  • push_button
  • header
  • resistor
  • del
  • fuse
    `
    載入結果:完全偵測不到
    螢幕擷取畫面 2023-07-11 113537

如何添加自定义模型?

您好,请问已经将paddleseg框架中的模型(pp_liteseg_stdc2)转换为onnx格式,想要在软件中添加该模型,如何操作?

【BUG】Custom2YOLO 导出有bug,只能在输出文件夹不存在时,运行一次

报错

(XAnyLabelingenv) D:\gitlib\github\BioVbreed\X-AnyLabeling>python tools/label_converter.py --src_path imgDB\images --dst_path imgDB\label\130xyolo --classes imgDB\la
bel\classes.txt --mode custom2yolo
Starting conversion to custom2yolo format...
Converting files:   0%|                                                                                                          | 1/1820 [00:00<04:01,  7.52file/s]
Traceback (most recent call last):
  File "tools/label_converter.py", line 399, in <module>
    main()
  File "tools/label_converter.py", line 372, in main
    os.makedirs(args.dst_path, exist_ok=False)
  File "C:\Users\zhenyuchen\.conda\envs\XAnyLabelingenv\lib\os.py", line 223, in makedirs
    mkdir(name, mode)
FileExistsError: [WinError 183] 当文件已存在时,无法创建该文件。: 'imgDB\\label\\130xyolo'

输出结果

image

一次性全部标注

非常感谢分享,现在导入模型后,只能单帧进行标注,是否可增添一次性全部生成选项

加载YOLOv8自定义模型出错

image
加载YOLOv8自定义模型时出现上述错误,配置文件如下

type: yolov8
name: YOLOv8s-parachute
display_name: YOLOv8s-parachute
model_path: E:\project\9_parachute_annotation\model\best.onnx
input_width: 640
input_height: 640
nms_threshold: 0.7
score_threshold: 0.25
confidence_threshold: 0.25
classes:
  - parachute

自行下载和添加模型的方法

打开路径:X-AnyLabeling-main\anylabeling\configs\auto_labeling 找到想要使用的模型的yaml文件,如 segment_anything_vit_h_quant
image
将其复制到希望存放的位置,用记事本打开,使用任意下载工具或方法下载encoder_model_path,decoder_model_path后的2个onnx文件
image
然后复制到与yaml同路径下,在修改encoder_model_path,decoder_model_path为相同路径:
image
然后在加载模型种选择 加载自定义模型,选择新创建的yaml文件即可。
image

关于标注文件格式切换的疑问

首先感谢您的工作,这个工具非常有意思,但是有一点我在工具中没有发现,就是亮点中的“支持转换成标准的COCO-JSON、VOC-XML以及YOLOv5-TXT文件格式”,请问这个功能是内置的吗?还是需要编写脚本自行转换?

下载.exe版本如何指定conda环境?

下载的exe文件可以运行,但是加载模型的时候无法指定自己的conda环境,软件中没有看到能够指定环境的选项,除非用源码编译

加载模型的时候出了问题

我自己训练了YOLOv8,输出了onnx模型,仿照官方的yaml写了配置文档,然后在x-anylabeling加载我的模型就报错,有两个错误:
第一个:Error in loading model:OpenCV(4.7.0)D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp:1073:error:(-2:Unspecified error)in function 'cv::dnn::dnn4_v20221220::ONNXImporter::handleNode'> Node [[email protected]]:(onnx_node!/model.22/Split) parse error:opencv(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\layers\slice_layer.cpp:274:error: (-215:Assertion failed) splits > 0 && inpShape[axis_rw] % split>
第二个:Error in loading model:OpenCV(4.7.0)D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\graph_simplifier.cpp:76:error:(-212:Parsing error) Input node with name /model.22/Gather_2_output_0 not found in function 'cv::dnn::Subg
我在网上也查不到这是啥意思,这是什么情况呢

接入 https://ultralytics.com 提供的远程免费YOLO检测的api

yolov8官方提供免费的运行平台 https://ultralytics.com
如果数据集可以传上网,没有太强的保密要求。
可以上传到yolov8官方的平台,通过colab训练,获得模型,yolov8官方提供免费的检测运行,可以用来循环预标注
虽然ultralytics也能导出onnx的格式,但是在x-anylabeling会报错 和这个 #4 一样的错误 #4 (comment)

image

但是,可以通过其免费的运行检测任务,通过cURL和Python进行调用api
image

返回json结果
image

加载模型失败后必须重启程序才能换模型

图片1
图片2终端log
环境是ubuntu20 +conda
选择新模型后,可能由于网络原因下载失败,就必须重新启动程序才能换模型,否则图一的状态一直存在。由于这个下载速度太慢了,能不能加一个中断下载的按钮,我自己从浏览器下载再复制到对应目录。

json转换coco格式的一些问题

感谢您提供的工具,这个工程十分有趣。但是我在运行过程中发现了一下问题,按照教程我进行json转coco格式时,报出如下信息
“Traceback (most recent call last):
File "label_converter.py", line 247, in
main()
File "label_converter.py", line 230, in main
converter.to_coco(input_dir, output_dir)
File "label_converter.py", line 71, in to_coco
x_min = min(points[0][0], points[1][0])
IndexError: list index out of range”

根据提示,我在代码的第71行找到了如下代码:
“x_min = min(points[0][0], points[1][0])
y_min = min(points[0][1], points[1][1])
x_max = max(points[0][0], points[1][0])
y_max = max(points[0][1], points[1][1])

        width = x_max - x_min
        height = y_max - y_min”

这部分似乎是在表示一个框,但是我进行的时关键点的标注,坐标值应该只有两个,这个问题应该如何解决?或者说,关键点标注必须标注一个框将其包括起来吗?期待您的回复。

COCO2custom converter is not working

Hello,

I am trying to convert a dataset from coco to labelme format and it seems there's some error dealing with dictionaries:

python tools/label_converter.py --src_path ~/Downloads/Tayqan_1.v5i.coco/train/_annotations.coco.json --dst_path ~/Downloads/Tayqan_1.v5i.coco/train/ --img_path ~/Downloads/Tayqan_1.v5i.coco/train/ --mode coco2custom
Starting conversion to coco2custom format...
Traceback (most recent call last):
  File "tools/label_converter.py", line 399, in <module>
    main()
  File "tools/label_converter.py", line 392, in main
    converter.coco_to_custom(args.src_path, args.dst_path, args.img_path)
  File "tools/label_converter.py", line 289, in coco_to_custom
    "imagePath": img_dic[dic_info["file_name"]],
KeyError: 'PHOTO-2022-12-07-00-31-19-2_jpg.rf.00a6a50ec0c8efe0815b459e14226c46.jpg'

I think the problem is your code is handling the filename as a key of the dictionary.

I am attaching my json in case you want to check the error.
_annotations.coco.zip

加载自定义模型并推理没有结果

我用yolov7-main分支训练的模型,使用:
python export.py --weights /lvol1/jjpeng/yolov7/runs/train/terminal_status_landi_newland_pax_newpos_verfone/weights/best.pt --end2end --simplify --topk-all 100 --iou-thres 0.65 --conf-thres 0.35 --img-size 1280 1280 --max-wh 1280进行导出onnx模型。导出过程无问题,使用onnx推理也验证模型没问题。验证结果如下:
image

但是按照教程配置并使用自定义模型的时候,加载似乎没有问题,但是运行后没有任何输出。
image
以下是我的yaml配置文件:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.