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?

    [email protected]:~/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
Label-Free Model Evaluation with Semi-Structured Dataset Representations

Label-Free Model Evaluation with Semi-Structured Dataset Representations Prerequisites This code uses the following libraries Python 3.7 NumPy PyTorch

8 Oct 06, 2022
Sign-to-Speech for Sign Language Understanding: A case study of Nigerian Sign Language

Sign-to-Speech for Sign Language Understanding: A case study of Nigerian Sign Language This repository contains the code, model, and deployment config

16 Oct 23, 2022
Optical Character Recognition + Instance Segmentation for russian and english languages

Распознавание рукописного текста в школьных тетрадях Соревнование, проводимое в рамках олимпиады НТО, разработанное Сбером. Платформа ODS. Результаты

Gerasimov Maxim 21 Dec 19, 2022
Lightweight stereo matching network based on MobileNetV1 and MobileNetV2

MobileStereoNet: Towards Lightweight Deep Networks for Stereo Matching

Cognitive Systems Research Group 139 Nov 30, 2022
Portfolio analytics for quants, written in Python

QuantStats: Portfolio analytics for quants QuantStats Python library that performs portfolio profiling, allowing quants and portfolio managers to unde

Ran Aroussi 2.7k Jan 08, 2023
Official Implementation of "Tracking Grow-Finish Pigs Across Large Pens Using Multiple Cameras"

Multi Camera Pig Tracking Official Implementation of Tracking Grow-Finish Pigs Across Large Pens Using Multiple Cameras CVPR2021 CV4Animals Workshop P

44 Jan 06, 2023
PyTorch code for ICPR 2020 paper Future Urban Scene Generation Through Vehicle Synthesis

Future urban scene generation through vehicle synthesis This repository contains Pytorch code for the ICPR2020 paper "Future Urban Scene Generation Th

Alessandro Simoni 4 Oct 11, 2021
Human motion synthesis using Unity3D

Human motion synthesis using Unity3D Prerequisite: Software: amc2bvh.exe, Unity 2017, Blender. Unity: RockVR (Video Capture), scenes, character models

Hao Xu 9 Jun 01, 2022
Catbird is an open source paraphrase generation toolkit based on PyTorch.

Catbird is an open source paraphrase generation toolkit based on PyTorch. Quick Start Requirements and Installation The project is based on PyTorch 1.

Afonso Salgado de Sousa 5 Dec 15, 2022
Commonsense Ability Tests

CATS Commonsense Ability Tests Dataset and script for paper Evaluating Commonsense in Pre-trained Language Models Use making_sense.py to run the exper

XUHUI ZHOU 28 Oct 19, 2022
PyTorch implementation for our AAAI 2022 Paper "Graph-wise Common Latent Factor Extraction for Unsupervised Graph Representation Learning"

deepGCFX PyTorch implementation for our AAAI 2022 Paper "Graph-wise Common Latent Factor Extraction for Unsupervised Graph Representation Learning" Pr

Thilini Cooray 4 Aug 11, 2022
Semantic Bottleneck Scene Generation

SB-GAN Semantic Bottleneck Scene Generation Coupling the high-fidelity generation capabilities of label-conditional image synthesis methods with the f

Samaneh Azadi 41 Nov 28, 2022
TilinGNN: Learning to Tile with Self-Supervised Graph Neural Network (SIGGRAPH 2020)

TilinGNN: Learning to Tile with Self-Supervised Graph Neural Network (SIGGRAPH 2020) About The goal of our research problem is illustrated below: give

59 Dec 09, 2022
Image reconstruction done with untrained neural networks.

PyTorch Deep Image Prior An implementation of image reconstruction methods from Deep Image Prior (Ulyanov et al., 2017) in PyTorch. The point of the p

Atiyo Ghosh 192 Nov 30, 2022
Sketch-Based 3D Exploration with Stacked Generative Adversarial Networks

pix2vox [Demonstration video] Sketch-Based 3D Exploration with Stacked Generative Adversarial Networks. Generated samples Single-category generation M

Takumi Moriya 232 Nov 14, 2022
Differentiable Prompt Makes Pre-trained Language Models Better Few-shot Learners

DART Implementation for ICLR2022 paper Differentiable Prompt Makes Pre-trained Language Models Better Few-shot Learners. Environment

ZJUNLP 83 Dec 27, 2022
Complete U-net Implementation with keras

U Net Lowered with Keras Complete U-net Implementation with keras Original Paper Link : https://arxiv.org/abs/1505.04597 Special Implementations : The

Sagnik Roy 14 Oct 10, 2022
BuildingNet: Learning to Label 3D Buildings

BuildingNet This is the implementation of the BuildingNet architecture described in this paper: Paper: BuildingNet: Learning to Label 3D Buildings Arx

16 Nov 07, 2022
Volsdf - Volume Rendering of Neural Implicit Surfaces

Volume Rendering of Neural Implicit Surfaces Project Page | Paper | Data This re

Lior Yariv 221 Jan 07, 2023
Topic Discovery via Latent Space Clustering of Pretrained Language Model Representations

TopClus The source code used for Topic Discovery via Latent Space Clustering of Pretrained Language Model Representations, published in WWW 2022. Requ

Yu Meng 63 Dec 18, 2022