Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 7cbe685

Browse files
add shortcut c instead of ctrl+v
1 parent 4993dcb commit 7cbe685

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

README.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,17 @@ Open the Anaconda Prompt and go to the `labelImg <#labelimg>`__ directory
119119
python labelImg.py
120120
python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
121121
122+
.. code::
123+
124+
conda create -n labelimg python=3.5
125+
pip install PyQt5==5.10.1 lxml pyinstaller
126+
# You may delete C:~/.labelImgSettings.pkl
127+
pyrcc5 -o libs/resources.py resources.qrc
128+
python labelImg.py
129+
python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
130+
pyinstaller --hidden-import=xml --hidden-import=xml.etree --hidden-import=xml.etree.ElementTree --hidden-import=lxml.etree --hidden-import=PyQt5.sip -D -F -n labelImg -c "./labelImg.py" -p ./libs -p ./ --paths C:\Users\Administrator\Anaconda3\envs\labelimg\Lib\site-packages\PyQt5\Qt\bin
131+
132+
122133
Get from PyPI but only python3.0 or above
123134
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124135
This is the simplest (one-command) install method on modern Linux distributions such as Ubuntu and Fedora.
@@ -219,6 +230,8 @@ Hotkeys
219230
+--------------------+--------------------------------------------+
220231
| a | Previous image |
221232
+--------------------+--------------------------------------------+
233+
| c | Copy Previous label |
234+
+--------------------+--------------------------------------------+
222235
| del | Delete the selected rect box |
223236
+--------------------+--------------------------------------------+
224237
| Ctrl++ | Zoom in |

activate.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pushd \\Mac\Home\Documents\programs\software\labelImg_copyfunc
2+
%windir%\System32\cmd.exe "/K" C:\Users\Administrator\Anaconda3\Scripts\activate.bat C:\Users\Administrator\Anaconda3\envs\labelimg

build.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
rd /s /q dist build
2+
del labelImg.spec
3+
4+
pyinstaller --hidden-import=xml --hidden-import=xml.etree --hidden-import=xml.etree.ElementTree --hidden-import=lxml.etree --hidden-import=PyQt5.sip -D -F -n labelImg -c "./labelImg.py" -p ./libs -p ./ --paths C:\Users\Administrator\Anaconda3\envs\labelimg\Lib\site-packages\PyQt5\Qt\bin
5+
mkdir dist\data
6+
xcopy data dist\data /s /e /y /i

labelImg.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,14 @@ def __init__(self, defaultFilename=None, defaultPrefdefClassFile=None, defaultSa
135135
self.editButton = QToolButton()
136136
self.editButton.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
137137

138+
# *
139+
# * dhzs 2017-12-2 add copy button
140+
# *
141+
self.copy_prev_button = QPushButton('Copy the previous label')
142+
self.copy_prev_button.setShortcut('c')
143+
self.copy_prev_button.clicked.connect(self.copyPreviousBoundingBoxes)
144+
listLayout.addWidget(self.copy_prev_button)
145+
138146
# Add some of widgets to listLayout
139147
listLayout.addWidget(self.editButton)
140148
listLayout.addWidget(self.diffcButton)

0 commit comments

Comments
 (0)