README.md

labelMe

 

Gabriela Morgenshtern,Department of Cells and System Biology, University of Toronto, Canada. <g.morgenshtern@mail.utoronto.ca>
  1. About this package:     1.1. Overview     1.2. Installation
  2. Notes     2.1 To test functionality     2.2 To use during workshop
  3. Acknowledgements

1 About this package:

1.1 Overview

labelMe is a package allowing clinicians and developers with test image data that requires manual labeling (ex. ultrasounds) to easily spin up a local web application to do so, ensuring data privacy while enabling the interactive convenience of the browser as a platform for this task. This is particularly useful to those who work with image-recognition algorithms.

 

1.2 Installation

Organize your imaging files in a single directory, or group them into several easily-accessible directories. Then, install the package, use its functions to set your desired labels, and run your webapp locally!

require("devtools")
devtools::install_github("gabmorg/labelme-goldenberg")
library("labelMe")

2 Notes

2.1 To test functionality

  1. Save the following images to your local machine:

  2. Call labelMe::serveMe(list("test label1", "test label2")) to launch the test app (replacing the strings with whatever labels you'd like to apply to the images)

2.2 To use during workshop

  1. Note where images for labeling are located on your local machine

  2. Call labelMe::startLabelingGoldenberg() in an R session to launch the app (within RStudio or Terminal)

  3. Upload the files to the Shiny app using the file browser on the right-hand panel; this will change the label of the radio button groups to the name of the uploaded files

  4. Please note that multiple file upload is not currently supported by the RStudio Viewer, and the app must be opened in browser to function.
  5. Use CTRL + A to select all the images in a directory for batch upload

  6. Select one option in each column of the radio buttons, according to the image presented on the screen

  7. Your selected choices are textually summarized below the radio group

  8. Press the <- and -> buttons on your keyboard to navigate between images

  9. Click the "Download DATE-labels.csv" button to download the CSV to your local machine.

  10. If using a lab computer, please create a folder in your Desktop using your first name, and save CSVs in there

  11. Click "flush data" to remove labeled images from the (local) server

  12. Repeat steps 3-7 as needed until all images are labeled

 

3 Contributions

The author of this package is Gabriela Morgenshtern. The functions available within this package include:

library("labelMe")
lsf.str("package:labelMe")

The above functions, and the helper functions involved in running it were authored by Gabriela Morgenshtern, using the Shiny R package, and with help structuring the app from the Shiny tutorial found on steps 1-6 here: (https://shiny.rstudio.com/tutorial/)

Thanks to Dr. Boris Steipe for providing the skeleton setup for this package through his own template (https://github.com/hyginn/rpt). Code for testing Shiny app was borrowed from a Shinytest tutorial by Ferand Dalatieh; specific examples of his contribution are denoted in the code. Starter code for the logic pertaining to pagination of images and radio buttons was found from Stéphane Laurent (https://stackoverflow.com/questions/57891201/render-images-for-interactive-display-from-folder-loaded-with-shinydirchoose)

The rest of the contributions are made by Gabriela.

 



gabmorg/labelme-goldenberg documentation built on Nov. 14, 2019, 2:52 p.m.