A simple graphical user interface (GUI) for bitmap image annotation in Python 3.9+ using Tkinter.
The annotation tool can be installed from GitHub:
$ pip install git+https://github.com/RTLucassen/annotation_tool
A minimal example of how the annotation tool can be used.
from annotation_tool import AnnotationTool
# define the image paths and layer names / classes
paths = ['image1.png', 'image2.png']
layer_names = ['foreground', 'background']
# start annotating
AnnotationTool(image_paths=paths, layer_names=layer_names)
The table below lists the buttons of the annotation tool with the corresponding symbol, keyboard shortcut, and explanation of the action.
The table below lists the actions with the corresponding controls that the user can perform, depending on the mode that is active.
- Adjusting the brush/eraser size using
<b>
+Scroll up/down
or moving the cursor while<b>
is pressed occasionally results in thin, black, horizontal or vertical lines coming off of the circular size indicator. This is only a visual bug that does not affect the behaviour of the annotation tool. The lines automatically disappear after panning the image or drawing/erasing near the lines. - At the moment, the tool becomes slower after annotating for a while. This is most noticable when panning the image. For now, restarting the tool resolves the problem.
- On Linux, tkinter is often by default not installed with Python. To install
tkinter with Python on Debian-derived distributions like Ubuntu, use
apt-get install python3-tk
. Moreover, because tkinter is incompatable with the external fonts on Linux, one of the system fonts is used. - The tool has only been tested on Windows and Linux machines.
- The tool was designed for and has only been tested on screens in landscape orientation.