Skip to content

Commit

Permalink
Added instructions on building stand-alone Mac OS X binary
Browse files Browse the repository at this point in the history
- Build occurs inside a virtualenv
- Added new icon
- Updated README.md and Icon GPL Attribution
  • Loading branch information
madhavajay authored and tzutalin committed Mar 25, 2018
1 parent 8d1bd68 commit f48e13a
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 2 deletions.
18 changes: 18 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,22 @@ Python 3 + Qt5 (Works on macOS High Sierra)
python labelImg.py
python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
*NEW* Python 3 Virtualenv + Binary
This avoids a lot of the QT / Python version issues,
and gives you a nice .app file with a new SVG Icon
in your /Applications folder.

.. code::
brew install python3
pip install pipenv
pipenv --three
pipenv shell
pip install pyqt5 lxml
make qt5py3
rm -rf build dist
python setup.py py2app
cp -rf dist/labelImg.app /Applications
Windows
^^^^^^^
Expand Down Expand Up @@ -239,3 +255,5 @@ Related
download image, create a label text for machine learning, etc
2. `Use Docker to run labelImg <https://hub.docker.com/r/tzutalin/py2qt4>`__
3. `Generating the PASCAL VOC TFRecord files <https://github.com/tensorflow/models/blob/4f32535fe7040bb1e429ad0e3c948a492a89482d/research/object_detection/g3doc/preparing_inputs.md#generating-the-pascal-voc-tfrecord-files>`__
4. `App Icon based on Icon by Nick Roach (GPL)` <https://www.elegantthemes.com/> <https://www.iconfinder.com/icons/1054978/shop_tag_icon> __

Binary file added icons/app.icns
Binary file not shown.
Binary file added icons/app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions icons/app.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<qresource>

<file alias="help">icons/help.png</file>
<file alias="app">icons/expert2.png</file>
<file alias="app">icons/app.png</file>
<file alias="expert">icons/expert2.png</file>
<file alias="done">icons/done.png</file>
<file alias="file">icons/file.png</file>
Expand Down
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@
required_packages = find_packages()
required_packages.append('labelImg')

APP = ['labelImg.py']
OPTIONS = {
'argv_emulation': True,
'iconfile': 'icons/app.icns'
}

setup(
app=APP,
name='labelImg',
version=__version__,
description="LabelImg is a graphical image annotation tool and label object bounding boxes in images",
Expand Down Expand Up @@ -51,5 +58,7 @@
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
package_data={'data/predefined_classes.txt': ['data/predefined_classes.txt']}
package_data={'data/predefined_classes.txt': ['data/predefined_classes.txt']},
options={'py2app': OPTIONS},
setup_requires=['py2app']
)

0 comments on commit f48e13a

Please sign in to comment.