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
Dcf-game-infrastructure-public - Contains all the components necessary to run a DC finals (attack-defense CTF) game from OOO

dcf-game-infrastructure All the components necessary to run a game of the OOO DC

Order of the Overflow 46 Sep 13, 2022
Totally Versatile Miscellanea for Pytorch

Totally Versatile Miscellania for PyTorch Thomas Viehmann [email protected] Thi

Thomas Viehmann 428 Dec 28, 2022
Repository for the semantic WMI loss

Installation: pip install -e . Installing DL2: First clone DL2 in a separate directory and install it using the following commands: git clone https:/

Nick Hoernle 4 Sep 15, 2022
Learning with Subset Stacking

Learning with Subset Stacking (LESS) LESS is a new supervised learning algorithm that is based on training many local estimators on subsets of a given

S. Ilker Birbil 19 Oct 04, 2022
A deep learning based semantic search platform that computes similarity scores between provided query and documents

semanticsearch This is a deep learning based semantic search platform that computes similarity scores between provided query and documents. Documents

1 Nov 30, 2021
List of papers, code and experiments using deep learning for time series forecasting

Deep Learning Time Series Forecasting List of state of the art papers focus on deep learning and resources, code and experiments using deep learning f

Alexander Robles 2k Jan 06, 2023
How Do Adam and Training Strategies Help BNNs Optimization? In ICML 2021.

AdamBNN This is the pytorch implementation of our paper "How Do Adam and Training Strategies Help BNNs Optimization?", published in ICML 2021. In this

Zechun Liu 47 Sep 20, 2022
Fibonacci Method Gradient Descent

An implementation of the Fibonacci method for gradient descent, featuring a TKinter GUI for inputting the function / parameters to be examined and a matplotlib plot of the function and results.

Emma 1 Jan 28, 2022
Rethinking the U-Net architecture for multimodal biomedical image segmentation

MultiResUNet Rethinking the U-Net architecture for multimodal biomedical image segmentation This repository contains the original implementation of "M

Nabil Ibtehaz 308 Jan 05, 2023
PyTorch implementation of "VRT: A Video Restoration Transformer"

VRT: A Video Restoration Transformer Jingyun Liang, Jiezhang Cao, Yuchen Fan, Kai Zhang, Rakesh Ranjan, Yawei Li, Radu Timofte, Luc Van Gool Computer

Jingyun Liang 837 Jan 09, 2023
Transport Mode detection - can detect the mode of transport with the help of features such as acceeration,jerk etc

title emoji colorFrom colorTo sdk app_file pinned Transport_Mode_Detector 🚀 purple yellow gradio app.py false Configuration title: string Display tit

Nishant Rajadhyaksha 3 Jan 16, 2022
Time-Optimal Planning for Quadrotor Waypoint Flight

Time-Optimal Planning for Quadrotor Waypoint Flight This is an example implementation of the paper "Time-Optimal Planning for Quadrotor Waypoint Fligh

Robotics and Perception Group 38 Dec 02, 2022
The lightweight PyTorch wrapper for high-performance AI research. Scale your models, not the boilerplate.

The lightweight PyTorch wrapper for high-performance AI research. Scale your models, not the boilerplate. Website • Key Features • How To Use • Docs •

Pytorch Lightning 21.1k Dec 29, 2022
Python Auto-ML Package for Tabular Datasets

Tabular-AutoML AutoML Package for tabular datasets Tabular dataset tuning is now hassle free! Run one liner command and get best tuning and processed

Sagnik Roy 18 Nov 20, 2022
PyTorch implementation of paper A Fast Knowledge Distillation Framework for Visual Recognition.

FKD: A Fast Knowledge Distillation Framework for Visual Recognition Official PyTorch implementation of paper A Fast Knowledge Distillation Framework f

Zhiqiang Shen 129 Dec 24, 2022
Open-source codebase for EfficientZero, from "Mastering Atari Games with Limited Data" at NeurIPS 2021.

EfficientZero (NeurIPS 2021) Open-source codebase for EfficientZero, from "Mastering Atari Games with Limited Data" at NeurIPS 2021. Environments Effi

Weirui Ye 671 Jan 03, 2023
Evaluating saliency methods on artificial data with different background types

Evaluating saliency methods on artificial data with different background types This repository contains the relevant code for the MedNeurips 2021 subm

2 Jul 05, 2022
Image marine sea litter prediction Shiny

MARLITE Shiny app for floating marine litter detection in aerial images. This directory contains the instructions and software needed to install the S

19 Dec 22, 2022
DARTS-: Robustly Stepping out of Performance Collapse Without Indicators

[ICLR'21] DARTS-: Robustly Stepping out of Performance Collapse Without Indicators [openreview] Authors: Xiangxiang Chu, Xiaoxing Wang, Bo Zhang, Shun

55 Nov 01, 2022
PICK: Processing Key Information Extraction from Documents using Improved Graph Learning-Convolutional Networks

Code for the paper "PICK: Processing Key Information Extraction from Documents using Improved Graph Learning-Convolutional Networks" (ICPR 2020)

Wenwen Yu 498 Dec 24, 2022