• 大小: 39.75MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-22
  • 语言: 其他
  • 标签: labelimg  

资源简介

深度学习工具,图片打标签预处理软件,源码加可执行文件,在build里

资源截图

代码片段和文件信息

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import distutils.spawn
import os.path
import platform
import re
import sys
import subprocess

from functools import partial
from collections import defaultdict

try:
    from PyQt5.QtGui import *
    from PyQt5.QtCore import *
    from PyQt5.QtWidgets import *
except ImportError:
    # needed for py3+qt4
    # Ref:
    # http://pyqt.sourceforge.net/Docs/PyQt4/incompatible_apis.html
    # http://stackoverflow.com/questions/21217399/pyqt4-qtcore-qvariant-object-instead-of-a-string
    if sys.version_info.major >= 3:
        import sip
        sip.setapi(‘QVariant‘ 2)
    from PyQt4.QtGui import *
    from PyQt4.QtCore import *

import resources
# Add internal libs
from libs.constants import *
from libs.lib import struct newAction newIcon addActions fmtShortcut generateColorByText
from libs.settings import Settings
from libs.shape import Shape DEFAULT_LINE_COLOR DEFAULT_FILL_COLOR
from libs.canvas import Canvas
from libs.zoomWidget import ZoomWidget
from libs.labelDialog import LabelDialog
from libs.colorDialog import ColorDialog
from libs.labelFile import LabelFile LabelFileError
from libs.toolBar import ToolBar
from libs.pascal_voc_io import PascalVocReader
from libs.pascal_voc_io import xml_EXT
from libs.yolo_io import YoloReader
from libs.yolo_io import TXT_EXT
from libs.ustr import ustr
from libs.version import __version__

__appname__ = ‘labelImg‘

# Utility functions and classes.

def have_qstring():
    ‘‘‘p3/qt5 get rid of QString wrapper as py3 has native unicode str type‘‘‘
    return not (sys.version_info.major >= 3 or QT_VERSION_STR.startswith(‘5.‘))

def util_qt_strlistclass():
    return QStringList if have_qstring() else list


class WindowMixin(object):

    def menu(self title actions=None):
        menu = self.menuBar().addMenu(title)
        if actions:
            addActions(menu actions)
        return menu

    def toolbar(self title actions=None):
        toolbar = ToolBar(title)
        toolbar.setobjectName(u‘%sToolBar‘ % title)
        # toolbar.setOrientation(Qt.Vertical)
        toolbar.setToolButtonstyle(Qt.ToolButtonTextUnderIcon)
        if actions:
            addActions(toolbar actions)
        self.addToolBar(Qt.LeftToolBarArea toolbar)
        return toolbar


# PyQt5: TypeError: unhashable type: ‘QListWidgetItem‘
class HashableQListWidgetItem(QListWidgetItem):

    def __init__(self *args):
        super(HashableQListWidgetItem self).__init__(*args)

    def __hash__(self):
        return hash(id(self))


class MainWindow(QMainWindow WindowMixin):
    FIT_WINDOW FIT_WIDTH MANUAL_ZOOM = list(range(3))

    def __init__(self defaultFilename=None defaultPrefdefClassFile=None defaultSaveDir=None):
        super(MainWindow self).__init__()
        self.setWindowtitle(__appname__)

        # Load setting in the main thread
        self.settings = Settings()
        self.settings.load()
        settings = self.settings

        # Save a

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    .......       142  2018-07-10 10:48  LabelImg\.gitignore

    .......      2491  2018-07-10 10:48  LabelImg\.travis.yml

     文件      30431  2018-09-11 13:34  LabelImg\build\labelImg\Analysis-00.toc

     文件     771349  2018-09-11 13:34  LabelImg\build\labelImg\base_library.zip

     文件       2338  2018-09-11 13:34  LabelImg\build\labelImg\EXE-00.toc

     文件    1644104  2018-09-11 13:34  LabelImg\build\labelImg\labelImg.exe

     文件       1033  2018-09-11 13:34  LabelImg\build\labelImg\labelImg.exe.manifest

     文件    1370696  2018-09-11 13:34  LabelImg\build\labelImg\PKG-00.pkg

     文件       1285  2018-09-11 13:34  LabelImg\build\labelImg\PKG-00.toc

     文件    1336453  2018-09-11 13:34  LabelImg\build\labelImg\PYZ-00.pyz

     文件      14647  2018-09-11 13:34  LabelImg\build\labelImg\PYZ-00.toc

     文件       3862  2018-09-11 13:34  LabelImg\build\labelImg\warn-labelImg.txt

     文件     312206  2018-09-11 13:34  LabelImg\build\labelImg\xref-labelImg.html

    .......       108  2018-07-10 10:48  LabelImg\build-tools\.gitignore

    .......       725  2018-07-10 10:48  LabelImg\build-tools\build-for-macos.sh

     文件        680  2018-07-10 10:48  LabelImg\build-tools\build-for-pypi.sh

     文件        656  2018-07-10 10:48  LabelImg\build-tools\build-ubuntu-binary.sh

     文件        882  2018-07-10 10:48  LabelImg\build-tools\build-windows-binary.sh

     文件       1566  2018-07-10 10:48  LabelImg\build-tools\envsetup.sh

    .......       484  2018-07-10 10:48  LabelImg\build-tools\README.md

     文件        383  2018-07-10 10:48  LabelImg\build-tools\run-in-container.sh

    .......        83  2018-07-10 10:48  LabelImg\CONTRIBUTING.rst

    .......       145  2018-07-10 10:48  LabelImg\data\predefined_classes.txt

    .......     58243  2018-07-10 10:48  LabelImg\demo\demo.jpg

    .......     91238  2018-07-10 10:48  LabelImg\demo\demo3.jpg

    .......   2843527  2018-07-10 10:48  LabelImg\demo\demo4.png

    .......   3240759  2018-07-10 10:48  LabelImg\demo\demo5.png

     文件      19256  2018-09-11 13:26  LabelImg\dist\labelImg\api-ms-win-core-console-l1-1-0.dll

     文件      18744  2018-09-11 13:26  LabelImg\dist\labelImg\api-ms-win-core-datetime-l1-1-0.dll

     文件      18744  2018-09-11 13:26  LabelImg\dist\labelImg\api-ms-win-core-debug-l1-1-0.dll

............此处省略241个文件信息

评论

共有 条评论