README.md 1.8 KB
Newer Older
K
Kentaro Wada 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
labelme: Image Annotation Tool with Python
==========================================

Labelme is a graphical image annotation tool inspired by <http://labelme.csail.mit.edu>.

It is written in Python and uses Qt for its graphical interface.


Dependencies
------------

- [PyQt4](http://www.riverbankcomputing.co.uk/software/pyqt/intro)


Installation
------------

On Ubuntu:

```bash
K
Kentaro Wada 已提交
21
$ sudo apt-get install python-qt4 pyqt4-dev-tools
K
Kentaro Wada 已提交
22 23 24 25 26 27 28 29 30 31 32 33

$ sudo pip install labelme
```

On OS X:

```bash
$ brew install qt qt4

$ pip install labelme
```

K
Kentaro Wada 已提交
34 35 36 37 38 39 40 41
On macOS Sierra:

```bash
$ brew install pyqt5

$ pip install git+https://github.com/wkentaro/labelme.git@pyqt5
```

K
Kentaro Wada 已提交
42 43 44 45

Usage
-----

K
Kentaro Wada 已提交
46 47
**Annotation**

K
Kentaro Wada 已提交
48 49
Run `labelme --help` for detail.

K
Kentaro Wada 已提交
50 51
```bash
$ labelme  # Open GUI
K
Kentaro Wada 已提交
52 53
$ labelme _static/IMG_6319.jpg  # Specify file
$ labelme _static/IMG_6319.jpg -O _static/IMG_6319.json  # Close window after the save
K
Kentaro Wada 已提交
54 55 56 57 58
```

The annotations are saved as a [JSON](http://www.json.org/) file. The
file includes the image itself.

K
Kentaro Wada 已提交
59 60
**Visualization**

K
Kentaro Wada 已提交
61 62 63
To view the json file quickly, you can use utility script:

```bash
K
Kentaro Wada 已提交
64 65 66 67 68 69 70 71 72 73
$ labelme_draw_json _static/IMG_6319.json
```

**Convert to Dataset**

To convert the json to set of image and label, you can run following:


```bash
$ labelme_json_to_dataset _static/IMG_6319.json
K
Kentaro Wada 已提交
74 75 76 77 78 79
```


Sample
------

K
Kentaro Wada 已提交
80 81 82 83
- [Original Image](https://github.com/wkentaro/labelme/blob/master/_static/IMG_6319.jpg)
- [Screenshot](https://github.com/wkentaro/labelme/blob/master/_static/IMG_6319_screenshot.png)
- [Generated Json File](https://github.com/wkentaro/labelme/blob/master/_static/IMG_6319.json)
- [Visualized Json File](https://github.com/wkentaro/labelme/blob/master/_static/IMG_6319_draw_json.png)
K
Kentaro Wada 已提交
84 85 86 87 88


Screencast
----------

K
Kentaro Wada 已提交
89
<img src="https://github.com/wkentaro/labelme/raw/master/_static/screencast.gif" width="70%"/>