A graphical Semi-automatic annotation tool based on labelImg and Yolov5

Overview

labelGo

Guide Language:简体中文

A graphical Semi-automatic annotation tool based on labelImg and Yolov5

Semi-automatic annotation of datasets by existing yolov5 pytorch models

image

Attention

If there is a problem, please put it forward in the issue

Please put classes.txt under the marked dataset folder in advance

The annotation file is saved in the same location as the picture folder

Recommended version of python: python 3.8

Recommended for conda environments

Installation and use

1.Fetching projects from git

git clone https://github.com/cnyvfang/labelGo-Yolov5AutoLabelImg.git

2.Switching the operating directory to the project directory

cd labelGo-Yolov5AutoLabelImg

3.Installation environment

pip install -r requirements.txt

4.Launching applications

python labelGo.py

5. Click on the "Open directory" button to select the folder where the images are stored

6. Click on the "Auto Annotate" button to confirm that the information is correct and then select the trained yolov5 pytorch model to complete the auto annotation

7. Adjust the automatic annotation results according to the actual requirements and save them

Comments
  • IndexError: list index out of range

    IndexError: list index out of range

    C:\Users\60332\Desktop\labelGo-Yolov5AutoLabelImg>python labelGo.py
    Traceback (most recent call last):
      File "labelGo.py", line 1316, in open_dir_dialog
        self.import_dir_images(target_dir_path)
      File "labelGo.py", line 1384, in import_dir_images
        self.open_next_image()
      File "labelGo.py", line 1458, in open_next_image
        self.load_file(filename)
      File "labelGo.py", line 1137, in load_file
        self.show_bounding_box_from_annotation_file(file_path)
      File "labelGo.py", line 1180, in show_bounding_box_from_annotation_file
        self.load_yolo_txt_by_filename(txt_path)
      File "labelGo.py", line 1639, in load_yolo_txt_by_filename
        t_yolo_parse_reader = YoloReader(txt_path, self.image)
      File "C:\Users\60332\Desktop\labelGo-Yolov5AutoLabelImg\libs\yolo_io.py", line 112, in __init__
        self.parse_yolo_format()
      File "C:\Users\60332\Desktop\labelGo-Yolov5AutoLabelImg\libs\yolo_io.py", line 143, in parse_yolo_format
        label, x_min, y_min, x_max, y_max = self.yolo_line_to_shape(class_index, x_center, y_center, w, h)
      File "C:\Users\60332\Desktop\labelGo-Yolov5AutoLabelImg\libs\yolo_io.py", line 125, in yolo_line_to_shape
        label = self.classes[int(class_index)]
    IndexError: list index out of range
    
    opened by WangRongsheng 5
  • 运行 python labelGo.py 的时候出现以下错误,所有的包都已经成功安装了

    运行 python labelGo.py 的时候出现以下错误,所有的包都已经成功安装了

    报错如下

    Traceback (most recent call last):
      File "labelGo.py", line 1744, in <module>
        sys.exit(main())
      File "labelGo.py", line 1738, in main
        app, _win = get_main_app(sys.argv)
      File "labelGo.py", line 1729, in get_main_app
        win = MainWindow(args.image_dir,
      File "labelGo.py", line 281, in __init__
        edit_mode = action(get_str('editBox'), self.set_edit_mode,
      File "labelGo.py", line 97, in <lambda>
        get_str = lambda str_id: self.string_bundle.get_string(str_id)
      File "D:\AnnotationsTools\labelGo-Yolov5AutoLabelImg-master\libs\stringBundle.py", line 47, in get_string
        assert(string_id in self.id_to_message), "Missing string id : " + string_id
    AssertionError: Missing string id : editBox
    

    请问如何解决?或者能通过docker安装吗?

    opened by XuechengWu 3
  • AttributeError: Can't get attribute 'SPPF'

    AttributeError: Can't get attribute 'SPPF'

    I successfully installed and configured the environment according to the instructions on GitHub, and then reported an error after running
    “AttributeError: Can't get attribute 'SPPF' on <module 'models.common'”, I refer to the link below to try to solve this problem https://blog.csdn.net/cjy_colorful0806/article/details/120930204

    But when encountering an error “AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘” I refer to the link below to try to solve this problem https://blog.csdn.net/qq_35207086/article/details/123879980

    But when encountering an error “RuntimeError: shape '[1, 3, 1, 1, 2]' is invalid for input of size 28224”

    I have tried several models such as: yolov5l.pt、yolov5l6.pt、yolov5s.pt、yolov5x6.pt. How can I run this project??

    opened by xudh1991 2
  • AssertionError: Missing string id : editBox

    AssertionError: Missing string id : editBox

    (yolo) C:\Users\z249\Desktop\labelGo-Yolov5AutoLabelImg-master>python labelGo.py Traceback (most recent call last): File "labelGo.py", line 1744, in sys.exit(main()) File "labelGo.py", line 1738, in main app, _win = get_main_app(sys.argv) File "labelGo.py", line 1729, in get_main_app win = MainWindow(args.image_dir, File "labelGo.py", line 281, in init edit_mode = action(get_str('editBox'), self.set_edit_mode, File "labelGo.py", line 97, in get_str = lambda str_id: self.string_bundle.get_string(str_id) File "C:\Users\z249\Desktop\labelGo-Yolov5AutoLabelImg-master\libs\stringBundle.py", line 47, in get_string assert(string_id in self.id_to_message), "Missing string id : " + string_id AssertionError: Missing string id : editBox

    opened by fanshu-520 2
  • IndexError: list index out of range

    IndexError: list index out of range

    File "D:/pythonProject/labelGo-Yolov5AutoLabelImg-master/labelGo.py", line 1390, in auto_label self.import_dir_images(self.last_open_dir) File "D:/pythonProject/labelGo-Yolov5AutoLabelImg-master/labelGo.py", line 1406, in import_dir_images self.open_next_image() File "D:/pythonProject/labelGo-Yolov5AutoLabelImg-master/labelGo.py", line 1480, in open_next_image self.load_file(filename) File "D:/pythonProject/labelGo-Yolov5AutoLabelImg-master/labelGo.py", line 1163, in load_file self.show_bounding_box_from_annotation_file(file_path) File "D:/pythonProject/labelGo-Yolov5AutoLabelImg-master/labelGo.py", line 1206, in show_bounding_box_from_annotation_file self.load_yolo_txt_by_filename(txt_path) File "D:/pythonProject/labelGo-Yolov5AutoLabelImg-master/labelGo.py", line 1661, in load_yolo_txt_by_filename t_yolo_parse_reader = YoloReader(txt_path, self.image) File "D:\pythonProject\labelGo-Yolov5AutoLabelImg-master\libs\yolo_io.py", line 112, in init self.parse_yolo_format() File "D:\pythonProject\labelGo-Yolov5AutoLabelImg-master\libs\yolo_io.py", line 143, in parse_yolo_format label, x_min, y_min, x_max, y_max = self.yolo_line_to_shape(class_index, x_center, y_center, w, h) File "D:\pythonProject\labelGo-Yolov5AutoLabelImg-master\libs\yolo_io.py", line 125, in yolo_line_to_shape label = self.classes[int(class_index)] IndexError: list index out of range

    opened by JerryHao-art 1
  • 中文支持有问题

    中文支持有问题

    按照说明完成安装,环境conda的python3.8 正常运行英文版成功。 改中文版出现问题: 编辑文件\libs\stringBundle.py的第52行, 将字符串":/strings"替换为":/strings-zh-CN"即可。 最后再次运行后报错 Traceback (most recent call last): File "labelGo.py", line 1744, in <module> sys.exit(main()) File "labelGo.py", line 1738, in main app, _win = get_main_app(sys.argv) File "labelGo.py", line 1729, in get_main_app win = MainWindow(args.image_dir, File "labelGo.py", line 281, in __init__ edit_mode = action(get_str('editBox'), self.set_edit_mode, File "labelGo.py", line 97, in <lambda> get_str = lambda str_id: self.string_bundle.get_string(str_id) File "D:\SynologyDrive\*********\labelGo-Yolov5AutoLabelImg\libs\stringBundle.py", line 47, in get_string assert(string_id in self.id_to_message), "Missing string id : " + string_id AssertionError: Missing string id : editBox

    opened by Iceprism 1
  • Can't get attribute 'SPPF'

    Can't get attribute 'SPPF'

    Thanks for sharing your code. I am trying to test run your code with yolov5s.pt and some data, but getting the error message: Can't get attribute 'SPPF'". Do you have any insight into what could be the source of the problem. Also in Readm, there is a note stating "Please put classes.txt under the marked dataset folder in advance". It is not clear to me what is marked dataset. Should dataset be labeled first before running your code? Please elaborate. Or could you send me images and pt file, (along with class.txt) used in your demo (gif)? Thanks in advance.

    opened by chyphen7 1
  • labelGo autolabel doesn't work with  newest model output from YOLOv5

    labelGo autolabel doesn't work with newest model output from YOLOv5

    opened by TECOLOGYxyz 1
  • 关于工具使用和个人的一些问题?

    关于工具使用和个人的一些问题?

    大佬你好,你是西南大学rm战队的成员吗?我是中北大学rm战队视觉组成员,现在负责用神经网络识别装甲板,目前已经用trt加速yolov5并部署到win下,后期会迁移到linux下,我感觉你这个工具挺好用的,就是我想问一下生成的标签格式就已经是yolo的吗,还是后期需要自己转?还有方便的话可以加个微信就数据集制作这块交流一下吗?

    opened by Hezhexi2002 1
  • settings.py

    settings.py

    What does self.path = os.path.join (home, '.labelImgSettings.pkl') mean in ClassSettings() inside the settings.py file? Where is the .labelImgSettings.pkl file?

    opened by ghost 0
  • QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?

    QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?

    orange@orange-HP-ProBook-440-G5:~/Documents/labelGo-Yolov5AutoLabelImg$ python3 labelGo.py Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. Traceback (most recent call last): File "/home/orange/Documents/labelGo-Yolov5AutoLabelImg/libs/canvas.py", line 506, in paintEvent p.drawLine(self.prev_point.x(), 0, self.prev_point.x(), self.pixmap.height()) TypeError: arguments did not match any overloaded call: drawLine(self, QLineF): argument 1 has unexpected type 'float' drawLine(self, QLine): argument 1 has unexpected type 'float' drawLine(self, int, int, int, int): argument 1 has unexpected type 'float' drawLine(self, QPoint, QPoint): argument 1 has unexpected type 'float' drawLine(self, Union[QPointF, QPoint], Union[QPointF, QPoint]): argument 1 has unexpected type 'float' QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it? QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it? QPainter::begin: Painter already active Segmentation fault (core dumped)

    opened by f2d73 0
  • AttributeError: Can't get attribute 'MP'

    AttributeError: Can't get attribute 'MP'

    用的是yolov7训练好的pt,自动标注报错

    (label) C:\Users\CAN\Documents\yolo\labelGo-Yolov5AutoLabelImg-master>python labelGo.py YOLOv5 2022-10-14 torch 1.13.0+cu117 CUDA:0 (NVIDIA GeForce RTX 3050 Laptop GPU, 4095.5MB)

    Traceback (most recent call last): File "C:\Users\CAN\Documents\yolo\labelGo-Yolov5AutoLabelImg-master\labelGo.py", line 1388, in auto_label run(**vars(opt)) File "C:\Users\CAN\anaconda3\envs\label\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "C:\Users\CAN\Documents\yolo\labelGo-Yolov5AutoLabelImg-master\libs\autoLabeler.py", line 61, in run model = attempt_load(weights, map_location=device) # load FP32 model File "C:\Users\CAN\Documents\yolo\labelGo-Yolov5AutoLabelImg-master\libs\models\experimental.py", line 96, in attempt_load ckpt = torch.load(attempt_download(w), map_location=map_location) # load File "C:\Users\CAN\anaconda3\envs\label\lib\site-packages\torch\serialization.py", line 789, in load return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args) File "C:\Users\CAN\anaconda3\envs\label\lib\site-packages\torch\serialization.py", line 1131, in _load result = unpickler.load() File "C:\Users\CAN\anaconda3\envs\label\lib\site-packages\torch\serialization.py", line 1124, in find_class return super().find_class(mod_name, name) AttributeError: Can't get attribute 'MP' on <module 'models.common' from 'C:\Users\CAN\Documents\yolo\labelGo-Yolov5AutoLabelImg-master\libs\models\common.py'>

    opened by lemonvallelonga 0
  • 在Ubuntu18下使用出现这个问题,请问怎么解决?

    在Ubuntu18下使用出现这个问题,请问怎么解决?

    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

    opened by wxymmecho 0
  • 最新版本的 requirements.txt 似乎有些问题,在 anaconda / 原生 环境下都无法安装成功。

    最新版本的 requirements.txt 似乎有些问题,在 anaconda / 原生 环境下都无法安装成功。

    Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e1/57/2023316578646e1adab903caab714708422f83a57f97eb34a5d13510f4e1/PyQt5-5.15.7.tar.gz (3.2 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

    × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [29 lines of output] Traceback (most recent call last): File "/root/anaconda3/envs/labelGo/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 144, in prepare_metadata_for_build_wheel hook = backend.prepare_metadata_for_build_wheel AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'

      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/root/anaconda3/envs/labelGo/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/root/anaconda3/envs/labelGo/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/root/anaconda3/envs/labelGo/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 148, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
        File "/tmp/pip-build-env-v9nl7vbu/overlay/lib/python3.8/site-packages/sipbuild/api.py", line 46, in build_wheel
          project = AbstractProject.bootstrap('wheel',
        File "/tmp/pip-build-env-v9nl7vbu/overlay/lib/python3.8/site-packages/sipbuild/abstract_project.py", line 87, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/tmp/pip-build-env-v9nl7vbu/overlay/lib/python3.8/site-packages/sipbuild/project.py", line 585, in setup
          self.apply_user_defaults(tool)
        File "project.py", line 69, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/tmp/pip-build-env-v9nl7vbu/overlay/lib/python3.8/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/tmp/pip-build-env-v9nl7vbu/overlay/lib/python3.8/site-packages/sipbuild/project.py", line 236, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "/tmp/pip-build-env-v9nl7vbu/overlay/lib/python3.8/site-packages/pyqtbuild/builder.py", line 69, in apply_user_defaults
          raise PyProjectOptionException('qmake',
      sipbuild.pyproject.PyProjectOptionException
      [end of output]
    

    note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

    × Encountered error while generating package metadata. ╰─> See above for output.

    note: This is an issue with the package mentioned above, not pip. hint: See above for details.

    opened by sci-law 0
Releases(v5_v5_source)
Owner
EricFang
Coding the world.
EricFang
Multi-task yolov5 with detection and segmentation based on yolov5

YOLOv5DS Multi-task yolov5 with detection and segmentation based on yolov5(branch v6.0) decoupled head anchor free segmentation head README中文 Ablation

null 150 Dec 30, 2022
TPH-YOLOv5: Improved YOLOv5 Based on Transformer Prediction Head for Object Detection on Drone-Captured Scenarios

TPH-YOLOv5 This repo is the implementation of "TPH-YOLOv5: Improved YOLOv5 Based on Transformer Prediction Head for Object Detection on Drone-Captured

cv516Buaa 439 Dec 22, 2022
ObjectDrawer-ToolBox: a graphical image annotation tool to generate ground plane masks for a 3D object reconstruction system

ObjectDrawer-ToolBox is a graphical image annotation tool to generate ground plane masks for a 3D object reconstruction system, Object Drawer.

null 77 Jan 5, 2023
🍅🍅🍅YOLOv5-Lite: lighter, faster and easier to deploy. Evolved from yolov5 and the size of model is only 1.7M (int8) and 3.3M (fp16). It can reach 10+ FPS on the Raspberry Pi 4B when the input size is 320×320~

YOLOv5-Lite:lighter, faster and easier to deploy Perform a series of ablation experiments on yolov5 to make it lighter (smaller Flops, lower memory, a

pogg 1.5k Jan 5, 2023
Yolov5-lite - Minimal PyTorch implementation of YOLOv5

Yolov5-Lite: Minimal YOLOv5 + Deep Sort Overview This repo is a shortened versio

Kadir Nar 57 Nov 28, 2022
Annotate datasets with a semi-trained or fully trained YOLOv5 model

YOLOv5 Auto Annotator Annotate datasets with a semi-trained or fully trained YOLOv5 model Prerequisites Ubuntu >=20.04 Python >=3.7 System dependencie

Akash James 3 May 14, 2022
CoSMA: Convolutional Semi-Regular Mesh Autoencoder. From Paper "Mesh Convolutional Autoencoder for Semi-Regular Meshes of Different Sizes"

Mesh Convolutional Autoencoder for Semi-Regular Meshes of Different Sizes Implementation of CoSMA: Convolutional Semi-Regular Mesh Autoencoder arXiv p

Fraunhofer SCAI 10 Oct 11, 2022
Automatic self-diagnosis program (python required)Automatic self-diagnosis program (python required)

auto-self-checker 자동으로 자가진단 해주는 프로그램(python 필요) 중요 이 프로그램이 실행될때에는 절대로 마우스포인터를 움직이거나 키보드를 건드리면 안된다(화면인식, 마우스포인터로 직접 클릭) 사용법 프로그램을 구동할 폴더 내의 cmd창에서 pip

null 1 Dec 30, 2021
This YoloV5 based model is fit to detect people and different types of land vehicles, and displaying their density on a fitted map, according to their coordinates and detected labels.

This YoloV5 based model is fit to detect people and different types of land vehicles, and displaying their density on a fitted map, according to their

Liron Bdolah 8 May 22, 2022
YOLOv5 Series Multi-backbone, Pruning and quantization Compression Tool Box.

YOLOv5-Compression Update News Requirements 环境安装 pip install -r requirements.txt Evaluation metric Visdrone Model mAP mAP@50 Parameters(M) GFLOPs FPS@

ZhangYuan 719 Jan 2, 2023
A Data Annotation Tool for Semantic Segmentation, Object Detection and Lane Line Detection.(In Development Stage)

Data-Annotation-Tool How to Run this Tool? To run this software, follow the steps: git clone https://github.com/Autonomous-Car-Project/Data-Annotation

TiVRA AI 13 Aug 18, 2022
joint detection and semantic segmentation, based on ultralytics/yolov5,

Multi YOLO V5——Detection and Semantic Segmentation Overeview This is my undergraduate graduation project which based on ultralytics YOLO V5 tag v5.0.

null 477 Jan 6, 2023
AgeGuesser: deep learning based age estimation system. Powered by EfficientNet and Yolov5

AgeGuesser AgeGuesser is an end-to-end, deep-learning based Age Estimation system, presented at the CAIP 2021 conference. You can find the related pap

null 5 Nov 10, 2022
A embed able annotation tool for end to end cross document co-reference

CoRefi CoRefi is an emebedable web component and stand alone suite for exaughstive Within Document and Cross Document Coreference Anntoation. For a de

PythicCoder 39 Dec 12, 2022
OpenCVのGrabCut()を利用したセマンティックセグメンテーション向けアノテーションツール(Annotation tool using GrabCut() of OpenCV. It can be used to create datasets for semantic segmentation.)

[Japanese/English] GrabCut-Annotation-Tool GrabCut-Annotation-Tool.mp4 OpenCVのGrabCut()を利用したアノテーションツールです。 セマンティックセグメンテーション向けのデータセット作成にご使用いただけます。 ※Grab

KazuhitoTakahashi 30 Nov 18, 2022
Open source annotation tool for machine learning practitioners.

doccano doccano is an open source text annotation tool for humans. It provides annotation features for text classification, sequence labeling and sequ

null 7.1k Jan 1, 2023
This repository is based on Ultralytics/yolov5, with adjustments to enable polygon prediction boxes.

Polygon-Yolov5 This repository is based on Ultralytics/yolov5, with adjustments to enable polygon prediction boxes. Section I. Description The codes a

xinzelee 226 Jan 5, 2023
This repository is based on Ultralytics/yolov5, with adjustments to enable rotate prediction boxes.

Rotate-Yolov5 This repository is based on Ultralytics/yolov5, with adjustments to enable rotate prediction boxes. Section I. Description The codes are

xinzelee 90 Dec 13, 2022
Rewrite ultralytics/yolov5 v6.0 opencv inference code based on numpy, no need to rely on pytorch

Rewrite ultralytics/yolov5 v6.0 opencv inference code based on numpy, no need to rely on pytorch; pre-processing and post-processing using numpy instead of pytroch.

炼丹去了 21 Dec 12, 2022