BRIMA: low-overhead BRowser-only IMage Annotation tool (Preprint)

07/13/2021 ∙ by Tuomo Lahtinen, et al. ∙ Jyväskylän yliopisto 0

Image annotation and large annotated datasets are crucial parts within the Computer Vision and Artificial Intelligence fields.At the same time, it is well-known and acknowledged by the research community that the image annotation process is challenging, time-consuming and hard to scale. Therefore, the researchers and practitioners are always seeking ways to perform the annotations easier, faster, and at higher quality. Even though several widely used tools exist and the tools' landscape evolved considerably, most of the tools still require intricate technical setups and high levels of technical savviness from its operators and crowdsource contributors. In order to address such challenges, we develop and present BRIMA – a flexible and open-source browser extension that allows BRowser-only IMage Annotation at considerably lower overheads. Once added to the browser, it instantly allows the user to annotate images easily and efficiently directly from the browser without any installation or setup on the client-side. It also features cross-browser and cross-platform functionality thus presenting itself as a neat tool for researchers within the Computer Vision, Artificial Intelligence, and privacy-related fields.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Research efforts in the fields of Computer Vision, image processing, image annotation, and object detection/recognition often require large datasets of annotated images. In some cases, existing datasets are not suitable or not available, therefore the data must be created fast and from the scratch as part of the research. For image dataset creation purpose, multiple annotation tools have been developed and published during the last decade [ciocca2015iat, halaschek2005photostuff, bernal2019gtcreator, russell_labelme, wada_labelme, labelimg, korc2007annotation]. In order to create such an object detection model, it requires a large and high-quality dataset of annotated images. Therefore, there is stringent need for fast, easy and scalable image annotation tools with lowest overheads in terms of bootstrapping and usage.

This work presents the first browser-only image annotation tool which aids researchers to fast and easy create high-quality image-based datasets for their custom needs. Our browser extension offers a new way to annotate images, where annotation is done directly in the browser (within browser-viewport), does not require additional software setups, and the annotator is in full control which image to annotate (as it comes directly from the browser’s viewport), allowing what could be called annotate-while-freely-browsing experience. The support for standard/compatible data formats (e.g., MS COCO [lin2014microsoft]) makes our extension compatible with other annotation tools that are used in the computer vision modeling pipelines.

For the browser extension, we set forward a few requirements to ease our collaborative annotation team, in making image annotation with good quality and coverage. Firstly, the extension should be easy and straightforward to use. For example, the user does not need to learn how to use extension more than a few minutes and annotation should be a forward process where the UI of the extension makes user comfortable to perform the annotations at high pace and with high accuracy while offering a good User Experience (UX). Secondly, the extension should require minimal setup. For example, the most recent browsers are known for the ease of installing add-on software, i.e., browser extensions. It is as simple as clicking “Install Add-on” and not even requiring the browser’s restart, all that thanks to robust browser architectures and the great flexibility of high-level programming languages such as JavaScript.

Our main contributions with this work are as follow:

  • [leftmargin=*]

  • To the best of our knowledge, we develop the first browser-only browser-viewport image annotation toolset

  • We validate our tool’s effectiveness in a real-world crowdsourcing experiment

  • We release the code and artifacts under open-source license

2 Related work

PhotoStuff is an “annotation tool for digital images on the Semantic Web” allowing “to manually annotate images using Web ontologies” proposed by Halaschek et al. [halaschek2005photostuff]. Presumably, it could be run both as a stand-alone as well as a web-based application. Wilhelm et al. [wilhelm2004photo] presented photo annotation with the mobile phone. In their work, some annotation was created automatically and sent to a server for annotation enhancements. LabelMe by Russell et al. [russell_labelme] is an earlier web-based image annotation tool, that allowed pretty flexible annotation and functionality. Korc and Schneider [korc2007annotation] proposed MATLAB-based Annotation Tool – a stand-alone software employing parts of the LabelMe by Russell et al. [russell_labelme].

LabelImg [labelimg] is a tool that presents a fast way to perform rectangle annotation to images in PascalVOC [eve_voc] and YOLO [redmon_yolo3] formats, but it does not support MS COCO [lin2014microsoft] JSON format. Labelme by Wada [wada_labelme] can annotate images with polygon segments that can be subsequently used in object segmentation architectures. It also supports MS COCO [lin2014microsoft] JSON format, and includes Python scripts to embed the data as an MS COCO single annotation file format. Labelme by Wada [wada_labelme] has drawn inspiration from LabelMe by Russell [russell_labelme]. Ilastik is a stand-alone

“easy-to-use interactive tool that brings machine-learning-based (bio) image analysis to end users without substantial computational expertise”

developed and proposed by Sommer et al. [sommer2011ilastik] and Berg et al. [berg2019ilastik]. Ciocca et al. [ciocca2015iat] developed IAT as a stand-alone annotation tool. Qin et al. [qin2018bylabel] propose ByLabel as a new semi-automatic boundary-based image annotation tool, which is also presented as an improved alternative to LabelMe by Russell et al. [russell_labelme]. Bernal et al. [bernal2019gtcreator] presented GTCreator – a stand-alone “flexible annotation tool for providing image and text annotations to image-based datasets.” Finally, for more complete and comprehensive surveys of the major tools and techniques for image annotation, we refer interested readers to Hanbury [hanbury2008survey] and Dasiopoulou et al. [dasiopoulou2011survey].

Crowdsourcing is a fast and cost-effective way to make image annotation with a potentially large group of collaborators, i.e., annotators. Su et al. [su2012crowdsourcing] presented a system that collects bounding-box (i.e., bbox) annotations through crowdsourcing. Using crowdsourcing, however, creates a significant challenge on how to ensure that annotation quality and coverage is reasonably good [hanbury2008survey][welinder2010online]. At the same time, crowdsourcing efforts need to pay particular attention to the reliability and differences between annotators during crowdsourcing [nowak2010reliable, su2012crowdsourcing, welinder2010online].

3 Detailed overview of the toolset

The browser extension presented in this work offers a new way to annotate images, and the researchers can create their own dataset that includes images suitable for the exact need.

3.1 Features

We have been continuously designing, iterating, and improving the toolset’s functionality. At present, BRIMA offers the following attractive and unique combination of features:

  • [leftmargin=*]

  • Browser-only. It does not require any installation or setup on the client-side, except of several clicks (e.g., “Install Add-on”) when using most common and modern browsers.Our tool allows to capture and annotate whatever is currently displayed in the user browser. Unlike all current tools, this means there is no limitation what images are presented to the annotator. Therefore, it provides more diversity to the final dataset since the annotator can browse whatever URL or image s/he thinks is representative to the annotation task at hand, or according to the crowdsourcing instructions. In a nutshell, with our tool annotation is as simple as annotate-while-freely-browsing.

  • Web-oriented. Traditional image annotation tools require that the images are first scraped from the web. Then, most often, they also require images to be organized by folders and filenames. Such an approach increases the complexity, the risk of errors, and the time required to pre-organize the dataset for annotation. In our design, the annotation takes place within the extension and the browser. This means that there is no need to scrape and organize the images to local files and folder, as the web images are already rendered within the extension which at the same time is the actual annotation tool. This also means there is no need to develop and maintain additional code that scrapes the web.

  • URL-aware. Our tool by default can store, parse, and otherwise process URLs for various additional data, thanks to being run within the browser. For example, for Google Street View [anguelov2010google] it can parse almost exact location of the annotated object including additional parameters such as zoom and orientation of the Google Street View lens that captured the given view. However, it can be configured and used on virtually any set of websites, according to the needs of the crowdsourcing effort. Also, parsing routines can be added and customized separately on the basis of the domain/subdomain names, as well as prefixes and regular expressions matching certain URL patterns. This also means that there is always a possibility to trace-back where each training/validation/testing image or annotation was taken from. Hence, this allows to further improve the annotation and data quality-check processes.

  • Minimal client-side. Our browser extension does not require complex setup and installation on the client-side. Everything can be done in browsers setup where the user just needs to configure/activate the extension. This makes large-scale crowdsourcing a breeze.

  • Minimal server-side. It also requires minimal server-side setup and configuration. We tested and release minimal setups supporting PHP and Python API backends.

  • Supports extensive combinations of “OS + browser”. The browser extension can be used in most common browsers and it has been tested with multiple different combinations of OS and browsers (see Section 3.4).

  • Support for standard/compatible data formats. It supports natively MS COCO [lin2014microsoft] annotation JSON file formats, thus enabling immediate training of object detectors using a variety of CV/ML framework and backend combinations.

  • Out-of-the-box usage. Our toolset can be used immediately and out-of-the-box by taking advantage of the provisioned client-side templates README documentation, and one-line scripts for server-side supporting HTTP/HTTPS with minimal software dependencies.

  • Easy to configure. Both the client-side browser extension and the server-side are easy to configure for various real-world scenarios. Most common browsers have a few click solution for activating browser extension and the server-side can be immediately started using a configurable command-line script.

  • Easy to use. User interface is simple, and annotation is done with the mouse, with optional support for configurable keyboard shortcut keys. Color-coding helps to identify which object type/category the user is currently annotating (color-coding was noted by Gong et al. [gong1994image] as an important feature for annotation).

  • Configurable keyboard shortcuts. Multiple keyboard shortcuts are defined, and can be customized. For example, a single key-press to select annotated object type or another key-press to accept all annotated object(s) and to send the full JSON data to the server backend.

  • No pre-built dataset required. This is a consequence of the web-oriented design of our toolset, i.e., there is no need for pre-annotation web-scraping phase.

3.2 Technical details

Our entire toolset is composed of client-side (i.e., the browser extension), and the server-side which receives and stores the annotated data. The browser extension is written in pure JavaScript, and it is helping the researchers and crowdsource contributors for fast and easy data annotation. For server-side, we provide basic reference implementations in PHP and Python (using Flask and Swagger/OpenAPI). However, nothing limits our toolset’s users to rewrite the server-side in a different language and serve it from a different web-server setup. The browser extension and the server communicate with each other via HTTP/XHR and RESTful API requests.

The exact annotation polygon data is based on the input from the user (typically using precise mouse clicks), and other parts of annotation data are automatically generated or enhanced by the browser extension. All the annotation data is sent to the server-side using a JSON format structure which at its core is compatible with the MS COCO and can be immediately used for CV/ML training under various object detection frameworks (e.g., TensorFlow 

[abadi_tensor]) and backends (e.g., CenterMask2 [cm_git], Detectron2 [d2]).

3.3 Toolset’s workflow

Our browser extension is easy to use. After an initial client-/server-side configuration, its usage follows a simple pattern:

  1. [leftmargin=*]

  2. The user seeks an image from web resources such as photo stock websites (e.g., Flickr) or street view imagery (e.g., Google StreetView) corresponding to dataset collection needs. The key and novel idea is that annotator’s browser viewport directly becomes the “image to be annotated”.

  3. The user uses few keyboard/mouse actions to activate the image into our browser extension, and after that the selected viewport image is ready for annotation.

  4. The user draws the annotation polygon around the object(s) of interest, and confirm object annotation.

  5. The user, once all objects of interest are annotated, confirms the annotation is ready, and with a single click sends the data to the data collection server.

  6. The server receives the data in MS COCO compatible format, processes it, and is ready to create a complete dataset snapshot ready for CV/ML training.

Figures 12 present our tool in real-life action. In particular, Figure 1 presents our extension used for privacy, anti-surveillance and safety applications. In that particular setup we configured it to aid the collection of an annotated CCTV cameras dataset. We use such a dataset to build a state-of-the-art object detector for CCTV camera objects in real-life and in street-level imagery [turtiainen2020towards]. For the case of CCTV camera dataset collection, we easily configured the extension to allow the collection of additional data that is both specific and relevant for CCTV camera object. For example, Figure 1 shows that the annotator can optionally fill the camera’s exact model and camera’s owner/operator. Alternatively, Figure 2 presents our extension used for other privacy and generic Computer Vision applications. For example, in “other privacy” applications it can be used to collect annotated datasets related to blurred/unblurred persons, faces, and license plate numbers. Also, it can be used for general-purpose CV applications such as collecting accurate annotation of traffic signs and street infrastructure that can be subsequently used by self-driving cars and their autopilots.

Figure 1: Browser window when extension is in annotation mode, and the user annotated two CCTV cameras.
Figure 2: Browser extension can be used to annotate virtually any object of interest such as faces, humans, traffic signs.

3.4 Toolset’s validation

We validate the effectiveness, efficiency, and usability of BRIMA toolset by actively employing it during a crowdsource effort aimed to create a large dataset used to train the first-ever state-of-the-art object detector for CCTV objects [turtiainen2020towards]. Its purpose is to detect CCTV cameras in various images (e.g., street view) for privacy, anonymity, anti-surveillance, safety applications [lahtinen2021towards]. Such applications are important due to risks associated with lax cybersecurity of CCTV systems [costin2016security], and their “privacy invasion” misuse once hacked.

We recruited eight (8) image annotators which are mainly non-experts in crowdsourcing and image annotation. The entire crowdsourcing effort took place in September 2020 and overall, it took an equivalent of at least one and a half person-month effort. Due to the ease of use and setup, and its web-oriented and browser-only design (see Section 3.1), during the 72 hours experiment window the annotators were able to submit quality-checked images for a total of annotated instances of CCTV cameras ( directed and round). Dataset results obtained using BRIMA are comparable with the state-of-the-art datasets of annotated images such as MS COCO where is the median size of a training dataset for the particular object types such as cars, airplanes, stop signs. Thanks to the extension, the work and the crowdsourcing described in this paper, we were able to achieve state-of-the-art results in our wider efforts related to the CCTV camera object detector [turtiainen2020towards].

Table 1 presents overall summary of the clean and quality-checked dataset at the end of the crowdsource experiment. In Table 2 we present some detailed statistics for each crowdsourcing annotator and shortly explain each metric below:

  • [leftmargin=*]

  • Approved Images. Number of images that successfully passed Quality Check (QC), both in terms of image and annotation.

  • DQ. DisQualification rate representing the percentage of images that were disqualified as a result of a failed QC. Hence the original number of submitted images per annotator is usually higher than the approved images.

  • Annotation expertise. Self-reporting scale was set from 0 (novice) to 5 (expert).

  • Easy setup and use. Self-reporting scale was set from 0 (extremely hard) to 5 (extremely easy).

  • Overall experience. Self-reporting scale was set from 0 (extremely bad) to 5 (extremely good).

  • OS and browser. The browser extension performed without any issues in a sufficiently diverse set of user environments (5 major OS releases and 3 major browser variants).

Total counts Instances grouped by sub-type
Total collected images
4167
Directed camera instances
3325
Total annotated camera instances
5380
Round camera instances
2055
Images grouped by source Instances grouped by area
Google (Street View, Image Search)
3873
Small (<32x32 px)
1455
Baidu street view
269
Medium (32x32 – 96x96 px)
3345
Flickr
25
Large (>96x96 px)
580
Table 1: Crowdsourced dataset statistics.
Annotator
Approved
Images
DQ %
OS and browser
(default 64-bit)
Annotation
expertise
(0 – 5)
Easy setup
and use
(0 – 5)
Overall
experience
(0 – 5)
Person1 JU 418 1.7 %
MacOS (10.15.6)
FFox (80.0.1)
0 3.5 2
Person2 PK 525 0.2 %
Debian (9.13)
Chromium (73.0.3683.75-dev)
0 5 4
Person3 SK 542 14.4 %
Win10
FFox (81.0.1)
3 5 4
Person4 AA 228 15.4 % no response no response no response no response
Person5 AT 632 3.0 %
Win10 (1809)
FFox (78.3.0esr)
1 3 4
Person6 TL 750 0.7 %
Win10
FFox (80.0.1)
2 5 4
Person7 LS 977 5.4 %
Ubuntu (18.04.5 LTS)
Chrome (85.0.4183.121)
1 5 5
Person8 AC 95 0.0 %
Ubuntu (16.04 LTS)
FFox (68.7.0esr) 32-bit
4 5 5
avg.
sum
520.87
4167
4.75 %
1.57
4.5
4
Table 2: Crowdsourcing statistics for each annotator.

4 Conclusion

We presented BRIMA – the first browser-only annotation toolset that allows easy and fast image annotation within browser-viewport while incurring a low overhead overall. We also validated the effectiveness, efficiency, and usability of our extension/toolset by actively employing it during a successful crowdsource effort. This underpins the fast-to-bootstrap and easy-to-maintain characteristics of our toolset and the extension, therefore allowing the researchers to actually focus on the core of their experiments (e.g., training and experimenting state-of-the-art object detectors for various applications). We believe our toolset is a valuable contribution to the communities of researchers and practitioners, therefore the relevant artefacts (code, documentation, samples) will be made available open-source at: https://github.com/tutalaht/brima

Acknowledgment

Authors would like to acknowledge grants of computer capacity from the Finnish Grid and Cloud Infrastructure (FGCI) (persistent identifier urn:nbn:fi:research-infras-2016072533).

Part of this research was kindly supported by the “Decision of the Research Dean on research funding within the Faculty (17.06.2020)” grant from the Faculty of Information Technology of University of Jyväskylä (the grant was facilitated and managed by Dr. Andrei Costin).

Hannu Turtiainen would like to also thank:

  • The Finnish Cultural Foundation / Suomen Kulttuurirahasto (https://skr.fi/en) for supporting his Ph.D. dissertation work and research (grant decision 00211119).

  • The Faculty of Information Technology of University of Jyvaskyla (JYU), in particular Prof. Timo Hämäläinen, for partly supporting his Ph.D. supervission at JYU in 2021.

References