Package: xllabelme
labelmeImage Polygonal Annotation with PythonInstallation|Usage|Tutorial|Examples|Youtube FAQDescriptionLabelme is a graphical image annotation tool inspired byhttp://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).FeaturesImage annotation for polygon, rectangle, circle, line and point. (tutorial)Image flag annotation for classification and cleaning. (#166)Video annotation. (video annotation)GUI customization (predefined labels / flags, auto-saving, label validation, etc). (#144)Exporting VOC-format dataset for semantic/instance segmentation. (semantic segmentation,instance segmentation)Exporting COCO-format dataset for instance segmentation. (instance segmentation)RequirementsUbuntu / macOS / WindowsPython3PyQt5 / PySide2InstallationThere are options:Platform agnostic installation:Anaconda,DockerPlatform specific installation:Ubuntu,macOS,WindowsPre-build binaries fromthe release sectionAnacondaYou need installAnaconda, then run below:# python3condacreate--name=labelmepython=3sourceactivatelabelme# conda install -c conda-forge pyside2# conda install pyqt# pip install pyqt5  # pyqt5 can be installed via pip on python3pipinstalllabelme# or you can install everything by conda command# conda install labelme -c conda-forgeDockerYou need installdocker, then run below:# on macOSsocatTCP-LISTEN:6000,reuseaddr,forkUNIX-CLIENT:\"$DISPLAY\"&dockerrun-it-v/tmp/.X11-unix:/tmp/.X11-unix-eDISPLAY=docker.for.mac.host.internal:0-v$(pwd):/root/workdirwkentaro/labelme# on Linuxxhost+
dockerrun-it-v/tmp/.X11-unix:/tmp/.X11-unix-eDISPLAY=:0-v$(pwd):/root/workdirwkentaro/labelmeUbuntusudoapt-getinstalllabelme# orsudopip3installlabelme# or install standalone executable from:# https://github.com/wkentaro/labelme/releasesmacOSbrewinstallpyqt# maybe pyqt5pipinstalllabelme# orbrewinstallwkentaro/labelme/labelme# command line interface# brew install --cask wkentaro/labelme/labelme  # app# or install standalone executable/app from:# https://github.com/wkentaro/labelme/releasesWindowsInstallAnaconda, then in an Anaconda Prompt run:condacreate--name=labelmepython=3condaactivatelabelme
pipinstalllabelme# or install standalone executable/app from:# https://github.com/wkentaro/labelme/releasesUsageRunlabelme --helpfor detail.The annotations are saved as aJSONfile.labelme# just open gui# tutorial (single image example)cdexamples/tutorial
labelmeapc2016_obj3.jpg# specify image filelabelmeapc2016_obj3.jpg-Oapc2016_obj3.json# close window after the savelabelmeapc2016_obj3.jpg--nodata# not include image data but relative image path in JSON filelabelmeapc2016_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 itlabelmedata_annotated/--labelslabels.txt# specify label list with a fileFor more advanced usage, please refer to the examples:Tutorial (Single Image Example)Semantic Segmentation ExampleInstance Segmentation ExampleVideo Annotation ExampleCommand Line Arguments--outputspecifies 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--configflag.Without the--nosortlabelsflag, 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.Flags are assigned to an entire image.ExampleLabels are assigned to a single polygon.ExampleFAQHow to convert JSON file to numpy array?Seeexamples/tutorial.How to load label PNG file?Seeexamples/tutorial.How to get annotations for semantic segmentation?Seeexamples/semantic_segmentation.How to get annotations for instance segmentation?Seeexamples/instance_segmentation.Developinggitclonehttps://github.com/wkentaro/labelme.gitcdlabelme# Install anaconda3 and labelmecurl-Lhttps://github.com/wkentaro/dotfiles/raw/main/local/bin/install_anaconda3.sh|bash-s.source.anaconda3/bin/activate
pipinstall-e.How to build standalone executableBelow shows how to build the standalone executable on macOS, Linux and Windows.# Setup condacondacreate--namelabelmepython=3.9
condaactivatelabelme# Build the standalone executablepipinstall.
pipinstallpyinstaller
pyinstallerlabelme.spec
dist/labelme--versionHow to contributeMake sure below test passes on your environment.See.github/workflows/ci.ymlfor more detail.pipinstall-rrequirements-dev.txt

flake8.
black--line-length79--checklabelme/MPLBACKEND='agg'pytest-vsxtests/AcknowledgementThis repo is the fork ofmpitid/pylabelme.