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
Official repository for the NeurIPS 2021 paper Get Fooled for the Right Reason: Improving Adversarial Robustness through a Teacher-guided curriculum Learning Approach

Get Fooled for the Right Reason Official repository for the NeurIPS 2021 paper Get Fooled for the Right Reason: Improving Adversarial Robustness throu

Sowrya Gali 1 Apr 25, 2022
Volumetric parameterization of the placenta to a flattened template

placenta-flattening A MATLAB algorithm for volumetric mesh parameterization. Developed for mapping a placenta segmentation derived from an MRI image t

Mazdak Abulnaga 12 Mar 14, 2022
pytorch implementation of ABC : Auxiliary Balanced Classifier for Class-imbalanced Semi-supervised Learning

ABC:Auxiliary Balanced Classifier for Class-imbalanced Semi-supervised Learning, NeurIPS 2021 pytorch implementation of ABC : Auxiliary Balanced Class

Hyuck Lee 25 Dec 22, 2022
[CVPR 2020] GAN Compression: Efficient Architectures for Interactive Conditional GANs

GAN Compression project | paper | videos | slides [NEW!] GAN Compression is accepted by T-PAMI! We released our T-PAMI version in the arXiv v4! [NEW!]

MIT HAN Lab 1k Jan 07, 2023
Simple reference implementation of GraphSAGE.

Reference PyTorch GraphSAGE Implementation Author: William L. Hamilton Basic reference PyTorch implementation of GraphSAGE. This reference implementat

William L Hamilton 861 Jan 06, 2023
The codes and related files to reproduce the results for Image Similarity Challenge Track 1.

ISC-Track1-Submission The codes and related files to reproduce the results for Image Similarity Challenge Track 1. Required dependencies To begin with

Wenhao Wang 115 Jan 02, 2023
Lighthouse: Predicting Lighting Volumes for Spatially-Coherent Illumination

Lighthouse: Predicting Lighting Volumes for Spatially-Coherent Illumination Pratul P. Srinivasan, Ben Mildenhall, Matthew Tancik, Jonathan T. Barron,

Pratul Srinivasan 65 Dec 14, 2022
MARS: Learning Modality-Agnostic Representation for Scalable Cross-media Retrieva

Introduction This is the source code of our TCSVT 2021 paper "MARS: Learning Modality-Agnostic Representation for Scalable Cross-media Retrieval". Ple

7 Aug 24, 2022
Interpretable-contrastive-word-mover-s-embedding

Interpretable-contrastive-word-mover-s-embedding Paper Datasets Here is a Dropbox link to the datasets used in the paper: https://www.dropbox.com/sh/n

0 Nov 02, 2021
project page for VinVL

VinVL: Revisiting Visual Representations in Vision-Language Models Updates 02/28/2021: Project page built. Introduction This repository is the project

308 Jan 09, 2023
RP-GAN: Stable GAN Training with Random Projections

RP-GAN: Stable GAN Training with Random Projections This repository contains a reference implementation of the algorithm described in the paper: Behna

Ayan Chakrabarti 20 Sep 18, 2021
clustimage is a python package for unsupervised clustering of images.

clustimage The aim of clustimage is to detect natural groups or clusters of images. Image recognition is a computer vision task for identifying and ve

Erdogan Taskesen 52 Jan 02, 2023
An ever-growing playground of notebooks showcasing CLIP's impressive zero-shot capabilities.

Playground for CLIP-like models Demo Colab Link GradCAM Visualization Naive Zero-shot Detection Smarter Zero-shot Detection Captcha Solver Changelog 2

Kevin Zakka 101 Dec 30, 2022
Global Rhythm Style Transfer Without Text Transcriptions

Global Prosody Style Transfer Without Text Transcriptions This repository provides a PyTorch implementation of AutoPST, which enables unsupervised glo

Kaizhi Qian 193 Dec 30, 2022
A script that trains a model to recognize handwritten digits using the MNIST data set.

handwritten-digits-recognition A script that trains a model to recognize handwritten digits using the MNIST data set. Then it loads external files and

Hamza Sayih 1 Oct 30, 2021
Official PyTorch implementation of the paper "Deep Constrained Least Squares for Blind Image Super-Resolution", CVPR 2022.

Deep Constrained Least Squares for Blind Image Super-Resolution [Paper] This is the official implementation of 'Deep Constrained Least Squares for Bli

MEGVII Research 141 Dec 30, 2022
Reproduce partial features of DeePMD-kit using PyTorch.

DeePMD-kit on PyTorch For better understand DeePMD-kit, we implement its partial features using PyTorch and expose interface consuing descriptors. Tec

Shaochen Shi 8 Dec 17, 2022
Prototype for Baby Action Detection and Classification

Baby Action Detection Table of Contents About Install Run Predictions Demo About An attempt to harness the power of Deep Learning to come up with a so

Shreyas K 30 Dec 16, 2022
PyTorch implementation of Off-policy Learning in Two-stage Recommender Systems

Off-Policy-2-Stage This repo provides a PyTorch implementation of the MovieLens experiments for the following paper: Off-policy Learning in Two-stage

Jiaqi Ma 25 Dec 12, 2022
DTCN IJCAI - Sequential prediction learning framework and algorithm

DTCN This is the implementation of our paper "Sequential Prediction of Social Me

Bobby 2 Jan 24, 2022