Updated README

This commit is contained in:
tzutalin 2020-11-14 22:51:44 -08:00
parent e13d154ad8
commit a86093ca60
2 changed files with 4 additions and 22 deletions

View File

@ -41,17 +41,8 @@ Linux/Ubuntu/Mac requires at least `Python
Ubuntu Linux
^^^^^^^^^^^^
Python 2 + Qt4
.. code:: shell
sudo apt-get install pyqt4-dev-tools
sudo pip install lxml
make qt4py2
python labelImg.py
python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
Python 3 + Qt5 (Recommended)
Python 3 + Qt5
.. code:: shell
@ -63,17 +54,8 @@ Python 3 + Qt5 (Recommended)
macOS
^^^^^
Python 2 + Qt4
.. code:: shell
brew install qt qt4
brew install libxml2
make qt4py2
python labelImg.py
python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
Python 3 + Qt5 (Recommended)
Python 3 + Qt5
.. code:: shell
@ -97,7 +79,7 @@ Virtualenv can avoid a lot of the QT / Python version issues
brew install python3
pip3 install pipenv
pipenv run pip install pyqt5==5.13.2 lxml
pipenv run pip install pyqt5==5.12.1 lxml
pipenv run make qt5py3
python3 labelImg.py
[Optional] rm -rf build dist; python setup.py py2app -A;mv "dist/labelImg.app" /Applications

View File

@ -1109,7 +1109,7 @@ class MainWindow(QMainWindow, WindowMixin):
def showBoundingBoxFromAnnotationFile(self, filePath):
if self.defaultSaveDir is not None:
basename = os.path.basename(os.path.splitext(filePath)[0])
filedir = os.path.basename(os.path.dirname(filePath))
filedir = filePath.split(basename)[0].split(os.path.sep)[-2:-1][0]
xmlPath = os.path.join(self.defaultSaveDir, basename + XML_EXT)
txtPath = os.path.join(self.defaultSaveDir, basename + TXT_EXT)
jsonPath = os.path.join(self.defaultSaveDir, filedir + JSON_EXT)