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.
VOC dataset example of instance segmentation.
Other examples (semantic segmentation, bbox detection, and classification).
Various primitives (polygon, rectangle, circle, line, and point).
Features
Image annotation for polygon, rectangle, circle, line and point. (
tutorial
)
Image flag annotation for classification and cleaning. (
#166
)
# python3
condacreate--name=labelmepython=3sourceactivatelabelme
# conda install -c conda-forge pyside2# conda install pyqt# pip install pyqt5 # pyqt5 can be installed via pip on python3
pipinstalllabelme
# or you can install everything by conda command# conda install labelme -c conda-forge
Ubuntu
sudoapt-getinstalllabelme
sudopip3installlabelme
# or install standalone executable from:# https://github.com/wkentaro/labelme/releases
macOS
brewinstallpyqt# maybe pyqt5
pipinstalllabelme
brewinstallwkentaro/labelme/labelme# command line interface# brew install --cask wkentaro/labelme/labelme # app# or install standalone executable/app from:# https://github.com/wkentaro/labelme/releases
condacreate--name=labelmepython=3
condaactivatelabelme
pipinstalllabelme
# or install standalone executable/app from:# https://github.com/wkentaro/labelme/releases
Usage
Run labelme --help for detail.
The annotations are saved as a JSON file.
labelme# just open gui# tutorial (single image example)cdexamples/tutorial
labelmeapc2016_obj3.jpg# specify image file
labelmeapc2016_obj3.jpg-Oapc2016_obj3.json# close window after the save
labelmeapc2016_obj3.jpg--nodata# not include image data but relative image path in JSON file
labelmeapc2016_obj3.jpg\--labelshighland_6539_self_stick_notes,mead_index_cards,kong_air_dog_squeakair_tennis_ball# specify label list# semantic segmentation examplecdexamples/semantic_segmentation
labelmedata_annotated/# Open directory to annotate all images in it
labelmedata_annotated/--labelslabels.txt# specify label list with a file
For more advanced usage, please refer to the examples:
--output specifies the location that annotations will be written to. If the location ends with .json, a single annotation will be written to this file. Only one image can be annotated if a location is specified with .json. If the location does not end with .json, the program will assume it is a directory. Annotations will be stored in this directory with a name that corresponds to the image that the annotation was made on.
The first time you run labelme, it will create a config file in ~/.labelmerc. You can edit this file and the changes will be applied the next time that you launch labelme. If you would prefer to use a config file from another location, you can specify this file with the --config flag.
Without the --nosortlabels flag, the program will list labels in alphabetical order. When the program is run with this flag, it will display labels in the order that they are provided.