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
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
Blender Add-on that sets a Material's Base Color to one of Pantone's Colors of the Year

Blender PCOY (Pantone Color of the Year) MCMC (Mid-Century Modern Colors) HG71 (House & Garden Colors 1971) Blender Add-ons That Assign a Custom Color

Don Schnitzius 15 Nov 20, 2022
Code to reproduce the experiments from our NeurIPS 2021 paper " The Limitations of Large Width in Neural Networks: A Deep Gaussian Process Perspective"

Code To run: python runner.py new --save SAVE_NAME --data PATH_TO_DATA_DIR --dataset DATASET --model model_name [options] --n 1000 - train - t

Geoff Pleiss 5 Dec 12, 2022
PatrickStar enables Larger, Faster, Greener Pretrained Models for NLP. Democratize AI for everyone.

PatrickStar: Parallel Training of Large Language Models via a Chunk-based Memory Management Meeting PatrickStar Pre-Trained Models (PTM) are becoming

Tencent 633 Dec 28, 2022
Pytorch implementation of CoCon: A Self-Supervised Approach for Controlled Text Generation

COCON_ICLR2021 This is our Pytorch implementation of COCON. CoCon: A Self-Supervised Approach for Controlled Text Generation (ICLR 2021) Alvin Chan, Y

alvinchangw 79 Dec 18, 2022
The official implementation of CSG-Stump: A Learning Friendly CSG-Like Representation for Interpretable Shape Parsing

CSGStumpNet The official implementation of CSG-Stump: A Learning Friendly CSG-Like Representation for Interpretable Shape Parsing Paper | Project page

Daxuan 39 Dec 26, 2022
prior-based-losses-for-medical-image-segmentation

Repository for papers: Benchmark: Effect of Prior-based Losses on Segmentation Performance: A Benchmark Midl: A Surprisingly Effective Perimeter-based

Rosana EL JURDI 9 Sep 07, 2022
Deep Learning & 3D Convolutional Neural Networks for Speaker Verification

TensorFlow implementation of 3D Convolutional Neural Networks for Speaker Verification - Official Project Page - Pytorch Implementation This repositor

Amirsina Torfi 753 Dec 17, 2022
Offline Reinforcement Learning with Implicit Q-Learning

Offline Reinforcement Learning with Implicit Q-Learning This repository contains the official implementation of Offline Reinforcement Learning with Im

Ilya Kostrikov 126 Jan 06, 2023
ImageBART: Bidirectional Context with Multinomial Diffusion for Autoregressive Image Synthesis

ImageBART NeurIPS 2021 Patrick Esser*, Robin Rombach*, Andreas Blattmann*, Björn Ommer * equal contribution arXiv | BibTeX | Poster Requirements A sui

CompVis Heidelberg 110 Jan 01, 2023
The modify PyTorch version of Siam-trackers which are speed-up by TensorRT.

SiamTracker-with-TensorRT The modify PyTorch version of Siam-trackers which are speed-up by TensorRT or ONNX. [Updating...] Examples demonstrating how

9 Dec 13, 2022
Deploy recommendation engines with Edge Computing

RecoEdge: Bringing Recommendations to the Edge A one stop solution to build your recommendation models, train them and, deploy them in a privacy prese

NimbleEdge 131 Jan 02, 2023
Progressive Image Deraining Networks: A Better and Simpler Baseline

Progressive Image Deraining Networks: A Better and Simpler Baseline [arxiv] [pdf] [supp] Introduction This paper provides a better and simpler baselin

190 Dec 01, 2022
Sound-guided Semantic Image Manipulation - Official Pytorch Code (CVPR 2022)

🔉 Sound-guided Semantic Image Manipulation (CVPR2022) Official Pytorch Implementation Sound-guided Semantic Image Manipulation IEEE/CVF Conference on

CVLAB 58 Dec 28, 2022
This repository contains the code for: RerrFact model for SciVer shared task

RerrFact This repository contains the code for: RerrFact model for SciVer shared task. Setup for Inference 1. Download SciFact database Download the S

Ashish Rana 1 May 22, 2022
Differentiable Simulation of Soft Multi-body Systems

Differentiable Simulation of Soft Multi-body Systems Yi-Ling Qiao, Junbang Liang, Vladlen Koltun, Ming C. Lin [Paper] [Code] Updates The C++ backend s

YilingQiao 26 Dec 23, 2022
HyperSeg: Patch-wise Hypernetwork for Real-time Semantic Segmentation Official PyTorch Implementation

: We present a novel, real-time, semantic segmentation network in which the encoder both encodes and generates the parameters (weights) of the decoder. Furthermore, to allow maximal adaptivity, the w

Yuval Nirkin 182 Dec 14, 2022
Discovering and Achieving Goals via World Models

Discovering and Achieving Goals via World Models [Project Website] [Benchmark Code] [Video (2min)] [Oral Talk (13min)] [Paper] Russell Mendonca*1, Ole

Oleg Rybkin 71 Dec 22, 2022
A simple, unofficial implementation of MAE using pytorch-lightning

Masked Autoencoders in PyTorch A simple, unofficial implementation of MAE (Masked Autoencoders are Scalable Vision Learners) using pytorch-lightning.

Connor Anderson 20 Dec 03, 2022
This was initially the repo for the project of [email protected] of Asaf Mazar, Millad Kassaie and Georgios Chochlakis named "Powered by the Will? Exploring Lay Theories of Behavior Change through Social Media"

Subreddit Analysis This repo includes tools for Subreddit analysis, originally developed for our class project of PSYC 626 in USC, titled "Powered by

Georgios Chochlakis 1 Dec 17, 2021