CRAN_Status_Badge R-CMD-check

Image annotation using free drawing.

annotator provides functions to create image annotations through polygon outlining. Annotator has the same function as graphics::locator() but achieves its purpose through drawing, rather than multiple mouse clicks.

annotator is based on fabric.js, a Javascript HTML5 canvas library and htmlwidgets, a package that provides a framework for creating R bindings to JavaScript libraries.

The main function of the package is annotate(path_to_image). Polygons can be outlined on the image and polygon’s coordinates are returned after each draw.

annotate widget

annotator makes it easy to create annotation pipelines in shiny. A minimal Shiny app demonstrating a simple pipeline can be found on

annotate widget


Stable version from CRAN:


Developement version from GITHUB: