ALL Metrics
-
Views
-
Downloads
Get PDF
Get XML
Cite
Export
Track
Software Tool Article

ROOSTER: An image labeler and classifier through interactive recurrent annotation

[version 1; peer review: 1 approved with reservations]
PUBLISHED 06 Feb 2023
Author details Author details
OPEN PEER REVIEW
REVIEWER STATUS

This article is included in the Plant Science gateway.

This article is included in the Artificial Intelligence and Machine Learning gateway.

This article is included in the Python collection.

Abstract

A large amount of training data is usually lacking at the beginning of system development and labeling such a large number of RGB (red, green, blue) images is laborious. Interactive recurrent annotation is beneficial to incrementally gain training images in the stream of the system development and provides an opportunity to reduce human workload. We developed a software package, ROOSTER, to integrate both labeling and prediction in a single user-friendly graphic user interface with interactive deep learning to reduce the laborious human labeling for fast development of machine vision systems. Predictions can be performed under both single-image mode and batch mode for multiple images. The prediction results can be used as the initial image labeling and manually adjusted under a single image mode. Human labeling and machine predictions are visualized on the same image. ROOSTER provides fully automatic labeling for abundantly available initial images of wheat stripe rust to gain essential predictability. The navigation of integrating prediction with labeling benefits human adjustment to iteratively improve predictability. The development of a detection system for wheat stripe rust was presented as a use case to demonstrate the efficiency of using interactive deep learning to develop machine vision systems.

Keywords

Machine vision, deep learning, labeling, classification, software

Introduction

Image recognition is a critical part of machine vision. It identifies objects in images, such as specific types of tumor cells or leaves infected by a specific pathogen. Due to the complexity of solving such problems, deep learning (DL) is leveraged to achieve the required results. The challenge of DL is the requirement of a large number of training images before the learning task.1 Because training data is not always available at the beginning, and the new data arrives in the format of sequential stream.2 Furthermore, labeling a large number of images is labor-intensive.3 To reduce the time consumption of laborious human labeling, it is ideal to incrementally label images to train a DL system and let the system label new images.4,5 After human corrections, the new labels can enhance the system further until the required results are achieved.6,7 We developed an open-source Python package named ROOSTER, to fit such a need. ROOSTER not only has a friendly graphic user interface to label images or their sub-images but also accepts any pre-trained models in the format of PyTorch for classification. We demonstrated the usage of ROOSTER in developing a machine vision system to detect wheat stripe rust using images from smartphones and drones.

Methods

Implementation

The interface of ROOSTER contains a control panel on the bottom and a display panel on the top. An image is imported by clicking the Image button. The number of rows and columns can define tiles. The grids can be hidden or displayed by clicking the Grid button. The image and grids can be zoomed in (+), zoomed out (-), or moved by clicking and dragging. When numbers of rows and columns are defined, the statuses of tiles are set to control by default, indicated by white lines on the top left corners. With a double-click on a tile, its status can be switched between the default status and the alternative status indicated by red lines in the top left corner (see Figure 1). The statuses of all tiles can be reversed by clicking the Reverse button.

10b1e3d6-c196-49f0-be9b-aba80757536a_figure1.gif

Figure 1. ROOSTER graphic user interface and its automatic and semi-automatic image labeling through classification.

The case image was for wheat stripe rust which can be found in Underlying data.11

ROOSTER can load ResNet-18 based neural networks model to make predictions. Prediction is applied to all tiles by loading a pre-trained model or a model trained with part of user-owned images. For example, RustNet is a ResNet-18 based neural network that can be used for wheat stripe rust detection.8 It was pre-trained with wheat stripe rust images from different situations, which can be loaded into ROOSTER to make predictions. Visualization of prediction on a tile is based on its current status. The disagreement between the prediction and the current status is indicated by a dot on the top left of the tile. The dot is in red if the current status is in the default status and white otherwise (Figure 1). ROOSTER outputs include a PNG file for an overview of labeling, images of cropped tiles, and an Excel file (Map) to indicate the statuses of individual tiles. The output Map file can also be used as the input to define the status of an image. This function allows users to save label results and resume labeling later.

ROOSTER can process images in two modes: batch mode and single image mode. When the batch mode is checked, clicking Image button defines the image folder. Otherwise, the Image button clicking chooses a single image. Under single image mode, an option is available to use the Map button to apply a pre-classification result (an Excel form) to the current image, including the numbers of rows and columns and statuses of all tiles. If no excel file is attached, users need to define the total number of tiles by specifying the number of rows and columns and click the Grid button to draw the grids. Users can switch the status between the default and the alternative for each tile. Prediction can be performed for either multiple images with the batch mode or the single image by clicking the Predict button. In either case, a window will pop out for users to attach a classification model, e.g., RustNet.pth. The labels can be saved by clicking the Export button. The exported result can be imported through the Map button to continue the customization of labels.

Operation

ROOSTER is developed with Python 3.6 for 64-bit processors on Mac OS, Linux, and Windows with a minimal 16 GB memory (the code is available in Software availability12). When numbers of rows and columns are defined, ROOSTER can load ResNet-18-based models to predict tiles before human labeling is involved. Human laborers can correct labels by double-clicking the tile. The disagreement between the prediction model and human labeling would be shown with a two-color dot in the top left corner. With ROOSTER, users can start with labeling part of images and train the initial version of the prediction model. The initial version of the model can be reloaded to predict the rest of images in the ROOSTER and retrain the model with the updated dataset, which could increase the labeling efficiency and gradually improve the model accuracy.

Use case

We used ROOSTER to automatically label 200 images of plants containing no infection as the default status and 200 images of plants with all leaves infected as the alternative status (Stage 1 in Figure 2). These images are available in Underlying data.11 We used them for this initial training stage of RustNet, which was modified with a pre-trained ResNet-18.9 The testing on a published independent set of images (5,818 diseased tiles and 14,542 non-diseased tiles) that were previously labeled manually (see Underlying data10) suggested the two types of abundantly available images are beneficial to establishing essential predictability. The area under the receiver operating characteristic curve of true positive rate against false discovery rate is 0.23 compared to 0 for the random guess. Similarly, the area under the receiver operating characteristic curve of true positive rate against false positive rate is 0.64 compared to 0.5 for the random guess.

10b1e3d6-c196-49f0-be9b-aba80757536a_figure2.gif

Figure 2. Development and performances of ROOSTER to detect wheat stripe rust using automatic and semi-automatic image-labeling.

A large number of images11 that were automatically labeled in control status (uninfected in a) and case status (all leaves infected by wheat stripe rust in b) were used to initialize the RestNet18 (Stage 1). Images with all leaves infected were initially labeled with case status at Stage 2 and predicted by the model trained from Stage 1 (c) to navigate humans to correct labels (d). Images with plants partially infected were initially labeled as control status (e) and predicted by the model from Stage 2 to navigate humans to correct labels (f). The performances at different stages were examined by 20,360 published tile images labeled manually (5,818 diseased and 14,542 non-diseased) in an independent study (see Underlying data10). Two receiver operating characteristic (ROC) curves with false discovery rate (g) and false positive rate (h) were used to compare performances. Random guess has AUC (area under curve) of 0 for ROC of false discovery rate (g) and 0.5 for ROC of false positive rate (the diagonal dash line in h). See Underlying data11 for the raw data associated with the use case.

The labels of the images with all leaves infected in Stage 1 contained errors as some tiles do not contain leaves. We made the prediction on 20 new images8 with all leaves infected, and manually corrected the prediction errors. The manual corrections with prediction navigation are much easier than labeling the raw images. The training (Stage 2) with the 20 new images dramatically boosted prediction accuracy (0.54 and 0.78 compared to 0.23 and 0.64 at Stage 1 for ROC of false discovery rate and false positive rate, respectively). Similarly, we made the prediction on 61 images with partial leaves infected, manually corrected the prediction errors, and added to the training data in Stage 2 to form Stage 3 training. The prediction accuracy was further improved (0.66 and 0.87 compared to 0.54 and 0.78 at Stage 2 for ROC of false discovery rate and false positive rate, respectively).

Conclusions

ROOSTER combines functions including automatic labeling, label prediction, and manual labeling in a user-friendly GUI (graphical user interface) to label and classifies images using any outsourced models in the format of PyTorch. The navigation of integrating prediction with labeling benefits human adjustment to iteratively improve predictability to use interactive deep learning to develop machine vision systems.

Comments on this article Comments (0)

Version 1
VERSION 1 PUBLISHED 06 Feb 2023
Comment
Author details Author details
Competing interests
Grant information
Copyright
Download
 
Export To
metrics
Views Downloads
F1000Research - -
PubMed Central
Data from PMC are received and updated monthly.
- -
Citations
CITE
how to cite this article
Tang Z, Hu Y and Zhang Z. ROOSTER: An image labeler and classifier through interactive recurrent annotation [version 1; peer review: 1 approved with reservations]. F1000Research 2023, 12:137 (https://doi.org/10.12688/f1000research.127953.1)
NOTE: If applicable, it is important to ensure the information in square brackets after the title is included in all citations of this article.
track
receive updates on this article
Track an article to receive email alerts on any updates to this article.

Open Peer Review

Current Reviewer Status: ?
Key to Reviewer Statuses VIEW
ApprovedThe paper is scientifically sound in its current form and only minor, if any, improvements are suggested
Approved with reservations A number of small changes, sometimes more significant revisions are required to address specific details and improve the papers academic merit.
Not approvedFundamental flaws in the paper seriously undermine the findings and conclusions
Version 1
VERSION 1
PUBLISHED 06 Feb 2023
Views
8
Cite
Reviewer Report 16 May 2023
Michael Schirrmann, Leibniz Institute for Agricultural Engineering and Bioeconomy (ATB), Potsdam, Germany 
Approved with Reservations
VIEWS 8
Summary:
The authors introduce "Rooster," a software designed to assist in human data labeling for training deep learning image classification models. Rooster features an intuitive graphical user interface (GUI) that includes a selection tool. This tool utilizes a grid ... Continue reading
CITE
CITE
HOW TO CITE THIS REPORT
Schirrmann M. Reviewer Report For: ROOSTER: An image labeler and classifier through interactive recurrent annotation [version 1; peer review: 1 approved with reservations]. F1000Research 2023, 12:137 (https://doi.org/10.5256/f1000research.140499.r171116)
NOTE: it is important to ensure the information in square brackets after the title is included in all citations of this article.

Comments on this article Comments (0)

Version 1
VERSION 1 PUBLISHED 06 Feb 2023
Comment
Alongside their report, reviewers assign a status to the article:
Approved - the paper is scientifically sound in its current form and only minor, if any, improvements are suggested
Approved with reservations - A number of small changes, sometimes more significant revisions are required to address specific details and improve the papers academic merit.
Not approved - fundamental flaws in the paper seriously undermine the findings and conclusions
Sign In
If you've forgotten your password, please enter your email address below and we'll send you instructions on how to reset your password.

The email address should be the one you originally registered with F1000.

Email address not valid, please try again

You registered with F1000 via Google, so we cannot reset your password.

To sign in, please click here.

If you still need help with your Google account password, please click here.

You registered with F1000 via Facebook, so we cannot reset your password.

To sign in, please click here.

If you still need help with your Facebook account password, please click here.

Code not correct, please try again
Email us for further assistance.
Server error, please try again.